Skip to content

Commit 4393bb2

Browse files
authored
Merge pull request #445 from mainmatter/drop-old-node
Drop support for Node < 22
2 parents e93f879 + 6d8853e commit 4393bb2

9 files changed

Lines changed: 4304 additions & 5176 deletions

File tree

.eslintrc.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ module.exports = {
55
parserOptions: {
66
ecmaVersion: '2019',
77
},
8-
plugins: ['eslint-plugin', 'filenames', 'import', 'jest', 'node', 'prettier'],
8+
plugins: ['eslint-plugin', 'filenames', 'import', 'node', 'prettier'],
99
extends: [
1010
'eslint:recommended',
1111
'plugin:eslint-comments/recommended',
1212
'plugin:eslint-plugin/all',
13-
'plugin:jest/recommended',
14-
'plugin:jest/style',
1513
'plugin:import/errors',
1614
'plugin:import/warnings',
1715
'plugin:node/recommended',
@@ -26,8 +24,15 @@ module.exports = {
2624
overrides: [
2725
{
2826
// Test files:
29-
files: ['tests/**/*.js'],
30-
env: { jest: true },
27+
files: ['**/*.test.js'],
28+
parserOptions: {
29+
ecmaVersion: '2019',
30+
sourceType: 'module',
31+
},
32+
rules: {
33+
'node/no-unsupported-features/es-syntax': 'off',
34+
'import/named': 'off',
35+
},
3136
},
3237
],
3338
};

.github/workflows/ci.yml

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,51 @@ on:
44
push:
55
branches:
66
- main
7-
- "v*"
8-
pull_request:
7+
- master
8+
pull_request: {}
99

10-
env:
11-
FORCE_COLOR: 1
12-
PNPM_VERSION: 6.15.0
10+
concurrency:
11+
group: ci-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
1313

1414
jobs:
1515
lint:
1616
name: Linting
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 5
1819

1920
steps:
20-
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
21-
22-
- uses: pnpm/action-setup@v2.4.1
23-
with:
24-
version: ${{ env.PNPM_VERSION }}
25-
26-
- uses: actions/setup-node@v3
21+
- uses: actions/checkout@v7
22+
- uses: pnpm/action-setup@v6
23+
- uses: actions/setup-node@v6
2724
with:
28-
node-version: 14.x
25+
node-version: 22.x
2926
cache: 'pnpm'
30-
3127
- run: pnpm install
3228
- run: pnpm lint
3329

3430
test-node:
31+
timeout-minutes: 5
3532
strategy:
33+
fail-fast: false
3634
matrix:
37-
node-version: [12.x, 14.x, 16.x]
35+
node-version: [22.x, 24.x, 26.x]
3836

3937
name: Tests (Node.js ${{ matrix.node-version }})
4038
runs-on: ubuntu-latest
4139

4240
steps:
43-
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
44-
45-
- uses: pnpm/action-setup@v2.4.1
46-
with:
47-
version: ${{ env.PNPM_VERSION }}
48-
49-
- uses: actions/setup-node@v3
41+
- uses: actions/checkout@v7
42+
- uses: pnpm/action-setup@v6
43+
- uses: actions/setup-node@v6
5044
with:
5145
node-version: ${{ matrix.node-version }}
5246
cache: 'pnpm'
53-
5447
- run: pnpm install
5548
- run: pnpm test -- --coverage
5649

5750
test-eslint:
51+
timeout-minutes: 5
5852
strategy:
5953
matrix:
6054
eslint-version: [7.0.0]
@@ -63,19 +57,12 @@ jobs:
6357
runs-on: ubuntu-latest
6458

6559
steps:
66-
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
67-
68-
- uses: pnpm/action-setup@v2.4.1
60+
- uses: actions/checkout@v7
61+
- uses: pnpm/action-setup@v6
62+
- uses: actions/setup-node@v6
6963
with:
70-
version: ${{ env.PNPM_VERSION }}
71-
72-
- uses: actions/setup-node@v3
73-
with:
74-
node-version: 14.x
75-
# cache disabled because the extra `pnpm add` might conflict with the
76-
# `test-node` job cache, and there is currently no way to influence
77-
# the cache key
78-
# cache: 'pnpm'
64+
node-version: 22.x
65+
cache: 'pnpm'
7966

8067
- run: pnpm install
8168
- run: pnpm add --save-dev eslint@${{ matrix.eslint-version }}

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
15-
- uses: actions/setup-node@v3
14+
- uses: actions/checkout@v7
15+
- uses: actions/setup-node@v6
1616
with:
17-
node-version: 12.x
17+
node-version: 22.x
1818
registry-url: 'https://registry.npmjs.org'
1919

2020
- run: npm publish

configs.test.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
import { describe, it, expect } from 'vitest';
2+
3+
import { configs } from './index.js';
4+
15
describe('configs', () => {
26
it('recommended is stable', () => {
37
// if you change the list of recommended rules, make sure to release this
48
// as a breaking change!!
59

6-
expect(require('./index').configs.recommended).toMatchInlineSnapshot(`
7-
Object {
8-
"plugins": Array [
9-
"qunit-dom",
10-
],
11-
"rules": Object {
12-
"qunit-dom/no-checked-selector": "error",
13-
"qunit-dom/no-ok-find": "error",
14-
"qunit-dom/require-assertion": "error",
15-
},
16-
}
17-
`);
10+
expect(configs.recommended).toMatchInlineSnapshot(`
11+
{
12+
"plugins": [
13+
"qunit-dom",
14+
],
15+
"rules": {
16+
"qunit-dom/no-checked-selector": "error",
17+
"qunit-dom/no-ok-find": "error",
18+
"qunit-dom/require-assertion": "error",
19+
},
20+
}
21+
`);
1822
});
1923
});

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"main": "index.js",
66
"repository": "https://github.com/Mainmatter/eslint-plugin-qunit-dom/",
77
"scripts": {
8-
"lint": "npm-run-all \"lint:*\"",
8+
"lint": "pnpm run \"/^lint:.*/\"",
99
"lint:js": "eslint .",
1010
"lint:readme": "eslint-doc-generator --check",
1111
"release": "release-it",
12-
"test": "jest",
12+
"test": "vitest",
1313
"update-readme": "eslint-doc-generator"
1414
},
1515
"devDependencies": {
@@ -20,20 +20,19 @@
2020
"eslint-plugin-eslint-plugin": "6.5.0",
2121
"eslint-plugin-filenames": "1.3.2",
2222
"eslint-plugin-import": "2.32.0",
23-
"eslint-plugin-jest": "27.9.0",
2423
"eslint-plugin-node": "11.1.0",
2524
"eslint-plugin-prettier": "5.5.6",
26-
"jest": "28.1.3",
27-
"npm-run-all": "4.1.5",
2825
"prettier": "3.8.4",
2926
"release-it": "15.11.0",
30-
"release-it-lerna-changelog": "5.0.0"
27+
"release-it-lerna-changelog": "5.0.0",
28+
"vitest": "^4.1.9"
3129
},
3230
"peerDependencies": {
3331
"eslint": "^7.11.0 || ^8.0.0"
3432
},
33+
"packageManager": "pnpm@11.9.0",
3534
"engines": {
36-
"node": "12.* || 14.* || >= 16.*"
35+
"node": "22.* || >= 24.*"
3736
},
3837
"changelog": {
3938
"repo": "Mainmatter/eslint-plugin-qunit-dom"

0 commit comments

Comments
 (0)