Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
node-version:
- "18"
- "22"
- "latest"
steps:
- uses: actions/checkout@v5
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"Douglas Christopher Wilson <doug@somethingdoug.com>"
],
"sideEffects": false,
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",

Copy link
Copy Markdown
Member Author

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).

"exports": "./dist/index.js",
"files": [
"dist/"
],
Expand All @@ -42,7 +42,7 @@
"vitest": "^3.2.4"
},
"engines": {
"node": ">=18"
"node": ">=22"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 22.0.0 already support require(esm)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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 👍

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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.

@bjohansebas bjohansebas Jun 24, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I mean, I assume Express will use versions that support require(esm). In any case, support for these packages shouldn't be too tightly coupled to Express. If they want to support older Node.js versions, that should be fine as long as it doesn't become a blocker for Node.js going forward. For example, cookie doesn't really have anything that would block Node.js—it’s a lightweight package and isn't particularly dependent on Node.js itself or on a specific runtime.

},
"size-limit": [
{
Expand Down
Loading