Skip to content

Commit 63d7f90

Browse files
committed
feat: update to Typescript 5.6
1 parent 116fec8 commit 63d7f90

File tree

6 files changed

+39
-30
lines changed

6 files changed

+39
-30
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"read-pkg": "^9.0.1",
6969
"resolve.exports": "^2.0.2",
7070
"tempy": "^3.1.0",
71-
"ts-morph": "^23.0.0",
71+
"ts-morph": "^24.0.0",
7272
"validate-npm-package-name": "^6.0.0"
7373
},
7474
"devDependencies": {

pnpm-lock.yaml

Lines changed: 10 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/declarations/__snapshots__/export-forms.test.ts.snap

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,28 @@ exports[`export list as renamed to default 1`] = `
338338
]
339339
`;
340340

341-
exports[`export list as renamed to string 1`] = `[]`;
341+
exports[`export list as renamed to string (arbitrary module identifiers) 1`] = `
342+
[
343+
{
344+
"docs": [],
345+
"file": "/index.ts",
346+
"id": "+function.my foo",
347+
"kind": "function",
348+
"line": 1,
349+
"name": "my foo",
350+
"signature": "my foo: () => void",
351+
},
352+
{
353+
"docs": [],
354+
"file": "/index.ts",
355+
"id": "+variable.my bar",
356+
"kind": "variable",
357+
"line": 2,
358+
"name": "my bar",
359+
"signature": "const my bar: string",
360+
},
361+
]
362+
`;
342363

343364
exports[`export list from module 1`] = `
344365
[

test/declarations/export-forms.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,11 @@ test("export list as renamed", async () => {
345345
).toMatchSnapshot();
346346
});
347347

348-
// Currently not supported by TypeScript.
348+
// Supported since TypeScript 5.6 and ts-morph 24.
349+
// See: https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/#support-for-arbitrary-module-identifiers
350+
// See: https://github.com/dsherret/ts-morph/blob/latest/packages/ts-morph/CHANGELOG.md#2400-2024-10-05
349351
// See: https://github.com/microsoft/TypeScript/issues/40594.
350-
test("export list as renamed to string", async () => {
352+
test("export list as renamed to string (arbitrary module identifiers)", async () => {
351353
const project = new Project({
352354
useInMemoryFileSystem: true,
353355
compilerOptions: {

test/packages/__snapshots__/enttec-open-dmx-usb.test.ts.snap

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,7 @@ exports[`[email protected] 1`] = `
8686
"kind": "class-method",
8787
"line": 40,
8888
"name": "setChannels",
89-
"signature": "setChannels: (
90-
channels: Buffer | number[] | Record<number, number>,
91-
clear?: boolean,
92-
) => void;",
89+
"signature": "setChannels: (channels: any, clear?: boolean) => void;",
9390
},
9491
{
9592
"docs": [

test/packages/__snapshots__/h3.test.ts.snap

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,10 +1360,7 @@ exports[`[email protected] 1`] = `
13601360
"kind": "function",
13611361
"line": 604,
13621362
"name": "sendStream",
1363-
"signature": "sendStream: (
1364-
event: H3Event,
1365-
stream: Readable | ReadableStream,
1366-
) => Promise<void>;",
1363+
"signature": "sendStream: (event: H3Event, stream: any) => Promise<void>;",
13671364
},
13681365
{
13691366
"docs": [],

0 commit comments

Comments
 (0)