Skip to content

Commit ee10190

Browse files
committed
chore: bump to Node 20.11.0+
BREAKING CHANGE: Requires Node 20.11.0+ Also: - chore: upgrade `are-docs-informative` - refactor: use `import.meta.dirname`
1 parent 99cb131 commit ee10190

File tree

10 files changed

+76
-68
lines changed

10 files changed

+76
-68
lines changed

.babelrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@babel/preset-env",
99
{
1010
"targets": {
11-
"node": 16
11+
"node": 20
1212
}
1313
}
1414
]

.github/workflows/feature.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: setup node.js
1414
uses: actions/setup-node@v4
1515
with:
16-
node-version: '20'
16+
node-version: '20.11.0'
1717
- run: pnpm install
1818
- run: pnpm build
1919
- run: pnpm lint
@@ -40,8 +40,7 @@ jobs:
4040
fail-fast: false
4141
matrix:
4242
node_js_version:
43-
- '18'
44-
- '20'
43+
- '20.11.0'
4544
- '22'
4645
build:
4746
runs-on: ubuntu-latest
@@ -57,7 +56,7 @@ jobs:
5756
- name: setup node.js
5857
uses: actions/setup-node@v4
5958
with:
60-
node-version: '20'
59+
node-version: '20.11.0'
6160
- run: pnpm install
6261
- run: pnpm build
6362
timeout-minutes: 10

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: setup node.js
1515
uses: actions/setup-node@v4
1616
with:
17-
node-version: "20"
17+
node-version: "22"
1818
- run: pnpm install
1919
- run: pnpm build
2020
- run: npx semantic-release

.ncurc.cjs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,5 @@ module.exports = {
44
reject: [
55
// Todo: When our package converted to ESM only
66
'escape-string-regexp',
7-
8-
// todo[engine:node@>=20]: Can reenable
9-
'are-docs-informative',
10-
// todo[engine:node@>=20]: Can reenable
11-
'glob',
12-
// todo[engine:node@>=20]: Can reenable
13-
'rimraf',
147
],
158
};

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"dependencies": {
88
"@es-joy/jsdoccomment": "~0.50.2",
9-
"are-docs-informative": "^0.0.2",
9+
"are-docs-informative": "^0.1.1",
1010
"comment-parser": "1.4.1",
1111
"debug": "^4.4.1",
1212
"escape-string-regexp": "^4.0.0",
@@ -55,7 +55,7 @@
5555
"eslint": "9.28.0",
5656
"eslint-config-canonical": "~44.9.5",
5757
"gitdown": "^4.1.1",
58-
"glob": "^10.4.2",
58+
"glob": "^11.0.2",
5959
"globals": "^16.2.0",
6060
"husky": "^9.1.7",
6161
"jsdoc-type-pratt-parser": "^4.1.0",
@@ -65,13 +65,13 @@
6565
"mocha": "^11.5.0",
6666
"open-editor": "^5.1.0",
6767
"replace": "^1.2.2",
68-
"rimraf": "^5.0.7",
68+
"rimraf": "^6.0.1",
6969
"semantic-release": "^24.2.5",
7070
"typescript": "5.8.3",
7171
"typescript-eslint": "^8.33.0"
7272
},
7373
"engines": {
74-
"node": ">=18"
74+
"node": ">=20.11.0"
7575
},
7676
"keywords": [
7777
"eslint",

pnpm-lock.yaml

Lines changed: 60 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bin/generateDocs.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@ import {
77
/**
88
* This script is used to inline assertions into the README.md documents.
99
*/
10-
import path, {
11-
dirname as getDirname,
12-
} from 'path';
13-
import {
14-
fileURLToPath,
15-
} from 'url';
10+
import path from 'path';
1611

17-
const dirname = getDirname(fileURLToPath(import.meta.url));
12+
const dirname = import.meta.dirname;
1813

1914
/**
2015
* @param {string} code

src/bin/generateRule.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,8 @@ import fs from 'fs/promises';
1313
*/
1414
import open from 'open-editor';
1515
import {
16-
dirname as getDirname,
1716
resolve,
1817
} from 'path';
19-
// Todo: Add back `@example` when reject other langs from processing
20-
import {
21-
fileURLToPath,
22-
} from 'url';
23-
24-
const dirname = getDirname(fileURLToPath(import.meta.url));
2518

2619
// Todo: Would ideally have prompts, e.g., to ask for whether
2720
// type was problem/layout, etc.
@@ -284,7 +277,7 @@ export default iterateJsdoc(({
284277
*/
285278

286279
// Set chdir as somehow still in operation from other test
287-
process.chdir(resolve(dirname, '../../'));
280+
process.chdir(resolve(import.meta.dirname, '../../'));
288281
await open([
289282
// Could even add editor line column numbers like `${rulePath}:1:1`
290283
ruleReadmePath,

src/getJsdocProcessorPlugin.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,14 @@ import {
1313
readFileSync,
1414
} from 'node:fs';
1515
import {
16-
dirname as getDirname,
1716
join,
1817
} from 'node:path';
19-
import {
20-
fileURLToPath,
21-
} from 'node:url';
22-
23-
const dirname = getDirname(fileURLToPath(import.meta.url));
2418

2519
const {
2620
version,
2721
} = JSON.parse(
2822
// @ts-expect-error `Buffer` is ok for `JSON.parse`
29-
readFileSync(join(dirname, '../package.json')),
23+
readFileSync(join(import.meta.dirname, '../package.json')),
3024
);
3125

3226
// const zeroBasedLineIndexAdjust = -1;

0 commit comments

Comments
 (0)