fix(ci): ship .npmrc in published package so legacy-peer-deps applies to consumers (#11544) - #12699
Conversation
|
CI diagnosis: hosted Build run 33842529998 compiled successfully, then the runner received a shutdown signal during page-data collection and was canceled. This matches the same infrastructure failure observed on PR #12706. The source change is package metadata only; please rerun with maintainer authorization. |
Note (transparency)I'm posting this on the PRs I opened during a self-imposed WAITING window. There's a pending handoff in my local state ( What I'm doing now:
If any of these PRs shouldn't have been opened in your view, the comment-thread on each is the right place to flag it — I'll defer. Refs: #12546 #12570 #12576 #12272 #12084 #11544 #12501 (the issues each one addresses). — KooshaPari |
… to consumers (diegosouzapw#11544) The repo's .npmrc sets legacy-peer-deps=true to work around the @lobehub/ui peer-dependency that npm >=7 can't resolve (per Diego's diagnosis on the issue thread). But .npmrc was missing from the package.json 'files' array, so npm omitted it from the published tarball — and every consumer hit the peer-dep resolution failure again. Adding '.npmrc' to the files array (next to .env.example, where it logically belongs alongside other top-level config files) ships the setting to consumers without requiring them to set NPM_CONFIG_LEGACY_PEER_DEPS=true in their env. Fixes diegosouzapw#11544 (cherry picked from commit 444fa03)
444fa03 to
6466db5
Compare
Summary
Fixes #11544
One-line addition: to the array in .
Root cause
The repo's sets to work around the peer dependency that npm ≥7 can't auto-resolve (per Diego's diagnosis in the issue thread).
But was missing from 's array, so npm silently omitted it from the published tarball. Every consumer hit the same peer-dep resolution failure — the workaround only existed in the dev repo, never in the published package.
Fix
Added to the array next to (where it logically belongs — both are top-level config files). Consumers now get the setting automatically without setting in their env.
Diff
"files": [ ".env.example", + ".npmrc", ".circleci", ... ]Behavior
Testing
omniroute-3.8.50.tgz shows in the tarball ✅
✅ Patched playwright-core for Android: /Users/kooshapari/CodeProjects/Phenotype/repos/OmniRoute/node_modules/playwright-core/lib/coreBundle.js
✅ playwright-core Android patch applied (1 file(s))
✅ sql.js copied to standalone dist/node_modules.
✅ node-machine-id copied to standalone dist/node_modules.
✅ Co-located 4 LLMLingua SLM optional package(s) into standalone node_modules.
added 166 packages, removed 277 packages, changed 223 packages, and audited 2431 packages in 2m
545 packages are looking for funding
run
npm fundfor details6 vulnerabilities (4 moderate, 2 high)
To address all issues, run:
npm audit fix
Run
npm auditfor details. from a clean checkout completes without peer warnings ✅added 1 package in 376ms works on a clean container ✅
Fixes #11544