-
Notifications
You must be signed in to change notification settings - Fork 61
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
ECMAScript support #212
base: master
Are you sure you want to change the base?
ECMAScript support #212
Conversation
Also remove unofficial fields that mark a package as 'ES' and bump build related tooling dependencies to ensure compatibility with the new standard. Since the package scope is now set to module change config files to use ESM or run with CommonJS using the `cjs` extension. Closes zspecza#201
Also ensures that exactly the dependencies listed in the lock are used.
Prevents file listing from jumping in editors.
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es --ignore **/*.test.js", | ||
"build:unpkg": "cross-env BABEL_ENV=es rollup --config", | ||
"codecov": "codecov", | ||
"doctoc": "doctoc readme.md --title \"## Table of Contents\"", | ||
"lint": "eslint .*rc.js *.js src/**/*.js --ignore-pattern '!.*rc.js'", | ||
"lint": "eslint src/**/*.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't quite figure out how to include linting the CommonJS root files without ESLint throwing an error, hope this is okay.
Codecov Report
@@ Coverage Diff @@
## master #212 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 30 30
Lines 121 121
Branches 31 31
=========================================
Hits 121 121
Continue to review full report at Codecov.
|
A file extension must be provided as per the specification: https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_mandatory_file_extensions
Today I noticed that directory imports (e.g. |
@fatfisz friendly ping! I've been running into problems with npm 7 and using git tarballs as a workaround for using this patch instead of the published npm package. Let me know if I can help with anything. |
👋 @fatfisz hope you can find some time to review this PR soonish 🤞 |
@Siilwyn repo is clearly dead. Should we simply fork the repo and re-publish on npm, with all of this merged? |
Hey thanks for the idea @damianobarbati, I did email a bit with the author and he did have intentions to merge this but was very busy. |
Okay it's happening! I've created https://github.com/Siilwyn/common-tagged and intend to publish it coming week. But just before that I'd like to see if there are other alternatives perhaps, @damianobarbati do you still use this package? |
Each commit has a body with some more more information about the changes. Commit (a68b0f3) drops support for Node.js 10 making it a breaking change which might be possible to include in v2? It does decrease the package size since no CommonJS build output is packed anymore. Feel free to rebase or cherry pick some of the changes!