@ultimat3/manifest 31.34.0 → 31.36.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/manifest",
3
- "version": "31.34.0",
3
+ "version": "31.36.0",
4
4
  "description": "x.manifest.json: deterministic generated facts, contract diff, AGENTS.md budget",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -43,12 +43,12 @@
43
43
  "test": "bun test"
44
44
  },
45
45
  "dependencies": {
46
- "@ultimat3/action": "31.34.0",
47
- "@ultimat3/core": "31.34.0",
48
- "@ultimat3/entity": "31.34.0",
49
- "@ultimat3/jobs": "31.34.0",
50
- "@ultimat3/query": "31.34.0",
51
- "@ultimat3/realtime": "31.34.0",
52
- "@ultimat3/schema": "31.34.0"
46
+ "@ultimat3/action": "31.36.0",
47
+ "@ultimat3/core": "31.36.0",
48
+ "@ultimat3/entity": "31.36.0",
49
+ "@ultimat3/jobs": "31.36.0",
50
+ "@ultimat3/query": "31.36.0",
51
+ "@ultimat3/realtime": "31.36.0",
52
+ "@ultimat3/schema": "31.36.0"
53
53
  }
54
54
  }
package/src/docs-wiki.ts CHANGED
@@ -216,9 +216,17 @@ export function wikiSection(markdown: string, anchor: string): string | undefine
216
216
  }
217
217
 
218
218
  /**
219
- * Every page in a shipped `wiki/` directory. `Error-Codes.md` is never read: `x errors explain` is
220
- * the one way to a code, and indexing 400 rows of it would bury every other answer. A directory that
221
- * is not there is no pages, not a throw — the caller decides whether that is a broken install.
219
+ * The error reference's page set: the index `Error-Codes` and one `Error-Codes-<owner>` per owner.
220
+ * The one predicate `x docs` and its section reader both exclude by — `x errors explain` is the one
221
+ * way to a code, and indexing a thousand rows would bury every other answer.
222
+ */
223
+ export const isErrorCodesPage = (page: string): boolean =>
224
+ page === 'Error-Codes' || page.startsWith('Error-Codes-');
225
+
226
+ /**
227
+ * Every page in a shipped `wiki/` directory but the error reference (`isErrorCodesPage`). A
228
+ * directory that is not there is no pages, not a throw — the caller decides whether that is a
229
+ * broken install.
222
230
  */
223
231
  export async function scanWikiDocs(dir: string, origin: WikiOrigin): Promise<readonly DocEntry[]> {
224
232
  let files: readonly string[];
@@ -230,7 +238,7 @@ export async function scanWikiDocs(dir: string, origin: WikiOrigin): Promise<rea
230
238
  const pages = [...files]
231
239
  .sort()
232
240
  .map(wikiPageOf)
233
- .filter((page): page is string => page !== undefined && page !== 'Error-Codes');
241
+ .filter((page): page is string => page !== undefined && !isErrorCodesPage(page));
234
242
  const perPage = await Promise.all(
235
243
  pages.map(async (page) => {
236
244
  // A listed page can vanish or turn unreadable before it is read — `bun update` rewrites the
package/src/errors.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // The X_* codes owned by @ultimat3/manifest. `x verify` raises these, so each fix line is a
2
2
  // command the developer (or the agent) can run verbatim.
3
3
 
4
- import { registerErrorCodes, UltimateError } from '@ultimat3/core';
4
+ import { registerErrorCodes, renderFixShellArg, UltimateError } from '@ultimat3/core';
5
5
 
6
6
  export const MANIFEST_ERROR_CODES = [
7
7
  'X_MANIFEST_DRIFT',
@@ -59,6 +59,12 @@ export class ManifestDriftError extends UltimateError {
59
59
  */
60
60
  const neverShippedAMajor = (version: string): boolean => version.trim().startsWith('0.');
61
61
 
62
+ /** The leading integer, plus one: `majorOf` compares nothing else, so `1.4.2` needs `2.0.0`. */
63
+ const nextMajor = (version: string): string => {
64
+ const major = Number.parseInt(version.trim(), 10);
65
+ return Number.isInteger(major) ? `${major + 1}.0.0` : '<next-major>.0.0';
66
+ };
67
+
62
68
  /**
63
69
  * A breaking contract change landed without a version bump.
64
70
  *
@@ -87,8 +93,8 @@ export class ManifestBreakingError extends UltimateError {
87
93
  : `${input.changes.length} breaking change(s) from ${input.from} to ${input.to} ` +
88
94
  `with no major version bump: ${summarize(input.changes)}`,
89
95
  fix: neverShippedAMajor(input.from)
90
- ? 'a 0.x app has published no compatibility promise, and only 1.0.0 satisfies this gate — 0.2.0 does not: re-commit the baseline with x manifest, or bun pm pkg set version=1.0.0 in package.json'
91
- : 'bump the major version in package.json — the leading integer, so 1.4.2 becomes 2.0.0 — or restore the removed contract',
96
+ ? 'x manifest # re-commit the baseline: a 0.x app has published no compatibility promise — or make one in package.json: bun pm pkg set version=1.0.0 (0.2.0 does not satisfy this gate)'
97
+ : `bun pm pkg set version=${renderFixShellArg(nextMajor(input.from), '<next-major>.0.0')} # the major bump in package.json — or restore the removed contract`,
92
98
  });
93
99
  }
94
100
  }
package/src/index.ts CHANGED
@@ -19,7 +19,13 @@ export type { DocHit } from './docs-search';
19
19
  export { nearestTopics, searchDocs } from './docs-search';
20
20
  export { tokenize } from './docs-tokens';
21
21
  export type { WikiHeading, WikiOrigin } from './docs-wiki';
22
- export { githubSlug, scanWikiDocs, wikiHeadings, wikiSection } from './docs-wiki';
22
+ export {
23
+ githubSlug,
24
+ isErrorCodesPage,
25
+ scanWikiDocs,
26
+ wikiHeadings,
27
+ wikiSection,
28
+ } from './docs-wiki';
23
29
  export type { EmitInput, EmitResult } from './emit';
24
30
  export {
25
31
  assertNoDrift,