Repository navigation
Switch to ESM #273
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
Switch to ESM #273
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ jobs: | |
| strategy: | ||
| matrix: | ||
| node-version: | ||
| - "18" | ||
| - "22" | ||
| - "latest" | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,8 +17,8 @@ | |
| "Douglas Christopher Wilson <doug@somethingdoug.com>" | ||
| ], | ||
| "sideEffects": false, | ||
| "main": "dist/index.js", | ||
| "types": "dist/index.d.ts", | ||
| "type": "module", | ||
| "exports": "./dist/index.js", | ||
| "files": [ | ||
| "dist/" | ||
| ], | ||
|
|
@@ -42,7 +42,7 @@ | |
| "vitest": "^3.2.4" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" | ||
| "node": ">=22" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does 22.0.0 already support
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes: https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require But switching to ESM isn't dependent on node 22, we could support a lower version since ESM has been supported longer. But if the concern is availability in Express 6, it will be usable 👍
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could even go for node 24 tbh, let me check with the TC. Worst case it can be bumped lower in the future, but we can't bump it higher without a major.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I mean, I assume Express will use versions that support |
||
| }, | ||
| "size-limit": [ | ||
| { | ||
|
|
||
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.
TypeScript automatically reads this and emits ESM (based on
module: nodenext).