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

Update bundled transpileModule implementation to match latest TS codebase #1973

Merged
merged 3 commits into from Mar 18, 2023

Conversation

cspotcode
Copy link
Collaborator

Fixes #1971

Implementation notes

We have a bundled copy of TS's transpileModule because we needed to make a couple tweaks that couldn't be done via public API.

Those differences are:

  • Refactored into createTsTranspileModule which returns impl of transpileModule
    • ingest compiler options once, not on every single call to transpileModule
  • useCaseSensitiveFileNames changed from false to true
  • fileExists and readFile understand to return a package.json so that module: NodeNext emits correctly
    • local var packageJsonFileName added as part of this

@codecov
Copy link

codecov bot commented Mar 18, 2023

Codecov Report

Merging #1973 (50ffdb4) into main (fd43821) will decrease coverage by 0.12%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
src/ts-transpile-module.ts 76.36% <100.00%> (-0.11%) ⬇️

... and 2 files with indirect coverage changes

@cspotcode cspotcode merged commit 6558cbe into main Mar 18, 2023
@cspotcode cspotcode deleted the issue-1971 branch March 18, 2023 20:40
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.

verbatimModuleSyntax w/transpileOnly raises diagnostic error
1 participant