From 1e0e24e4579d9c94f8310dec3491e015c8e5a0e5 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 9 Jan 2026 12:49:13 -0800 Subject: [PATCH 1/3] chore(ci): try to add Node.js v20 to build matrix --- .github/workflows/nodejs.yml | 6 ++++++ package.json | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index f03d0a6..f9770e1 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: include: + - node-version: '20' - node-version: '22' - node-version: '24' steps: @@ -19,5 +20,10 @@ jobs: - uses: ./.github/actions/prepare with: node-version: ${{ matrix.node-version }} + - name: Test (Node v20.x) + if: matrix.node-version == '20' + # CAUTION: this only works in POSIX environments + run: npm run test:node20 - name: Test + if: matrix.node-version != '20' run: npm test diff --git a/package.json b/package.json index ce7faa3..02fb854 100644 --- a/package.json +++ b/package.json @@ -59,8 +59,10 @@ "lint:types": "tsc --noEmit", "prepare": "husky; run-s -s build", "test": "run-s test:runtime", - "test:runtime": "node --import tsx --test --test-reporter=spec \"test/**/*.test.ts\"", - "test:watch": "node --import tsx --test --test-reporter=spec --watch \"test/**/*.test.ts\"" + "test:base": "node --import tsx --test --test-reporter=spec", + "test:node20": "node --import tsx --test --test-reporter=spec test/*.test.ts", + "test:runtime": "npm run test:base -- \"test/*.test.ts\"", + "test:watch": "npm run test:base -- --watch \"test/*.test.ts\"" }, "devDependencies": { "@commitlint/cli": "20.2.0", From 31a0bdc1ff123a64b8c06c8f4f6c6658cf60e4ec Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 9 Jan 2026 12:52:03 -0800 Subject: [PATCH 2/3] chore(ci): add windows to build matrix --- .github/workflows/nodejs.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index f9770e1..0fcd8c0 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -6,14 +6,15 @@ jobs: test: env: FORCE_COLOR: '1' - name: Build & Test - runs-on: ubuntu-latest + name: Build & Test (Node ${{ matrix.node-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} strategy: matrix: - include: - - node-version: '20' - - node-version: '22' - - node-version: '24' + os: [ubuntu-latest, windows-latest] + node-version: ['20', '22', '24'] + exclude: + - os: windows-latest + node-version: '20' steps: - name: Checkout Repository uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 From df967811fc0ab484f0f07134ca5b6bd9e881dd3a Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 9 Jan 2026 12:58:11 -0800 Subject: [PATCH 3/3] chore(test): skip VTE tests on win --- test/osc.test.ts | 66 ++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/test/osc.test.ts b/test/osc.test.ts index 9cdb3f4..1e6e943 100644 --- a/test/osc.test.ts +++ b/test/osc.test.ts @@ -80,35 +80,47 @@ describe('osc', () => { expect(supportsHyperlinks(), 'to be', false); }); - it('should return false for VTE 0.50.0 (dotted format) due to segfault bug', () => { - delete process.env.CI; - delete process.env.FORCE_HYPERLINK; - delete process.env.TERM_PROGRAM; - process.env.VTE_VERSION = '0.50.0'; - - const mockStream = { isTTY: true } as NodeJS.WriteStream; - expect(supportsHyperlinks(mockStream), 'to be', false); - }); - - it('should return false for VTE 0.50.0 (compact format "5000") due to segfault bug', () => { - delete process.env.CI; - delete process.env.FORCE_HYPERLINK; - delete process.env.TERM_PROGRAM; - process.env.VTE_VERSION = '5000'; - - const mockStream = { isTTY: true } as NodeJS.WriteStream; - expect(supportsHyperlinks(mockStream), 'to be', false); - }); + it( + 'should return false for VTE 0.50.0 (dotted format) due to segfault bug', + { skip: process.platform === 'win32' }, + () => { + delete process.env.CI; + delete process.env.FORCE_HYPERLINK; + delete process.env.TERM_PROGRAM; + process.env.VTE_VERSION = '0.50.0'; + + const mockStream = { isTTY: true } as NodeJS.WriteStream; + expect(supportsHyperlinks(mockStream), 'to be', false); + }, + ); - it('should return true for VTE 0.50.1 (compact format "5001")', () => { - delete process.env.CI; - delete process.env.FORCE_HYPERLINK; - delete process.env.TERM_PROGRAM; - process.env.VTE_VERSION = '5001'; + it( + 'should return false for VTE 0.50.0 (compact format "5000") due to segfault bug', + { skip: process.platform === 'win32' }, + () => { + delete process.env.CI; + delete process.env.FORCE_HYPERLINK; + delete process.env.TERM_PROGRAM; + process.env.VTE_VERSION = '5000'; + + const mockStream = { isTTY: true } as NodeJS.WriteStream; + expect(supportsHyperlinks(mockStream), 'to be', false); + }, + ); - const mockStream = { isTTY: true } as NodeJS.WriteStream; - expect(supportsHyperlinks(mockStream), 'to be', true); - }); + it( + 'should return true for VTE 0.50.1 (compact format "5001")', + { skip: process.platform === 'win32' }, + () => { + delete process.env.CI; + delete process.env.FORCE_HYPERLINK; + delete process.env.TERM_PROGRAM; + process.env.VTE_VERSION = '5001'; + + const mockStream = { isTTY: true } as NodeJS.WriteStream; + expect(supportsHyperlinks(mockStream), 'to be', true); + }, + ); }); describe('linkifyUrls()', () => {