@intentius/chant 0.124.99 → 0.124.100

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 (40) hide show
  1. package/bin/chant +3 -3
  2. package/dist/cli/commands/carve-emit.js +2 -2
  3. package/dist/cli/commands/check-lexicon-plugin.d.ts +2 -2
  4. package/dist/cli/commands/check-lexicon-plugin.js +3 -3
  5. package/dist/cli/commands/check-lexicon.js +4 -4
  6. package/dist/cli/commands/init-lexicon/templates/project.d.ts +1 -1
  7. package/dist/cli/commands/init-lexicon/templates/project.js +4 -4
  8. package/dist/cli/commands/init.d.ts +13 -0
  9. package/dist/cli/commands/init.js +30 -2
  10. package/dist/cli/handlers/release.d.ts +8 -0
  11. package/dist/cli/handlers/release.js +34 -1
  12. package/dist/cli/main.js +5 -0
  13. package/dist/cli/parse-args.js +7 -0
  14. package/dist/cli/registry.d.ts +2 -0
  15. package/dist/codegen/pinned-upgrade.js +1 -1
  16. package/dist/components/capability-plugin.d.ts +1 -1
  17. package/dist/components/capability-plugin.js +1 -1
  18. package/dist/config.d.ts +8 -0
  19. package/dist/config.js +2 -0
  20. package/dist/dead-guards.d.ts +5 -1
  21. package/dist/dead-guards.js +34 -23
  22. package/dist/discovery/sandbox/driver.js +1 -1
  23. package/dist/discovery/specifier-resolve.js +1 -1
  24. package/dist/floor-table.d.ts +3 -1
  25. package/dist/floor-table.data.js +9 -3
  26. package/dist/floor-table.js +4 -3
  27. package/dist/module-source.d.ts +2 -2
  28. package/dist/module-source.js +8 -8
  29. package/dist/release-floors.d.ts +3 -1
  30. package/dist/release-floors.js +3 -1
  31. package/dist/ts-loader.d.ts +1 -1
  32. package/dist/ts-loader.js +6 -6
  33. package/dist/wave-runtime.mjs +8 -8
  34. package/dist/workspace/reason-codes.d.ts +4 -0
  35. package/dist/workspace/reason-codes.js +5 -0
  36. package/dist/workspace/release-changed.d.ts +108 -0
  37. package/dist/workspace/release-changed.js +454 -0
  38. package/dist/workspace/release-changed.schema.json +188 -0
  39. package/dist/workspace/search-contract.d.ts +1 -1
  40. package/package.json +26 -26
