Skip to content

Commit 4c1a6c4

Browse files
committed
Running unit tests with TypeScript 5.9
1 parent d9d9c54 commit 4c1a6c4

6 files changed

Lines changed: 30 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-node@v4
19+
- uses: actions/checkout@v5
20+
- uses: actions/setup-node@v6
2121
with:
22-
node-version: '22'
22+
node-version: '24'
2323
- run: |
2424
npm install
2525
gulp make-ts-defs
@@ -40,15 +40,15 @@ jobs:
4040

4141
strategy:
4242
matrix:
43-
node-version: ['16.0.0', '16', '18', '20', '22', '23']
43+
node-version: ['16.0.0', '16', '18', '20', '22', '24', '25']
4444

4545
steps:
46-
- uses: actions/checkout@v4
47-
- uses: actions/setup-node@v4
46+
- uses: actions/checkout@v5
47+
- uses: actions/setup-node@v6
4848
with:
4949
node-version: ${{ matrix.node-version }}
5050
- run: npm uninstall @origin-1/eslint-config
51-
- uses: actions/download-artifact@v4
51+
- uses: actions/download-artifact@v5
5252
with:
5353
name: lib
5454
path: lib
@@ -69,14 +69,14 @@ jobs:
6969

7070
strategy:
7171
matrix:
72-
deno-version: [v1.24, v1.x]
72+
deno-version: [v1.24, v1.x, v2.x]
7373

7474
steps:
75-
- uses: actions/checkout@v4
76-
- uses: denoland/setup-deno@v1
75+
- uses: actions/checkout@v5
76+
- uses: denoland/setup-deno@v2
7777
with:
7878
deno-version: ${{ matrix.deno-version }}
79-
- uses: actions/download-artifact@v4
79+
- uses: actions/download-artifact@v5
8080
with:
8181
name: lib
8282
path: lib

deno.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"lock": false
3+
}

gulpfile.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ task
166166
{
167167
files: ['**/*.ts', '**/*.tstest'],
168168
tsVersion: '4.7.0',
169-
languageOptions: { parserOptions: { extraFileExtensions: ['.tstest'] } },
170169
},
171170
{
172171
files: ['example/**/*.js'],
@@ -183,8 +182,9 @@ task
183182
rules: { '@stylistic/max-len': 'off' },
184183
},
185184
{
186-
files: ['**/*.tstest'],
187-
processor: tsTestProcessor,
185+
files: ['**/*.tstest'],
186+
languageOptions: { parserOptions: { extraFileExtensions: ['.tstest'] } },
187+
processor: tsTestProcessor,
188188
rules:
189189
{
190190
'@typescript-eslint/no-extraneous-class': 'off',
@@ -194,12 +194,16 @@ task
194194
'no-duplicate-imports': 'off',
195195
},
196196
},
197+
{
198+
files: ['**/*.json'],
199+
jsonVersion: 'standard',
200+
},
197201
);
198202
const stream =
199203
src
200204
(
201205
[
202-
'*.js',
206+
'*.{js,json}',
203207
'example/**/*.{js,ts}',
204208
'lib/**/*.d.ts',
205209
'src/**/*.js',

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"typescript_5.5": "npm:typescript@5.5",
6969
"typescript_5.6": "npm:typescript@5.6",
7070
"typescript_5.7": "npm:typescript@5.7",
71-
"typescript_5.8": "npm:typescript@5.8"
71+
"typescript_5.8": "npm:typescript@5.8",
72+
"typescript_5.9": "npm:typescript@5.9"
7273
},
7374
"engines": {
7475
"node": ">=16.0.0"

test/deno-spec-runner.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ import 'https://esm.sh/mocha/mocha.js';
1616

1717
globalThis.chai = chai;
1818
await import('./spec-helper.js');
19-
window.location = new URL('about:blank'); // Browser based Mocha expects `window.location` to exist.
19+
20+
// Browser based Mocha expects `window.location` to exist.
21+
Object.defineProperty(globalThis, 'window', { value: globalThis, enumerable: true });
22+
window.location = new URL('about:blank');
23+
2024
mocha.setup({ checkLeaks: true, reporter: 'spec', ui: 'bdd' });
2125
await import('./init-spec.js');
2226
{

test/spec/ts-defs/210.tstest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class B
1515

1616
void
1717
(
18-
(C: typeof A | typeof B): (new () => unknown) =>
18+
(C: typeof A | typeof B): new () => unknown =>
1919
class extends classes(C)
2020
{ }
2121
);

0 commit comments

Comments
 (0)