@platforma-sdk/block-tools 2.19.1 → 2.19.3

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": "@platforma-sdk/block-tools",
3
- "version": "2.19.1",
3
+ "version": "2.19.3",
4
4
  "description": "Utility to manipulate Platforma Blocks and Block Registry",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -26,9 +26,9 @@
26
26
  "@aws-sdk/client-ecr-public": "3.1157.0",
27
27
  "@inquirer/prompts": "^7.0.1",
28
28
  "@milaboratories/pl-http": "1.2.6",
29
- "@milaboratories/pl-model-backend": "1.4.46",
30
- "@milaboratories/pl-model-common": "1.55.2",
31
- "@milaboratories/pl-model-middle-layer": "1.39.0",
29
+ "@milaboratories/pl-model-backend": "1.4.48",
30
+ "@milaboratories/pl-model-common": "1.56.0",
31
+ "@milaboratories/pl-model-middle-layer": "1.40.0",
32
32
  "@milaboratories/resolve-helper": "1.1.3",
33
33
  "@milaboratories/ts-helpers": "1.9.1",
34
34
  "@platforma-sdk/blocks-deps-updater": "2.2.2",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@milaboratories/build-configs": "2.0.3",
47
- "@milaboratories/ts-builder": "1.7.4",
47
+ "@milaboratories/ts-builder": "1.8.0",
48
48
  "@milaboratories/ts-configs": "1.4.1",
49
49
  "@rollup/plugin-node-resolve": "^16.0.1",
50
50
  "@types/mime-types": "^2.1.4",
@@ -123,6 +123,8 @@ describe("facade: slim `package.json` end-state", () => {
123
123
  // Author-owned seed + engine-managed components both present.
124
124
  expect(p.block.components).toBeTruthy();
125
125
  expect(p.block.meta).toBeTruthy();
126
+ // The changelog is the facade's own, the file changesets writes.
127
+ expect(p.block.meta.changelog).toBe("file:CHANGELOG.md");
126
128
  });
127
129
  });
128
130
 
@@ -110,6 +110,11 @@ const FACADE_EXPORTS = {
110
110
  },
111
111
  };
112
112
 
113
+ /** `block.meta.changelog`: the facade's own `CHANGELOG.md`, the only changelog
114
+ * changesets writes for the published package. Not author-owned — any other
115
+ * path shows release notes that never change. */
116
+ const BLOCK_CHANGELOG = "file:CHANGELOG.md";
117
+
113
118
  /** Fail loudly if any required `block.*` field is empty — a missing
114
119
  * title / description / logo / organization or empty components map would
115
120
  * otherwise produce an init block that `block-tools pack` rejects only
@@ -167,6 +172,7 @@ export function blockPackageJsonInitial(ctx: RunContext): Record<string, unknown
167
172
  title: v.shortName,
168
173
  description: `${v.shortName} block`,
169
174
  logo: "file:logos/block-logo.png",
175
+ changelog: BLOCK_CHANGELOG,
170
176
  organization: {
171
177
  name: v.orgScope,
172
178
  url: "https://example.com",
@@ -244,10 +250,11 @@ export function blockPackageJsonRules(ctx: RunContext): void {
244
250
  ensureDevDep("typescript", "catalog:");
245
251
 
246
252
  // `block.components` is fully determined by the discovered modules — keep it
247
- // in sync on refresh. `block.meta` is deliberately NOT touched: it is an
248
- // author-owned seed (set once in the init package.json), so refresh must
249
- // never overwrite the author's title / description / logo.
253
+ // in sync on refresh. The rest of `block.meta` is deliberately NOT touched:
254
+ // it is an author-owned seed (set once in the init package.json), so refresh
255
+ // must never overwrite the author's title / description / logo.
250
256
  ensureField("block.components", blockComponents(ctx));
257
+ ensureField("block.meta.changelog", BLOCK_CHANGELOG);
251
258
 
252
259
  // The author owns `name` and `version`; `version` MUST be present (the
253
260
  // facade publishes).
@@ -52,6 +52,14 @@ export function blockRules(): void {
52
52
  seed("logos/block-logo.png", binaryFile("block/logos/block-logo.png"));
53
53
  seed("logos/organization-logo.png", binaryFile("block/logos/organization-logo.png"));
54
54
 
55
+ // Target of `block.meta.changelog`. Changesets writes the facade's release
56
+ // notes here; the header-only file keeps `block-tools pack` resolvable
57
+ // before the first release.
58
+ scaffold(
59
+ "CHANGELOG.md",
60
+ generate((ctx) => `# ${ctx.blockVars.facadeName}\n`),
61
+ );
62
+
55
63
  managed(
56
64
  "package.json",
57
65
  generate((ctx) => blockPackageJsonInitial(ctx)),