Commit 7cc6574
perf(stackblitz): commit an npm lockfile so the demo stops re-resolving (#501)
A cold StackBlitz container spent ~6 minutes on `npm install`, almost all of
it in dependency resolution: with no lockfile npm fetches a packument per
package across ~500 transitive deps, which is why the terminal sat silent
for minutes before printing anything.
Commit `package-lock.json` and the install drops to **14 seconds** —
measured in a fresh WebContainer on this branch ("added 414 packages in
14s"). Nothing else in the repo reads the file: pnpm ignores it, CI still
runs `pnpm install --frozen-lockfile`, and local development is unchanged.
Also pass `--prefer-offline` so npm skips revalidating what it has.
The lockfile only helps while it matches package.json, and no other job
would notice drift, so CI now runs `scripts/check-stackblitz-lock.mjs`. It
compares the manifest against the lockfile's root entry rather than
diffing a regenerated lockfile, which would flap with the npm version.
Regeneration steps are in the script's header comment.
Re-verified in the same container: app boots, `sign-in/email` 200,
`get-session` 200, `jwks` 404 (OIDC still off, per #486).
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent d0e2765 commit 7cc6574
5 files changed
Lines changed: 7219 additions & 2 deletions
File tree
- .github/workflows
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments