diff --git a/.github/workflows/ci.js.yml b/.github/workflows/ci.js.yml index 294a58f7..4e1efb1b 100644 --- a/.github/workflows/ci.js.yml +++ b/.github/workflows/ci.js.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/.github/workflows/ci.python.yml b/.github/workflows/ci.python.yml index 93818a23..903e9d21 100644 --- a/.github/workflows/ci.python.yml +++ b/.github/workflows/ci.python.yml @@ -23,6 +23,8 @@ jobs: python-version: - '3.11' - '3.12' + - '3.13' + - '3.14' runs-on: ${{ matrix.os }} diff --git a/python/tests/__py3.13_snapshots__/test_conflicting_names_1/test_conflicting_names_1.schema.d.ts b/python/tests/__py3.13_snapshots__/test_conflicting_names_1/test_conflicting_names_1.schema.d.ts new file mode 100644 index 00000000..1e14c802 --- /dev/null +++ b/python/tests/__py3.13_snapshots__/test_conflicting_names_1/test_conflicting_names_1.schema.d.ts @@ -0,0 +1,15 @@ +// Entry point is: 'Derived' + +// ERRORS: +// !!! Cannot create a schema using two types with the same name. C conflicts between .C'> and .C'> + +interface Derived extends C, C { +} + +interface C { + my_attr_2: number; +} + +interface C { + my_attr_1: string; +} diff --git a/python/tests/__py3.13_snapshots__/test_hello_world/test_generic_alias1.schema.d.ts b/python/tests/__py3.13_snapshots__/test_hello_world/test_generic_alias1.schema.d.ts new file mode 100644 index 00000000..00de4634 --- /dev/null +++ b/python/tests/__py3.13_snapshots__/test_hello_world/test_generic_alias1.schema.d.ts @@ -0,0 +1,35 @@ +// Entry point is: 'D_or_E' + +type D_or_E = D | E + +// This is the definition of the class E. +interface E extends C { + tag: "E"; + next: this | null; +} + +// This is a generic class named C. +interface C { + x?: T; + c: C; +} + +// This is the definition of the class D. +interface D extends C { + tag?: "D"; + // This comes from string metadata + // within an Annotated hint. + y: boolean | null; + z?: number[] | null; + other?: IndirectC; + non_class?: NonClass; + // This comes from later metadata. + multiple_metadata?: string; +} + +interface NonClass { + a: number; + "my-dict": Record; +} + +type IndirectC = C diff --git a/python/tests/__py3.14_snapshots__/test_conflicting_names_1/test_conflicting_names_1.schema.d.ts b/python/tests/__py3.14_snapshots__/test_conflicting_names_1/test_conflicting_names_1.schema.d.ts new file mode 100644 index 00000000..1e14c802 --- /dev/null +++ b/python/tests/__py3.14_snapshots__/test_conflicting_names_1/test_conflicting_names_1.schema.d.ts @@ -0,0 +1,15 @@ +// Entry point is: 'Derived' + +// ERRORS: +// !!! Cannot create a schema using two types with the same name. C conflicts between .C'> and .C'> + +interface Derived extends C, C { +} + +interface C { + my_attr_2: number; +} + +interface C { + my_attr_1: string; +} diff --git a/python/tests/__py3.14_snapshots__/test_hello_world/test_generic_alias1.schema.d.ts b/python/tests/__py3.14_snapshots__/test_hello_world/test_generic_alias1.schema.d.ts new file mode 100644 index 00000000..00de4634 --- /dev/null +++ b/python/tests/__py3.14_snapshots__/test_hello_world/test_generic_alias1.schema.d.ts @@ -0,0 +1,35 @@ +// Entry point is: 'D_or_E' + +type D_or_E = D | E + +// This is the definition of the class E. +interface E extends C { + tag: "E"; + next: this | null; +} + +// This is a generic class named C. +interface C { + x?: T; + c: C; +} + +// This is the definition of the class D. +interface D extends C { + tag?: "D"; + // This comes from string metadata + // within an Annotated hint. + y: boolean | null; + z?: number[] | null; + other?: IndirectC; + non_class?: NonClass; + // This comes from later metadata. + multiple_metadata?: string; +} + +interface NonClass { + a: number; + "my-dict": Record; +} + +type IndirectC = C