@tibia.sh/tibiawiki-data 3.0.1 → 3.0.2

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 (3) hide show
  1. package/README.md +38 -14
  2. package/index.db +0 -0
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -78,6 +78,7 @@ What each release was built from:
78
78
  | Release | Generator `version` | `generate_time` |
79
79
  |---|---|---|
80
80
  | `3.0.0` | `9.0.0` | `2026-09-12T19:53:53.020856+00:00` |
81
+ | `3.0.1` | `9.0.0` | `2026-09-13T07:02:58.860376+00:00` |
81
82
 
82
83
  To read them from any index:
83
84
 
@@ -101,9 +102,12 @@ pnpm build-index
101
102
 
102
103
  That builds `dist/`, then `scripts/build.ts` runs the devDependency's
103
104
  `tibiawiki-mcp build-index` with `TIBIAWIKI_MCP_DB` set to `DB_PATH`, so the build
104
- writes exactly the file this package ships and exports. Every build resolves the
105
- generator's PyPI dependencies after a 7-day cooldown, matching the one pnpm applies to npm
106
- packages, and setting `UV_EXCLUDE_NEWER` overrides it.
105
+ writes exactly the file this package ships and exports. From `0.3.1`, the server installs
106
+ the generator from its own requirements file, where every Python dependency is pinned and
107
+ hashed, so every build runs the same packages. Builds still set a 7-day PyPI cooldown,
108
+ matching the one pnpm applies to npm packages. It is a backstop for a server older than
109
+ `0.3.1`, which resolves those dependencies fresh on every build. You can override it with
110
+ `UV_EXCLUDE_NEWER`.
107
111
 
