@yahoo/uds-create-config 5.107.2 → 5.108.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.
@@ -13,7 +13,7 @@ import { ConfigFormatError } from "./rejection.js";
13
13
  * sets this constant to its own older timestamp; the merge ref then carries a registered migration
14
14
  * newer than the constant, and the assertion fails until the author re-mints.
15
15
  */
16
- const CURRENT_SCHEMA_VERSION = 20261113131930;
16
+ const CURRENT_SCHEMA_VERSION = 20261117234103;
17
17
  /** The mint that moved `options` into the `settings` kind — restated here, rather than imported
18
18
  * from the migration that owns it, because that migration imports this module. */
19
19
  const SETTINGS_AS_KIND_VERSION = 20260908171448;
@@ -45,7 +45,7 @@ function registerSchemaMigrations(...migrations) {
45
45
  for (const migration of migrations) {
46
46
  if (migration.version !== 1 && !isMintTimestamp(migration.version)) throw new Error(`Schema migration version ${migration.version} is not a mint timestamp — mint one with \`date +%Y%m%d%H%M%S\`, like a supabase migration.`);
47
47
  if (REGISTERED.has(migration.version)) throw new Error(`A schema migration at version ${migration.version} is already registered.`);
48
- if (migration.version > 20261113131930) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) — a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
48
+ if (migration.version > 20261117234103) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) — a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
49
49
  REGISTERED.set(migration.version, migration);
50
50
  }
51
51
  }
@@ -102,7 +102,7 @@ function pendingFor(version, target, options) {
102
102
  * Already-current input passes through untouched — same reference, so hot paths pay nothing.
103
103
  */
104
104
  function upgradeSerializedConfig(json, options) {
105
- const target = options?.target ?? 20261113131930;
105
+ const target = options?.target ?? 20261117234103;
106
106
  const version = detectedWireVersion(json);
107
107
  if (version > target) throw new SchemaVersionTooNew(version, target);
108
108
  const raw = json;
@@ -160,7 +160,7 @@ function upgradedSources(json, options) {
160
160
  * meaning under the current schema and replay skips it — reported by the caller, not swallowed here.
161
161
  */
162
162
  function upgradePatch(patch, writtenAt, options) {
163
- const target = options?.target ?? 20261113131930;
163
+ const target = options?.target ?? 20261117234103;
164
164
  if (writtenAt > target) throw new SchemaVersionTooNew(writtenAt, target);
165
165
  let current = patch;
166
166
  for (const migration of pendingFor(writtenAt, target, options)) {
@@ -179,7 +179,7 @@ function upgradePatch(patch, writtenAt, options) {
179
179
  * stamp would cause.
180
180
  */
181
181
  function upgradeDraftEntries(draft, options) {
182
- const target = options?.target ?? 20261113131930;
182
+ const target = options?.target ?? 20261117234103;
183
183
  const entries = [];
184
184
  const held = [];
185
185
  const retired = [];
@@ -63,14 +63,17 @@ function styleSites(styles) {
63
63
  if (!node || typeof node !== "object" || Array.isArray(node)) return;
64
64
  for (const [key, value] of Object.entries(node)) if (key.startsWith("_") || BREAKPOINTS.has(key)) walk(value, [...modifiers, key], prop);
65
65
  else if (prop === void 0) walk(value, modifiers, key);
66
- else out.push({
67
- when,
68
- whenValue,
69
- layer,
70
- prop,
71
- modifiers,
72
- value
73
- });
66
+ else {
67
+ out.push({
68
+ when,
69
+ whenValue,
70
+ layer,
71
+ prop,
72
+ modifiers,
73
+ value: node
74
+ });
75
+ break;
76
+ }
74
77
  };
75
78
  walk(bag, []);
76
79
  }
@@ -31,6 +31,16 @@ declare const AUTHORING_LINT_GROUPS: {
31
31
  };
32
32
  type AuthoringLintGroup = keyof typeof AUTHORING_LINT_GROUPS;
33
33
  declare const AUTHORING_LINT_RULES: {
34
+ readonly 'invalid-style-value': {
35
+ readonly reads: "config";
36
+ readonly group: "maintainability";
37
+ readonly label: "Value outside its declared choices";
38
+ readonly detects: "A component style rule uses a value its property does not offer, so the component can render differently than intended.";
39
+ readonly fix: "use a declared value or add the intended value to the property first";
40
+ readonly check: {
41
+ readonly value: (ctx: ConfigLintContext, value: LintValue, report: ConfigLintReport) => void;
42
+ };
43
+ };
34
44
  readonly 'unmapped-native-style-key': {
35
45
  readonly reads: "config";
36
46
  readonly group: "maintainability";
@@ -46,6 +46,24 @@ const AUTHORING_LINT_GROUPS = {
46
46
  }
47
47
  };
48
48
  const AUTHORING_LINT_RULES = {
49
+ "invalid-style-value": {
50
+ reads: "config",
51
+ group: "maintainability",
52
+ label: "Value outside its declared choices",
53
+ detects: "A component style rule uses a value its property does not offer, so the component can render differently than intended.",
54
+ fix: "use a declared value or add the intended value to the property first",
55
+ check: { value(ctx, value, report) {
56
+ const { layer, prop } = value.site;
57
+ if (!ctx.config.resolve("style-property", prop)) return;
58
+ for (const message of ctx.config.validateData("component", value.component.path, "sub-create/styles", {
59
+ when: null,
60
+ layers: { [layer]: { [prop]: value.site.value } }
61
+ })) report({
62
+ at: value,
63
+ message
64
+ });
65
+ } }
66
+ },
49
67
  "unmapped-native-style-key": {
50
68
  reads: "config",
51
69
  group: "maintainability",
@@ -0,0 +1,4 @@
1
+ /** MCP operation schemas changed; stored shapes did not. Keep until older artifacts cannot be read. */
2
+ import type { SchemaMigration } from '../framework/schema-version';
3
+ export declare const UDS_6038_MCP_INPUTS_VERSION = 20261117234103;
4
+ export declare const uds6038McpInputsMigration: SchemaMigration;
@@ -0,0 +1,10 @@
1
+ //#region src/migrations/20261117234103_uds_6038_mcp_inputs.ts
2
+ const UDS_6038_MCP_INPUTS_VERSION = 20261117234103;
3
+ const uds6038McpInputsMigration = {
4
+ version: UDS_6038_MCP_INPUTS_VERSION,
5
+ up(json) {
6
+ return json;
7
+ }
8
+ };
9
+ //#endregion
10
+ export { UDS_6038_MCP_INPUTS_VERSION, uds6038McpInputsMigration };