Skip to content

Commit 0852407

Browse files
authored
Bump required VSCode version to 1.82.3 (#503)
1 parent 0ed8966 commit 0852407

File tree

8 files changed

+45
-41
lines changed

8 files changed

+45
-41
lines changed

.github/workflows/testing.yml

+7-19
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,29 @@ on:
1111

1212
jobs:
1313
test:
14-
name: Test for Stylelint ${{ matrix.stylelint }} on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
14+
name: Test for Stylelint ${{ matrix.stylelint }} on ${{ matrix.os }}
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
node-version: [18]
20-
os: [ubuntu-latest, macos-latest]
19+
os: [ubuntu-latest, macos-latest, windows-latest]
2120
stylelint: [14, 15]
22-
include:
23-
- stylelint: 15
24-
node-version: 14 # For some reason jest-runner-vscode doesn't work well with Node v18 and Windows.
25-
os: windows-latest
26-
- stylelint: 14
27-
node-version: 14 # For some reason jest-runner-vscode doesn't work well with Node v18 and Windows.
28-
os: windows-latest
2921
timeout-minutes: 30
3022
permissions:
3123
contents: read
3224
steps:
3325
- uses: actions/checkout@v4
3426

35-
- name: Use Node.js ${{ matrix.node-version }}
27+
- name: Set up Node.js
3628
uses: actions/setup-node@v4
3729
with:
38-
node-version: ${{ matrix.node-version }}
30+
node-version-file: .nvmrc
3931
cache: npm
4032

41-
# TODO: [email protected] is broken on Windows. See https://github.com/npm/cli/issues/4341
42-
- name: Workaround for npm installation failure on Node.js 14 and Windows
43-
if: ${{ matrix.node-version == '14' && runner.os == 'Windows' }}
44-
run: npm install --global [email protected]
45-
4633
- name: Install latest npm
47-
if: ${{ matrix.node-version == '18' }}
48-
run: npm install --global npm@latest
34+
# TODO: npm 10 requires Node.js 18.17 or later.
35+
# run: npm install --global npm@latest
36+
run: npm install --global npm@9
4937

5038
- name: Install dependencies
5139
run: npm ci

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.17.6
1+
18.15.0

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
},
1919
"icon": "media/stylelint.png",
2020
"engines": {
21-
"vscode": ">=1.56.0",
22-
"node": ">=14.16.0"
21+
"vscode": ">=1.82.3",
22+
"node": ">=18.15.0"
2323
},
2424
"galleryBanner": {
2525
"color": "#000000",
@@ -225,7 +225,7 @@
225225
"@types/jest": "^27.0.3",
226226
"@types/path-is-inside": "^1.0.0",
227227
"@types/semver": "^7.3.9",
228-
"@types/vscode": "1.56.0",
228+
"@types/vscode": "1.82.0",
229229
"@typescript-eslint/eslint-plugin": "^5.5.0",
230230
"@typescript-eslint/parser": "^5.30.5",
231231
"@typescript/lib-dom": "npm:@types/web@^0.0.47",
@@ -280,7 +280,7 @@
280280
},
281281
"prettier": "@stylelint/prettier-config",
282282
"volta": {
283-
"node": "14.17.6",
284-
"npm": "8.1.3"
283+
"node": "18.15.0",
284+
"npm": "9.9.2"
285285
}
286286
}

test/e2e/__tests__/__snapshots__/code-actions.ts.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Array [
8383
],
8484
],
8585
"isPreferred": undefined,
86-
"kind": s {
86+
"kind": _ {
8787
"value": "quickfix",
8888
},
8989
"title": "Disable indentation for this line",
@@ -112,7 +112,7 @@ Array [
112112
],
113113
],
114114
"isPreferred": undefined,
115-
"kind": s {
115+
"kind": _ {
116116
"value": "quickfix",
117117
},
118118
"title": "Disable indentation for the entire file",
@@ -128,7 +128,7 @@ Array [
128128
"title": "Open documentation for indentation",
129129
},
130130
"isPreferred": undefined,
131-
"kind": s {
131+
"kind": _ {
132132
"value": "quickfix",
133133
},
134134
"title": "Show documentation for indentation",

test/e2e/jest-runner-vscode.config.js

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
'use strict';
22

3-
const path = require('path');
3+
const path = require('node:path');
4+
const { readFileSync } = require('node:fs');
5+
6+
const vscodeVersion = '1.82.3';
7+
8+
const pkg = JSON.parse(readFileSync(path.join(__dirname, '../../package.json'), 'utf8'));
9+
const requiredVscodeVersion = pkg.engines.vscode.match(/\d+\.\d+\.\d+/)?.[0];
10+
11+
if (!requiredVscodeVersion) {
12+
throw new Error('Cannot find a VSCode version in package.json');
13+
}
14+
15+
if (vscodeVersion !== requiredVscodeVersion) {
16+
throw new Error(
17+
`The required VSCode version in package.json is '${requiredVscodeVersion}', but actually '${vscodeVersion}'`,
18+
);
19+
}
420

521
/** @type {import('jest-runner-vscode').RunnerOptions} */
622
const config = {
7-
version: '1.56.2',
23+
version: vscodeVersion,
824
launchArgs: ['--disable-extensions'],
925
openInFolder: true,
1026
workspaceDir: path.join(__dirname, 'workspace/workspace.code-workspace'),
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"stylelint.customSyntax": "${workspaceFolder}/custom-syntax.js",
33
"editor.codeActionsOnSave": {
4-
"source.fixAll.stylelint": true
4+
"source.fixAll.stylelint": "explicit"
55
}
66
}

test/e2e/workspace/report-disables/.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"stylelint.reportInvalidScopeDisables": true,
33
"stylelint.reportNeedlessDisables": true,
44
"editor.codeActionsOnSave": {
5-
"source.fixAll.stylelint": false
5+
"source.fixAll.stylelint": "never"
66
}
77
}

0 commit comments

Comments
 (0)