Skip to content

fix(npm): scope the platform packages to sidestep npm spam detection - #5

Merged
adhikjoshi merged 1 commit into
mainfrom
feat/scoped-npm-platform-packages
Aug 24, 2026
Merged

fix(npm): scope the platform packages to sidestep npm spam detection#5
adhikjoshi merged 1 commit into
mainfrom
feat/scoped-npm-platform-packages

Conversation

@adhikjoshi

@adhikjoshiadhikjoshi commented Aug 24, 2026

Copy link
Copy Markdown
Contributor
403 Package name triggered spam detection - PUT modelslab-cli-win32-x64

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-x64 is 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:

CLIPlatform package
esbuild@esbuild/win32-x64
Biome@biomejs/cli-win32-x64
Claude Code@anthropic-ai/claude-code-win32-x64

esbuild's unscoped esbuild-windows-64 has been frozen at 0.15.18 since 2022, when they migrated for the same reason.

The entry package stays unscoped as modelslab-cli, so npm install -g modelslab-cli is 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:

6 scoped platform packages + entry built
entry optionalDependencies -> all six pinned at exact version
publish.sh finds them under dist/npm/@modelslab/*
npm install (entry + one platform) -> modelslab --version ✓

Needs you

The @modelslab organisation must exist on npm, and NPM_TOKEN needs publish rights to it. It does not exist yet — I checked. Once it does, tag v0.1.3 and the release completes on all channels.


View with [code]smithAutofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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.
@adhikjoshi
adhikjoshi merged commit 13c6679 into mainAug 24, 2026
8 checks passed
@adhikjoshi
adhikjoshi deleted the feat/scoped-npm-platform-packages branch August 24, 2026 16:57
Sign up for freeto 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.

1 participant

@adhikjoshi