Skip to content

JavaScript: remove SEMMLE_TYPESCRIPT_HOME support - #22870

Merged
paldepind merged 2 commits into
mainfrom
js/typescript-home
Oct 22, 2026
Merged

paldepind merged 2 commits into
mainfrom
js/typescript-home

Conversation

@paldepind

@paldepind paldepind commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Remove support for overriding the TypeScript compiler with SEMMLE_TYPESCRIPT_HOME. The JavaScript/TypeScript extractor now always uses its bundled TypeScript compiler.

Here's my rationale, copy/pasted from a Slack thread:

  • The extractor is tightly coupled to the TypeScript dependency. Letting users override one of our internal dependencies is brittle.
  • It's very hard to think of a reason why this is needed. We only use TypeScript for parsing, and parsing is backwards compatible.
  • If we simply stop using SEMMLE_TYPESCRIPT_HOME then the 7.1 upgrade will be smoother for users. If anyone rely on it then the upgrade will go from breaking for their setup (requiring them to update to 7.1) into not breaking their setup (but ignoring an envvar they've set, if we don't want to do this silently we could log a warning).

paldepind and others added 2 commits October 22, 2026 10:45
Co-authored-by: Copilot <[email protected]>
Copilot-Session: b58bba12-96d2-40c2-aaf4-d249623a385c
@paldepind
paldepind marked this pull request as ready for review October 22, 2026 08:46
@paldepind
paldepind requested review from a team as code owners October 22, 2026 08:46
Copilot AI max review requested due to automatic review settings October 22, 2026 08:46

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.

🔵 Needs a closer look

Removing the compiler override is an intentional compatibility break that needs maintainer sign-off.

No open issues 🎉

What changed in this PR

Removes SEMMLE_TYPESCRIPT_HOME support so the JavaScript/TypeScript extractor consistently uses its bundled TypeScript compiler.

Changes:

  • Switches both compiler consumers to direct typescript imports.
  • Deletes the override wrapper and its declaration file.
  • Documents the compatibility break in a change note.
File Description
javascript/​ql/​lib/​change-notes/​2026-10-22-remove-typescript-home.md Documents removal of the compiler override.
javascript/​extractor/​lib/​typescript/​src/​typescript.js Deletes the environment-dependent compiler wrapper.
javascript/​extractor/​lib/​typescript/​src/​typescript.d.ts Deletes the wrapper’s type declaration.
javascript/​extractor/​lib/​typescript/​src/​main.ts Imports TypeScript directly.
javascript/​extractor/​lib/​typescript/​src/​ast_extractor.ts Imports TypeScript directly.

Review effort: Max

@paldepind
paldepind merged commit 03d96b8 into main Oct 22, 2026
21 checks passed
@paldepind
paldepind deleted the js/typescript-home branch October 22, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants