Commit e7133bb
committed
chore(build): canonicalize on npm, add phantom-import guardrail
Two changes to prevent a repeat of the 14-hour production outage where
Vercel's pnpm build couldn't resolve 'advanced-cropper' while local
npm builds worked fine.
1. Delete pnpm-lock.yaml. Both lockfiles were tracked, and Vercel was
picking pnpm on the tie-break. Everything else about the repo
(package.json scripts, CLAUDE.md, README.md, docs/SETUP.md,
docs/CONTRIBUTING.md, GitHub Actions CI) uses npm, so pnpm was the
outlier. Keeping package-lock.json makes npm the single source of
truth and eliminates drift between the two lockfiles.
2. Add the import/no-extraneous-dependencies ESLint rule (plugin is
already in devDependencies). This catches any `import from 'foo'`
where 'foo' is a transitive dependency instead of an explicit one
— the exact failure mode that broke production. Verified locally:
temporarily removing advanced-cropper from package.json triggers
the expected error at CustomStencil.tsx:5.
Test files, e2e specs, scripts, and config files are allowed to
import from devDependencies.1 parent e1abdee commit e7133bb
2 files changed
Lines changed: 25 additions & 8700 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
34 | 59 | | |
35 | 60 | | |
36 | 61 | | |
0 commit comments