@intentius/chant 0.124.34 → 0.124.35

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 (169) hide show
  1. package/dist/cli/handlers/graph.js +2 -2
  2. package/dist/cli/handlers/pr.d.ts.map +1 -1
  3. package/dist/cli/handlers/pr.js +147 -51
  4. package/dist/cli/handlers/promote.d.ts.map +1 -1
  5. package/dist/cli/handlers/promote.js +23 -8
  6. package/dist/cli/handlers/release.d.ts +12 -0
  7. package/dist/cli/handlers/release.d.ts.map +1 -1
  8. package/dist/cli/handlers/release.js +125 -10
  9. package/dist/cli/handlers/run.d.ts +3 -1
  10. package/dist/cli/handlers/run.d.ts.map +1 -1
  11. package/dist/cli/handlers/run.js +12 -2
  12. package/dist/cli/main.d.ts.map +1 -1
  13. package/dist/cli/main.js +19 -1
  14. package/dist/cli/parse-args.d.ts.map +1 -1
  15. package/dist/cli/parse-args.js +17 -0
  16. package/dist/cli/registry.d.ts +14 -0
  17. package/dist/cli/registry.d.ts.map +1 -1
  18. package/dist/components/auto-release.d.ts +8 -1
  19. package/dist/components/auto-release.d.ts.map +1 -1
  20. package/dist/components/auto-release.js +3 -2
  21. package/dist/components/green-cover.d.ts +77 -0
  22. package/dist/components/green-cover.d.ts.map +1 -0
  23. package/dist/components/green-cover.js +153 -0
  24. package/dist/components/pr-pipeline.d.ts +34 -0
  25. package/dist/components/pr-pipeline.d.ts.map +1 -1
  26. package/dist/components/pr-pipeline.js +39 -5
  27. package/dist/components/promote.d.ts +4 -1
  28. package/dist/components/promote.d.ts.map +1 -1
  29. package/dist/components/promote.js +6 -3
  30. package/dist/components/release-promote.d.ts +9 -0
  31. package/dist/components/release-promote.d.ts.map +1 -1
  32. package/dist/components/release-promote.js +15 -0
  33. package/dist/config.d.ts +2 -0
  34. package/dist/config.d.ts.map +1 -1
  35. package/dist/deep-observation.d.ts +11 -0
  36. package/dist/deep-observation.d.ts.map +1 -1
  37. package/dist/graph-declared.d.ts +5 -1
  38. package/dist/graph-declared.d.ts.map +1 -1
  39. package/dist/graph-declared.js +7 -2
  40. package/dist/graph-detail.d.ts.map +1 -1
  41. package/dist/graph-detail.js +30 -1
  42. package/dist/graph-ir.d.ts.map +1 -1
  43. package/dist/graph-ir.js +13 -2
  44. package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -1
  45. package/dist/lifecycle/__fixtures__/publish-fakes.js +5 -1
  46. package/dist/lifecycle/compose-refs.d.ts +52 -0
  47. package/dist/lifecycle/compose-refs.d.ts.map +1 -0
  48. package/dist/lifecycle/compose-refs.js +115 -0
  49. package/dist/lifecycle/deep-observe.d.ts.map +1 -1
  50. package/dist/lifecycle/deep-observe.js +3 -2
  51. package/dist/lifecycle/green-apply.d.ts +39 -0
  52. package/dist/lifecycle/green-apply.d.ts.map +1 -0
  53. package/dist/lifecycle/green-apply.js +51 -0
  54. package/dist/lifecycle/publish-declaration.d.ts +4 -0
  55. package/dist/lifecycle/publish-declaration.d.ts.map +1 -1
  56. package/dist/lifecycle/publish-declaration.js +15 -0
  57. package/dist/lifecycle/publish-npm.d.ts +7 -4
  58. package/dist/lifecycle/publish-npm.d.ts.map +1 -1
  59. package/dist/lifecycle/publish-npm.js +60 -13
  60. package/dist/lifecycle/release-compose.d.ts +91 -0
  61. package/dist/lifecycle/release-compose.d.ts.map +1 -0
  62. package/dist/lifecycle/release-compose.js +235 -0
  63. package/dist/lifecycle/release-cut.d.ts +8 -0
  64. package/dist/lifecycle/release-cut.d.ts.map +1 -1
  65. package/dist/lifecycle/release-cut.js +2 -0
  66. package/dist/lifecycle/release-publish.d.ts +2 -0
  67. package/dist/lifecycle/release-publish.d.ts.map +1 -1
  68. package/dist/lifecycle/release-publish.js +2 -1
  69. package/dist/lifecycle/release-store.d.ts +15 -0
  70. package/dist/lifecycle/release-store.d.ts.map +1 -1
  71. package/dist/lifecycle/release-store.js +5 -1
  72. package/dist/wave-runtime.mjs +225 -223
  73. package/dist/workspace/checks/ci-workflow.d.ts.map +1 -1
  74. package/dist/workspace/checks/ci-workflow.js +8 -1
  75. package/dist/workspace/ci-green-cli.d.ts.map +1 -1
  76. package/dist/workspace/ci-green-cli.js +5 -3
  77. package/dist/workspace/ci-green-workflow.d.ts +18 -2
  78. package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
  79. package/dist/workspace/ci-green-workflow.js +27 -5
  80. package/dist/workspace/ci-green.d.ts +31 -0
  81. package/dist/workspace/ci-green.d.ts.map +1 -1
  82. package/dist/workspace/ci-green.js +78 -4
  83. package/dist/workspace/ci-run.d.ts +6 -0
  84. package/dist/workspace/ci-run.d.ts.map +1 -1
  85. package/dist/workspace/ci-run.js +2 -1
  86. package/dist/workspace/ci-serve.d.ts +94 -13
  87. package/dist/workspace/ci-serve.d.ts.map +1 -1
  88. package/dist/workspace/ci-serve.js +248 -30
  89. package/dist/workspace/ci-workflow.d.ts +4 -4
  90. package/dist/workspace/ci-workflow.d.ts.map +1 -1
  91. package/dist/workspace/ci-workflow.js +2 -2
  92. package/dist/workspace/delivery-metrics.d.ts +3 -1
  93. package/dist/workspace/delivery-metrics.d.ts.map +1 -1
  94. package/dist/workspace/delivery-metrics.js +12 -3
  95. package/dist/workspace/member-commands.d.ts.map +1 -1
  96. package/dist/workspace/member-commands.js +4 -0
  97. package/dist/workspace/nested-graph.d.ts.map +1 -1
  98. package/dist/workspace/nested-graph.js +1 -0
  99. package/dist/workspace/release-candidates.d.ts +28 -0
  100. package/dist/workspace/release-candidates.d.ts.map +1 -1
  101. package/dist/workspace/release-candidates.js +38 -2
  102. package/dist/workspace/release-candidates.schema.json +51 -0
  103. package/dist/workspace/releases.schema.json +30 -0
  104. package/package.json +1 -1
  105. package/src/cli/handlers/graph.ts +2 -2
  106. package/src/cli/handlers/pr-green.test.ts +230 -0
  107. package/src/cli/handlers/pr.ts +148 -66
  108. package/src/cli/handlers/promote.test.ts +34 -0
  109. package/src/cli/handlers/promote.ts +22 -8
  110. package/src/cli/handlers/release-compose.e2e.test.ts +133 -0
  111. package/src/cli/handlers/release.ts +112 -10
  112. package/src/cli/handlers/run.ts +12 -1
  113. package/src/cli/main.ts +19 -1
  114. package/src/cli/parse-args.ts +13 -0
  115. package/src/cli/registry.ts +14 -0
  116. package/src/codegen/release-wiring.test.ts +56 -9
  117. package/src/components/auto-release.test.ts +22 -0
  118. package/src/components/auto-release.ts +9 -2
  119. package/src/components/green-cover.test.ts +170 -0
  120. package/src/components/green-cover.ts +186 -0
  121. package/src/components/pr-pipeline.test.ts +14 -4
  122. package/src/components/pr-pipeline.ts +56 -5
  123. package/src/components/promote.test.ts +7 -0
  124. package/src/components/promote.ts +9 -4
  125. package/src/components/release-promote.test.ts +24 -1
  126. package/src/components/release-promote.ts +15 -0
  127. package/src/deep-observation.ts +8 -0
  128. package/src/graph-declared.test.ts +18 -0
  129. package/src/graph-declared.ts +8 -1
  130. package/src/graph-detail.test.ts +68 -1
  131. package/src/graph-detail.ts +29 -1
  132. package/src/graph-ir.ts +12 -4
  133. package/src/lifecycle/__fixtures__/publish-fakes.ts +5 -1
  134. package/src/lifecycle/compose-refs.ts +125 -0
  135. package/src/lifecycle/deep-observe.test.ts +20 -0
  136. package/src/lifecycle/deep-observe.ts +4 -2
  137. package/src/lifecycle/green-apply.ts +71 -0
  138. package/src/lifecycle/publish-declaration.ts +15 -0
  139. package/src/lifecycle/publish-npm.ts +55 -13
  140. package/src/lifecycle/publish-targets.test.ts +45 -0
  141. package/src/lifecycle/release-compose.test.ts +125 -0
  142. package/src/lifecycle/release-compose.ts +312 -0
  143. package/src/lifecycle/release-cut.ts +6 -0
  144. package/src/lifecycle/release-publish.ts +4 -1
  145. package/src/lifecycle/release-store.ts +16 -1
  146. package/src/workspace/checks/ci-workflow.test.ts +12 -2
  147. package/src/workspace/checks/ci-workflow.ts +7 -1
  148. package/src/workspace/ci-green-cli.ts +5 -3
  149. package/src/workspace/ci-green-workflow.test.ts +52 -0
  150. package/src/workspace/ci-green-workflow.ts +34 -5
  151. package/src/workspace/ci-green.test.ts +33 -0
  152. package/src/workspace/ci-green.ts +85 -4
  153. package/src/workspace/ci-run.test.ts +18 -13
  154. package/src/workspace/ci-run.ts +8 -1
  155. package/src/workspace/ci-serve-land.e2e.test.ts +138 -0
  156. package/src/workspace/ci-serve-land.test.ts +176 -0
  157. package/src/workspace/ci-serve.test.ts +77 -43
  158. package/src/workspace/ci-serve.ts +268 -34
  159. package/src/workspace/ci-workflow.ts +4 -4
  160. package/src/workspace/delivery-metrics.ts +12 -3
  161. package/src/workspace/graph-contract.test.ts +3 -2
  162. package/src/workspace/member-commands.test.ts +11 -4
  163. package/src/workspace/member-commands.ts +3 -0
  164. package/src/workspace/nested-graph.test.ts +4 -0
  165. package/src/workspace/nested-graph.ts +1 -0
  166. package/src/workspace/release-candidates.schema.json +51 -0
  167. package/src/workspace/release-candidates.test.ts +30 -3
  168. package/src/workspace/release-candidates.ts +54 -2
  169. package/src/workspace/releases.schema.json +30 -0
