@ultimat3/manifest 31.35.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.
Files changed (2) hide show
  1. package/package.json +8 -8
  2. package/src/errors.ts +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/manifest",
3
- "version": "31.35.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.35.0",
47
- "@ultimat3/core": "31.35.0",
48
- "@ultimat3/entity": "31.35.0",
49
- "@ultimat3/jobs": "31.35.0",
50
- "@ultimat3/query": "31.35.0",
51
- "@ultimat3/realtime": "31.35.0",
52
- "@ultimat3/schema": "31.35.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/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
  }