@tibia.sh/tibiawiki-data 3.0.1 → 3.0.3
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.
- package/README.md +41 -14
- package/index.db +0 -0
- 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.
|
|
105
|
-
generator
|
|
106
|
-
|
|
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,21 @@ 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
|
|
119
|
-
|
|
122
|
+
and no version covers the tables tibiawiki-sql writes.
|
|
123
|
+
|
|
124
|
+
A generator upgrade does not bump the major. If you installed any published server that depends
|
|
125
|
+
on `^N`, your next install gets every new `N.x` of this package. So before every publish, and in
|
|
126
|
+
CI, the `oldest-consumer` job installs the oldest and the newest published `^N` server from npm,
|
|
127
|
+
each together with the packed candidate, and pages every item through each one's
|
|
128
|
+
`tibia_find_items`. The oldest has the oldest serving code that still gets a new `N.x`. The newest
|
|
129
|
+
is the one a fresh install gets, and newer serving code can refuse an index the oldest serves. When
|
|
130
|
+
one server is both, the job sweeps it once. The gate passes only when, for each server, no page
|
|
131
|
+
is an error, every page carries the candidate index's `generate_time`, and every item in the
|
|
132
|
+
index comes back exactly once. `pnpm oldest-consumer` runs the same gate, and needs network
|
|
133
|
+
access to npm.
|
|
134
|
+
|
|
135
|
+
The sweep covers items only, not creatures, NPCs, quests or spells. So the `9.0.0` pin in
|
|
136
|
+
`test/data.test.ts` stays as the explicit decision point for a generator upgrade.
|
|
120
137
|
|
|
121
138
|
### Drift
|
|
122
139
|
|
|
@@ -168,7 +185,7 @@ explicitly, and checks that the answer's `indexGeneratedAt` matches `index.db`.
|
|
|
168
185
|
## Development
|
|
169
186
|
|
|
170
187
|
Requires Node 22.18 or later, because the tests run TypeScript directly, and pnpm
|
|
171
|
-
|
|
188
|
+
12.4.1, pinned in `packageManager`.
|
|
172
189
|
|
|
173
190
|
```bash
|
|
174
191
|
pnpm install --frozen-lockfile
|
|
@@ -183,7 +200,8 @@ pnpm test
|
|
|
183
200
|
name, so it typechecks against the built declarations, as a consumer does.
|
|
184
201
|
3. It runs every `test/*.test.ts`. `test/data.test.ts` spawns the server from the
|
|
185
202
|
devDependency against `index.db`, and makes a real query. The other files check the
|
|
186
|
-
|
|
203
|
+
workflows, the smoke check, the oldest-consumer gate's decisions and the test floor, with
|
|
204
|
+
no network.
|
|
187
205
|
|
|
188
206
|
The run fails when fewer than `MIN_TESTS` tests pass. `node --test` still exits 0 for a
|
|
189
207
|
file that declares no tests, for a skipped test, and for a `--test-name-pattern` that
|
|
@@ -220,11 +238,15 @@ by name.
|
|
|
220
238
|
## Releases
|
|
221
239
|
|
|
222
240
|
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`
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
241
|
+
that version yet. On every push to `main`, `.github/workflows/release.yml` runs the
|
|
242
|
+
`oldest-consumer` gate from [How the index is built](#how-the-index-is-built), and its release
|
|
243
|
+
job waits for that gate. The release job then asks npm whether it lists that exact version. If
|
|
244
|
+
it does, the run publishes nothing and ends green. Every merge that leaves `version` alone,
|
|
245
|
+
and passes the gate, ends this way. If it does not, the run installs from the lockfile, runs
|
|
246
|
+
`pnpm test`, and runs `npm publish`.
|
|
247
|
+
|
|
248
|
+
- The gate runs on every push, whether the run publishes or not, so an index that breaks the
|
|
249
|
+
oldest or the newest published server turns the run red even when nothing is published.
|
|
228
250
|
- The check is for existence, never a comparison with `latest`. A revert leaves
|
|
229
251
|
`version` below `latest`, and `npm publish` moves `latest` itself.
|
|
230
252
|
- A registry the check cannot read fails the run. It is never taken for a missing
|
|
@@ -235,7 +257,7 @@ installs from the lockfile, runs `pnpm test`, and runs `npm publish`.
|
|
|
235
257
|
attaches a provenance attestation for the merged commit. The trusted publisher is
|
|
236
258
|
registered for the file name `release.yml`, and renaming the file breaks publishing
|
|
237
259
|
with no warning.
|
|
238
|
-
- Every pull request runs the same `pnpm test
|
|
260
|
+
- Every pull request runs the same `pnpm test` and the same gate, in `.github/workflows/ci.yml`.
|
|
239
261
|
|
|
240
262
|
Nothing is tagged, so a failed publish leaves nothing stranded. When a release run fails,
|
|
241
263
|
follow [docs/RELEASING.md](docs/RELEASING.md).
|
|
@@ -295,7 +317,12 @@ repository, remove it in the pull request that moves the lockfile off `N.0.0` wi
|
|
|
295
317
|
`pnpm update @tibia.sh/tibiawiki-data --no-save`. Without `--no-save`, pnpm also raises the
|
|
296
318
|
server's `^N` to the new version, such as `^N.0.1`, and the server's
|
|
297
319
|
`test/data-package.test.ts` rejects that. Without the exclude, a lockfile still on `N.0.0`
|
|
298
|
-
fails the next `pnpm dedupe`.
|
|
320
|
+
fails the next `pnpm dedupe`. pnpm 12.4.1 fails `update --no-save` with
|
|
321
|
+
`ERR_PNPM_STRICT_MIN_RELEASE_AGE_REQUIRES_SAVE` whenever `minimumReleaseAge` is set
|
|
322
|
+
([pnpm#14835](https://github.com/pnpm/pnpm/issues/14835)). Until `packageManager` names a
|
|
323
|
+
pnpm with the fix, run `pnpm update @tibia.sh/tibiawiki-data` without `--no-save`, restore
|
|
324
|
+
`^N` in the server's `package.json`, then run `pnpm install`. The lockfile moves and the range
|
|
325
|
+
stays.
|
|
299
326
|
|
|
300
327
|
**Verify the deadlock before relying on this.** On a scratch branch, set the server's
|
|
301
328
|
`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.
|
|
3
|
+
"version": "3.0.3",
|
|
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@
|
|
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": {
|