Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.0.0 #43

Merged
merged 23 commits into from Feb 6, 2019
Merged

7.0.0 #43

merged 23 commits into from Feb 6, 2019

Conversation

jlmakes
Copy link
Owner

@jlmakes jlmakes commented Jan 12, 2019

The next major release of karma-rollup-preprocessor in response to Rollup 1.0 πŸŽ‰

Pre-release

Added

  • Support for Rollup 1.0.0 #42

Changed

  • Breaking: Dropped support for Rollup < 1.0.0
  • Breaking: Dropped support for Node < 8.0.0
  • Watcher no longer relies on Karma’s run_start event. #41
  • Upgraded dependencies.

Fixed

  • Watcher only rebundles changed files and their dependents. #28
  • Bundle cache now properly maps each entry to its bundle cache.

Hey all! πŸ‘‹πŸ½

@isidrok @tatey @niksy @thisconnect @calebdwilliams @abaksha-sc @Paulskit @LvChengbin
@ckbo3hrk @pantosha @MartijnR @fengyuanchen @givanse @wifilinker @danielnaab

You all have participated in issues addressed in this release β€” if you don't mind, please help test by installing the pre-release (under the next tag):

npm install karma-rollup-preprocessor@next

Happy new year! πŸŽ‰
Library source updated for Rollup v1.0.0 API (Closes #42)
It seems as though the file watcher is being excesively
reinitialized, whereby only certain files end up being watched.

The Chokidar watcher may yet be the best solution, but for now it
will be removed while the core preprocessor is refactored.
Each entrypoint has its own bundle, so the previous implementation
seemed to be ineffectual. Oops! :)
Partial reimplementation of #39
Begin reimplementation of the custom file watcher.
So it turns out the basePath and log were not necessary, because
Karma already outputs when files change... got love removing code!

What's more, this implementation appears to fix #28 and fix #41
due to its use of Karma's internal `FileList.changeFile` method
(exposed on the Server "EventEmitter").

This still needs more thorough testing, but I'm optimistic.
@abaksha-sc
Copy link

Sorry, can't test it, because we use rollup 0.67.4 😒
​​​​​Could you release minor update for version 6.1 to fix issue #41?

@calebdwilliams
Copy link

@jlmakes I can confirm this works for my build. Thanks for all the hard work!

@fengyuanchen
Copy link

fengyuanchen commented Jan 16, 2019

@jlmakes Got the following error with rollup@1.1.0:

ERROR [preprocessor.rollup]: Failed to process ./test\index.js
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string or Uint8Array without null bytes. Received '\u0000commonjsHelpers'
    at Object.stat (fs.js:818:3)
    at FSWatcher.NodeFsHandler._addToNodeFs (~\node_modules\chokidar\lib\nodefs-handler.js:454:20)
    at FSWatcher.<anonymous> (~\node_modules\chokidar\index.js:648:12)
    at ~\node_modules\async-each\index.js:16:7
    at Array.forEach (<anonymous>)
    at each (~\node_modules\async-each\index.js:15:11)
    at FSWatcher.add (~\node_modules\chokidar\index.js:647:5)
    at Watcher.add (~\node_modules\karma-rollup-preprocessor\lib\Watcher.js:16:16)
    at preprocess (~\node_modules\karma-rollup-preprocessor\lib\index.js:24:15)

@jlmakes
Copy link
Owner Author

jlmakes commented Jan 16, 2019

@fengyuanchen: Oooh, I forgot about null bytes! (re: #30)

@abaksha-sc: That seems like a reasonable request, although one thing that comes to mind is that the listening event was added in Karma 2 (breaking the watcher for anyone using Karma 1); karma was never an explicit peer dependency, but I'm still wondering if that would constitute a major release anyway.

Out of curiosity, why isn't your team upgrading to ^rollup@1 ?

@niksy
Copy link

niksy commented Jan 16, 2019

@jlmakes works for my build!

@abaksha-sc
Copy link

Out of curiosity, why isn't your team upgrading to ^rollup@1 ?

Yes, we decided to try to upgrade ^rollup@1, but I just wanted to have "backup plan" if we will get some problems with upgrading. I thought that fix will be very simple (just replace event name), because I didn't know, that listening event was added in Karma 2 only. I hope rollup upgrading will be succedeed and minor release won't need.

@tatey
Copy link

tatey commented Jan 17, 2019

@jlmakes Thanks for the update. I've tried this in my project and it's working great πŸ‘

@fengyuanchen
Copy link

@jlmakes Works fine in my project now with karma-rollup-preprocessor@7.0.0-rc.2.

@LvChengbin
Copy link

It works for my build. @jlmakes Thank you for your project.

@givanse
Copy link

givanse commented Jan 18, 2019

Works in my build, thanks:) 7.0.0-rc.2

    "rollup": "^1.1.0",
    "rollup-plugin-commonjs": "^9.2.0",
    "rollup-plugin-multi-entry": "^2.1.0",
    "rollup-plugin-node-resolve": "^4.0.0",
    "rollup-plugin-typescript": "^1.0.0",

@alexanderwende
Copy link

alexanderwende commented Jan 23, 2019

Thanks for your work, can confirm that 7.0.0-rc.2 works with

"karma": "^3.1.4",
"rollup": "^1.1.2",

@yohangz yohangz mentioned this pull request Jan 23, 2019
@isidrok
Copy link

isidrok commented Jan 30, 2019

Works nice, thanks!

@jlmakes
Copy link
Owner Author

jlmakes commented Feb 7, 2019

Thanks for the feedback everyone! 7.0.0 is live! πŸŽ‰

Repository owner locked as resolved and limited conversation to collaborators Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants