Skip to content

Commit e59238e

Browse files
ci: fix pnpm install and snapshot script for scheduled ci (#33097)
Fixes the failure in Scheduled CI by adding `--no-frozen-lockfile` to `pnpm install` when running snapshot builds, and updating the snapshot script to avoid moving packages from `devDependencies` to `dependencies`.
1 parent 3ed8f89 commit e59238e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/scheduled-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
# updates the lock file as expected with the changes
3232
run: node ./scripts/circleci/setup-angular-snapshots.js main
3333
- name: Install node modules
34-
run: pnpm install
34+
run: pnpm install --no-frozen-lockfile
3535
- name: Run Browser tests
3636
run: pnpm bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
3737

@@ -51,7 +51,7 @@ jobs:
5151
# updates the lock files as expected with the changes
5252
run: node ./scripts/circleci/setup-angular-snapshots.js main
5353
- name: Install node modules
54-
run: pnpm install
54+
run: pnpm install --no-frozen-lockfile
5555
- name: Run linker tests using AOT
5656
run: pnpm test-linker-aot
5757
- name: Run linker tests using JIT

scripts/circleci/setup-angular-snapshots.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ packagesToUpdate.forEach(({name, repoName}) => {
7575

7676
// Since the resolutions only cover the version of all nested installs, we also need
7777
// to explicitly set the version for the package listed in the project "package.json".
78-
packageJson.dependencies[name] = buildsUrl;
79-
80-
// In case this dependency was previously a dev dependency, just remove it because we
81-
// re-added it as a normal dependency for simplicity.
82-
delete packageJson.devDependencies[name];
78+
if (packageJson.devDependencies && packageJson.devDependencies[name]) {
79+
packageJson.devDependencies[name] = buildsUrl;
80+
} else {
81+
packageJson.dependencies[name] = buildsUrl;
82+
}
8383
});
8484

8585
// Write changes to the "packageJson", so that we can install the new versions afterwards.

0 commit comments

Comments
 (0)