-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Package/ESM compatibility linter (completed 💚) #116
Comments
Thanks for requesting! I've started development on a module to do this. https://github.com/Richienb/esm-lint |
@Richienb sounds great! Keep in mind that most build tools (and node) depend on the package.json, so In my example, I made sure to use:
|
I successfully used my workflow in 2 packages: fregante/webext-options-sync#49 It's not always easy to apply it, but if you want to use it in your projects:
|
✅With ghat this is now easy as pie, without giving up GitHub Actions’ UI. Install the workflow with: npx ghat fregante/ghatemplates/esm-lint --exclude jobs.TypeScript Notice the optional More info: |
Someone is working on an actual tool 🙂 https://twitter.com/_developit/status/1443988884782784514?s=20 |
There are a few projects now: |
It's easy to publish a package, but does it work? Is it compatible? I'm looking for a tool that verifies:
With Node's ESM resolution introducing new constraints for ESM modules (
type: 'module'
), a lot of existing modules probably can't beimport
ed successfully by it.Edit: a GHA workflow would be useful, but currently you'd have to copy-paste the whole thing between repos.
Example config: https://github.com/fregante/webext-options-sync/blob/master/.github/workflows/esm-lint.yml
Example run: https://github.com/fregante/webext-options-sync/runs/388845886
I think it can be repackaged as module with https://github.com/SamVerschueren/listr so that failures can be caught and ignored
The text was updated successfully, but these errors were encountered: