Conversation
…umers Consumers installing force-ui as a git dependency on npm 9.x (Node 18.15) fail with "Cannot read properties of null (reading 'edgesOut')" since vitest 5.0.0 was published (2026-09-03). The release tag ships package.json without a lockfile, so npm re-resolves all devDependencies on every install. Two peer chains reached vite 8, whose @vitejs/devtools peer pulls in vitest@* (now 5.0.0), which conflicts with our vitest 4 and trips an arborist bug in npm 9: - @storybook/react-vite >=10.3.5 -> @joshwooding/vite-plugin-react-docgen-typescript ^0.7 (peer vite up to ^8) - vitest 4 peer vite ^6||^7||^8 while we declared vite ^5 Pinning the storybook family to the exact 10.3.3 already in the lockfile keeps the docgen plugin at 0.6.x (peer vite <=6), and moving vite to ^6 satisfies vitest's peer range. Neither path can reach vite 8 anymore. Verified: npm 9.5.0 resolves the tag package.json cleanly; npm run build succeeds on vite 6.4.3.
Address review on #500: - Drop the nine exact storybook pins and express the real invariant once: `overrides: { vite: "^6.4.3" }`. No node in the tree can resolve vite 8, so the @vitejs/devtools -> vitest@* peer chain is unreachable regardless of which storybook version floats in. Survives dependabot bumps. - Raise @vitejs/plugin-react floor to ^4.3.4, the first release whose peer range includes vite 6. - Regenerate package-lock.json from scratch instead of patching in place. Removes the three stale nested vite@8.0.2 subtrees, moves the vitest family 4.1.1 -> 4.1.11 (clears 4 critical advisories), keeps storybook at 10.3.3. - Add a consumer-install-check workflow that resolves the bare manifest on Node 18.15 / npm 9.5.0 without a lockfile, the path consumers hit and the one `npm ci` never exercises. - Changelog: describe the override mechanism; disclose the tailwind.css minifier delta and the d.ts JSX import change from newer @types/react. Verified: lockless resolution passes on npm 9.5.0 and 10.3.0; npm run build and build-storybook pass; JS/sourcemaps byte-identical to the previous build.
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Not needed; the vite override in package.json already keeps the git-dep install path stable. Removed per maintainer decision on #500.
Problem
Every SureRank CI run since 2026-09-03 fails at
npm install --forcewith:Consumers install
@bsf/force-uias a git dependency (github:brainstormforce/force-ui#1.8.1). The release tag shipspackage.jsonwith fulldevDependenciesandbuild/postinstallscripts but no lockfile, so npm runs a nestednpm install --include=dev --include=peerinside the cloned tag and re-resolves every devDependency from the registry on each run.Trigger
vitest@5.0.0was published on 2026-09-03 12:24 UTC. Nothing in force-ui or SureRank changed.Two peer-resolution chains reach vite 8, whose
@vitejs/devtoolspeer pulls@vitejs/devtools-vitest→vitest: "*"→ nowvitest@5.0.0. That conflicts with our vitest 4 and trips an arborist bug (loadPeerSetdereferences a detached node) present in npm 9.x and 10.0–10.3. npm 9.5.0 ships with Node 18.15, which SureRank CI pins.@storybook/react-vite≥ 10.3.5 depends on@joshwooding/vite-plugin-react-docgen-typescript ^0.7.0, whose peer range allows vite up to^8. Our^10.3.3range floated there.vitest4 peersvite ^6 || ^7 || ^8, but we declaredvite ^5.4.21, so arborist reached for vite 8 to satisfy it.Only vite 8 declares the
@vitejs/devtoolspeer; vite 5/6/7 do not.Fix
overrides: { "vite": "^6.4.3" }— states the invariant once: no node in the tree may resolve vite ≥ 7. Both chains above are closed regardless of which storybook or vitest version floats in, and dependabot cannot silently undo it.vite^5.4.21→^6.4.3— satisfies vitest 4's peer range natively. Vite 6 supports Node 18/20/22, matching our workflows (vite 7 needs Node ≥ 20.19;publish-public-build.ymlruns Node 18).@vitejs/plugin-react^4.3.2→^4.3.4— first release whose peer range includes vite 6.package-lock.jsonregenerated from scratch. Removes three stale nestedvite@8.0.2subtrees, moves the vitest family 4.1.1 → 4.1.11 (clears 4 critical advisories: audit 40 → 15 findings, 0 critical). Storybook stays at 10.3.3 in the dev tree.Verification
edgesOutcrashnpm run buildnpm run build-storybooktailwind.cssdiffers by minifier whitespace (esbuild 0.21 → 0.25).force-ui.d.tsimportsJSXfromreactinstead ofreact/jsx-runtime(same types,@types/react18.3.28 → 18.3.31)Follow-up
After merge and the
1.8.2tag, SureRank bumps its@bsf/force-uiref to that tag.