diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2008c93f..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=$? @@ -432,7 +434,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..4776648c4 100644 --- a/npm/typescript-readme.md +++ b/npm/typescript-readme.md @@ -2,9 +2,9 @@ [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 -use `typescript` run tsc-rs. +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"