@@ -5,8 +5,8 @@
5
5
  * `trunk-curated`: a merge records the plan and deploys nothing (#4168 4.1),
6
6
  * the quick checks run before the branch moves (4.4), and a release is cut
7
7
  * from a green commit and promoted through the member's environments, gated
8
- * in the last (4.2). `trunk-curated+apply-on-merge` is the same with the apply
9
- * on merge turned back on (section 5).
8
+ * in the last (4.2). `trunk-curated+apply-on-merge` is the same, and each
9
+ * newest green commit is also applied (section 5, step 9).
10
10
  *
11
11
  * A workflow requires no security group: those are opt-in on their own
12
12
  * (./security.ts). `chant workspace check` reports what a member under a
@@ -70,12 +70,12 @@ export declare const CI_WORKFLOW_REQUIREMENTS: readonly [{
70
70
  readonly perMember: true;
71
71
  }, {
72
72
  readonly code: "ci-workflow-pipeline-missing";
73
- readonly requirement: "a pipeline file runs the plan job, the merge job (`ci run record`, or `ci run apply` under apply on merge) and `chant ci tick`";
73
+ readonly requirement: "a pipeline file runs the plan job, the record job (`ci run record`) and `chant ci tick`";
74
74
  readonly fix: "`chant build --components --generate <forge> --pr-loop` and `chant ci workflow`";
75
75
  readonly perMember: false;
76
76
  }, {
77
77
  readonly code: "ci-workflow-pipeline-differs";
78
- readonly requirement: "the merge job matches the workflow: it records under `trunk-curated` and applies under `trunk-curated+apply-on-merge`";
78
+ readonly requirement: "the pipeline matches the workflow: no apply job under `trunk-curated`, and under `trunk-curated+apply-on-merge` an apply job that applies the newest green commit, not each merge";
79
79
  readonly fix: "regenerate the pull-request pipeline, with `--apply-on-merge` only under apply on merge";
80
80
  readonly perMember: false;
81
81
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"ci-workflow.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAErE,oJAAoJ;AACpJ,eAAO,MAAM,WAAW,wBAAwB,CAAC;AAEjD,eAAO,MAAM,YAAY,4DAA6F,CAAC;AAEvH,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAE5D;AAED,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAE7H;AAED,iGAAiG;AACjG,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;mBAC3B,8BAA8B;0BAAe,6FAA6F;kBAAO,qDAAqD;;;mBACtM,0BAA0B;0BAAe,iGAAiG;kBAAO,0BAA0B;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B,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;mBAC3B,8BAA8B;0BAAe,6FAA6F;kBAAO,qDAAqD;;;mBACtM,0BAA0B;0BAAe,iGAAiG;kBAAO,0BAA0B;;;mBAC3K,4BAA4B;0BAAe,0FAA0F;kBAAO,uDAAuD;;;mBACnM,2BAA2B;0BAAe,oDAAoD;kBAAO,+BAA+B;;;mBACpI,6BAA6B;0BAAe,6EAA6E;kBAAO,qCAAqC;;;mBACrK,yBAAyB;0BAAe,sFAAsF;kBAAO,kCAAkC;;;mBACvK,8BAA8B;0BAAe,yFAAyF;kBAAO,iFAAiF;;;mBAC9N,8BAA8B;0BAAe,mLAAmL;kBAAO,yFAAyF;;;mBAChU,6BAA6B;0BAAe,8CAA8C;kBAAO,0BAA0B;;EAChF,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,eAAO,MAAM,yBAAyB,EAAkD,SAAS,cAAc,EAAE,CAAC;AAElH,sEAAsE;AACtE,wBAAgB,eAAe,IAAI,MAAM,CAGxC"}
@@ -21,8 +21,8 @@ export const CI_WORKFLOW_REQUIREMENTS = [
21
21
  { code: "ci-workflow-no-components", requirement: "the member declares a component (`*.component.ts`)", fix: "`chant ci init` writes a stub", perMember: true },
22
22
  { code: "ci-workflow-no-environments", requirement: "the member's `chant.config.ts` declares `environments`, the promotion order", fix: "`environments` in `chant.config.ts`", perMember: true },
23
23
  { code: "ci-workflow-ungated-env", requirement: "each component has a gate, so a promote to the last environment waits on an approval", fix: "a `gate()` step in the component", perMember: true },
24
- { code: "ci-workflow-pipeline-missing", requirement: "a pipeline file runs the plan job, the merge job (`ci run record`, or `ci run apply` under apply on merge) and `chant ci tick`", fix: "`chant build --components --generate <forge> --pr-loop` and `chant ci workflow`", perMember: false },
25
- { code: "ci-workflow-pipeline-differs", requirement: "the merge job matches the workflow: it records under `trunk-curated` and applies under `trunk-curated+apply-on-merge`", fix: "regenerate the pull-request pipeline, with `--apply-on-merge` only under apply on merge", perMember: false },
24
+ { code: "ci-workflow-pipeline-missing", requirement: "a pipeline file runs the plan job, the record job (`ci run record`) and `chant ci tick`", fix: "`chant build --components --generate <forge> --pr-loop` and `chant ci workflow`", perMember: false },
25
+ { code: "ci-workflow-pipeline-differs", requirement: "the pipeline matches the workflow: no apply job under `trunk-curated`, and under `trunk-curated+apply-on-merge` an apply job that applies the newest green commit, not each merge", fix: "regenerate the pull-request pipeline, with `--apply-on-merge` only under apply on merge", perMember: false },
26
26
  { code: "ci-workflow-publish-missing", requirement: "a pipeline file runs `chant release publish`", fix: "`chant release workflow`", perMember: false },
27
27
  ];
28
28
  export const CI_WORKFLOW_FINDING_CODES = CI_WORKFLOW_REQUIREMENTS.map((r) => r.code);
@@ -15,7 +15,9 @@
15
15
  * resolutions, for a deploy that names its release only through its
16
16
  * admission (`releaseOfDeploy`, #4043);
17
17
  * - the counted `ci/revoked/<sha>` tags, judged as `release cut` judges them
18
- * (`readRevokedCommits`, #4033), and each commit's committer time from git.
18
+ * (`readRevokedCommits`, #4033), and each commit's committer time from git;
19
+ * a composed commit (#4168 4.3) takes the earliest time of the trunk
20
+ * commits it carries.
19
21
  *
20
22
  * Outside a workspace the project's own ledger is read as one member, `null`.
21
23
  * It reads the local branch and the local tags, and never fetches.
@@ -1 +1 @@
1
- {"version":3,"file":"delivery-metrics.d.ts","sourceRoot":"","sources":["../../src/workspace/delivery-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAmD,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,+BAA+B,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;IAC1B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,4FAA4F;IAC5F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAmBD,kFAAkF;AAClF,wBAAsB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAsE3F;AAsED,0DAA0D;AAC1D,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,uBAAuB,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,MAAM,CAcjG;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkB9E"}
@@ -15,7 +15,9 @@
15
15
  * resolutions, for a deploy that names its release only through its
16
16
  * admission (`releaseOfDeploy`, #4043);
17
17
  * - the counted `ci/revoked/<sha>` tags, judged as `release cut` judges them
18
- * (`readRevokedCommits`, #4033), and each commit's committer time from git.
18
+ * (`readRevokedCommits`, #4033), and each commit's committer time from git;
19
+ * a composed commit (#4168 4.3) takes the earliest time of the trunk
20
+ * commits it carries.
19
21
  *
20
22
  * Outside a workspace the project's own ledger is read as one member, `null`.
21
23
  * It reads the local branch and the local tags, and never fetches.
@@ -84,11 +86,18 @@ export async function deliveryMetrics(query) {
84
86
  // can't be judged stop the read: the failure rate would be wrong otherwise.
85
87
  const { readRevokedCommits } = await import("../lifecycle/release-revocation.js");
86
88
  const revoked = await readRevokedCommits(root);
89
+ const { compositionOf } = await import("../lifecycle/compose-refs.js");
87
90
  const commitTimes = new Map();
91
+ const ownTime = (sha) => {
92
+ const iso = tryGit(top, ["show", "-s", "--format=%cI", `${sha}^{commit}`]);
93
+ return iso ? Date.parse(iso) : null;
94
+ };
88
95
  const commitTime = (sha) => {
89
96
  if (!commitTimes.has(sha)) {
90
- const iso = tryGit(top, ["show", "-s", "--format=%cI", `${sha}^{commit}`]);
91
- commitTimes.set(sha, iso ? Date.parse(iso) : null);
97
+ // #4168 4.3: a composed commit's lead time runs from the earliest trunk commit it carries.
98
+ const sources = compositionOf(top, sha)?.sources ?? [];
99
+ const times = sources.map(ownTime).filter((t) => t !== null);
100
+ commitTimes.set(sha, times.length > 0 ? Math.min(...times) : ownTime(sha));
92
101
  }
93
102
  return commitTimes.get(sha);
94
103
  };
@@ -1 +1 @@
1
- {"version":3,"file":"member-commands.d.ts","sourceRoot":"","sources":["../../src/workspace/member-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAuB,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,EAAwC,KAAK,aAAa,EAAyB,MAAM,cAAc,CAAC;AAC/G,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjE,wFAAwF;AACxF,MAAM,WAAW,OAAO;IACtB,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,iFAAiF;IACjF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG;QAAE,UAAU,EAAE,MAAM,C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b, unit, args) {
241
241
  argv.push("--overlay");
242
242
  if (args.traffic)
243
243
  argv.push("--traffic", args.traffic);
244
+ // The detail tier too, so `workspace graph --detail 1` composes collapsed
245
+ // composites with their rolled-up status (#4228).
246
+ if (args.detail !== undefined)
247
+ argv.push("--detail", String(args.detail));
244
248
  }
245
249
  return argv;
246
250
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nested-graph.d.ts","sourceRoot":"","sources":["../../src/workspace/nested-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAA8B,KAAK,cAAc,EAAqB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1H,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEpE,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAClB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,cAAc,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC9F;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,wBAAwB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAElI,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,EAAE,CAY1G;AAeD,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,MAAM,EAA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,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,wBAAwB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAElI,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,EAAE,CAa1G;AAeD,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAwBnI;AAED,uEAAuE;AACvE,wBAAsB,UAAU,CAC9B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,EACzB,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,SAAS,GAAG,SAAqB,GAC3C,OAAO,CAAC,UAAU,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAG1C;AAYD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAwD5H"}
@@ -33,6 +33,7 @@ export function nestedArgv(dir, args, at) {
33
33
  ...(args.live ? ["--live"] : []),
34
34
  ...(args.overlay ? ["--overlay"] : []),
35
35
  ...(args.traffic !== undefined ? ["--traffic", String(args.traffic)] : []),
36
+ ...(args.detail !== undefined ? ["--detail", String(args.detail)] : []),
36
37
  ...(args.noCache ? ["--no-cache"] : []),
37
38
  ];
38
39
  }
@@ -24,6 +24,11 @@
24
24
  * flags whose record files changed in its range, from the declared flag kinds
25
25
  * (#4024).
26
26
  *
27
+ * Each candidate also groups its changes (#4168 4.4) by work item, then by
28
+ * pull request, then by commit: a change lands under every work item its
29
+ * trailers name, or under no work item, and within that under its pull
30
+ * request, or under none for a commit that landed without one.
31
+ *
27
32
  * It reads local refs and tags only and never fetches. Git is read through a
28
33
  * local `git` subprocess.
29
34
  */
@@ -61,6 +66,18 @@ export interface CandidateChange {
61
66
  /** The merge record `_merges/<sha>.json` (#4168 4.1), as stored, or null when there is none. */
62
67
  merge: Record<string, unknown> | null;
63
68
  }
69
+ /** A candidate's changes under one pull request, or under none (`pr: null`) for commits that landed without one. */
70
+ export interface CandidatePullRequestGroup {
71
+ pr: number | null;
72
+ /** Newest first. */
73
+ commits: string[];
74
+ }
75
+ /** A candidate's changes under one work item, or under none (`work: null`). Work items come first, in the order the oldest change names them. */
76
+ export interface CandidateGroup {
77
+ work: string | null;
78
+ /** Pull requests in the order their oldest commit landed, then `pr: null`. */
79
+ pullRequests: CandidatePullRequestGroup[];
80
+ }
64
81
  export interface CandidateFlag {
65
82
  id: string;
66
83
  member: string;
@@ -79,6 +96,8 @@ export interface Candidate {
79
96
  /** The labels of releases already cut from it. */
80
97
  cut: string[];
81
98
  changes: CandidateChange[];
99
+ /** The same changes by work item, then pull request, then commit (#4168 4.4). */
100
+ groups: CandidateGroup[];
82
101
  flags: CandidateFlag[];
83
102
  }
84
103
  export type ReleaseCandidatesDocument = {
@@ -124,6 +143,15 @@ export declare function recordTrailers(trailers: Record<string, string[]>): {
124
143
  };
125
144
  /** The pull request number at the end of a squash subject, or null. */
126
145
  export declare function prFromSubject(subject: string): number | null;
146
+ /** The pull request a merge record names in its `source`, or null. */
147
+ export declare function mergeRecordPr(merge: Record<string, unknown> | null): number | null;
148
+ /**
149
+ * Group changes, given newest first, by work item, then pull request, then
150
+ * commit. A change with work items lands in each one's group; the rest land
151
+ * in the `work: null` group, last. Within a group, pull requests come in the
152
+ * order their oldest commit landed, and commits without one last.
153
+ */
154
+ export declare function groupChanges(changes: readonly CandidateChange[]): CandidateGroup[];
127
155
  /** Read the release candidates of the member at `query.cwd`. */
128
156
  export declare function releaseCandidatesDocument(query: ReleaseCandidatesQuery): Promise<ReleaseCandidatesDocument>;
129
157
  //# sourceMappingURL=release-candidates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"release-candidates.d.ts","sourceRoot":"","sources":["../../src/workspace/release-candidates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAUH,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,4BAA4B,sGAAsG,CAAC;AAEhJ,uEAAuE;AACvE,eAAO,MAAM,8BAA8B,YAAI,sBAAsB,EAAE,mBAAmB,CAAU,CAAC;AAErG,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,qFAAqF;AACrF,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,+FAA+F;IAC/F,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,sDAAsD;IACtD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6FAA6F;IAC7F,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC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KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAgBD,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAOxG;AAED,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG5D;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAGlF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,cAAc,EAAE,CAclF;AAED,gEAAgE;AAChE,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAoIjH"}
@@ -24,6 +24,11 @@
24
24
  * flags whose record files changed in its range, from the declared flag kinds
25
25
  * (#4024).
26
26
  *
27
+ * Each candidate also groups its changes (#4168 4.4) by work item, then by
28
+ * pull request, then by commit: a change lands under every work item its
29
+ * trailers name, or under no work item, and within that under its pull
30
+ * request, or under none for a commit that landed without one.
31
+ *
27
32
  * It reads local refs and tags only and never fetches. Git is read through a
28
33
  * local `git` subprocess.
29
34
  */
@@ -66,6 +71,34 @@ export function prFromSubject(subject) {
66
71
  const m = PR_IN_SUBJECT.exec(subject);
67
72
  return m ? Number(m[1]) : null;
68
73
  }
74
+ /** The pull request a merge record names in its `source`, or null. */
75
+ export function mergeRecordPr(merge) {
76
+ const source = merge?.source;
77
+ return source?.kind === "pull-request" && typeof source.pr === "number" ? source.pr : null;
78
+ }
79
+ /**
80
+ * Group changes, given newest first, by work item, then pull request, then
81
+ * commit. A change with work items lands in each one's group; the rest land
82
+ * in the `work: null` group, last. Within a group, pull requests come in the
83
+ * order their oldest commit landed, and commits without one last.
84
+ */
85
+ export function groupChanges(changes) {
86
+ const oldestFirst = [...changes].reverse();
87
+ const groups = new Map();
88
+ const add = (work, pr, commit) => {
89
+ const byPr = groups.get(work) ?? new Map();
90
+ groups.set(work, byPr);
91
+ byPr.set(pr, [commit, ...(byPr.get(pr) ?? [])]);
92
+ };
93
+ for (const c of oldestFirst)
94
+ for (const work of c.work.length > 0 ? c.work : [null])
95
+ add(work, c.pr, c.commit);
96
+ const nullLast = (keys) => [...keys.filter((k) => k !== null), ...keys.filter((k) => k === null)];
97
+ return nullLast([...groups.keys()]).map((work) => {
98
+ const byPr = groups.get(work);
99
+ return { work, pullRequests: nullLast([...byPr.keys()]).map((pr) => ({ pr, commits: byPr.get(pr) })) };
100
+ });
101
+ }
69
102
  /** Read the release candidates of the member at `query.cwd`. */
70
103
  export async function releaseCandidatesDocument(query) {
71
104
  const head = { $schema: RELEASE_CANDIDATES_SCHEMA_ID, contract: RELEASE_CANDIDATES_CONTRACT_VERSION, chant: readerVersion() };
@@ -153,7 +186,8 @@ export async function releaseCandidatesDocument(query) {
153
186
  const d = details.get(sha);
154
187
  const { work, records } = recordTrailers(d?.trailers ?? {});
155
188
  const merge = merges.get(sha) ?? null;
156
- const mergePr = merge && typeof merge.pr === "number" ? merge.pr : null;
189
+ // The merge record names its pull request in `source` (../lifecycle/merge-record.ts).
190
+ const mergePr = mergeRecordPr(merge);
157
191
  const subject = d?.subject ?? "";
158
192
  return { commit: sha, subject, date: d?.date ?? "", work, records, pr: mergePr ?? prFromSubject(subject), merge };
159
193
  };
@@ -178,13 +212,15 @@ export async function releaseCandidatesDocument(query) {
178
212
  if (!tags.green.has(sha))
179
213
  continue;
180
214
  const own = change(sha);
215
+ const changes = open.map(change).reverse();
181
216
  candidates.push({
182
217
  commit: sha,
183
218
  subject: own.subject,
184
219
  date: own.date,
185
220
  newFor: environments.filter((e) => i < newestRun.get(e.env)).map((e) => e.env),
186
221
  cut: cutLabels.get(sha) ?? [],
187
- changes: open.map(change).reverse(),
222
+ changes,
223
+ groups: groupChanges(changes),
188
224
  flags: flagReader(open),
189
225
  });
190
226
  open = [];
@@ -212,6 +212,7 @@
212
212
  "newFor",
213
213
  "cut",
214
214
  "changes",
215
+ "groups",
215
216
  "flags"
216
217
  ],
217
218
  "properties": {
@@ -245,6 +246,13 @@
245
246
  },
246
247
  "description": "The first-parent commits after the previous candidate, up to and including this one, newest first."
247
248
  },
249
+ "groups": {
250
+ "type": "array",
251
+ "items": {
252
+ "$ref": "#/$defs/group"
253
+ },
254
+ "description": "The same changes by work item, then pull request, then commit (#4168 4.4). Work items come first, in the order the oldest change names them, then `work: null` for changes that name none. A change with two work items is under both."
255
+ },
248
256
  "flags": {
249
257
  "type": "array",
250
258
  "items": {
@@ -254,6 +262,49 @@
254
262
  }
255
263
  }
256
264
  },
265
+ "group": {
266
+ "type": "object",
267
+ "required": [
268
+ "work",
269
+ "pullRequests"
270
+ ],
271
+ "properties": {
272
+ "work": {
273
+ "type": [
274
+ "string",
275
+ "null"
276
+ ],
277
+ "description": "The work item id a `Chant-Record: work:<id>` trailer names, or null."
278
+ },
279
+ "pullRequests": {
280
+ "type": "array",
281
+ "items": {
282
+ "type": "object",
283
+ "required": [
284
+ "pr",
285
+ "commits"
286
+ ],
287
+ "properties": {
288
+ "pr": {
289
+ "type": [
290
+ "integer",
291
+ "null"
292
+ ],
293
+ "description": "The pull request, or null for commits that landed without one."
294
+ },
295
+ "commits": {
296
+ "type": "array",
297
+ "items": {
298
+ "type": "string"
299
+ },
300
+ "description": "Newest first."
301
+ }
302
+ }
303
+ },
304
+ "description": "Pull requests in the order their oldest commit landed, then `pr: null`."
305
+ }
306
+ }
307
+ },
257
308
  "change": {
258
309
  "type": "object",
259
310
  "required": [
@@ -363,6 +363,36 @@
363
363
  "type": "string"
364
364
  }
365
365
  }
366
+ },
367
+ "composed": {
368
+ "type": "object",
369
+ "required": [
370
+ "branch",
371
+ "base",
372
+ "sources"
373
+ ],
374
+ "properties": {
375
+ "branch": {
376
+ "type": [
377
+ "string",
378
+ "null"
379
+ ]
380
+ },
381
+ "base": {
382
+ "type": "string"
383
+ },
384
+ "sources": {
385
+ "type": "array",
386
+ "items": {
387
+ "type": "string"
388
+ }
389
+ }
390
+ },
391
+ "description": "Added by #4168 4.3, written by chant 0.124.35 and newer. On a cut of a composed commit only: its chant/compose/<name> branch, the trunk commit it was composed on, and the trunk commits picked onto that base, oldest first."
392
+ },
393
+ "channel": {
394
+ "type": "string",
395
+ "description": "Added by #4168 4.3, written by chant 0.124.35 and newer. The tag release publish moves in place of latest (an npm dist-tag, an image tag), from release cut --channel. Absent for latest."
366
396
  }
367
397
  }
368
398
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.124.34",
3
+ "version": "0.124.35",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -432,7 +432,7 @@ async function runGraphLive(
432
432
  // no stack carries a `src`.
433
433
  const scopedStacks = stacks.filter((s) => s.src);
434
434
  if (scopedStacks.length > 0) {
435
- const declaredIr = await buildDeclaredPerStack(scopedStacks, projectPath);
435
+ const declaredIr = await buildDeclaredPerStack(scopedStacks, projectPath, (g, entities) => withLexiconEdges(g, plugins, entities));
436
436
  ir =
437
437
  args.overlayAnchor === "live"
438
438
  ? overlayGraphs(ir, declaredIr, overlayOpts)
@@ -455,7 +455,7 @@ async function runGraphLive(
455
455
  console.error(formatWarning({ message: "overlay: a build root failed to render — showing the provisioned graph without the declared overlay" }));
456
456
  } else {
457
457
  await mergeGraphOps(declared.entities, declared.sourceFiles, projectPath);
458
- const declaredIr = buildGraphIr(declared.entities, projectPath);
458
+ const declaredIr = withLexiconEdges(buildGraphIr(declared.entities, projectPath), plugins, declared.entities);
459
459
  ir =
460
460
  args.overlayAnchor === "live"
461
461
  ? overlayGraphs(ir, declaredIr, overlayOpts)