-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Turn into real ES Node module #49
Conversation
Two issues:
If this can be a true ESM, then it should ONLY be ESM following fregante/meta#1 |
I double-checked. 2 out of 3 dependencies are not true ESM so I can’t convert this one either. The only way to convert would be to change the dependencies or vendor them (😬). Following fregante/meta#1 also basically means that almost no changes in this PR are applicable. |
Well I’m a bit silly. Rollup solves exactly that problem. So this PR only needs to drop the CJS bundle and just make it ESM by default |
Can you also un-vendor this dependency? https://github.com/fregante/webext-options-sync/blob/master/vendor/lz-string.js |
Base: 39kBnpm notice === Tarball Contents ===
npm notice 1.1kB license
npm notice 39.6kB index.js
npm notice 1.6kB package.json
npm notice 9.1kB readme.md
npm notice 3.2kB index.d.ts
npm notice === Tarball Details ===
npm notice package size: 14.1 kB
npm notice unpacked size: 54.5 kB + vendored
|
You can test it in your PR with: npm install webext-options-sync@next |
Note: WOS is already an ES Module, just not a Node ES Module. This PR is missing |
fregante/webext-options-sync-per-domain#1 also seems to be imported/tested correctly in RG under Node 14 |
Well, everything seems to work! Including #52 The tests still aren't compatible with Node 14, but that can be separate. Related: vadimdemedes/dom-chef#68 (but this package won't have the same problem) webext-options-sync-per-domain would also need the same thing due to its |
This will be released as a breaking release. If anyone can show just cause why this module cannot lawfully be published as |
I blame Node ESM again! |
Closes #48
Shamelessly copied code over from https://github.com/fregante/github-url-detection because the state of ES module is a friggin mess right now.
Haven't tested this yet though, but it should work fine.
Sample
npm pack
: