Skip to content

Commit

Permalink
Bump required VSCode version to 1.86.1
Browse files Browse the repository at this point in the history
VSCode 1.86.1 included the Electron 27 update. This comes with Node.js 18.17.1.
Ref https://code.visualstudio.com/updates/v1_86

Also, this change removes the Node.js version from the CI testing matrix,
following the `engines.node` field in `package.json`.
  • Loading branch information
ybiquitous committed Feb 13, 2024
1 parent 2b59af3 commit 987daf7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 32 deletions.
22 changes: 4 additions & 18 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,23 @@ on:

jobs:
test:
name: Test for Stylelint ${{ matrix.stylelint }} on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
name: Test for Stylelint ${{ matrix.stylelint }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [18]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
stylelint: [14, 15]
include:
- stylelint: 15
node-version: 14 # For some reason jest-runner-vscode doesn't work well with Node v18 and Windows.
os: windows-latest
- stylelint: 14
node-version: 14 # For some reason jest-runner-vscode doesn't work well with Node v18 and Windows.
os: windows-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: .nvmrc
cache: npm

# TODO: [email protected] is broken on Windows. See https://github.com/npm/cli/issues/4341
- name: Workaround for npm installation failure on Node.js 14 and Windows
if: ${{ matrix.node-version == '14' && runner.os == 'Windows' }}
run: npm install --global [email protected]

- name: Install latest npm
if: ${{ matrix.node-version == '18' }}
run: npm install --global npm@latest

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.6
18.17.1
18 changes: 9 additions & 9 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
},
"icon": "media/stylelint.png",
"engines": {
"vscode": ">=1.56.0",
"node": ">=14.16.0"
"vscode": ">=1.86.1",
"node": ">=18.17.1"
},
"galleryBanner": {
"color": "#000000",
Expand Down Expand Up @@ -225,7 +225,7 @@
"@types/jest": "^27.0.3",
"@types/path-is-inside": "^1.0.0",
"@types/semver": "^7.3.9",
"@types/vscode": "1.56.0",
"@types/vscode": "1.86.0",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.30.5",
"@typescript/lib-dom": "npm:@types/web@^0.0.47",
Expand Down
17 changes: 16 additions & 1 deletion test/e2e/jest-runner-vscode.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@

const path = require('path');

const pkg = require('../../package.json');

Check failure on line 5 in test/e2e/jest-runner-vscode.config.js

View workflow job for this annotation

GitHub Actions / lint / Lint on Node.js lts/* and ubuntu-latest

File '/home/runner/work/vscode-stylelint/vscode-stylelint/package.json' is not listed within the file list of project '/home/runner/work/vscode-stylelint/vscode-stylelint/tsconfig.test.json'. Projects must list all files or use an 'include' pattern.

const vscodeVersion = '1.86.1';
const requiredVscodeVersion = pkg.engines.vscode.match(/\d+\.\d+\.\d+/)?.[0];

if (!requiredVscodeVersion) {
throw new Error('Cannot find a VSCode version in package.json');
}

if (vscodeVersion !== requiredVscodeVersion) {
throw new Error(
`The VSCode version '${requiredVscodeVersion}' is required in package.json, but actually '${vscodeVersion}'`,
);
}

/** @type {import('jest-runner-vscode').RunnerOptions} */
const config = {
version: '1.56.2',
version: vscodeVersion,
launchArgs: ['--disable-extensions'],
openInFolder: true,
workspaceDir: path.join(__dirname, 'workspace/workspace.code-workspace'),
Expand Down

0 comments on commit 987daf7

Please sign in to comment.