From 62ee6e97eb41c08f178f3ef9a4115f11f50a23ce Mon Sep 17 00:00:00 2001 From: Theo Browne <6751787+t3dotgg@users.noreply.github.com> Date: Fri, 23 Oct 2026 08:15:03 -0700 Subject: [PATCH 1/3] fix(release): verify imports typescript/sync, the 7.1 beta export At pin 3e9236361fa9 (typescript@7.1.0-beta) Go's typescript package exports its API as ./sync, ./async and so on, not ./unstable/* (#64681). The release verify step and npm-alias-test.sh imported typescript/unstable/sync, so every release verify job failed. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 2 +- npm/typescript-readme.md | 4 ++-- scripts/goport/npm-alias-test.sh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2008c93f..529bb10db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -432,7 +432,7 @@ jobs: [[ $(npx tsc --version) == "Version $tsc_version" ]] node -p 'require("typescript").version' [[ $(node -p 'require("typescript").version') == "$tsc_version" ]] - node --input-type=module -e 'await import("typescript/unstable/sync")' + node --input-type=module -e 'await import("typescript/sync")' echo 'const x: number = "a";' > bad.ts set +e npx tsc --noEmit bad.ts > check.txt diff --git a/npm/typescript-readme.md b/npm/typescript-readme.md index 07dbee8d6..b48cc6198 100644 --- a/npm/typescript-readme.md +++ b/npm/typescript-readme.md @@ -2,8 +2,8 @@ [tsc-rs](https://www.npmjs.com/package/tsc-rs) as the `typescript` package. tsc-rs is a Rust port of the TypeScript 7 compiler, which Microsoft writes in Go. This package has the layout of the -TypeScript 7 `typescript` package: the `tsc` bin, the JS API (`typescript/unstable/*`) and the -platform packages that VS Code finds. Install it under the name `typescript`, and the tools that +TypeScript 7 `typescript` package: the `tsc` bin, the JS API (`typescript/sync`, `typescript/async` +and the other `typescript/*` modules) and the platform packages that VS Code finds. Install it under the name `typescript`, and the tools that use `typescript` run tsc-rs. This is an early release. Report problems at https://github.com/pingdotgg/ts-rust/issues. diff --git a/scripts/goport/npm-alias-test.sh b/scripts/goport/npm-alias-test.sh index 029e3f951..6904720d0 100755 --- a/scripts/goport/npm-alias-test.sh +++ b/scripts/goport/npm-alias-test.sh @@ -21,7 +21,7 @@ # Checks, per install: # - node_modules/.bin/tsc --version, and require("typescript").version: the tsc version. # - bin/tsc is the sh and JS polyglot when the postinstall ran (npm/install.js). -# - import("typescript/unstable/sync") gives the API class. +# - import("typescript/sync") gives the API class. # - tsc -p on a tiny project: exit 2 with TS2322 for bad.ts, and the emit of ok.ts. # - VS Code's resolver (resolveTsdkPathToExe, the JS copy below) on node_modules/typescript/lib # finds lib/tsc of @tsc-rs/linux-x64, with the npm version as the version it shows. @@ -300,10 +300,10 @@ checks() { [[ $v == "$tsc_version" ]] r=$? check "$tag require(\"typescript\").version: $tsc_version" $r "$v" - v=$(cd "$d" && node --input-type=module -e 'const m = await import("typescript/unstable/sync"); console.log(typeof m.API)' 2>&1) + v=$(cd "$d" && node --input-type=module -e 'const m = await import("typescript/sync"); console.log(typeof m.API)' 2>&1) [[ $v == function ]] r=$? - check "$tag import(\"typescript/unstable/sync\") gives the API class" $r "$v" + check "$tag import(\"typescript/sync\") gives the API class" $r "$v" mkdir -p "$d/tiny" echo 'export const x: number = 1;' > "$d/tiny/ok.ts" echo 'const y: number = "a";' > "$d/tiny/bad.ts" From a3bfd19e7994192a7ff6fcb333f34f75ca4c1071 Mon Sep 17 00:00:00 2001 From: Theo Browne <6751787+t3dotgg@users.noreply.github.com> Date: Fri, 23 Oct 2026 08:15:12 -0700 Subject: [PATCH 2/3] docs(npm): reflow the typescript readme line Co-Authored-By: Claude Opus 5.5 --- npm/typescript-readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/typescript-readme.md b/npm/typescript-readme.md index b48cc6198..4776648c4 100644 --- a/npm/typescript-readme.md +++ b/npm/typescript-readme.md @@ -3,8 +3,8 @@ [tsc-rs](https://www.npmjs.com/package/tsc-rs) as the `typescript` package. tsc-rs is a Rust port of the TypeScript 7 compiler, which Microsoft writes in Go. This package has the layout of the TypeScript 7 `typescript` package: the `tsc` bin, the JS API (`typescript/sync`, `typescript/async` -and the other `typescript/*` modules) and the platform packages that VS Code finds. Install it under the name `typescript`, and the tools that -use `typescript` run tsc-rs. +and the other `typescript/*` modules) and the platform packages that VS Code finds. Install it +under the name `typescript`, and the tools that use `typescript` run tsc-rs. This is an early release. Report problems at https://github.com/pingdotgg/ts-rust/issues. From 5572f872431c5cdd357296af57c23fe7817ece19 Mon Sep 17 00:00:00 2001 From: Theo Browne <6751787+t3dotgg@users.noreply.github.com> Date: Fri, 23 Oct 2026 07:09:41 -0700 Subject: [PATCH 3/3] fix(release): no SIGPIPE in the tsc check `tsc --listFilesOnly | grep -qx` failed on darwin-x64 with exit 141: grep -q ended at the first match, and the tsc died of SIGPIPE under pipefail. grep without -q reads all of the output. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 529bb10db..d64c698bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -222,7 +222,9 @@ jobs: [[ $RUNNER_OS != Windows ]] || listed=$(cygpath -m "$listed") cd "$RUNNER_TEMP" echo 'const x: number = "a";' > a.ts - "$dir/tsc$EXE" --listFilesOnly --lib es5 a.ts | grep -qx "$listed" + # Not grep -q: it can end before the tsc does, and the tsc then dies of SIGPIPE (exit 141 with + # pipefail; seen on darwin-x64). + "$dir/tsc$EXE" --listFilesOnly --lib es5 a.ts | grep -x "$listed" > /dev/null set +e "$dir/tsc$EXE" --noEmit a.ts > check.txt rc=$?