You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename npm package to @joaoh82/sqlrite (scoped) (#30)
The unscoped `sqlrite` name on npm was rejected during the v0.1.5
canary setup with:
403 Forbidden — Package name too similar to existing packages
sqlite, sqlite3; try renaming your package to '@joaoh82/sqlrite'
and publishing with 'npm publish --access=public' instead.
Levenshtein distance between "sqlrite" and "sqlite" is 1, which
trips npm's similar-names check. This is a registry-side policy,
not something we can work around with a suffix — `sqlrite-db`,
`sqlrite-node`, etc. all share the same stem and would hit the
same check.
**Switch to `@joaoh82/sqlrite`** — npm's own recommended fix, and
the standard pattern in the Node ecosystem (`@napi-rs/canvas`,
`@aws-sdk/client-s3`, `@swc/core`, `@types/*`). Scoped names
bypass the similarity check because the scope itself is a
namespace. The scope `@joaoh82` is auto-owned by the author's
npm user account, so no additional reservation step needed.
**Paralleling the crates.io workaround:** this is the same
registry-forced rename pattern we hit with `sqlrite-engine` on
crates.io (the `sqlrite` name there was taken by an unrelated
RAG-SQLite wrapper). Different registries, different reasons,
same pragmatic outcome — rename the *package* while keeping the
Rust import alias stable inside the codebase.
Files touched (12):
Source & manifests:
sdk/nodejs/package.json — name: "@joaoh82/sqlrite"
sdk/nodejs/package-lock.json — refreshed via npm install
sdk/nodejs/Cargo.toml — description + comment
sdk/nodejs/src/lib.rs — module doc-comment
Workflows:
.github/workflows/release.yml — npm URL + install/require
snippets in release body,
comment block explaining
--access public requirement
Docs:
README.md — Phase 6c runbook summary
docs/embedding.md — distribution channel list
docs/release-plan.md — publish-channels table
docs/release-secrets.md — §3 npm trusted-publisher
flow, now notes scoped names
auto-own + skip bootstrap
NPM_TOKEN dance
docs/roadmap.md — Phase 6c trusted-publishers
bullet
examples/README.md — language→publish-channel
table
sdk/nodejs/README.md gets a new "Why the scoped name?" callout
near the top explaining the rename to users reading the readme
cold.
No engine changes, no src/ changes outside the doc-comment in
sdk/nodejs/src/lib.rs. The underlying napi-rs binding is byte-
identical; only how npm addresses the tarball changed.
Next release canary (v0.1.5) will push the first real build
under the new name. First publish also auto-creates the scoped
package, so the trusted-publisher registration on npmjs.com can
run straight against the non-existent-yet package name (npm's
chicken-and-egg from the PyPI comparison doesn't apply to scoped
names under your own user scope).
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -224,7 +224,7 @@ Lockstep versioning — one dispatch bumps every product to the same `vX.Y.Z`. T
224
224
225
225
-[x]**6a — Bump script**: `scripts/bump-version.sh` rewrites the version string in ten manifests (7 TOML, 3 JSON) in a single pass; semver-validated, idempotent, cross-platform (BSD + GNU sed). Runnable locally for rehearsing a release: `./scripts/bump-version.sh 0.2.0 && cargo build && git diff`.
226
226
-[x]**6b — CI**: `.github/workflows/ci.yml` runs on every PR + push to main. Seven parallel jobs: `rust-build-and-test` (Linux/macOS/Windows × cargo build + test), `rust-lint` (fmt + clippy + doc), `python-sdk` (Linux/macOS/Windows × maturin develop + pytest in a venv), `nodejs-sdk` (Linux/macOS/Windows × napi build + node --test), `go-sdk` (Linux/macOS × cargo build sqlrite-ffi + go test), `wasm-build` (wasm-pack + size report), `desktop-build` (npm ci + Tauri Rust compile). Cargo / npm / pip caching for fast PR turnaround.
227
-
-[x]**6c — Trusted publisher setup + branch protection runbook**: [`docs/release-secrets.md`](docs/release-secrets.md) captures the one-time web-UI setup — crates.io token in the `release` environment, OIDC trusted publishers on PyPI (`sqlrite`) and npm (`sqlrite` + `sqlrite-wasm`), GitHub `release` environment with required reviewer, branch protection on `main` requiring 14 CI jobs + 1 review. No code changes — executable as-is, ready to run through in the GitHub + registry UIs.
227
+
-[x]**6c — Trusted publisher setup + branch protection runbook**: [`docs/release-secrets.md`](docs/release-secrets.md) captures the one-time web-UI setup — crates.io token in the `release` environment, OIDC trusted publishers on PyPI (`sqlrite`) and npm (`@joaoh82/sqlrite` + `sqlrite-wasm` — Node binding is scoped because npm's similarity check rejects the unscoped name against `sqlite`/`sqlite3`), GitHub `release` environment with required reviewer, branch protection on `main` requiring 14 CI jobs + 1 review. No code changes — executable as-is, ready to run through in the GitHub + registry UIs.
228
228
-[x]**6d — Release PR + skeleton publish**: two workflows under `.github/workflows/`. `release-pr.yml` (manual dispatch with version input → bump-version.sh → PR), `release.yml` (fires on `release: v<semver>` merge commit → `tag-all` + `publish-crate` + `publish-ffi` matrix [linux x86_64/aarch64, macOS aarch64, windows x86_64] + umbrella release). Idempotent tag creation so "Re-run failed jobs" works after partial failures. `cargo publish` gated by the `release` environment's required-reviewer rule. First canary: `v0.1.1`.
-**crates.io** — `sqlrite-engine` crate (published under a different name from the `sqlrite` lib target because the short name was already taken; users `cargo add sqlrite-engine` but still write `use sqlrite::…`)
219
219
-**PyPI** — `sqlrite` wheels (manylinux x86_64/aarch64, macOS universal, Windows x86_64)
Copy file name to clipboardExpand all lines: docs/roadmap.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -360,7 +360,7 @@ One-time non-code setup — the state lives in registry web UIs + GitHub setting
360
360
361
361
1.**crates.io API token** → `CRATES_IO_TOKEN` in the `release` environment's secrets (crates.io doesn't support OIDC yet, so this is the only long-lived token in the pipeline).
362
362
2.**PyPI trusted publisher** pointed at `release.yml` / environment `release` — short-lived OIDC tokens, no secret to leak.
363
-
3.**npm trusted publishers** for both `sqlrite` (the Node binding) and `sqlrite-wasm` (the browser binding). npm doesn't have a pending-publisher mode like PyPI, so the runbook captures the first-release bootstrap: temporary `NPM_TOKEN`, then swap to OIDC.
363
+
3.**npm trusted publishers** for both `@joaoh82/sqlrite` (the Node binding — scoped because npm rejected the unscoped `sqlrite` name as too similar to `sqlite`/`sqlite3`) and `sqlrite-wasm` (the browser binding). Scoped packages under your own user scope auto-own the name, so the trusted-publisher flow works without a bootstrap`NPM_TOKEN`. See `docs/release-secrets.md` §3 for the full flow.
364
364
4.**GitHub `release` environment** — required reviewer (maintainer), `main`-only deployments, scoped secrets. Acts as a second human-in-the-loop gate after the Release PR merge but before any registry write.
365
365
5.**Branch protection on `main`** — require 14 CI status checks green + 1 review + conversation resolution. Admin bypass left available for emergencies.
Copy file name to clipboardExpand all lines: sdk/nodejs/README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
-
# sqlrite (Node.js)
1
+
# @joaoh82/sqlrite (Node.js)
2
2
3
3
Node.js bindings for [SQLRite](https://github.com/joaoh82/rust_sqlite) — a small, embeddable SQLite clone written in Rust. Shape follows [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) (sync API, row-as-object), so Node developers who've used that library can pick this up without reading the docs.
4
4
5
+
> **Why the scoped name?** npm's registry rejected the unscoped `sqlrite` name as too similar to the existing `sqlite` / `sqlite3` packages. Scoping under `@joaoh82` (my npm user scope) bypasses that check cleanly — same pattern as `@napi-rs/canvas`, `@swc/core`, `@aws-sdk/client-s3`.
6
+
5
7
## Install
6
8
7
9
```bash
8
-
# From npm (once Phase 6e's CI/CD release pipeline is live):
9
-
npm install sqlrite
10
+
npm install @joaoh82/sqlrite
10
11
11
12
# From source in a clone of the repo:
12
13
cd sdk/nodejs
@@ -17,7 +18,7 @@ npm run build # produces sqlrite.<platform>-<arch>.node
17
18
## Quick tour
18
19
19
20
```js
20
-
import { Database } from'sqlrite';
21
+
import { Database } from'@joaoh82/sqlrite';
21
22
22
23
// File-backed or in-memory (use `":memory:"` to match better-sqlite3).
0 commit comments