npm

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package npm runs the npm routes of the assembled server: the route and principal matrix, the status tables, login and logout, the auth lines, reindex and the layout conversion.

Role

Server-assembly suite, outside the modules: it drives the production router through HTTP requests. It is a package of its own so that CI selection can run it alone; its owner in tools/citestselection/test_ownership.json is npm.

Inputs

  • The production router from test/server/support/harness (app.NewRouter), built over an in-memory store and a file-system blob store, with the request and seed helpers of test/server/support.
  • support.NPMRoutes, the route inventory, with support.NPMPublishBody and support.NPMTarballOf.

Outputs

  • TestAccNPMRouteTablesCoverImplemented fails while a route of support.NPMRoutes has no status row or no principal row.
  • TestAcc results for login and logout (no logout token is logged), the auth lines, the queued reindex and the strict-layout conversion.
  • TestAccNPMRemoteTarballMIMERefusal fails while an upstream tarball whose label the remote's block list refuses answers other than 7.x's 409, remembered, without asking the upstream again (issue 1392).
  • TestAccNPMRemoteTarballTypedByPath fails while a tarball of a remote that stores nothing answers its upstream's label instead of the type its kept copy answers (issue 1477).
  • TestAccNPMRemoteTarballETagIsItsSHA1 and TestAccNPMRemoteKeysETagIsItsSHA1 fail while a remote tarball or keys document answers with its upstream's ETag instead of its SHA-1, or matches it (issue 1484); TestAccNPMRemoteTarballHeadWithoutChecksumIsMatchedByDate while a tarball HEAD answered from the upstream's HEAD without a checksum is matched by Go's rules against the upstream's ETag (issue 1487).
  • TestAccNPMRemoteFailedAvailabilityWriteIsAServerFault fails while a remote tarball whose record of the upstream's 200 or 404 in the availability state meets a statement the database fails to run answers other than 500 "internal error", logged once (issue 1489).
  • TestAccNPMRemoteTarballOutsideRegistry fails while a remote answers 502 for a packument whose tarball lies outside its registry, on its host or another, unless its externalDependencies fields allow it, or sends its credentials to that other host (issue 1574).

References

  • Decision 0034: docs/research/decisions/0034-npm.md.
  • Research 25: docs/research/25-npm.md.
  • docs/testing/server-test-ownership.md: how CI selection gives the package an owner.

Status

Implemented P7; P9b moved the tests here from the server root (issue 673).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL