Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #266: restore in TS 5.6. #270

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

samchon
Copy link

@samchon samchon commented Sep 10, 2024

Failed to compile transform-typescript-paths due to many TypeScript compilation errors. Therefore, don't know whether this PR is valid or not. Hope your strict your review @nonara.

Instead, tested on my project manually editing the JS file in the node_modules/typescript-transform-paths directory.

Failed to compile `transform-typescript-paths` due to many TypeScript compilation errors. Therefore, don't know whether this PR is valid or not. Hope your strict your review @nonara.

Instead, tested on my project manually editing the JS file in the `node_modules/typescript-transform-paths` directory.
@danielpza danielpza linked an issue Sep 13, 2024 that may be closed by this pull request
@danielpza
Copy link
Member

Thanks for contributing @samchon, it seems the build is failing, and I'm concerned about breaking compatibility with typescript <5.6, so we probably need to add some tests to make sure older typescript versions continue working.

@bradennapier
Copy link
Contributor

bradennapier commented Sep 17, 2024

indeed this only requires renaming a single fn name and it breaks the core release of typescript

- originalSourceFile: tsInstance.getOriginalSourceFile(sourceFile),
+ originalSourceFile: tsInstance.getSourceFileOfNode(sourceFile),

made my project compile -- worst case perhaps

originalSourceFile: typeof tsInstance.getSourceFileOfNode === 'function' ?  tsInstance.getSourceFileOfNode(sourceFile) :  tsInstance.getOriginalSourceFile(sourceFile)

ah it does seem entirely type based - id be surprised if it didnt require a major change due to them removing a bunch of stuff in 5.6 via knip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

not working with typescript 5.6.1-rc
3 participants