Add local npm registry publish and install #139
Reference in New Issue
Block a user
Delete Branch "benvin/local-npm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In-house npm packages have nowhere to publish: npm locals only accept raw file uploads, which
npm publishandnpm installcannot use.npm publish(PUT /api/v1/local/<repo>/<pkg>, scoped included) on local npm repos, capping the body at 256MiB and verifying the tarball against dist integrity.npmrcregistry +_authTokensetup in the UI and READMEnode:22publish/install e2e-docker caser.Bodyinhttp.MaxBytesReaderwith a configurable cap, return 413 on overflow.ErrAlreadyExistswith no manifest row, finish the remaining writes) or write the gate last.handleLocalPut/handleLocal(409 on republish, 405 on non-npm local, scoped%2fthrough chi routing, two concurrent publishes of different versions keeping both versions and tags, failure after tarball write) → add handler-level tests with a fake db/cas; concurrency and immutability are only covered by the docker e2e.npmRefReaccepts non-semver versions (e.g.1..2,x+) that npm clients choke on in a packument → validate with a semver parser.latest: 1.0.1with no1.0.1inversions, sonpm install pkgfails ETARGET until the manifest lands (permanently if the publish dies after the tags) → drop tags whose version is absent fromversionsin buildNPMPackument, and add a test for the window.latest -> 1.0.0, then 409s on the manifest, solatestregresses. Same via concurrent publishes with the same tarball and different manifests: the loser's tags can land last → check the manifest path first (409 before touching tags), or only write tags once the manifest write has succeeded; test a rejected republish leaves tags unchanged.No findings.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.