Skip to content

Commit bba060f

Browse files
committed
[CI] Pin TypeScript toolchain for the ArkAnalyzer build
ArkAnalyzer is installed without a lockfile, so 'typescript' and '@types/node' float to the latest versions on every CI run. A recent '@types/node' release is not parseable by the TypeScript version the project builds with, failing 'npm run build' in the ci-ts job. Pin a known-good toolchain with 'npm install --no-save'.
1 parent ea5e952 commit bba060f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ jobs:
149149
cd $DEST_DIR
150150
151151
npm install
152+
# ArkAnalyzer has no lockfile, and 'typescript'/'@types/node' are resolved
153+
# transitively, so a fresh 'npm install' floats them to the latest versions.
154+
# New '@types/node' releases are not parseable by the TypeScript version
155+
# ArkAnalyzer builds with, which breaks 'npm run build'.
156+
# Pin a known-good toolchain without touching package.json
157+
# ('ohos-typescript' must be re-installed explicitly: npm prunes it
158+
# otherwise, because it is only listed in bundleDependencies).
159+
npm install --no-save typescript@5.4.5 @types/node@24.0.0 ohos-typescript@4.9.5-r10
152160
npm run build
153161
154162
- name: Run TS tests

0 commit comments

Comments
 (0)