Problem
OLSKBundleClearPackageLock() (invoked from olsk-bundle, this repo's setup/postinstall step) deliberately deletes package-lock.json, and several dependencies are pinned loosely (git refs with no commit SHA, "latest", bare majors). This means the exact dependency graph resolved on any given day is not reproducible.
Concrete instance
While working on #1, npm run build failed with:
TypeError: require(...) is not a constructor
at OLSKRollupPluginLocalize/main.js:62 -> new (require('magic-string'))(...)
because the unpinned transitive magic-string resolved to 1.1.0, which is ESM-only ("type": "module", no CJS entry) — incompatible with the require() call. Fixed for now via a package.json overrides pin to ^0.25.0, but the same class of break can recur with any other loosely-pinned transitive dependency whenever upstream publishes a new major.
Suggested next steps
- Consider committing a lockfile (tension with
OLSKBundleClearPackageLock's intent — worth a design discussion across the OLSK toolchain, not just this repo)
- Or: audit and pin the dependencies most likely to break (build-time rollup/babel plugins, similar to the
magic-string override already added)
https://claude.ai/code/session_01AcjKc8vk2fb84yYZsE8k5d
Problem
OLSKBundleClearPackageLock()(invoked fromolsk-bundle, this repo'ssetup/postinstallstep) deliberately deletespackage-lock.json, and several dependencies are pinned loosely (git refs with no commit SHA,"latest", bare majors). This means the exact dependency graph resolved on any given day is not reproducible.Concrete instance
While working on #1,
npm run buildfailed with:because the unpinned transitive
magic-stringresolved to1.1.0, which is ESM-only ("type": "module", no CJS entry) — incompatible with therequire()call. Fixed for now via apackage.jsonoverridespin to^0.25.0, but the same class of break can recur with any other loosely-pinned transitive dependency whenever upstream publishes a new major.Suggested next steps
OLSKBundleClearPackageLock's intent — worth a design discussion across the OLSK toolchain, not just this repo)magic-stringoverride already added)https://claude.ai/code/session_01AcjKc8vk2fb84yYZsE8k5d