nathanmarks / jss-theme-reactor

NOT MAINTAINED Powerful theming layer for use with the jss CSS in JS library
MIT License
64 stars 6 forks source link

jss update to 7.1.3 needed - bug in flow shadow files #43

Open rosskevin opened 7 years ago

rosskevin commented 7 years ago

Flow errors present in the current jss flow shadow files, please update to 7.1.3 and release.

https://github.com/cssinjs/jss/issues/507

rob2d commented 7 years ago

Just put a PR in. In the meantime you can feel free to reference that fork which should fix things.

rob2d commented 7 years ago

It seems updating the JSS dependency breaks something in flow according to CircleCI :/

npm run flow

> jss-theme-reactor-build@0.11.2 flow /home/ubuntu/jss-theme-reactor
> flow --show-all-errors

Launching Flow server for /home/ubuntu/jss-theme-reactor
Spawned flow server (pid=13754)
Logs will go to /tmp/flow/zShomezSubuntuzSjss-theme-reactor.log
node_modules/jss/lib/RulesContainer.js.flow:139
139:       const cssRule = cssRules[i]
                           ^^^^^^^^^^^ access of computed property/element. Indexable signature not found in
139:       const cssRule = cssRules[i]
                           ^^^^^^^^ CSSRuleList

node_modules/jss/lib/backends/DomRenderer.js.flow:51
 51: function getSelector(rule: CSSOMRule): string {
                                ^^^^^^^^^ identifier `CSSOMRule`. Could not resolve name

node_modules/promise/index.js.flow:3
  3: declare class ThenPromise<+R> extends Promise<R> {
                                ^ R. This type is incompatible with
 14:   catch<U>(
       ^ some incompatible instantiation of `U`

node_modules/promise/index.js.flow:14
 14:   catch<U>(
       ^ some incompatible instantiation of `U`. This type is incompatible with
597:       onReject?: (error: any) => ?Promise<U> | U
                                       ^^^^^^^^^^ null. See lib: /tmp/flow/flowlib_3e2c41ac/core.js:597

node_modules/promise/index.js.flow:14
 14:   catch<U>(
       ^ some incompatible instantiation of `U`. This type is incompatible with
597:       onReject?: (error: any) => ?Promise<U> | U
                                       ^^^^^^^^^^ undefined. See lib: /tmp/flow/flowlib_3e2c41ac/core.js:597

Found 5 errors

npm ERR! Linux 3.13.0-119-generic
npm ERR! argv "/opt/circleci/nodejs/v6.9.5/bin/node" "/opt/circleci/nodejs/v6.9.5/bin/npm" "run" "flow"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! jss-theme-reactor-build@0.11.2 flow: `flow --show-all-errors`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the jss-theme-reactor-build@0.11.2 flow script 'flow --show-all-errors'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the jss-theme-reactor-build package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     flow --show-all-errors
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs jss-theme-reactor-build
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls jss-theme-reactor-build
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/jss-theme-reactor/npm-debug.log

npm run flow returned exit code 1
rosskevin commented 7 years ago

@rob2d I'm not sure that the latest jss is compatible with this master. We had a short discussion an the material-ui gitter, waiting for @nathanmarks to get settled and weigh-in.

RikardGehlin commented 6 years ago

hopefully will be fixed with #46