noderaider / redux-idle-monitor

A Redux component to schedule events at stages of user idleness across multiple browser tabs.
https://noderaider.github.io/redux-idle-monitor/
MIT License
105 stars 9 forks source link

redux-blueprints and redux-mux have Chai as a dependency #20

Closed Discordius closed 6 years ago

Discordius commented 6 years ago

It seems that both redux-blueprints and redux-mux have chai as a dependency. Here is the dependency graph npm printed out for me when I installed the package.

└─┬ redux-idle-monitor@0.7.0
  ├─┬ localsync@1.4.0
  │ ├─┬ cookiesync@1.4.0
  │ │ └── react-cookie@1.0.4
  │ ├── serversync@1.4.0
  │ ├─┬ socketsync@1.4.0
  │ │ ├── local-storage@1.4.2
  │ │ └── react-cookie@1.0.4
  │ ├─┬ storagesync@1.4.0
  │ │ └── local-storage@1.4.2  deduped
  │ └── webrtcsync@1.4.0
  ├─┬ redux-actions@0.9.1
  │ ├─┬ flux-standard-action@0.6.1
  │ │ └─┬ lodash.isplainobject@3.2.0
  │ │   ├── lodash._basefor@3.0.3
  │ │   ├── lodash.isarguments@3.1.0
  │ │   └─┬ lodash.keysin@3.0.8
  │ │     ├── lodash.isarguments@3.1.0  deduped
  │ │     └── lodash.isarray@3.0.4
  │ └── reduce-reducers@0.1.2
  ├─┬ redux-blueprint@0.2.23
  │ ├─┬ chai@3.5.0
  │ │ ├── assertion-error@1.0.2
  │ │ ├─┬ deep-eql@0.1.3
  │ │ │ └── type-detect@0.1.1
  │ │ └── type-detect@1.0.0
  │ └── redux-actions@0.9.1  deduped
  ├─┬ redux-middleware@0.1.21
  │ ├── chai@3.5.0  deduped
  │ ├── redux-actions@0.9.1  deduped
  │ └── redux-blueprint@0.2.23  deduped
  └─┬ redux-mux@0.1.15
    └── chai@3.5.0  deduped

Chai is a pretty big package, and this seems to unnecessarily bloat the size of this package. Not sure what one can do about it.

cchamberlain commented 6 years ago

Thanks for opening. Going to reduce all dependencies to make this as slim as possible for the 1.0 release. This wasn't big on my radar for the early releases but has been the number one request I've seen.

cchamberlain commented 6 years ago

@Discordius just finished upgrading the localsync prong of this to TypeScript, reduced production dependencies to the minimum, and rolled cookiesync, serversync, and storagesync up into the main localsync package.

Deleted webrtcsync and socketsync altogether.

Its passing all unit tests (now on Jest) and published under beta tag. PR here - https://github.com/noderaider/localsync/pull/4

cchamberlain commented 6 years ago

@Discordius finished massive baseline TypeScript source upgrade to the following projects last night:

I've cut as many dependencies as possible and now they all use invariant instead of chai for assertions. I also found a couple of issues and fixed them.

Would love to get some feedback, I published everything under the next tag so you can install via:

yarn add redux-idle-monitor@next
# OR
npm install redux-idle-monitor@next
Discordius commented 6 years ago

Nice! I am currently traveling until the 25th, but will let you know how the upgrade goes as soon as I am back. On Fri, Nov 17, 2017 at 11:26 AM Cole Chamberlain notifications@github.com wrote:

@Discordius https://github.com/discordius finished massive baseline TypeScript source upgrade to the following projects last night:

  • redux-idle-monitor
  • localsync
  • redux-blueprint
  • redux-mux

I've cut as many dependencies as possible and now they all use invariant instead of chai for assertions. I also found a couple of issues and fixed them.

Would love to get some feedback, I published everything under the next tag so you can install via:

yarn add redux-idle-monitor@next# OR npm install redux-idle-monitor@next

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/noderaider/redux-idle-monitor/issues/20#issuecomment-345342179, or mute the thread https://github.com/notifications/unsubscribe-auth/AIq25Y7J7I7QxAqKDI49gWthbggClD9Zks5s3d32gaJpZM4QPNow .

damiangreen commented 6 years ago

has this broken anything?

I appear to be getting

PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR SyntaxError: Unexpected token 'const' at http://localhost:9877webpack:///~/redux-blueprint/lib/index.js:3:0 <- tests/test-bundler.js:134482

Which appears to be referenced as an issue in the other repo. I tried to add the child dependencies to their earlier versions but am still not succeeding.

"redux-mux": "0.1.15", "redux-blueprint": "0.2.23",

cchamberlain commented 6 years ago

@damiangreen I think the issue should be fixed now. Can you attempt running one of the following:

yarn add redux-idle-monitor@next

OR

npm install -S redux-idle-monitor@next
damiangreen commented 6 years ago

Just tried that and now i get

PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR Error: Cannot find module "tslib" at http://localhost:9877webpack:///~/redux-mux/lib/index.js:3:0 <- tests/test-bundler.js:137258

I also tried deleting the whole node_modules folder and reinstalling npm packages but get same error. Note I get this error when running my tests (npm run test:dev) and whne runing the app npm run start . maybe tslib needs adding to the package.json?

cchamberlain commented 6 years ago

@damiangreen should be fixed now, I've published new versions of all the libraries, please reinstall redux-idle-monitor@next.

I incorrectly had tslib in devDependencies and it takes the place of babel-polyfill in the TypeScript version. Should fix https://github.com/noderaider/redux-blueprint/issues/2#issuecomment-345969897 as well.

damiangreen commented 6 years ago

looks like it's fixed ;)

cchamberlain commented 6 years ago

@damiangreen thanks for all your testing / feedback, its been crucial given I don't have a proper integration test right now - on roadmap for v2 to have one. Now that these are all on TypeScript with minimal build complexity, I'm confident I can add some of the requested features and get v2 out without breaking things.

The upgrade was mostly lift an shift but I did catch what I believe to be a bug in the idle monitoring. If you notice any changes, good or bad, I'd appreciate the feedback.

damiangreen commented 6 years ago

hiya, the upgrade has caused it to stop working in IE11. I've raised a separate ticket for this