@@ -1,3 +1,8 @@
1
+ // Written by scripts/floor-table.ts (#4792) from the floor constants under
2
+ // packages/core/src and in each lexicon's src/chant-floors.ts (#4916); run
3
+ // `npx tsx scripts/floor-table.ts` after adding one.
4
+ // scripts/release-floors.ts fails while this file is stale.
5
+ import { NEXT_RELEASE } from "./release-floors.js";
1
6
  export const FLOOR_ROWS = [
2
7
  { name: "CACHE4_PIN_FLOOR", version: "0.124.78", gates: "The first chant whose table has the `cache4` row (#4816).", issue: "#4816", file: "action-pins.ts", modules: ["@intentius/chant/action-pins"] },
3
8
  { name: "AGENT_GUARD_FLOOR", version: "0.124.77", gates: "The first chant with the shared agent guard (#4770).", issue: "#4770", file: "agent-guard.ts", modules: ["@intentius/chant/agent-guard", "@intentius/chant/ci-product"] },
@@ -244,6 +249,7 @@ export const FLOOR_ROWS = [
244
249
  { name: "GITLAB_WAVE_EVIDENCE_RETRY_FLOOR", version: "0.124.89", gates: "The first chant whose `chant run resume` (`resumeGateRun`) on GitLab retries a wave job's `<wave job>-evidence` with the wave job when the evidence job already ran, and whose `ci evidence sign --from-job` waits for a job it reads to finish, so a resumed wave's evidence job signs from the new try (#4978).", issue: "#4978", file: "release-floors.ts", modules: ["@intentius/chant/ci-evidence-jobs", "@intentius/chant/release-floors"] },
245
250
  { name: "TERRAFORM_COMMAND_TRACE_FLOOR", version: "0.124.91", gates: "The first chant whose terraform lexicon's engine runs carry what a product's own command tracing read: `runBinary` and the engine runner's `exec` and `execSync` answer stderr apart (`Ran.stderr`) and a spawn failure's message (`Ran.error`), a hook's `after` gets a binary that could not be started as a null code with `error`, `commandTrace` ends that span with the message, and `composeCommandHooks` runs a product's own hook and `commandTrace` as one `onCommand` (#5007).", issue: "#5007", file: "release-floors.ts", modules: ["@intentius/chant/release-floors"] },
246
251
  { name: "COMMENT_ALLOW_FLOOR", version: "0.124.98", gates: "The first chant whose product pipeline limits comment commands to logins and teams on GitHub and Forgejo (INTENTIUS/terragucci#1461): `commentAllow: { allow, tokenSecret? }` in `productPipelineJobs`, where `allow` maps `plan`, `apply`, `lock`, `unlock`, `agent` and `default` to logins and `team:<org>/<team>` entries.", issue: "#1461", file: "release-floors.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/release-floors"] },
252
+ { name: "RELEASE_CHANGED_FLOOR", version: NEXT_RELEASE, gates: "The first chant with `chant release changed`, the members to release at a commit with their dependency closure, and `release.legacyTags` in `chant.config.ts` (#5134).", issue: "#5134", file: "release-floors.ts", modules: ["@intentius/chant/release-floors"] },
247
253
  { name: "RUN_EVENT_FLOOR", version: "0.124.28", gates: "The first chant that writes contract version 1 of the run-event stream.", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
248
254
  { name: "RUN_EVENT_FAILURE_FLOOR", version: "0.124.30", gates: "The first chant that writes `failure` on `run-settle` (#4094).", issue: "#4094", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
249
255
  { name: "RUN_EVENT_COMPONENT_SKIP_FLOOR", version: "0.124.29", gates: "The first chant that writes `blocked`, `already-applied` and `blockedBy` on `component-settle` (#4007).", issue: "#4007", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
@@ -268,7 +274,7 @@ export const FLOOR_ROWS = [
268
274
  { name: "RELEASE_CANDIDATES_CLOSES_FLOOR", version: "0.124.63", gates: "The first chant whose candidates carry `changes[].closes` and `groups[].issue` (#4649).", issue: "#4649", file: "workspace/release-candidates.ts", modules: ["@intentius/chant/workspace/release-candidates"] },
269
275
  { name: "RELEASE_CANDIDATES_LANE_FLOOR", version: "0.124.64", gates: "The first chant whose candidates document carries `lane` and reads a lane's tags (#4692).", issue: "#4692", file: "workspace/release-candidates.ts", modules: ["@intentius/chant/workspace/release-candidates"] },
270
276
  { name: "TRAIN_PROMOTE_FLOOR", version: "0.124.98", gates: "The first chant that writes ReleaseTrainRecord.trainDigest and has `chant workspace train promote` (#4037).", issue: "#4037", file: "workspace/release-train.ts", modules: ["@intentius/chant/workspace/release-train"] },
271
- { name: "MODULE_CONSUMERS_FLOOR", version: "0.124.55", gates: "The first chant whose terraform lexicon has `moduleConsumers`, the scan of every registry module call a root makes, with `readRegistryCatalog` and `deprecatedPins` beside it on `./registry` (#4599).", issue: "#4599", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
272
- { name: "USED_SOURCES_FLOOR", version: "0.124.55", gates: "The first chant whose terraform lexicon has `usedSources`, every module source and provider address a root uses, with `moduleSourceForms`, `providerAddressForms` and `lockedProviders` on `./registry` (#3924).", issue: "#3924", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
273
- { name: "MODULE_CATALOG_FLOOR", version: "0.124.55", gates: "The first chant whose terraform lexicon has `./module-catalog`, the known-module catalog TF047 reads (#4560).", issue: "#4560", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/module-catalog", "@intentius/chant-lexicon-terraform/module-catalog/index"] },
277
+ { name: "MODULE_CONSUMERS_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `moduleConsumers`, the scan of every registry module call a root makes, with `readRegistryCatalog` and `deprecatedPins` beside it on `./registry` (#4599).", issue: "#4599", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
278
+ { name: "USED_SOURCES_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `usedSources`, every module source and provider address a root uses, with `moduleSourceForms`, `providerAddressForms` and `lockedProviders` on `./registry` (#3924).", issue: "#3924", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
279
+ { name: "MODULE_CATALOG_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `./module-catalog`, the known-module catalog TF047 reads (#4560).", issue: "#4560", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/module-catalog", "@intentius/chant-lexicon-terraform/module-catalog/index"] },
274
280
  ];
@@ -4,9 +4,10 @@
4
4
  * with.
5
5
  *
6
6
  * A floor is a constant `<NAME>_FLOOR` in chant core, or in a lexicon's
7
- * src/chant-floors.ts (#4916), naming the first chant release with a part
8
- * (an export, a field chant writes, a flag). Lexicons release with chant at
9
- * the same version, so a lexicon's floor is a chant version too. A product
7
+ * src/chant-floors.ts (#4916), naming the first release with a part (an
8
+ * export, a field chant writes, a flag). Packages have their own versions
9
+ * (#5138): a core floor is a version of `@intentius/chant`, and a lexicon's
10
+ * floor is a version of that lexicon, named by the row's `package`. A product
10
11
  * that runs on several chant releases checks one before it calls the part. The
11
12
  * rows are written by scripts/floor-table.ts from the constants themselves
12
13
  * (./floor-table.data.ts), and scripts/release-floors.ts fails while a floor
@@ -52,8 +52,8 @@ export declare function isJavaScriptModule(pathOrUrl: string): boolean;
52
52
  * #3981 — the package export conditions chant adds to `import`, `node` and
53
53
  * `default` when it resolves a package itself (fold's import resolution, the
54
54
  * sandbox bundle), so it lands on the module this process's `import()` would.
55
- * Each chant package maps `development` to `src/*.ts` and `default` to the
56
- * compiled `dist/*.js` it publishes. `["development"]` when the process
55
+ * Each chant package maps `@intentius/chant-source` to `src/*.ts` and `default` to the
56
+ * compiled `dist/*.js` it publishes. `["@intentius/chant-source"]` when the process
57
57
  * resolves with it ({@link resolvesDevelopment}), else empty.
58
58
  */
59
59
  export declare const SOURCE_EXPORT_CONDITIONS: readonly string[];
@@ -83,10 +83,10 @@ export function isJavaScriptModule(pathOrUrl) {
83
83
  }
84
84
  /**
85
85
  * #3981 — whether this process resolves chant's packages through their
86
- * `development` export condition: always when chant runs from source (the
86
+ * `@intentius/chant-source` export condition: always when chant runs from source (the
87
87
  * CLI's `main()` installs a resolve hook that does so, and vitest's resolver
88
88
  * adds the condition outside production mode), and otherwise when node runs
89
- * with `--conditions=development` (or `-C development`, on the command line
89
+ * with `--conditions=@intentius/chant-source` (or `-C @intentius/chant-source`, on the command line
90
90
  * or in `NODE_OPTIONS`). Not from the environment: a compiled CLI that a test
91
91
  * spawns inherits vitest's variables.
92
92
  */
@@ -96,16 +96,16 @@ function resolvesDevelopment() {
96
96
  if (typeof process === "undefined")
97
97
  return false;
98
98
  const flags = [...process.execArgv, ...(process.env.NODE_OPTIONS ?? "").split(/\s+/)];
99
- return flags.some((flag, i) => flag === "--conditions=development" ||
100
- flag === "-C=development" ||
101
- ((flag === "--conditions" || flag === "-C") && flags[i + 1] === "development"));
99
+ return flags.some((flag, i) => flag === "--conditions=@intentius/chant-source" ||
100
+ flag === "-C=@intentius/chant-source" ||
101
+ ((flag === "--conditions" || flag === "-C") && flags[i + 1] === "@intentius/chant-source"));
102
102
  }
103
103
  /**
104
104
  * #3981 — the package export conditions chant adds to `import`, `node` and
105
105
  * `default` when it resolves a package itself (fold's import resolution, the
106
106
  * sandbox bundle), so it lands on the module this process's `import()` would.
107
- * Each chant package maps `development` to `src/*.ts` and `default` to the
108
- * compiled `dist/*.js` it publishes. `["development"]` when the process
107
+ * Each chant package maps `@intentius/chant-source` to `src/*.ts` and `default` to the
108
+ * compiled `dist/*.js` it publishes. `["@intentius/chant-source"]` when the process
109
109
  * resolves with it ({@link resolvesDevelopment}), else empty.
110
110
  */
111
- export const SOURCE_EXPORT_CONDITIONS = resolvesDevelopment() ? ["development"] : [];
111
+ export const SOURCE_EXPORT_CONDITIONS = resolvesDevelopment() ? ["@intentius/chant-source"] : [];
@@ -19,7 +19,7 @@
19
19
  * this constant to the next patch (#4501). The check fails while a floor
20
20
  * still names this constant after its version shipped.
21
21
  */
22
- export declare const NEXT_RELEASE = "0.124.99";
22
+ export declare const NEXT_RELEASE = "0.124.100";
23
23
  /** The first chant with `chant dev local` and `chant dev bundle-check`, `@intentius/chant/local-chant` and `@intentius/chant/bundle-check` (`chantRuntimeTarget`, `chantExternalPlugin`, `checkBundle`): a product built against a chant checkout, and its bundle checked, without its own scripts (#4787). */
24
24
  export declare const LOCAL_CHANT_FLOOR = "0.124.86";
25
25
  /** The first chant with `chant workspace ref-gate` (pre-receive, pre-push, check, status, attach, install) and `refs` in `.chant/trust.json`, the checks a ref update needs evidence for (#4867). */
@@ -192,3 +192,5 @@ export declare const GITLAB_WAVE_EVIDENCE_RETRY_FLOOR = "0.124.89";
192
192
  export declare const TERRAFORM_COMMAND_TRACE_FLOOR = "0.124.91";
193
193
  /** The first chant whose product pipeline limits comment commands to logins and teams on GitHub and Forgejo (INTENTIUS/terragucci#1461): `commentAllow: { allow, tokenSecret? }` in `productPipelineJobs`, where `allow` maps `plan`, `apply`, `lock`, `unlock`, `agent` and `default` to logins and `team:<org>/<team>` entries. The map is written as `CHANT_COMMENT_ALLOW` into the comment job, the product plan's re-plan decision and the agent's jobs (a spec's `agent.commentAllow`), so it is read from the workflow on the default branch. `answerProductComment` takes `allow` and replies to a commenter the list leaves out, `ForgeReads.teamMember` reads a team on GitHub and Forgejo, `CHANT_COMMENT_ALLOW_TOKEN` (`tokenSecret`) carries a token that can read teams, and a team the forge cannot answer for fails closed with a message. */
194
194
  export declare const COMMENT_ALLOW_FLOOR = "0.124.98";
195
+ /** The first chant with `chant release changed`, the members to release at a commit with their dependency closure, and `release.legacyTags` in `chant.config.ts` (#5134). */
196
+ export declare const RELEASE_CHANGED_FLOOR = "0.124.100";
@@ -19,7 +19,7 @@
19
19
  * this constant to the next patch (#4501). The check fails while a floor
20
20
  * still names this constant after its version shipped.
21
21
  */
22
- export const NEXT_RELEASE = "0.124.99";
22
+ export const NEXT_RELEASE = "0.124.100";
23
23
  /** The first chant with `chant dev local` and `chant dev bundle-check`, `@intentius/chant/local-chant` and `@intentius/chant/bundle-check` (`chantRuntimeTarget`, `chantExternalPlugin`, `checkBundle`): a product built against a chant checkout, and its bundle checked, without its own scripts (#4787). */
24
24
  export const LOCAL_CHANT_FLOOR = "0.124.86";
25
25
  /** The first chant with `chant workspace ref-gate` (pre-receive, pre-push, check, status, attach, install) and `refs` in `.chant/trust.json`, the checks a ref update needs evidence for (#4867). */
@@ -192,3 +192,5 @@ export const GITLAB_WAVE_EVIDENCE_RETRY_FLOOR = "0.124.89";
192
192
  export const TERRAFORM_COMMAND_TRACE_FLOOR = "0.124.91";
193
193
  /** The first chant whose product pipeline limits comment commands to logins and teams on GitHub and Forgejo (INTENTIUS/terragucci#1461): `commentAllow: { allow, tokenSecret? }` in `productPipelineJobs`, where `allow` maps `plan`, `apply`, `lock`, `unlock`, `agent` and `default` to logins and `team:<org>/<team>` entries. The map is written as `CHANT_COMMENT_ALLOW` into the comment job, the product plan's re-plan decision and the agent's jobs (a spec's `agent.commentAllow`), so it is read from the workflow on the default branch. `answerProductComment` takes `allow` and replies to a commenter the list leaves out, `ForgeReads.teamMember` reads a team on GitHub and Forgejo, `CHANT_COMMENT_ALLOW_TOKEN` (`tokenSecret`) carries a token that can read teams, and a team the forge cannot answer for fails closed with a message. */
194
194
  export const COMMENT_ALLOW_FLOOR = "0.124.98";
195
+ /** The first chant with `chant release changed`, the members to release at a commit with their dependency closure, and `release.legacyTags` in `chant.config.ts` (#5134). */
196
+ export const RELEASE_CHANGED_FLOOR = NEXT_RELEASE;
@@ -36,7 +36,7 @@ export declare function installCompiledCli(): void;
36
36
  */
37
37
  export declare function lexiconCompiledTwin(url: string): string | undefined;
38
38
  /**
39
- * #3981 — the `development` target a chant package's `exports` give
39
+ * #3981 — the `@intentius/chant-source` target a chant package's `exports` give
40
40
  * `specifier`, found from `parentPath`'s directory up through each
41
41
  * `node_modules`, or `undefined` when there is none or its file does not
42
42
  * exist. Reads exact keys and single-`*` patterns, the shapes chant's
package/dist/ts-loader.js CHANGED
@@ -130,7 +130,7 @@ export function lexiconCompiledTwin(url) {
130
130
  }
131
131
  const SOURCE_RESOLUTION = Symbol.for("chant.sourceResolution");
132
132
  /**
133
- * #3981 — the `development` target a chant package's `exports` give
133
+ * #3981 — the `@intentius/chant-source` target a chant package's `exports` give
134
134
  * `specifier`, found from `parentPath`'s directory up through each
135
135
  * `node_modules`, or `undefined` when there is none or its file does not
136
136
  * exist. Reads exact keys and single-`*` patterns, the shapes chant's
@@ -173,10 +173,10 @@ export function chantPackageSourceTarget(specifier, parentPath) {
173
173
  star = subpath.slice(prefix.length, subpath.length - suffix.length);
174
174
  }
175
175
  }
176
- const development = entry && typeof entry === "object" ? entry.development : undefined;
177
- if (typeof development !== "string")
176
+ const sourceTarget = entry && typeof entry === "object" ? entry["@intentius/chant-source"] : undefined;
177
+ if (typeof sourceTarget !== "string")
178
178
  return undefined;
179
- const target = join(pkgDir, star === undefined ? development : development.split("*").join(star));
179
+ const target = join(pkgDir, star === undefined ? sourceTarget : sourceTarget.split("*").join(star));
180
180
  // Node keys a module by its real path, so a symlinked package must too.
181
181
  return existsSync(target) ? realpathSync(target) : undefined;
182
182
  }
@@ -188,10 +188,10 @@ export function chantPackageSourceTarget(specifier, parentPath) {
188
188
  }
189
189
  /**
190
190
  * #3981 — from source, resolve chant's own packages through their
191
- * `development` export condition, as `node --conditions=development` (which
191
+ * `@intentius/chant-source` export condition, as `node --conditions=@intentius/chant-source` (which
192
192
  * the repository's `bin/chant` passes) would. A lexicon's `default` export is
193
193
  * its compiled `dist/*.js`, which a checkout may not have built, or built from
194
- * older source; `development` is its `src/*.ts`, which vitest, a project's
194
+ * older source; `@intentius/chant-source` is its `src/*.ts`, which vitest, a project's
195
195
  * tsconfig `paths` and fold's own resolution (`SOURCE_EXPORT_CONDITIONS`)
196
196
  * pick. Without this, a CLI run from source by `node --import tsx` would load
197
197
  * a plugin from `dist/` and fold the project against `src/`: two copies of the