build: publish the npm package as @yuez/pi2d

The unscoped name was rejected by the registry's similarity filter ("too similar
to existing packages pify, ping, pino, pm2, uid"), so the package moves under the
maintainer's npm scope, which is not subject to that heuristic.

The executable is still `pi2`, the GitHub repository is still `zgs225/pi2d` (the
trusted publisher matches on owner/repo/workflow filename, not the npm name), and
the tarball contents are unchanged. The releasing checklist also had the npm
account wrong: the registry account is `yuez`, while `zgs225` is the GitHub owner
the trusted publisher is configured against.
This commit is contained in:
yuez committed 2026-10-23 10:31:32 +08:00
1 parent 9eb7075d70
commit 2589e6df72
4 files changed
+18 -18

No files matched your search

+1 -1
View File
@@ -130,6 +130,6 @@ jobs:
with: with:
generate_release_notes: true generate_release_notes: true
body: | body: |
`npm i -g pi2d@${{ github.ref_name }}` `npm i -g @yuez/pi2d@${{ github.ref_name }}`
Compatible pi2.nvim: protocol v1 (see `docs/protocol.md`). Compatible pi2.nvim: protocol v1 (see `docs/protocol.md`).
+6 -6
View File
@@ -29,15 +29,15 @@ starts it lazily. The result is one command inside Neovim:
…which opens your browser already signed in, showing the current workspace. …which opens your browser already signed in, showing the current workspace.
> **Status.** The npm package, the packaged web console and the lazy-start contract are > **Status.** The npm package, the packaged web console and the lazy-start contract are
> ready (`npm i -g pi2d` works today). `:PiWeb`, `:PiWebInstall` and the access-mode prompt > ready (`npm i -g @yuez/pi2d` works today). `:PiWeb`, `:PiWebInstall` and the access-mode prompt
> land with the next pi2.nvim release; until then use `:PiWebStart` plus a manual install. > land with the next pi2.nvim release; until then use `:PiWebStart` plus a manual install.
### Package managers (optional, for CLI-first users) ### Package managers (optional, for CLI-first users)
```bash ```bash
npm i -g pi2d # installs the `pi2` binary npm i -g @yuez/pi2d # installs the `pi2` binary
pnpm add -g pi2d pnpm add -g @yuez/pi2d
bun add -g pi2d bun add -g @yuez/pi2d
``` ```
Then: Then:
@@ -49,7 +49,7 @@ pi2 status # daemon + instances + health
pi2 doctor # node/nvim/pi/curl/plugin/runtime/web-dist/protocol checks pi2 doctor # node/nvim/pi/curl/plugin/runtime/web-dist/protocol checks
``` ```
`pi2` is the only executable (`pi2d` is the npm package name); `pi2 daemon` is a subcommand `pi2` is the only executable (`@yuez/pi2d` is the npm package name); `pi2 daemon` is a subcommand
of it, not a separate process. Runtime files, ports, auth, services and troubleshooting: of it, not a separate process. Runtime files, ports, auth, services and troubleshooting:
[docs/deployment.md](docs/deployment.md). [docs/deployment.md](docs/deployment.md).
@@ -75,7 +75,7 @@ The plugin looks for the daemon in this order, and `:PiWebStatus` reports which
| 2 | `pi2` on `PATH` | a global install | | 2 | `pi2` on `PATH` | a global install |
| 3 | plugin data dir | `<stdpath("data")>/pi2d/node_modules/.bin/pi2` | | 3 | plugin data dir | `<stdpath("data")>/pi2d/node_modules/.bin/pi2` |
| 4 | repo checkout | `node_modules/.bin/pi2` (developing pi2d itself) | | 4 | repo checkout | `node_modules/.bin/pi2` (developing pi2d itself) |
| 5 | `npx -y pi2d@<pinned>` | last resort when nothing is writable | | 5 | `npx -y @yuez/pi2d@latest` | last resort when nothing is writable |
## Remote access (phone, LAN, Tailscale) ## Remote access (phone, LAN, Tailscale)
+10 -10
View File
@@ -12,18 +12,18 @@ bump version → git tag v<version> → push tag → release.yml → npm publish
That pipeline applies to **every release after the first one**. The very first version has to be That pipeline applies to **every release after the first one**. The very first version has to be
published by hand — see [Bootstrap](#bootstrap-the-first-publish-three-phases) — because npmjs.com published by hand — see [Bootstrap](#bootstrap-the-first-publish-three-phases) — because npmjs.com
only offers the Trusted Publisher settings page for a package that already exists on the registry, only offers the Trusted Publisher settings page for a package that already exists on the registry,
and `pi2d` does not exist yet (`npm view pi2d` → 404). and `@yuez/pi2d` does not exist yet (`npm view @yuez/pi2d` → 404).
## Bootstrap: the first publish (three phases) ## Bootstrap: the first publish (three phases)
### Phase 0 — publish the first version from your machine (once, no provenance) ### Phase 0 — publish the first version from your machine (once, no provenance)
npmjs.com has no `pi2d` package page yet, so there is nowhere to configure a trusted publisher and npmjs.com has no `@yuez/pi2d` package page yet, so there is nowhere to configure a trusted publisher and
CI cannot authenticate. The first version is therefore published manually from the repo root: CI cannot authenticate. The first version is therefore published manually from the repo root:
```bash ```bash
npm login # account zgs225; 2FA prompt npm login # npm account yuez; 2FA prompt
npm whoami # must print: zgs225 npm whoami # must print: yuez
npm publish --access public # from the repo root; runs `prepack` (builds dist/ and web/dist/) npm publish --access public # from the repo root; runs `prepack` (builds dist/ and web/dist/)
``` ```
@@ -37,9 +37,9 @@ first CI release must use a **higher** `package.json` version (bump it in Phase
### Phase 1 — register the trusted publisher (possible only now) ### Phase 1 — register the trusted publisher (possible only now)
The package page exists after Phase 0. Configure the publisher on The package page exists after Phase 0. Configure the publisher on
<https://www.npmjs.com/package/pi2d> — no CI secrets are involved. <https://www.npmjs.com/package/@yuez/pi2d> — no CI secrets are involved.
1. **Log in** to npmjs.com as an owner of `pi2d` (account `zgs225`) and make sure 2FA is enabled on 1. **Log in** to npmjs.com as the owner of `@yuez/pi2d` (npm account `yuez`) and make sure 2FA is enabled on
that account. that account.
2. Package page → **Settings** → **Trusted publishing** → **Add a trusted publisher** → 2. Package page → **Settings** → **Trusted publishing** → **Add a trusted publisher** →
**GitHub Actions**. **GitHub Actions**.
@@ -144,15 +144,15 @@ a real publish. It still validates `prepack`, the `files` list and the tarball c
## Verifying a publish ## Verifying a publish
```bash ```bash
npm view pi2d version dist.integrity dist.attestations npm view @yuez/pi2d version dist.integrity dist.attestations
npm view pi2d dist.tarball npm view @yuez/pi2d dist.tarball
npm audit signatures # in a scratch dir, after `npm i pi2d` npm audit signatures # in a scratch dir, after `npm i @yuez/pi2d`
``` ```
* npmjs.com shows a green **provenance badge** on the package page and on the version's * npmjs.com shows a green **provenance badge** on the package page and on the version's
"Provenance" section; it links to the exact commit and workflow run that built the tarball. "Provenance" section; it links to the exact commit and workflow run that built the tarball.
(The Phase 0 bootstrap version has no badge — that is expected.) (The Phase 0 bootstrap version has no badge — that is expected.)
* `npm view pi2d dist.integrity` must match the tarball you expected; the release page should list * `npm view @yuez/pi2d dist.integrity` must match the tarball you expected; the release page should list
the attestation (`dist.attestations.provenance`). the attestation (`dist.attestations.provenance`).
* In the workflow log, the publish step should report authenticated publishing via OIDC — never a * In the workflow log, the publish step should report authenticated publishing via OIDC — never a
token. token.
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "pi2d", "name": "@yuez/pi2d",
"version": "0.1.0", "version": "0.1.0",
"type": "module", "type": "module",
"license": "MIT", "license": "MIT",