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:
1 parent
9eb7075d70
commit
2589e6df72
4 files changed
+18
-18
No files matched your search
@@ -130,6 +130,6 @@ jobs:
|
||||
with:
|
||||
generate_release_notes: true
|
||||
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`).
|
||||
@@ -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.
|
||||
|
||||
> **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.
|
||||
|
||||
### Package managers (optional, for CLI-first users)
|
||||
|
||||
```bash
|
||||
npm i -g pi2d # installs the `pi2` binary
|
||||
pnpm add -g pi2d
|
||||
bun add -g pi2d
|
||||
npm i -g @yuez/pi2d # installs the `pi2` binary
|
||||
pnpm add -g @yuez/pi2d
|
||||
bun add -g @yuez/pi2d
|
||||
```
|
||||
|
||||
Then:
|
||||
@@ -49,7 +49,7 @@ pi2 status # daemon + instances + health
|
||||
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:
|
||||
[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 |
|
||||
| 3 | plugin data dir | `<stdpath("data")>/pi2d/node_modules/.bin/pi2` |
|
||||
| 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)
|
||||
|
||||
|
||||
+10
-10
@@ -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
|
||||
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,
|
||||
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)
|
||||
|
||||
### 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:
|
||||
|
||||
```bash
|
||||
npm login # account zgs225; 2FA prompt
|
||||
npm whoami # must print: zgs225
|
||||
npm login # npm account yuez; 2FA prompt
|
||||
npm whoami # must print: yuez
|
||||
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)
|
||||
|
||||
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.
|
||||
2. Package page → **Settings** → **Trusted publishing** → **Add a trusted publisher** →
|
||||
**GitHub Actions**.
|
||||
@@ -144,15 +144,15 @@ a real publish. It still validates `prepack`, the `files` list and the tarball c
|
||||
## Verifying a publish
|
||||
|
||||
```bash
|
||||
npm view pi2d version dist.integrity dist.attestations
|
||||
npm view pi2d dist.tarball
|
||||
npm audit signatures # in a scratch dir, after `npm i pi2d`
|
||||
npm view @yuez/pi2d version dist.integrity dist.attestations
|
||||
npm view @yuez/pi2d dist.tarball
|
||||
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
|
||||
"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.)
|
||||
* `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`).
|
||||
* In the workflow log, the publish step should report authenticated publishing via OIDC — never a
|
||||
token.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "pi2d",
|
||||
"name": "@yuez/pi2d",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
|
||||
Reference in new issue
Block a user