108
112
  `build-index` needs [`uv`](https://docs.astral.sh/uv/) and network access to
109
113
  TibiaWiki. It validates the new index before replacing `index.db`, so a build that
@@ -115,8 +119,18 @@ crawl.
115
119
 
116
120
  `pnpm test` pins the generator too. It fails for an index whose `database_info` `version`
117
121
  is anything but `9.0.0`. The major version covers only the server's enrichment tables,
118
- and no version covers the tables tibiawiki-sql writes yet, so a rebuild with another
119
- generator waits until that is decided.
122
+ and no version covers the tables tibiawiki-sql writes.
123
+
124
+ A generator upgrade does not bump the major. A user who installed the oldest published server
125
+ that depends on `^N` gets every new `N.x` of this package, so before every publish, and in CI,
126
+ the `oldest-consumer` job installs that server package from npm together with the packed
127
+ candidate, and pages every item through its `tibia_find_items`. The gate passes only when no
128
+ page is an error, every page carries the candidate index's `generate_time`, and every item in
129
+ the index comes back exactly once. `pnpm oldest-consumer` runs the same gate, and needs network
130
+ access to npm.
131
+
132
+ The sweep covers items only, not creatures, NPCs, quests or spells. So the `9.0.0` pin in
133
+ `test/data.test.ts` stays as the explicit decision point for a generator upgrade.
120
134
 
121
135
  ### Drift
122
136
 
@@ -168,7 +182,7 @@ explicitly, and checks that the answer's `indexGeneratedAt` matches `index.db`.
168
182
  ## Development
169
183
 
170
184
  Requires Node 22.18 or later, because the tests run TypeScript directly, and pnpm
171
- 10.33.0, pinned in `packageManager`.
185
+ 12.4.1, pinned in `packageManager`.
172
186
 
173
187
  ```bash
174
188
  pnpm install --frozen-lockfile
@@ -183,7 +197,8 @@ pnpm test
183
197
  name, so it typechecks against the built declarations, as a consumer does.
184
198
  3. It runs every `test/*.test.ts`. `test/data.test.ts` spawns the server from the
185
199
  devDependency against `index.db`, and makes a real query. The other files check the
186
- release and drift workflows, the smoke check and the test floor, with no network.
200
+ workflows, the smoke check, the oldest-consumer gate's decisions and the test floor, with
201
+ no network.
187
202
 
188
203
  The run fails when fewer than `MIN_TESTS` tests pass. `node --test` still exits 0 for a
189
204
  file that declares no tests, for a skipped test, and for a `--test-name-pattern` that
@@ -220,11 +235,15 @@ by name.
220
235
  ## Releases
221
236
 
222
237
  Merging a commit to `main` publishes its `package.json` `version` if npm does not have
223
- that version yet. On every push to `main`, `.github/workflows/release.yml` asks npm
224
- whether it lists that exact version. If it does, the run publishes nothing and ends
225
- green. Every merge that leaves `version` alone ends this way. If it does not, the run
226
- installs from the lockfile, runs `pnpm test`, and runs `npm publish`.
227
-
238
+ that version yet. On every push to `main`, `.github/workflows/release.yml` runs the
239
+ `oldest-consumer` gate from [How the index is built](#how-the-index-is-built), and its release
240
+ job waits for that gate. The release job then asks npm whether it lists that exact version. If
241
+ it does, the run publishes nothing and ends green. Every merge that leaves `version` alone,
242
+ and passes the gate, ends this way. If it does not, the run installs from the lockfile, runs
243
+ `pnpm test`, and runs `npm publish`.
244
+
245
+ - The gate runs on every push, whether the run publishes or not, so an index that breaks the
246
+ oldest published server turns the run red even when nothing is published.
228
247
  - The check is for existence, never a comparison with `latest`. A revert leaves
229
248
  `version` below `latest`, and `npm publish` moves `latest` itself.
230
249
  - A registry the check cannot read fails the run. It is never taken for a missing
@@ -235,7 +254,7 @@ installs from the lockfile, runs `pnpm test`, and runs `npm publish`.
235
254
  attaches a provenance attestation for the merged commit. The trusted publisher is
236
255
  registered for the file name `release.yml`, and renaming the file breaks publishing
237
256
  with no warning.
238
- - Every pull request runs the same `pnpm test`, in `.github/workflows/ci.yml`.
257
+ - Every pull request runs the same `pnpm test` and the same gate, in `.github/workflows/ci.yml`.
239
258
 
240
259
  Nothing is tagged, so a failed publish leaves nothing stranded. When a release run fails,
241
260
  follow [docs/RELEASING.md](docs/RELEASING.md).
@@ -295,7 +314,12 @@ repository, remove it in the pull request that moves the lockfile off `N.0.0` wi
295
314
  `pnpm update @tibia.sh/tibiawiki-data --no-save`. Without `--no-save`, pnpm also raises the
296
315
  server's `^N` to the new version, such as `^N.0.1`, and the server's
297
316
  `test/data-package.test.ts` rejects that. Without the exclude, a lockfile still on `N.0.0`
298
- fails the next `pnpm dedupe`.
317
+ fails the next `pnpm dedupe`. pnpm 12.4.1 fails `update --no-save` with
318
+ `ERR_PNPM_STRICT_MIN_RELEASE_AGE_REQUIRES_SAVE` whenever `minimumReleaseAge` is set
319
+ ([pnpm#14835](https://github.com/pnpm/pnpm/issues/14835)). Until `packageManager` names a
320
+ pnpm with the fix, run `pnpm update @tibia.sh/tibiawiki-data` without `--no-save`, restore
321
+ `^N` in the server's `package.json`, then run `pnpm install`. The lockfile moves and the range
322
+ stays.
299
323
 
300
324
  **Verify the deadlock before relying on this.** On a scratch branch, set the server's
301
325
  `MCP_SCHEMA_VERSION` to N: its `test/data-package.test.ts` and regression sweep must
package/index.db CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tibia.sh/tibiawiki-data",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "The prebuilt TibiaWiki index served by @tibia.sh/tibiawiki-mcp. Its major version is the index schema version.",
5
5
  "type": "module",
6
6
  "license": "(CC-BY-SA-3.0 AND MIT)",
@@ -12,7 +12,7 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/tibia-sh/tibiawiki-data/issues"
14
14
  },
15
- "packageManager": "pnpm@10.33.0",
15
+ "packageManager": "pnpm@12.4.1",
16
16
  "exports": {
17
17
  ".": {
18
18
  "types": "./dist/index.d.ts",
@@ -34,6 +34,7 @@
34
34
  "test": "pnpm build && pnpm typecheck && node --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./test/min-tests.ts --test-reporter-destination=stderr test/*.test.ts",
35
35
  "build-index": "pnpm build && node scripts/build.ts",
36
36
  "smoke": "node scripts/smoke.mjs",
37
+ "oldest-consumer": "pnpm build && node scripts/oldest-consumer.ts",
37
38
  "prepublishOnly": "pnpm test"
38
39
  },
39
40
  "devDependencies": {