Skip to content

Add support for TS 5.0 "extends" array #1954

Closed

Description

@cspotcode

TS 5.0 adds support for "extends" to be an array of one or more extended configs, not just a single config.

https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#supporting-multiple-configuration-files-in-extends

We can do the same, also merging ts-node options from multiple tsconfigs.

Activity

  1. evantill commented on Apr 9, 2023

    @evantill

    is it possible to add some warning that current released version does not support tsconfig extensions ?

  2. Kurt-von-Laven commented on Apr 22, 2023

    @Kurt-von-Laven

    Thank you for addressing this issue! Would it be possible to release this fix when time allows?

  3. simenandre commented on Apr 25, 2023

    @simenandre

    Let me know if I can help with anything in regard to releasing!

  4. simenandre commented on Apr 27, 2023

    @simenandre

    For anyone finding this issue and wanting a fix while we wait, plan, work or try to find time to work on a release.

    It is possible to install ts-node from git, as @cspotcode noted in #1958.

    There's a snippet and instructions here: #1977

  5. BryceBarbara commented on May 4, 2023

    @BryceBarbara

    @simenandre Were you able to get that to work? It doesn't work for me because the repo is downloaded and there's no dist files.

  6. simenandre commented on May 5, 2023

    @simenandre

    @simenandre Were you able to get that to work? It doesn't work for me because the repo is downloaded and there's no dist files.

    There are others having some issues with yarn, etc. Maybe you could repost your setup in the issue I referenced?

  7. alexeyr-ci commented on Feb 17, 2024

    @alexeyr-ci

    There has been a new release 10.9.2, but from v10.9.1...v10.9.2 it looks like this change isn't included?

  8. tylim88 commented on Mar 27, 2024

    @tylim88

    still same issue with v10.9,2

  9. enisdenjo commented on Mar 28, 2024

    @enisdenjo

    seriously? a year passed and this is still not released. please release a new version

  10. yogrr commented on Jul 8, 2024

    @yogrr

    can be solved now by using

    pnpm i -D ts-node@11.0.0-beta.1
    

    worked for me with this version

    don't forget to rm node_modules or rm old ts-node before

  11. rrooddooxx commented on Feb 19, 2025

    @rrooddooxx

    when is this going be released? is there something can do to help? thanks

  12. heyakyra commented on Aug 23, 2025

    @heyakyra

    In case anyone ends up here from Google, have been debugging various jest issues, and was hitting:

    Error: Jest: Failed to parse the TypeScript config file /var/home/[…]/storybook/jest.config.ts
      TypeError: value.replace is not a function
        at readConfigFileAndSetRootDir (/var/home/[…]/storybook/node_modules/jest-config/build/index.js:2269:13)
        at async readInitialOptions (/var/home/[…]/storybook/node_modules/jest-config/build/index.js:1147:13)
        at async readConfig (/var/home/[…]/storybook/node_modules/jest-config/build/index.js:918:7)
        at async readConfigs (/var/home/[…]/storybook/node_modules/jest-config/build/index.js:1168:26)
        at async runCLI (/var/home/[…]/storybook/node_modules/@jest/core/build/index.js:1393:7)
        at async Object.run (/var/home/[…]/storybook/node_modules/jest-cli/build/index.js:656:9)
    

    and led here by jestjs/jest#14096

    but the above solution

    @yogrr on on Jul 8, 2024

    can be solved now by using

    pnpm i -D ts-node@11.0.0-beta.1
    

    just leads to another problem:

    Error: Jest: Failed to parse the TypeScript config file /var/home/[…]/storybook/jest.config.ts
      TypeError: state.conditions.includes is not a function
        at readConfigFileAndSetRootDir (/var/home/[…]/storybook/node_modules/jest-config/build/index.js:2269:13)
        at async readInitialOptions (/var/home/[…]/storybook/node_modules/jest-config/build/index.js:1147:13)
        at async readConfig (/var/home/[…]/storybook/node_modules/jest-config/build/index.js:918:7)
        at async readConfigs (/var/home/[…]/storybook/node_modules/jest-config/build/index.js:1168:26)
        at async runCLI (/var/home/[…]/storybook/node_modules/@jest/core/build/index.js:1393:7)
        at async Object.run (/var/home/[…]/storybook/node_modules/jest-cli/build/index.js:656:9)
    

    that was fixed in the more-recent stable version 10.9.2 so the beta version is older and does not include the fix 😖

    there is a patch available but a new beta release is definitely in order. #2076 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions