Repository navigation
Fetch TypeScript standard libs at the bundled compiler version - #437
Merged
Merged
Conversation
ubuntu-latest now resolves to Ubuntu 26.04, where the pinned Playwright version (1.46.1) cannot install its system dependencies: it falls back to the 24.04 package list, and packages such as libicu74 and libvpx9 do not exist there. Pin the workflows that install Playwright to ubuntu-24.04 until Playwright is upgraded.
Standard lib typings (lib.dom.d.ts etc.) were fetched from the CDN at typescript@latest unless the project pinned a typescript version. Since TypeScript 7 was published, the latest package no longer contains those files, so the worker got no standard typings. That broke type checking and completions that rely on them, and the completions tests. Default to the version of the TypeScript compiler bundled in the worker instead, which is the version the lib files need to match anyway. A typescript version in the project's package.json still takes precedence.
The zizmor check requires every action reference to be pinned to a commit hash. Pin each action to the commit its current tag points to, so behaviour is unchanged, and keep the version as a comment.
Address the remaining zizmor findings: - Give every workflow a read-only default token (contents: read). The deploy-demo job additionally gets contents: write, which it needs to push to gh-pages. - Stop the checkout action from persisting credentials in lint, test and version-module, which never use them. deploy-demo keeps them, because its deploy step pushes with them; that finding is suppressed with a rationale.
rictic
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The TypeScript worker fetches the standard lib typings (
lib.dom.d.ts,lib.esnext.d.ts, ...) from the CDN attypescript@latest, unless the project'spackage.jsonpins atypescriptversion.latestis now TypeScript 7, whose npm package no longer contains those files, so the requests 404 and the worker gets no standard typings.This breaks type checking and completions that rely on the standard libs in any playground that doesn't pin
typescript. In CI it shows up as three failingcompletionstests.Fix
When the project doesn't specify a
typescriptversion, use the version of the compiler bundled in the worker (ts.version, currently 5.6.2). The lib files need to match the compiler that reads them anyway. Atypescriptversion in the project'spackage.jsonstill takes precedence.Note that this default applies to the
typescriptpackage as a whole: a project that importstypescriptitself without pinning it now gets typings for the bundled version rather thanlatest.Tests
typescriptversion inpackage.jsonis still used.typescript-worker_test.tsthat relied onlatest.wtrsuite passes on Chromium and WebKit, including the threecompletionstests that were failing. I couldn't run Firefox locally.Also in this PR: workflow changes needed for CI to pass
These are only here so the checks on this PR can run and pass. None of them changes what is tested.
ubuntu-24.04.ubuntu-latestnow resolves to Ubuntu 26.04, where our pinned Playwright (1.46.1) can't install its system dependencies, sonpx playwright install-depsfails before any test starts. This applies to the three workflows that install Playwright (test,deploy-demo,version-module), until Playwright is upgraded.contents: read. Thedeploy-demojob additionally getscontents: write, which it needs to push togh-pages.lint,testandversion-module, which never use them.deploy-demokeeps them, because its deploy step pushes with them; that zizmor finding is suppressed with a rationale.