Uh oh!
There was an error while loading. Please reload this page.
fix(npm): scope the platform packages to sidestep npm spam detection - #5
Merged
Merged
Conversation
The v0.1.2 release published five unscoped platform packages and was then refused on the sixth: 403 Package name triggered spam detection - PUT modelslab-cli-win32-x64 Not a token problem — the five before it published fine, with signed provenance, seconds earlier. A thin, unscoped package whose name matches a very common platform-suffix pattern is the shape that heuristic targets, and `win32-x64` is the most heavily squatted suffix of the six. Platform packages become @modelslab/cli-<os>-<arch>. A scope proves ownership and takes them out of the unscoped-name heuristic entirely, which is why every comparable CLI is scoped: @esbuild/win32-x64, @biomejs/cli-win32-x64, @anthropic-ai/claude-code-win32-x64. esbuild's unscoped esbuild-windows-64 has been frozen at 0.15.18 since they migrated for the same reason. The entry package stays unscoped as `modelslab-cli`, so `npm install -g modelslab-cli` is unchanged and still findable by name. Platform packages also gain a README. A two-file package with no readable content is part of what reads as spam, and "do not install this directly" is worth saying to anyone who lands on one. The five unscoped packages v0.1.2 published are orphaned at that version. Nothing references them — the entry package never published — and npm does not permit unpublishing, so they are left alone. Verified end to end against a real goreleaser snapshot: six scoped packages plus the entry package build, the entry pins all six by exact version, publish.sh finds them under the scope directory, and an install of the entry plus one platform package produces a working `modelslab --version`. Requires the @ModelsLab organisation to exist on npm and NPM_TOKEN to have publish rights to it.
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not a token problem. Five platform packages published fine — with signed provenance — seconds earlier. A thin, unscoped package whose name matches a very common platform-suffix pattern is exactly the shape npm's heuristic targets, and
win32-x64is the most heavily squatted of the six suffixes.The fix
Platform packages become
@modelslab/cli-<os>-<arch>. A scope proves ownership and removes them from the unscoped-name heuristic entirely.This is what everyone else converged on:
@esbuild/win32-x64@biomejs/cli-win32-x64@anthropic-ai/claude-code-win32-x64esbuild's unscoped
esbuild-windows-64has been frozen at 0.15.18 since 2022, when they migrated for the same reason.The entry package stays unscoped as
modelslab-cli, sonpm install -g modelslab-cliis unchanged and still discoverable by name.Platform packages also gain a README — a two-file package with no readable content is part of what reads as spam, and "do not install this directly" is worth saying to anyone who lands on one.
The orphaned packages
The five unscoped packages v0.1.2 published are stranded at that version. Nothing references them (the entry package never published) and npm does not permit unpublishing, so they are left alone. Same thing esbuild lived with.
Verified end to end
Against a real
goreleaser build --snapshot:Needs you
The
@modelslaborganisation must exist on npm, andNPM_TOKENneeds publish rights to it. It does not exist yet — I checked. Once it does, tagv0.1.3and the release completes on all channels.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.