-
Notifications
You must be signed in to change notification settings - Fork 33
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
chore: move project to ESM #2840
Conversation
♻️ PR Preview 35828c1 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
♻️ PR Preview 35828c1 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
f6a2354
to
dd08183
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
LGTM
Instruct Node.js to consider .js file as ESM module.
The
package.json
file has its type set to "module" and it declares "exports". This can be useful when testing code using bpmn-visualization in a Node.js environment (for instance, bv-experimental-add-ons).It's also marked as having no side effects ("sideEffects": false) to enable tools like webpack to better manage tree shaking.
Migrate configuration files to ESM. When possible, add typings to ease configuration change in IDE.
Notes
This has been detected as mandatory to run Jest tests in a ESM context. See process-analytics/bpmn-visualization-addons#95 and process-analytics/bpmn-visualization-addons#96 for more details.
Resources
Side effects free:
Configuration of the tools
Resources about exports in package.json
See also process-analytics/bpmn-visualization-addons#99