Skip to content

Commit

Permalink
Extensionless support in 18.19
Browse files Browse the repository at this point in the history
  • Loading branch information
bengl committed Dec 1, 2023
1 parent 4ca3824 commit 9b6d22d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,25 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.10.0, 16.16.0, 16.17.0, 16.x, 17.x, 18.5.0, 18.x, 20.9.0, 20.x, 21.x]
os: [ubuntu-latest, macos-latest, windows-latest]
node-version:
- 12.x
- 14.x
- 16.10.0
- 16.16.0
- 16.17.0
- 16.x
- 17.x
- 18.5.0
- 18.18.0
- 18.19.0
- 18.x
- 20.9.0
- 20.x
- 21.x
os:
- ubuntu-latest
- macos-latest
- windows-latest

steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions test/other/import-executable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import { rejects } from 'assert'
(async () => {
const [processMajor, processMinor] = process.versions.node.split('.').map(Number)
const extensionlessSupported = processMajor >= 21 ||
(processMajor === 20 && processMinor >= 10)
(processMajor === 20 && processMinor >= 10) ||
(processMajor === 18 && processMinor >= 19)
if (extensionlessSupported) {
// Files without extension are supported in Node.js >= 20.10.0
// Files without extension are supported in Node.js ^21, ^20.10.0, and ^18.19.0
return
}
await rejects(() => import('./executable'), {
Expand Down

0 comments on commit 9b6d22d

Please sign in to comment.