@nspot/geo-engine 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +0 -68
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -178,71 +178,3 @@ writing rows or editing regions at that moment. Registering a source is as power
178
178
  writing a trigger by hand — only let database administrators call `registerSource` /
179
179
  `unregisterSource` (the underlying `geo.register_source` / `geo.unregister_source` are not
180
180
  executable by PUBLIC).
181
-
182
- ## Releasing
183
-
184
- `pnpm sdk:rehearsal` (from the repo root) packs the SDK and installs it into a throwaway
185
- project against a scratch database; run it before every release.
186
-
187
- To cut a release: bump `version` in `packages/sdk-node/package.json`, run
188
- `pnpm sdk:rehearsal` and confirm it passes, and open a pull request with the bump. There is
189
- no release tag to push by hand — when the pull request merges and CI passes on `main`,
190
- `.github/workflows/publish-sdk.yml` publishes it to npm, tags the commit
191
- `sdk-node-v<version>` and creates a GitHub release for it.
192
-
193
- That workflow publishes *every* publishable package in the repository whose version is not
194
- on npm yet, not only the SDK. `node scripts/publishable.mjs --all` lists every publishable
195
- package (one JSON line each — `name`, `version`, `dir`, `tag`, `published`), and the job
196
- walks that list in order:
197
-
198
- - a package whose version is **not** on npm is published (`npm publish --access public`);
199
- - every package that is on npm — published just now or long since — then has its tag
200
- (`sdk-node-v<version>` for the SDK, `pack-<slug>-v<version>` for a region pack) and its
201
- GitHub release created if they are missing, and left alone if they are not.
202
-
203
- A merge that bumps nothing publishes nothing; the job still runs, finds everything in
204
- order, and exits green.
205
-
206
- What "idempotent" means here is worth being precise about, because a re-run does more than
207
- skip work. Re-running the job **repairs** a half-finished release: a package that published
208
- successfully but whose tag push or release creation failed gets its tag and release on the
209
- next run, instead of being skipped forever because it is now on npm. And one package
210
- failing no longer stops the rest — a failure is recorded and the loop continues to the next
211
- package, with the job failing at the end and naming everything that went wrong. So it is
212
- always safe, and often useful, to re-run by hand from the Actions tab
213
- (`workflow_dispatch`).
214
-
215
- A manual run publishes **the current `main`**, not the commit of an older run: it checks
216
- out `main`'s head, and the job refuses to run on any other branch. There is no way to
217
- re-publish a past commit from the Actions tab; to release again, merge another bump.
218
-
219
- Only one publish runs at a time (`concurrency: publish`, never cancelled mid-flight). Two
220
- merges landing within a minute can therefore drop the middle run — a queued run is
221
- superseded by a newer one. That is harmless: the gate is "is this version on npm", not "did
222
- this commit run", so a version bump superseded before it published simply publishes on the
223
- next merge.
224
-
225
- The workflow publishes through npm Trusted Publishing (OpenID Connect), so there is no token
226
- and no repository secret. npm binds a trusted publisher to a workflow **filename**, which is
227
- why the file is still called `publish-sdk.yml` now that it publishes the packs too.
228
-
229
- Publishing does *not* pass `--provenance`: npm only accepts provenance attestations from a
230
- public source repository, and this repository is private, so asking for one fails the
231
- publish outright. Trusted publishing itself is unaffected. If the repository is ever made
232
- public, trusted publishing generates provenance on its own — no flag needed.
233
-
234
- The first version of a *new* package cannot be published by CI, because a trusted publisher
235
- can only be configured on a package that already exists. For each new package, once:
236
-
237
- 1. Publish the first version from your machine: in the package directory run `npm login` and
238
- `npm publish --access public` (for the SDK, npm runs `prepack`, which syncs the SQL and
239
- builds; it asks for a one-time 2FA code).
240
- 2. On npmjs.com open the package, Settings, Trusted Publisher, GitHub Actions: organisation
241
- `NSpot-Games`, repository `geo-engine`, workflow filename `publish-sdk.yml`, environment
242
- empty.
243
-
244
- Until both are done for a package, the publish job runs and fails at `npm publish` for it.
245
- `@nspot/geo-engine` is past that point: 0.1.0 was published by hand on 2026-09-16 and its
246
- trusted publisher is configured, so every later version comes from a merge to `main`.
247
-
248
- A Python SDK does not exist yet.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nspot/geo-engine",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Region membership for your own PostGIS tables: install the geo schema, register tables, install region packs, query by region.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
12
12
  "./types": { "types": "./dist/types.d.ts", "import": "./dist/types.js" }
13
13
  },
14
- "bin": { "geo-engine": "./dist/cli.js" },
14
+ "bin": { "geo-engine": "dist/cli.js" },
15
15
  "files": ["dist", "sql", "README.md", "LICENSE"],
16
16
  "engines": { "node": ">=20" },
17
17
  "repository": {