Skip to content

chore: bump to Node 20.11.0+ #1375

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 .babelrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@babel/preset-env",
{
"targets": {
"node": 16
"node": 20
}
}
]
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '20.11.0'
- run: pnpm install
- run: pnpm build
- run: pnpm lint
Expand All @@ -40,8 +40,7 @@ jobs:
fail-fast: false
matrix:
node_js_version:
- '18'
- '20'
- '20.11.0'
- '22'
build:
runs-on: ubuntu-latest
Expand All @@ -57,7 +56,7 @@ jobs:
- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '20.11.0'
- run: pnpm install
- run: pnpm build
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
- run: pnpm install
- run: pnpm build
- run: npx semantic-release
Expand Down
7 changes: 0 additions & 7 deletions .ncurc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@

module.exports = {
reject: [
// Todo: When our package converted to ESM only

Check warning on line 5 in .ncurc.cjs

View workflow job for this annotation

GitHub Actions / Lint

Unexpected 'todo' comment: 'Todo: When our package converted to ESM...'
'escape-string-regexp',

// todo[engine:node@>=20]: Can reenable
'are-docs-informative',
// todo[engine:node@>=20]: Can reenable
'glob',
// todo[engine:node@>=20]: Can reenable
'rimraf',
],
};
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@es-joy/jsdoccomment": "~0.50.2",
"are-docs-informative": "^0.0.2",
"are-docs-informative": "^0.1.0",
"comment-parser": "1.4.1",
"debug": "^4.4.1",
"escape-string-regexp": "^4.0.0",
Expand Down Expand Up @@ -55,7 +55,7 @@
"eslint": "9.28.0",
"eslint-config-canonical": "~44.9.5",
"gitdown": "^4.1.1",
"glob": "^10.4.2",
"glob": "^11.0.2",
"globals": "^16.2.0",
"husky": "^9.1.7",
"jsdoc-type-pratt-parser": "^4.1.0",
Expand All @@ -65,13 +65,13 @@
"mocha": "^11.5.0",
"open-editor": "^5.1.0",
"replace": "^1.2.2",
"rimraf": "^5.0.7",
"rimraf": "^6.0.1",
"semantic-release": "^24.2.5",
"typescript": "5.8.3",
"typescript-eslint": "^8.33.0"
},
"engines": {
"node": ">=18"
"node": ">=20.11.0"
},
"keywords": [
"eslint",
Expand Down
82 changes: 60 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions src/bin/generateDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ import {
/**
* This script is used to inline assertions into the README.md documents.
*/
import path, {
dirname as getDirname,
} from 'path';
import {
fileURLToPath,
} from 'url';
import path from 'path';

const dirname = getDirname(fileURLToPath(import.meta.url));
const dirname = import.meta.dirname;

/**
* @param {string} code
Expand Down
9 changes: 1 addition & 8 deletions src/bin/generateRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,10 @@
*/
import open from 'open-editor';
import {
dirname as getDirname,
resolve,
} from 'path';
// Todo: Add back `@example` when reject other langs from processing
import {
fileURLToPath,
} from 'url';

const dirname = getDirname(fileURLToPath(import.meta.url));

// Todo: Would ideally have prompts, e.g., to ask for whether

Check warning on line 19 in src/bin/generateRule.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected 'todo' comment: 'Todo: Would ideally have prompts, e.g.,...'
// type was problem/layout, etc.

const [
Expand Down Expand Up @@ -284,7 +277,7 @@
*/

// Set chdir as somehow still in operation from other test
process.chdir(resolve(dirname, '../../'));
process.chdir(resolve(import.meta.dirname, '../../'));
await open([
// Could even add editor line column numbers like `${rulePath}:1:1`
ruleReadmePath,
Expand Down
8 changes: 1 addition & 7 deletions src/getJsdocProcessorPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,14 @@
readFileSync,
} from 'node:fs';
import {
dirname as getDirname,
join,
} from 'node:path';
import {
fileURLToPath,
} from 'node:url';

const dirname = getDirname(fileURLToPath(import.meta.url));

const {
version,
} = JSON.parse(
// @ts-expect-error `Buffer` is ok for `JSON.parse`
readFileSync(join(dirname, '../package.json')),
readFileSync(join(import.meta.dirname, '../package.json')),
);

// const zeroBasedLineIndexAdjust = -1;
Expand Down Expand Up @@ -528,7 +522,7 @@
ruleId,
severity,

// Todo: Make fixable

Check warning on line 525 in src/getJsdocProcessorPlugin.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected 'todo' comment: 'Todo: Make fixable'
// fix
// fix: {range: [number, number], text: string}
// suggestions: {desc: , messageId:, fix: }[],
Expand Down
Loading
Loading