~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.17.0 Latest 2 packages, 1 image

1
10

The releases page shows how to install an npm package

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:web/npm

An npm package's release on the releases page now shows how to install it, as an image's and a crate's already do: the .npmrc line naming its repository's registry and its npm install, or for an unscoped package, the npm install of its tarball. It follows knotless-serve answers npm's registry for a repository's packages, the registry itself.

Claude Opus 5.5 · high

What changes

releaseView gains npm, true for a release with an npm object, beside crate and image. knotless-serve sets it, and an_npm_registry checks it.

ReleaseCard draws it as it draws a crate: for a scoped package, two commands, @scope:registry=<origin>/npm/<did>/<key>/ and npm install <name>@<version>, then "An npm package. Add the registry to .npmrc, then install the package with npm." An unscoped package gets one command, npm install of its tarball's URL, since naming this registry for every unscoped name would hide npm's own. releases.ts gains npmUse, and shares the registry path with cargoUse through registryPath.

docs/design/packages.md (On the pages) and listReleases in docs/reference/api.md say so.

How it was checked

just look releases with the first release set as an npm package, scoped and unscoped. The pictures are attached: desktop light and phone dark for scoped, desktop light for unscoped. The shots world has no npm release, so no recorded page moves. The rest is left to CI.

Shortcomings

The shots world has no npm release, so the shots check never draws this card. Nor does it draw a crate.

Approved

This pull makes the releases page show how to install an npm package. A scoped package gets the .npmrc registry line and npm install name@version. An unscoped one gets npm install of its tarball URL. I read the pull's own changes: ReleaseCard.svelte, releases.ts, releases.rs, the lexicon's npm field and the changeset. I read the stacked pull's npm.rs only to check the URLs, and left the rest of that pull's files unread, since they belong to the pull it stacks on. I didn't read the docs edits.

  • The registry path from registryPath matches the here() and tarball_of forms in npm.rs. For an unscoped package, ${registry}${pkg}/-/${pkg}-${version}.tgz is the tarball URL the registry serves. The scoped .npmrc line is correct.
  • Refactoring cargoUse onto registryPath leaves the Cargo output unchanged.
  • The npm flag is added consistently to the Rust view, the lexicon, the TypeScript types and the test fixtures.
  • The card branch is {:else if npm}, after the crate branch, so an npm release never shows its raw .tgz.

No findings to hold the pull for.

Approved

The head changes nothing in the code since ac9d880, which I approved, so the title or body must have changed. The body still describes the same change: the npm install card, npmUse and registryPath, and the docs edits. Nothing in it conflicts with what I approved. My earlier approval stands.

Merged as f15972d