From 3b8d753c350dfe31b193015140e03c75c5f7055a Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 01:28:36 +0900 Subject: [PATCH 1/9] ci: upgrade default Node.js to 26 and trim test matrix Bump the default Node.js version across CI workflows to 26 now that it has been released. Drop multi-OS coverage for older Node and for vscode-test: - test job: only run Node 26 / stylelint 17 across ubuntu/macos/windows. Older Node versions (22, 24) run on ubuntu only since OS-specific issues in old Node versions almost always reproduce on ubuntu too. - vscode-test job: pin to Node 26. The extension host uses VS Code's bundled Node, so the runner's Node version does not affect tests. - release.yml: switch runner to ubuntu-24.04-arm to match other jobs. --- .../workflows/check-generated-in-examples.yml | 2 +- .github/workflows/ci.yml | 17 +++++++++++++---- .github/workflows/release.yml | 4 ++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-generated-in-examples.yml b/.github/workflows/check-generated-in-examples.yml index 613c53c9..bad61c7c 100644 --- a/.github/workflows/check-generated-in-examples.yml +++ b/.github/workflows/check-generated-in-examples.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: voidzero-dev/setup-vp@56918a6d0c629c55ae8b88826a7d47fda85769ee # v1.9.0 with: - node-version: 24 + node-version: 26 cache: true - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 741a9533..27a46055 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: voidzero-dev/setup-vp@56918a6d0c629c55ae8b88826a7d47fda85769ee # v1.9.0 with: - node-version: 24 + node-version: 26 cache: true - run: vp check build: @@ -28,18 +28,27 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: voidzero-dev/setup-vp@56918a6d0c629c55ae8b88826a7d47fda85769ee # v1.9.0 with: - node-version: 24 + node-version: 26 cache: true - run: vp run build test: strategy: fail-fast: false matrix: - node: [22, 24] + node: [26] os: [ubuntu-24.04-arm, macos-latest, windows-11-arm] stylelint-version: ['17'] include: + # Configuration for Node.js 24 - node: 24 + os: ubuntu-24.04-arm + stylelint-version: '17' + # Configuration for Node.js 22 + - node: 22 + os: ubuntu-24.04-arm + stylelint-version: '17' + # Configuration for Stylelint 16 + - node: 26 os: ubuntu-24.04-arm stylelint-version: '16' runs-on: ${{ matrix.os }} @@ -65,7 +74,7 @@ jobs: strategy: fail-fast: false matrix: - node: [22, 24] + node: [26] os: [ubuntu-24.04-arm, macos-latest, windows-11-arm] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c831249..d5f9f733 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,12 +16,12 @@ concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: release: name: Release - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: voidzero-dev/setup-vp@56918a6d0c629c55ae8b88826a7d47fda85769ee # v1.9.0 with: - node-version: 24 + node-version: 26 cache: true - run: vp run build - name: set release variables From b9803d9bc5d58c16d669ae419863c642953beb01 Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 13:47:15 +0900 Subject: [PATCH 2/9] test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27a46055..8779ae2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: fail-fast: false matrix: node: [26] - os: [ubuntu-24.04-arm, macos-latest, windows-11-arm] + os: [ubuntu-24.04-arm, macos-latest, windows-11-arm, windows-latest] stylelint-version: ['17'] include: # Configuration for Node.js 24 From 415247cbdbe9e2a28724b4a05b9ea5746441baa3 Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 13:54:54 +0900 Subject: [PATCH 3/9] test: update timeout --- vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index c95172f4..493d5903 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -58,8 +58,8 @@ export default defineConfig({ }, test: { // On GitHub Actions, the Windows runner is slow and tests may fail with the default timeout. - // Therefore, we set the timeout to 10 seconds. - testTimeout: 10_000, + // Therefore, we set the timeout to 20 seconds. + testTimeout: 20_000, watch: false, projects: [ { From cae1d9400344ba228097710fd8675cd4724321b2 Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 14:02:47 +0900 Subject: [PATCH 4/9] debug --- packages/ts-plugin/e2e-test/completion.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/ts-plugin/e2e-test/completion.test.ts b/packages/ts-plugin/e2e-test/completion.test.ts index 4c40e6e5..30269375 100644 --- a/packages/ts-plugin/e2e-test/completion.test.ts +++ b/packages/ts-plugin/e2e-test/completion.test.ts @@ -153,6 +153,7 @@ describe.each([{ namedExports: false }, { namedExports: true }])('namedExports: test.each([{ quotePreference: 'single' as const }, { quotePreference: 'double' as const }])( 'completes as className={$$1} with quotePreference: $quotePreference', async ({ quotePreference }) => { + console.log(quotePreference, new Date().toLocaleDateString(), 0); const { iff, getRange } = await setupFixture({ 'tsconfig.json': buildTSConfigJSON({ compilerOptions: { jsx: 'react-jsx', types: [reactDtsPath] }, @@ -164,7 +165,9 @@ describe.each([{ namedExports: false }, { namedExports: true }])('namedExports: `, 'a.module.css': '', }); + console.log(quotePreference, new Date().toLocaleDateString(), 1); await tsserver.sendUpdateOpen({ openFiles: [{ file: iff.paths['a.tsx'] }] }); + console.log(quotePreference, new Date().toLocaleDateString(), 2); await tsserver.sendConfigure({ preferences: { includeCompletionsWithSnippetText: true, @@ -174,16 +177,19 @@ describe.each([{ namedExports: false }, { namedExports: true }])('namedExports: }, }); + console.log(quotePreference, new Date().toLocaleDateString(), 3); const res = await tsserver.sendCompletionInfo({ file: iff.paths['a.tsx'], ...getRange('a.tsx', 'className').end, }); + console.log(quotePreference, new Date().toLocaleDateString(), 4); expect( normalizeCompletionEntry(res.body?.entries.filter((entry) => entry.name === 'className') ?? []), ).toStrictEqual( normalizeCompletionEntry([{ name: 'className', insertText: 'className={$1}', sortText: expect.anything() }]), ); + console.log(quotePreference, new Date().toLocaleDateString(), 5); }, ); }); From f0241196c0c217aadc25a6acf73064960e793e86 Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 14:04:14 +0900 Subject: [PATCH 5/9] debug --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8779ae2b..932b9d0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,10 @@ jobs: - node: 24 os: ubuntu-24.04-arm stylelint-version: '17' + # Configuration for Node.js 24/Windows + - node: 24 + os: windows-11-arm + stylelint-version: '17' # Configuration for Node.js 22 - node: 22 os: ubuntu-24.04-arm From 6bbacaee8fc24b3fff59271a19feb7fa6247f87b Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 14:07:28 +0900 Subject: [PATCH 6/9] minimum --- packages/ts-plugin/e2e-test/completion.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ts-plugin/e2e-test/completion.test.ts b/packages/ts-plugin/e2e-test/completion.test.ts index 30269375..46b4884f 100644 --- a/packages/ts-plugin/e2e-test/completion.test.ts +++ b/packages/ts-plugin/e2e-test/completion.test.ts @@ -9,7 +9,7 @@ import { launchTsserver, normalizeCompletionDetails, normalizeCompletionEntry } const reactDtsPath = join(require.resolve('@types/react/package.json'), '../index.d.ts'); const tsserver = launchTsserver(); -describe.each([{ namedExports: false }, { namedExports: true }])('namedExports: $namedExports', ({ namedExports }) => { +describe.each([{ namedExports: false }])('namedExports: $namedExports', ({ namedExports }) => { describe('styles binding suggestion', () => { test('prioritizes the CSS module corresponding to the current component file', async () => { const { iff, getRange } = await setupFixture({ @@ -149,8 +149,8 @@ describe.each([{ namedExports: false }, { namedExports: true }])('namedExports: }); }); - describe('className attribute snippet', () => { - test.each([{ quotePreference: 'single' as const }, { quotePreference: 'double' as const }])( + describe.only('className attribute snippet', () => { + test.each([{ quotePreference: 'double' as const }])( 'completes as className={$$1} with quotePreference: $quotePreference', async ({ quotePreference }) => { console.log(quotePreference, new Date().toLocaleDateString(), 0); From 0e523c0c193f4b5c25ffdbc741c2a4e02d77a039 Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 14:09:05 +0900 Subject: [PATCH 7/9] allowOnly --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 932b9d0e..321563cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: tsconfig.tsbuildinfo key: test-tools-${{ runner.arch }}-${{ runner.os }}-node-${{ matrix.node }}-stylelint-${{ matrix.stylelint-version }}-${{ github.sha }} restore-keys: test-tools-${{ runner.arch }}-${{ runner.os }}-node-${{ matrix.node }}-stylelint-${{ matrix.stylelint-version }} - - run: vp test + - run: vp test --allowOnly env: STYLELINT_VERSION: ${{ matrix.stylelint-version }} vscode-test: From 06be0015c3ee7c3887282fdc0dd1842fc3af0ba4 Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 14:17:34 +0900 Subject: [PATCH 8/9] test --- packages/ts-plugin/e2e-test/completion.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/ts-plugin/e2e-test/completion.test.ts b/packages/ts-plugin/e2e-test/completion.test.ts index 46b4884f..116c5353 100644 --- a/packages/ts-plugin/e2e-test/completion.test.ts +++ b/packages/ts-plugin/e2e-test/completion.test.ts @@ -153,7 +153,7 @@ describe.each([{ namedExports: false }])('namedExports: $namedExports', ({ named test.each([{ quotePreference: 'double' as const }])( 'completes as className={$$1} with quotePreference: $quotePreference', async ({ quotePreference }) => { - console.log(quotePreference, new Date().toLocaleDateString(), 0); + console.log(quotePreference, new Date().toLocaleString(), 0); const { iff, getRange } = await setupFixture({ 'tsconfig.json': buildTSConfigJSON({ compilerOptions: { jsx: 'react-jsx', types: [reactDtsPath] }, @@ -165,9 +165,9 @@ describe.each([{ namedExports: false }])('namedExports: $namedExports', ({ named `, 'a.module.css': '', }); - console.log(quotePreference, new Date().toLocaleDateString(), 1); + console.log(quotePreference, new Date().toLocaleString(), 1); await tsserver.sendUpdateOpen({ openFiles: [{ file: iff.paths['a.tsx'] }] }); - console.log(quotePreference, new Date().toLocaleDateString(), 2); + console.log(quotePreference, new Date().toLocaleString(), 2); await tsserver.sendConfigure({ preferences: { includeCompletionsWithSnippetText: true, @@ -177,19 +177,19 @@ describe.each([{ namedExports: false }])('namedExports: $namedExports', ({ named }, }); - console.log(quotePreference, new Date().toLocaleDateString(), 3); + console.log(quotePreference, new Date().toLocaleString(), 3); const res = await tsserver.sendCompletionInfo({ file: iff.paths['a.tsx'], ...getRange('a.tsx', 'className').end, }); - console.log(quotePreference, new Date().toLocaleDateString(), 4); + console.log(quotePreference, new Date().toLocaleString(), 4); expect( normalizeCompletionEntry(res.body?.entries.filter((entry) => entry.name === 'className') ?? []), ).toStrictEqual( normalizeCompletionEntry([{ name: 'className', insertText: 'className={$1}', sortText: expect.anything() }]), ); - console.log(quotePreference, new Date().toLocaleDateString(), 5); + console.log(quotePreference, new Date().toLocaleString(), 5); }, ); }); From 01d48199594831a126afc8d35c893b1a8a7d16ff Mon Sep 17 00:00:00 2001 From: mizdra Date: Sun, 17 May 2026 14:26:59 +0900 Subject: [PATCH 9/9] off --- packages/ts-plugin/e2e-test/refactor.test.ts | 44 ++++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/ts-plugin/e2e-test/refactor.test.ts b/packages/ts-plugin/e2e-test/refactor.test.ts index fd508fc7..190c7e6c 100644 --- a/packages/ts-plugin/e2e-test/refactor.test.ts +++ b/packages/ts-plugin/e2e-test/refactor.test.ts @@ -57,27 +57,27 @@ describe('Get Applicable Refactors', () => { }); }); -describe('Get Edits For Refactor', () => { - test('emits an edit that creates a new empty CSS module file paired with the component file', async () => { - const { iff } = await setupFixture({ - 'tsconfig.json': buildTSConfigJSON({ compilerOptions: { jsx: 'react-jsx' } }), - 'a.tsx': '', - }); - await tsserver.sendUpdateOpen({ openFiles: [{ file: iff.paths['a.tsx'] }] }); +// describe('Get Edits For Refactor', () => { +// test('emits an edit that creates a new empty CSS module file paired with the component file', async () => { +// const { iff } = await setupFixture({ +// 'tsconfig.json': buildTSConfigJSON({ compilerOptions: { jsx: 'react-jsx' } }), +// 'a.tsx': '', +// }); +// await tsserver.sendUpdateOpen({ openFiles: [{ file: iff.paths['a.tsx'] }] }); - const res = await tsserver.sendGetEditsForRefactor({ - refactor: createCssModuleFileRefactor.name, - action: createCssModuleFileRefactor.actions[0].name, - file: iff.paths['a.tsx'], - line: 1, - offset: 1, - }); +// const res = await tsserver.sendGetEditsForRefactor({ +// refactor: createCssModuleFileRefactor.name, +// action: createCssModuleFileRefactor.actions[0].name, +// file: iff.paths['a.tsx'], +// line: 1, +// offset: 1, +// }); - expect(res.body?.edits).toStrictEqual([ - { - fileName: iff.join('a.module.css'), - textChanges: [{ start: { line: 0, offset: 0 }, end: { line: 0, offset: 0 }, newText: '' }], - }, - ]); - }); -}); +// expect(res.body?.edits).toStrictEqual([ +// { +// fileName: iff.join('a.module.css'), +// textChanges: [{ start: { line: 0, offset: 0 }, end: { line: 0, offset: 0 }, newText: '' }], +// }, +// ]); +// }); +// });