milkee-plugin
v0.0.0-reserved
Published
[Reserved]
Downloads
8
Readme
reserve-npm-package
CLI tool to "reserve" an npm package name by publishing a temporary version 0.0.0-reserved.
Usage
Local (interactive):
Run and follow prompts:
npm run reserveProvide flags (use
--to forward flags throughnpm run):npm run reserve -- -p milkee-plugin -u otoneko.Or use positional args without
--(works withnpm rundirectly):npm run reserve milkee-plugin otoneko.
CI / GitHub Actions: use the included workflow
.github/workflows/reserve.yml(provide secretNPM_TOKEN).
How it works
- Creates a temporary copy of the repository (does not modify your working tree).
- Replaces every occurrence of
milkee-pluginandotoneko.inside the temporary copy. - Writes a temporary
.npmrcthat usesprocess.env.NPM_TOKEN. - Runs
npm publishfrom the temporary copy (the published version is0.0.0-reserved).
Environment
- Requires
NPM_TOKENset in the environment (CI: set as secretNPM_TOKEN).
Notes
- The repository itself is not modified — all replacements happen in a temporary workspace.
- The package.json
versionshould (and by default is)0.0.0-reservedfor reservation. - If an unscoped publish is rejected (name already used or "too similar"), the CLI will not publish a scoped package. The
usernameis used only forauthor/LICENSE placeholders; supply a differentpackage-nameto reserve.
