Skip to content

Use explicit TypeScript import extensions - #9637

Open
dibarbet wants to merge 2 commits into
mainfrom
dev/dibarbet/explicit-ts-imports
Open

Use explicit TypeScript import extensions#9637
dibarbet wants to merge 2 commits into
mainfrom
dev/dibarbet/explicit-ts-imports

Conversation

@dibarbet

@dibarbet dibarbet commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

Preparatory extraction from #9635 that adds explicit .ts extensions to relative TypeScript import, export, and dynamic-import specifiers without adopting ESM.

  • upgrades TypeScript to 5.7.3 and enables rewriteRelativeImportExtensions
  • keeps module: "CommonJS", moduleResolution: "node", package.json main, and the existing CommonJS esbuild/Jest configuration
  • migrates general task scripts to tsx; retains updated ts-node only for Jest-driving task scripts because Jest 29 loads TypeScript configs through ts-node
  • maps rewritten relative .js Jest requests back to TypeScript source

Validation

  • npm run compileDev
  • npm run test:unit
  • npm run omnisharptest:unit
  • npm run packageDev (produces dist/extension.js with CommonJS exports)

Upgrade TypeScript and task execution so relative TypeScript imports can use explicit source extensions while preserving CommonJS output.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c12a1e5a-fd95-478e-b642-d8911d7d81e1
Avoid the tsx require hook conflict when Jest loads TypeScript configuration through ts-node.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c12a1e5a-fd95-478e-b642-d8911d7d81e1
@dibarbet
dibarbet marked this pull request as ready for review August 5, 2026 17:34
@dibarbet
dibarbet requested review from a team as code owners August 5, 2026 17:34
Copilot AI review requested due to automatic review settings August 5, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

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.

3 participants