Skip to content

Enable storage retention for npm - #440

Merged
andrew merged 3 commits into
git-pkgs:mainfrom
pinguinfuss:issue-306-retention-npm
Oct 12, 2026
Merged

andrew merged 3 commits into
git-pkgs:mainfrom
pinguinfuss:issue-306-retention-npm

Conversation

@pinguinfuss

Copy link
Copy Markdown
Contributor

Refs #306, builds on #428.

Registers npm for storage.retention, so cached tarballs are evicted once nobody has downloaded them for the configured age.

Package rules use the package name as purl writes it. Both pkg:npm/@babel/core and pkg:npm/%40babel/core work. Names match exactly, so pkg:npm/jsonstream doesn't cover JSONStream.

Tests cover eviction and refetch, package rules for scoped and unscoped packages, and tarballs the mirror puts in the cache.

npm stores packages under the PURL purl builds from the full name, so package rules use the default mapping. Both pkg:npm/@babel/core and pkg:npm/%40babel/core work.

Refs git-pkgs#306
The docs now say npm package rules match the name exactly, so pkg:npm/jsonstream doesn't cover JSONStream. The refetch, package rule and mirror tests were weaker than their names and now check what they claim.

Refs git-pkgs#306

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm package rules match the production cache keys. The tests cover eviction, deletion queueing, refetching, scoped package exemptions, and mirrored tarballs.

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation conflict is resolved with the npm entry and the previously merged ecosystem entries preserved. This retains the change reviewed at #440 (review).

@andrew
andrew merged commit 4b8678c into git-pkgs:main Oct 12, 2026
6 checks passed
@pinguinfuss
pinguinfuss deleted the issue-306-retention-npm branch October 12, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants