@equinor/roma-nx-plugin 6.4.2 → 6.5.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [6.5.1](https://github.com/equinor/tops-roma/compare/roma-6.5.0...roma-6.5.1) (2026-12-03)
6
+
7
+
8
+ ### Dependencies
9
+
10
+ * The following workspace dependencies were updated
11
+ * dependencies
12
+ * @equinor/roma-framework bumped to 6.4.0
13
+
14
+ ## [6.5.0](https://github.com/equinor/tops-roma/compare/roma-6.4.2...roma-6.5.0) (2026-12-02)
15
+
16
+
17
+ ### Features
18
+
19
+ * **ROMA-426:** Publish docs build for agents and install AI skills by default ([#673](https://github.com/equinor/tops-roma/issues/673)) ([fa179bc](https://github.com/equinor/tops-roma/commit/fa179bcbbe44eda51c38b8eb9f8c15f6a3985e4f))
20
+ * **ROMA-427:** publish release notes from the Nx publish executor ([#680](https://github.com/equinor/tops-roma/issues/680)) ([93214aa](https://github.com/equinor/tops-roma/commit/93214aa6b8dbd7c13166c508eb3cab9387fc7b0e))
21
+
22
+
23
+ ### Dependencies
24
+
25
+ * The following workspace dependencies were updated
26
+ * dependencies
27
+ * @equinor/roma-framework bumped to 6.3.0
28
+
5
29
  ## [6.4.2](https://github.com/equinor/tops-roma/compare/roma-6.4.1...roma-6.4.2) (2026-11-30)
6
30
 
7
31
  ### Features
package/generators.json CHANGED
@@ -25,6 +25,11 @@
25
25
  "factory": "./src/generators/lint-setup/generator",
26
26
  "schema": "./src/generators/lint-setup/schema.json",
27
27
  "description": "Switch projects from ESLint to the Roma Biome lint executor"
28
+ },
29
+ "release-note": {
30
+ "factory": "./src/generators/release-note/generator",
31
+ "schema": "./src/generators/release-note/schema.json",
32
+ "description": "Scaffold release-notes/<version>.md for a Roma app's current package.json version"
28
33
  }
29
34
  }
30
35
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@equinor/roma-nx-plugin",
3
3
  "private": false,
4
- "version": "6.4.2",
4
+ "version": "6.5.1",
5
5
  "repository": "https://github.com/equinor/tops-roma",
6
6
  "dependencies": {
7
7
  "@azure/identity": "^4.14.1",
8
8
  "@biomejs/biome": "2.6.9",
9
9
  "@equinor/fusion-framework-module-app": "8.3.0",
10
- "@equinor/roma-framework": "6.2.0",
10
+ "@equinor/roma-framework": "6.4.0",
11
11
  "@nx/devkit": "^22.7.12",
12
12
  "@nx/react": "^22.7.12",
13
13
  "@vitejs/plugin-react": "^6.3.0",
@@ -22,7 +22,8 @@
22
22
  "tslib": "^2.9.1",
23
23
  "vite": "^8.3.8",
24
24
  "vite-plugin-checker": "^0.14.5",
25
- "vite-plugin-environment": "^1.1.4"
25
+ "vite-plugin-environment": "^1.1.4",
26
+ "yaml": "^2.9.0"
26
27
  },
27
28
  "peerDependencies": {
28
29
  "@nx/devkit": "^22.0.3",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = runExecutor;
4
+ const node_path_1 = require("node:path");
4
5
  const publish_script_1 = require("./publish-script");
5
6
  async function runExecutor(options, context) {
6
7
  var _a;
@@ -8,9 +9,10 @@ async function runExecutor(options, context) {
8
9
  const project = context.projectsConfigurations.projects[projectName];
9
10
  const buildConfig = project.targets.build;
10
11
  const outputPath = (_a = buildConfig.outputPath) !== null && _a !== void 0 ? _a : `dist/apps/${projectName}`;
12
+ const projectRoot = (0, node_path_1.join)(context.root, project.root);
11
13
  let success = true;
12
14
  try {
13
- await (0, publish_script_1.publishApplication)(outputPath, options);
15
+ await (0, publish_script_1.publishApplication)(outputPath, options, projectRoot);
14
16
  }
15
17
  catch (ex) {
16
18
  console.error(`Error when publishing ${projectName}`);
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/executor.ts"],"names":[],"mappings":";;AASA,8BAqBC;AA5BD,qDAAsD;AAOvC,KAAK,UAAU,WAAW,CACvC,OAA8B,EAC9B,OAAwB;;IAExB,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CACrD,WAAW,CACU,CAAC;IACxB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,KAA2B,CAAC;IAChE,MAAM,UAAU,GAAG,MAAA,WAAW,CAAC,UAAU,mCAAI,aAAa,WAAW,EAAE,CAAC;IACxE,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC;QACH,MAAM,IAAA,mCAAkB,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;QACtD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,GAAG,KAAK,CAAC;IAClB,CAAC;IACD,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/executor.ts"],"names":[],"mappings":";;AAUA,8BAsBC;AAhCD,yCAAiC;AAGjC,qDAAsD;AAOvC,KAAK,UAAU,WAAW,CACvC,OAA8B,EAC9B,OAAwB;;IAExB,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CACrD,WAAW,CACU,CAAC;IACxB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,KAA2B,CAAC;IAChE,MAAM,UAAU,GAAG,MAAA,WAAW,CAAC,UAAU,mCAAI,aAAa,WAAW,EAAE,CAAC;IACxE,MAAM,WAAW,GAAG,IAAA,gBAAI,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC;QACH,MAAM,IAAA,mCAAkB,EAAC,UAAU,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;QACtD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,GAAG,KAAK,CAAC;IAClB,CAAC;IACD,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -4,8 +4,9 @@ import type { PublishExecutorSchema } from './schema';
4
4
  *
5
5
  * @param pathToOutput - The path to the output directory.
6
6
  * @param options - The options for the publish operation.
7
+ * @param projectRoot - Absolute path to the project root; `releaseNotesDir` is resolved against it.
7
8
  */
8
- export declare const publishApplication: (pathToOutput: string, options: PublishExecutorSchema) => Promise<void>;
9
+ export declare const publishApplication: (pathToOutput: string, options: PublishExecutorSchema, projectRoot: string) => Promise<void>;
9
10
  /**
10
11
  * Retrieves details for the publishing account
11
12
  * @param jwt The string JWT
@@ -7,6 +7,7 @@ const node_path_1 = require("node:path");
7
7
  const node_util_1 = require("node:util");
8
8
  const node_zlib_1 = require("node:zlib");
9
9
  const identity_1 = require("@azure/identity");
10
+ const release_note_file_1 = require("./release-note-file");
10
11
  const brotli = (0, node_util_1.promisify)(node_zlib_1.brotliCompress);
11
12
  /**
12
13
  * An enum representing the status of the publish operation.
@@ -51,9 +52,10 @@ let token;
51
52
  *
52
53
  * @param pathToOutput - The path to the output directory.
53
54
  * @param options - The options for the publish operation.
55
+ * @param projectRoot - Absolute path to the project root; `releaseNotesDir` is resolved against it.
54
56
  */
55
- const publishApplication = async (pathToOutput, options) => {
56
- var _a, _b, _c;
57
+ const publishApplication = async (pathToOutput, options, projectRoot) => {
58
+ var _a, _b, _c, _d;
57
59
  let env = options.environment;
58
60
  // @ts-expect-error Need to rewrite this as nx expects production, not prod.
59
61
  if (env === 'prod')
@@ -76,6 +78,9 @@ const publishApplication = async (pathToOutput, options) => {
76
78
  parsedManifest.displayName = parsedManifest.name;
77
79
  }
78
80
  const appName = (_b = parsedManifest.appKey) !== null && _b !== void 0 ? _b : parsedManifest.key;
81
+ // The package.json version, never the random cache-busting version used for dev/qa bundle URLs.
82
+ const buildVersion = parsedManifest.build.version;
83
+ const releaseNote = await loadReleaseNote(projectRoot, (_c = options.releaseNotesDir) !== null && _c !== void 0 ? _c : release_note_file_1.DEFAULT_RELEASE_NOTES_DIR, buildVersion);
79
84
  const categories = await getCategories(config);
80
85
  const categoryIds = categories.map((c) => c.id);
81
86
  if (!categoryIds.includes(parsedManifest.categoryId)) {
@@ -101,7 +106,7 @@ const publishApplication = async (pathToOutput, options) => {
101
106
  const version = config.randomVersion
102
107
  ? Date.now()
103
108
  : parsedManifest.build.version;
104
- parsedManifest.metadata = Object.assign(Object.assign({}, ((_c = parsedManifest.metadata) !== null && _c !== void 0 ? _c : {})), { assets: assetFilenames.map((f) => `${config.romaUri}/cdn/applications/bundle/${appName}/assets/${f}?version=${version}`) });
109
+ parsedManifest.metadata = Object.assign(Object.assign({}, ((_d = parsedManifest.metadata) !== null && _d !== void 0 ? _d : {})), { assets: assetFilenames.map((f) => `${config.romaUri}/cdn/applications/bundle/${appName}/assets/${f}?version=${version}`) });
105
110
  console.log(`Added ${assetFilenames.length} asset URI(s) to manifest metadata`);
106
111
  }
107
112
  console.log(`Reading & uploading application manifest to ${config.romaUri}`);
@@ -109,11 +114,78 @@ const publishApplication = async (pathToOutput, options) => {
109
114
  if (status === Status.ERROR) {
110
115
  throw new Error(`Failed to publish application ${appName}`);
111
116
  }
112
- else {
113
- console.log(`Successfully published application ${appName}`);
117
+ console.log(`Successfully published application ${appName}`);
118
+ if (releaseNote) {
119
+ await publishReleaseNote(appName, buildVersion, (0, release_note_file_1.toReleaseNoteRequest)(releaseNote.content, appName), config);
114
120
  }
115
121
  };
116
122
  exports.publishApplication = publishApplication;
123
+ /**
124
+ * Reads and validates the release note for this version before anything is uploaded,
125
+ * so an invalid file fails the publish early.
126
+ */
127
+ async function loadReleaseNote(projectRoot, releaseNotesDir, version) {
128
+ if (!version) {
129
+ console.warn('Manifest has no build version; skipping release notes');
130
+ return null;
131
+ }
132
+ const releaseNote = await (0, release_note_file_1.readReleaseNote)(projectRoot, releaseNotesDir, version);
133
+ if (!releaseNote) {
134
+ console.log(`No release notes for ${version}`);
135
+ return null;
136
+ }
137
+ if (!release_note_file_1.RELEASE_NOTE_SEMVER.test(version)) {
138
+ throw new Error(`Release notes need a semantic version like 1.2.3; package.json version is ${version} (${releaseNote.path})`);
139
+ }
140
+ console.log(`Found release note ${releaseNote.path}`);
141
+ return releaseNote;
142
+ }
143
+ /**
144
+ * Upserts the release note for this app version. Never throws: the bundle and manifest
145
+ * are already live, so a failure only warns and publishing again retries.
146
+ */
147
+ async function publishReleaseNote(appKey, version, request, config) {
148
+ const label = `Release note for ${appKey} ${version}`;
149
+ const retry = 'The app is published. Run publish again to retry.';
150
+ try {
151
+ const token = await authenticate(config);
152
+ const req = await fetch(`${config.romaUri}/api/release-notes/apps/${encodeURIComponent(appKey)}/versions/${encodeURIComponent(version)}`, {
153
+ method: 'PUT',
154
+ headers: {
155
+ Authorization: `Bearer ${token}`,
156
+ 'Content-Type': 'application/json',
157
+ },
158
+ body: JSON.stringify(request),
159
+ });
160
+ if (req.status < 400) {
161
+ const action = req.status === 201 ? 'Created' : 'Updated';
162
+ console.log(`${action} release note for ${appKey} ${version}`);
163
+ return;
164
+ }
165
+ const hint = req.status === 403
166
+ ? "\n The publishing identity needs the Roma.App role and must be listed in the app's config.admins (or the list must be empty)."
167
+ : '';
168
+ console.warn(`${label} was not published (status ${req.status}). ${retry}${await describeApiError(req)}${hint}`);
169
+ }
170
+ catch (error) {
171
+ const reason = error instanceof Error ? error.message : String(error);
172
+ console.warn(`${label} was not published: ${reason}. ${retry}`);
173
+ }
174
+ }
175
+ /** Formats the `message` and `details` of a Roma `ApiError` body, if there is one. */
176
+ async function describeApiError(response) {
177
+ var _a;
178
+ try {
179
+ const error = (await response.json());
180
+ return [error.message, ...((_a = error.details) !== null && _a !== void 0 ? _a : [])]
181
+ .filter(Boolean)
182
+ .map((line) => `\n ${line}`)
183
+ .join('');
184
+ }
185
+ catch (_b) {
186
+ return '';
187
+ }
188
+ }
117
189
  /**
118
190
  * Decodes a base64url-encoded string (as used in JWT tokens) to a UTF-8 string.
119
191
  * Uses Buffer to correctly handle multi-byte UTF-8 characters in claims.
@@ -1 +1 @@
1
- {"version":3,"file":"publish-script.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/publish-script.ts"],"names":[],"mappings":";;;AAyKA,oCAoBC;AA7LD,+CAAqD;AACrD,yCAAqD;AACrD,yCAAsC;AACtC,yCAA2C;AAC3C,8CAAyD;AAIzD,MAAM,MAAM,GAAG,IAAA,qBAAS,EAAC,0BAAc,CAAC,CAAC;AAEzC;;;GAGG;AACH,IAAK,MAGJ;AAHD,WAAK,MAAM;IACT,yCAAO,CAAA;IACP,qCAAK,CAAA;AACP,CAAC,EAHI,MAAM,KAAN,MAAM,QAGV;AAeD;;GAEG;AACH,MAAM,SAAS,GAA2B;IACxC,GAAG,EAAE;QACH,OAAO,EAAE,6BAA6B;QACtC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,8BAA8B;QACvC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,EAAE,EAAE;QACF,OAAO,EAAE,4BAA4B;QACrC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,UAAU,EAAE;QACV,OAAO,EAAE,0BAA0B;QACnC,aAAa,EAAE,KAAK;QACpB,SAAS,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GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,MAAM,CAAC,OAAO,iBAAiB,OAAO,SAAS,EAAE;QAC1E,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,KAAK,EAAE;SACjC;QACD,IAAI,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CACV,sGAAsG,CACvG,CAAC;QACF,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,oCAAoC,OAAO,EAAE,CAAC,CAAC;QAC3D,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,gDAAgD,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QAC5E,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"publish-script.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/publish-script.ts"],"names":[],"mappings":";;;AA4RA,oCAoBC;AAhTD,+CAAqD;AACrD,yCAAqD;AACrD,yCAAsC;AACtC,yCAA2C;AAC3C,8CAAyD;AAEzD,2DAO6B;AAG7B,MAAM,MAAM,GAAG,IAAA,qBAAS,EAAC,0BAAc,CAAC,CAAC;AAEzC;;;GAGG;AACH,IAAK,MAGJ;AAHD,WAAK,MAAM;IACT,yCAAO,CAAA;IACP,qCAAK,CAAA;AACP,CAAC,EAHI,MAAM,KAAN,MAAM,QAGV;AAeD;;GAEG;AACH,MAAM,SAAS,GAA2B;IACxC,GAAG,EAAE;QACH,OAAO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rB,OAAO,CAAC,GAAG,CAAC,oCAAoC,OAAO,EAAE,CAAC,CAAC;QAC3D,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,gDAAgD,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QAC5E,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC;AACH,CAAC"}
@@ -81,6 +81,40 @@ The URL pattern is: `{romaUri}/cdn/applications/bundle/{appKey}/assets/{filename
81
81
 
82
82
  This is particularly important for CSS files — Vite library mode extracts CSS into a separate `app-bundle.css` file. The framework can use `metadata.assets` to load the CSS at runtime.
83
83
 
84
+ ## Release Notes
85
+
86
+ If the app has a curated release note for the version being published, the executor publishes it too.
87
+
88
+ | Option | Default | Description |
89
+ | ----------------- | --------------- | --------------------------------------------------------------- |
90
+ | `releaseNotesDir` | `release-notes` | Folder with `<version>.md` files, relative to the project root. |
91
+
92
+ 1. The version is `manifest.build.version`, which is the `version` in `package.json`. It is never the random
93
+ cache-busting version used for dev/qa bundle URLs. Without a build version, release notes are skipped with a
94
+ warning.
95
+ 2. Before anything is uploaded, `<projectRoot>/<releaseNotesDir>/<version>.md` is read and its front-matter is
96
+ validated (`release-note-file.ts`). An invalid file fails the publish. With no file, the executor logs
97
+ `No release notes for <version>`.
98
+ 3. After the manifest is published, the note is sent with
99
+ `PUT /api/release-notes/apps/{appKey}/versions/{version}`, targeting the app plus the front-matter `keywords`.
100
+ The request is idempotent.
101
+ 4. If that request fails, the executor logs a warning (with the API error, and a hint about `Roma.App` and
102
+ `config.admins` on 403). The publish still succeeds. Publish again to retry.
103
+
104
+ ```markdown
105
+ ---
106
+ title: Faster price grid
107
+ summary: The grid loads three times faster.
108
+ changeType: improvement
109
+ keywords: [pricing, grid]
110
+ ---
111
+
112
+ Markdown body shown in the dialog.
113
+ ```
114
+
115
+ Create the file with `nx g @equinor/roma-nx-plugin:release-note <project>`. The full format (fields, limits and link
116
+ rules) is documented on the "Release notes" page in roma-docs (`apps/roma-docs/docs/Features/ReleaseNotes.md`).
117
+
84
118
  ## Code Explanation
85
119
 
86
120
  This script exports a default asynchronous function `runExecutor` which is what NX calls on executors.
@@ -91,8 +125,9 @@ The `publishApplication` function is responsible for publishing the application
91
125
 
92
126
  - `pathToOutput`: The path to the output directory.
93
127
  - `options`: The options for the publish operation.
128
+ - `projectRoot`: The absolute project root. `releaseNotesDir` is resolved against it.
94
129
 
95
- The publish flow is: **bundle upload → asset upload → manifest publish**.
130
+ The publish flow is: **release note check → bundle upload → asset upload → manifest publish → release note**.
96
131
 
97
132
  The `authenticate` function is responsible for authenticating the user and returning the authentication token. It uses the `DefaultAzureCredential` class from the `@azure/identity` package to authenticate the user.
98
133
 
@@ -103,3 +138,6 @@ The `uploadBundle` function uploads the brotli-compressed bundle to Azure Blob S
103
138
  The `uploadAssets` function scans the output directory for additional files and uploads them (uncompressed) to the assets endpoint.
104
139
 
105
140
  The `publishManifest` function publishes the application manifest to the Roma API.
141
+
142
+ The `loadReleaseNote` function reads and validates the release note before anything is uploaded, and
143
+ `publishReleaseNote` sends it after the manifest is published. It only warns on failure.
@@ -0,0 +1,48 @@
1
+ export declare const RELEASE_NOTE_SEMVER: RegExp;
2
+ export declare const DEFAULT_RELEASE_NOTES_DIR = "release-notes";
3
+ export declare const RELEASE_NOTE_CHANGE_TYPES: readonly ["feature", "improvement", "fix", "security", "deprecation", "other"];
4
+ export declare const RELEASE_NOTE_LINK_RELS: readonly ["docs", "jira", "support", "changelog"];
5
+ export type ReleaseNoteChangeType = (typeof RELEASE_NOTE_CHANGE_TYPES)[number];
6
+ export type ReleaseNoteLinkRel = (typeof RELEASE_NOTE_LINK_RELS)[number];
7
+ export type ReleaseNoteLink = {
8
+ rel: ReleaseNoteLinkRel;
9
+ href: string;
10
+ label?: string;
11
+ };
12
+ /** The curated content of a `release-notes/<version>.md` file. */
13
+ export type ReleaseNoteContent = {
14
+ title: string;
15
+ summary?: string;
16
+ body: string;
17
+ changeType: ReleaseNoteChangeType;
18
+ keywords: Array<string>;
19
+ links: Array<ReleaseNoteLink>;
20
+ };
21
+ /** Body of `PUT /api/release-notes/apps/{appKey}/versions/{version}`. */
22
+ export type ReleaseNoteRequest = {
23
+ title: string;
24
+ summary?: string;
25
+ body: string;
26
+ changeType: ReleaseNoteChangeType;
27
+ links: Array<ReleaseNoteLink>;
28
+ targets: {
29
+ apps: Array<string>;
30
+ keywords: Array<string>;
31
+ };
32
+ };
33
+ export type ReleaseNoteFile = {
34
+ path: string;
35
+ content: ReleaseNoteContent;
36
+ };
37
+ export declare class ReleaseNoteFileError extends Error {
38
+ readonly filePath: string;
39
+ readonly problems: Array<string>;
40
+ constructor(filePath: string, problems: Array<string>);
41
+ }
42
+ export declare function parseReleaseNote(content: string, filePath: string): ReleaseNoteContent;
43
+ export declare function toReleaseNoteRequest(content: ReleaseNoteContent, appKey: string): ReleaseNoteRequest;
44
+ /**
45
+ * Reads and validates `<projectRoot>/<releaseNotesDir>/<version>.md`.
46
+ * Returns `null` when the file does not exist and throws `ReleaseNoteFileError` when it is invalid.
47
+ */
48
+ export declare function readReleaseNote(projectRoot: string, releaseNotesDir: string, version: string): Promise<ReleaseNoteFile | null>;
@@ -0,0 +1,287 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReleaseNoteFileError = exports.RELEASE_NOTE_LINK_RELS = exports.RELEASE_NOTE_CHANGE_TYPES = exports.DEFAULT_RELEASE_NOTES_DIR = exports.RELEASE_NOTE_SEMVER = void 0;
4
+ exports.parseReleaseNote = parseReleaseNote;
5
+ exports.toReleaseNoteRequest = toReleaseNoteRequest;
6
+ exports.readReleaseNote = readReleaseNote;
7
+ const tslib_1 = require("tslib");
8
+ const node_fs_1 = require("node:fs");
9
+ const promises_1 = require("node:fs/promises");
10
+ const node_path_1 = require("node:path");
11
+ const yaml_1 = require("yaml");
12
+ // Same pattern as ReleaseNoteValidator.SEMVER in the Roma API.
13
+ exports.RELEASE_NOTE_SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-.]+)?(?:\+[0-9A-Za-z-.]+)?$/;
14
+ exports.DEFAULT_RELEASE_NOTES_DIR = 'release-notes';
15
+ exports.RELEASE_NOTE_CHANGE_TYPES = [
16
+ 'feature',
17
+ 'improvement',
18
+ 'fix',
19
+ 'security',
20
+ 'deprecation',
21
+ 'other',
22
+ ];
23
+ exports.RELEASE_NOTE_LINK_RELS = [
24
+ 'docs',
25
+ 'jira',
26
+ 'support',
27
+ 'changelog',
28
+ ];
29
+ class ReleaseNoteFileError extends Error {
30
+ constructor(filePath, problems) {
31
+ super(`Invalid release note ${filePath}:\n${problems.map((problem) => ` - ${problem}`).join('\n')}`);
32
+ this.name = 'ReleaseNoteFileError';
33
+ this.filePath = filePath;
34
+ this.problems = problems;
35
+ }
36
+ }
37
+ exports.ReleaseNoteFileError = ReleaseNoteFileError;
38
+ // Same limits as the Roma API, so a file that passes here is not rejected after the bundle is live.
39
+ const TITLE_MAX = 140;
40
+ const SUMMARY_MAX = 280;
41
+ const BODY_MAX = 20000;
42
+ const LABEL_MAX = 80;
43
+ const ALLOWED_FIELDS = ['title', 'summary', 'changeType', 'keywords', 'links'];
44
+ const LINK_FIELDS = ['rel', 'href', 'label'];
45
+ function parseReleaseNote(content, filePath) {
46
+ var _a;
47
+ const parts = splitFrontMatter(content);
48
+ if (!parts) {
49
+ throw new ReleaseNoteFileError(filePath, [
50
+ 'the file must start with YAML front-matter between two "---" lines',
51
+ ]);
52
+ }
53
+ let data;
54
+ try {
55
+ data = (_a = (0, yaml_1.parse)(parts.frontMatter)) !== null && _a !== void 0 ? _a : {};
56
+ }
57
+ catch (error) {
58
+ const reason = error instanceof Error ? error.message : String(error);
59
+ throw new ReleaseNoteFileError(filePath, [
60
+ `front-matter is not valid YAML: ${reason}`,
61
+ ]);
62
+ }
63
+ if (!isRecord(data)) {
64
+ throw new ReleaseNoteFileError(filePath, [
65
+ 'front-matter must be a YAML mapping of fields',
66
+ ]);
67
+ }
68
+ const problems = [];
69
+ for (const key of Object.keys(data)) {
70
+ if (!ALLOWED_FIELDS.includes(key)) {
71
+ problems.push(`unknown field "${key}" (allowed: ${ALLOWED_FIELDS.join(', ')})`);
72
+ }
73
+ }
74
+ const title = readText(data.title, 'title', TITLE_MAX, true, problems);
75
+ const summary = readText(data.summary, 'summary', SUMMARY_MAX, false, problems);
76
+ if (parts.body.length === 0) {
77
+ problems.push('body is required (write Markdown below the closing "---")');
78
+ }
79
+ else if (parts.body.length > BODY_MAX) {
80
+ problems.push(`body must be at most ${BODY_MAX} characters (has ${parts.body.length})`);
81
+ }
82
+ const changeType = readChangeType(data.changeType, problems);
83
+ const keywords = readKeywords(data.keywords, problems);
84
+ const links = readLinks(data.links, problems);
85
+ if (problems.length > 0) {
86
+ throw new ReleaseNoteFileError(filePath, problems);
87
+ }
88
+ return Object.assign(Object.assign({ title: title }, (summary ? { summary } : {})), { body: parts.body, changeType,
89
+ keywords,
90
+ links });
91
+ }
92
+ function toReleaseNoteRequest(content, appKey) {
93
+ const { keywords } = content, note = tslib_1.__rest(content, ["keywords"]);
94
+ return Object.assign(Object.assign({}, note), { targets: { apps: [appKey], keywords } });
95
+ }
96
+ /**
97
+ * Reads and validates `<projectRoot>/<releaseNotesDir>/<version>.md`.
98
+ * Returns `null` when the file does not exist and throws `ReleaseNoteFileError` when it is invalid.
99
+ */
100
+ async function readReleaseNote(projectRoot, releaseNotesDir, version) {
101
+ const path = (0, node_path_1.resolve)(projectRoot, releaseNotesDir, `${version}.md`);
102
+ if (!(0, node_fs_1.existsSync)(path))
103
+ return null;
104
+ const content = (await (0, promises_1.readFile)(path)).toString('utf-8');
105
+ return { path, content: parseReleaseNote(content, path) };
106
+ }
107
+ function splitFrontMatter(content) {
108
+ var _a;
109
+ const lines = content.replace(/^\uFEFF/, '').split(/\r?\n/);
110
+ if (((_a = lines[0]) === null || _a === void 0 ? void 0 : _a.trimEnd()) !== '---')
111
+ return null;
112
+ const end = lines.findIndex((line, index) => index > 0 && line.trimEnd() === '---');
113
+ if (end === -1)
114
+ return null;
115
+ return {
116
+ frontMatter: lines.slice(1, end).join('\n'),
117
+ body: lines
118
+ .slice(end + 1)
119
+ .join('\n')
120
+ .replace(/^(?:[ \t]*\n)+/, '')
121
+ .trimEnd(),
122
+ };
123
+ }
124
+ function readText(value, field, max, required, problems) {
125
+ if (value === undefined || value === null) {
126
+ if (required)
127
+ problems.push(`${field} is required`);
128
+ return undefined;
129
+ }
130
+ if (typeof value !== 'string') {
131
+ problems.push(`${field} must be text (quote it in YAML)`);
132
+ return undefined;
133
+ }
134
+ const text = value.trim();
135
+ if (text.length === 0) {
136
+ if (required)
137
+ problems.push(`${field} is required`);
138
+ return undefined;
139
+ }
140
+ if (text.length > max) {
141
+ problems.push(`${field} must be at most ${max} characters (has ${text.length})`);
142
+ }
143
+ return text;
144
+ }
145
+ function readChangeType(value, problems) {
146
+ if (value === undefined || value === null)
147
+ return 'other';
148
+ if (typeof value === 'string' &&
149
+ exports.RELEASE_NOTE_CHANGE_TYPES.includes(value)) {
150
+ return value;
151
+ }
152
+ problems.push(`changeType must be one of ${exports.RELEASE_NOTE_CHANGE_TYPES.join(', ')}`);
153
+ return 'other';
154
+ }
155
+ function readKeywords(value, problems) {
156
+ if (value === undefined || value === null)
157
+ return [];
158
+ if (!Array.isArray(value)) {
159
+ problems.push('keywords must be a list, e.g. [pricing, grid]');
160
+ return [];
161
+ }
162
+ const keywords = [];
163
+ for (const [index, keyword] of value.entries()) {
164
+ if (typeof keyword !== 'string' || keyword.trim().length === 0) {
165
+ problems.push(`keywords[${index}] must be non-empty text`);
166
+ continue;
167
+ }
168
+ // The API rejects commas: Spring splits a comma-separated query value, so such a keyword could not be filtered on.
169
+ if (keyword.includes(',')) {
170
+ problems.push(`keywords[${index}] must not contain a comma`);
171
+ continue;
172
+ }
173
+ const trimmed = keyword.trim();
174
+ const seen = keywords.some((existing) => existing.toLowerCase() === trimmed.toLowerCase());
175
+ if (!seen)
176
+ keywords.push(trimmed);
177
+ }
178
+ return keywords;
179
+ }
180
+ function readLinks(value, problems) {
181
+ if (value === undefined || value === null)
182
+ return [];
183
+ if (!Array.isArray(value)) {
184
+ problems.push('links must be a list of { rel, href, label? }');
185
+ return [];
186
+ }
187
+ const links = [];
188
+ for (const [index, entry] of value.entries()) {
189
+ const field = `links[${index}]`;
190
+ if (!isRecord(entry)) {
191
+ problems.push(`${field} must be a mapping with rel and href`);
192
+ continue;
193
+ }
194
+ const { rel, href, label } = entry;
195
+ const before = problems.length;
196
+ if (typeof rel !== 'string' ||
197
+ !exports.RELEASE_NOTE_LINK_RELS.includes(rel)) {
198
+ problems.push(`${field}.rel must be one of ${exports.RELEASE_NOTE_LINK_RELS.join(', ')}`);
199
+ }
200
+ if (typeof href !== 'string' || !isHttpUrl(href)) {
201
+ problems.push(`${field}.href must be an absolute http(s) URL`);
202
+ }
203
+ const hasLabel = label !== undefined && label !== null;
204
+ if (hasLabel &&
205
+ (typeof label !== 'string' || label.trim().length > LABEL_MAX)) {
206
+ problems.push(`${field}.label must be text of at most ${LABEL_MAX} characters`);
207
+ }
208
+ for (const key of Object.keys(entry)) {
209
+ if (!LINK_FIELDS.includes(key)) {
210
+ problems.push(`${field} has unknown field "${key}"`);
211
+ }
212
+ }
213
+ if (problems.length > before)
214
+ continue;
215
+ const text = typeof label === 'string' ? label.trim() : '';
216
+ links.push(Object.assign({ rel: rel, href: href }, (text ? { label: text } : {})));
217
+ }
218
+ return links;
219
+ }
220
+ // Mirrors the API's isHttpUri: java.net.URI must parse the href (no characters it rejects, no malformed %-escapes),
221
+ // the scheme must be http(s), and the authority must yield a server-based host.
222
+ function isHttpUrl(value) {
223
+ const match = /^https?:\/\/([^/?#]*)(.*)$/i.exec(value);
224
+ if (!match)
225
+ return false;
226
+ if ([...value].some(isIllegalUriChar))
227
+ return false;
228
+ if (value.indexOf('#') !== value.lastIndexOf('#'))
229
+ return false;
230
+ if (/%(?![0-9A-Fa-f]{2})/.test(value))
231
+ return false;
232
+ const [, authority, rest] = match;
233
+ const path = rest.split(/[?#]/, 1)[0];
234
+ if (/[[\]]/.test(path))
235
+ return false;
236
+ return isServerAuthority(authority);
237
+ }
238
+ const ILLEGAL_URI_CHARS = '"<>\\^`{|}';
239
+ function isIllegalUriChar(char) {
240
+ return ILLEGAL_URI_CHARS.includes(char) || /\p{Zs}|\p{Cc}/u.test(char);
241
+ }
242
+ function isServerAuthority(authority) {
243
+ const userInfoEnd = authority.indexOf('@');
244
+ if (/[[\]]/.test(authority.slice(0, Math.max(userInfoEnd, 0))))
245
+ return false;
246
+ const hostPort = authority.slice(userInfoEnd + 1);
247
+ if (hostPort.includes('@'))
248
+ return false;
249
+ const parts = /^(\[[^\]]*\]|[^:]*)(?::(\d*))?$/.exec(hostPort);
250
+ if (!parts)
251
+ return false;
252
+ if (parts[2] && Number(parts[2]) > 2147483647)
253
+ return false;
254
+ const host = parts[1];
255
+ if (host.startsWith('['))
256
+ return isIpv6(host.slice(1, -1));
257
+ return isIpv4(host) || isHostname(host);
258
+ }
259
+ // RFC 4291 text form as java.net.URI parses it: 8 groups, or at most 7 around a single "::",
260
+ // where a trailing IPv4 address counts as two groups.
261
+ function isIpv6(address) {
262
+ const halves = address.split('::');
263
+ if (halves.length > 2)
264
+ return false;
265
+ const groups = halves.flatMap((half) => (half ? half.split(':') : []));
266
+ const last = groups.at(-1);
267
+ const ipv4 = (last === null || last === void 0 ? void 0 : last.includes('.')) ? last : undefined;
268
+ if (ipv4 && (!address.endsWith(ipv4) || !isIpv4(ipv4)))
269
+ return false;
270
+ const hex = ipv4 ? groups.slice(0, -1) : groups;
271
+ if (!hex.every((group) => /^[0-9A-Fa-f]{1,4}$/.test(group)))
272
+ return false;
273
+ const count = hex.length + (ipv4 ? 2 : 0);
274
+ return halves.length === 2 ? count <= 7 : count === 8;
275
+ }
276
+ function isIpv4(host) {
277
+ return (/^\d{1,3}(\.\d{1,3}){3}$/.test(host) &&
278
+ host.split('.').every((octet) => Number(octet) <= 255));
279
+ }
280
+ function isHostname(host) {
281
+ const labels = host.replace(/\.$/, '').split('.');
282
+ return (labels.every((label) => /^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/.test(label)) && /^[A-Za-z]/.test(labels[labels.length - 1]));
283
+ }
284
+ function isRecord(value) {
285
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
286
+ }
287
+ //# sourceMappingURL=release-note-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-note-file.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/release-note-file.ts"],"names":[],"mappings":";;;AAgFA,4CAgEC;AAED,oDAMC;AAMD,0CASC;;AAvKD,qCAAqC;AACrC,+CAA4C;AAC5C,yCAAoC;AACpC,+BAA6B;AAE7B,+DAA+D;AAClD,QAAA,mBAAmB,GAC9B,qFAAqF,CAAC;AAE3E,QAAA,yBAAyB,GAAG,eAAe,CAAC;AAE5C,QAAA,yBAAyB,GAAG;IACvC,SAAS;IACT,aAAa;IACb,KAAK;IACL,UAAU;IACV,aAAa;IACb,OAAO;CACC,CAAC;AAEE,QAAA,sBAAsB,GAAG;IACpC,MAAM;IACN,MAAM;IACN,SAAS;IACT,WAAW;CACH,CAAC;AAiCX,MAAa,oBAAqB,SAAQ,KAAK;IAI7C,YAAY,QAAgB,EAAE,QAAuB;QACnD,KAAK,CACH,wBAAwB,QAAQ,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC/F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,Q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13,4 +13,10 @@ export type PublishExecutorSchema = {
13
13
  * Useful for dev and qa where updates are more frequent and you don't want to publish a new version.
14
14
  */
15
15
  randomVersion?: boolean;
16
+
17
+ /**
18
+ * Folder with curated release notes (`<version>.md`), relative to the project root.
19
+ * Defaults to `release-notes`.
20
+ */
21
+ releaseNotesDir?: string;
16
22
  };
@@ -14,6 +14,11 @@
14
14
  "randomVersion": {
15
15
  "type": "boolean",
16
16
  "description": "Whether to generate a random version for the published application.\nUseful for dev and qa where updates are more frequent and you don't want to publish a new version.\nDefault true for dev/qa, false for prod"
17
+ },
18
+ "releaseNotesDir": {
19
+ "type": "string",
20
+ "description": "Folder with curated release notes, relative to the project root. If <releaseNotesDir>/<version>.md exists for the package.json version, it is validated before upload and published as the app's release note.",
21
+ "default": "release-notes"
17
22
  }
18
23
  },
19
24
  "required": []
@@ -0,0 +1,4 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ import type { ReleaseNoteGeneratorSchema } from './schema';
3
+ export declare function releaseNoteGenerator(tree: Tree, options: ReleaseNoteGeneratorSchema): void;
4
+ export default releaseNoteGenerator;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.releaseNoteGenerator = releaseNoteGenerator;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const release_note_file_1 = require("../../executors/publish/release-note-file");
6
+ function releaseNoteGenerator(tree, options) {
7
+ var _a, _b, _c, _d, _e;
8
+ const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
9
+ const packageJsonPath = (0, devkit_1.joinPathFragments)(project.root, 'package.json');
10
+ if (!tree.exists(packageJsonPath)) {
11
+ throw new Error(`${packageJsonPath} not found`);
12
+ }
13
+ const { version } = (0, devkit_1.readJson)(tree, packageJsonPath);
14
+ if (!version) {
15
+ throw new Error(`${packageJsonPath} has no version`);
16
+ }
17
+ const publish = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.publish;
18
+ const defaultConfiguration = (publish === null || publish === void 0 ? void 0 : publish.defaultConfiguration)
19
+ ? (_b = publish.configurations) === null || _b === void 0 ? void 0 : _b[publish.defaultConfiguration]
20
+ : undefined;
21
+ const releaseNotesDir = (_e = ((_c = defaultConfiguration === null || defaultConfiguration === void 0 ? void 0 : defaultConfiguration.releaseNotesDir) !== null && _c !== void 0 ? _c : (_d = publish === null || publish === void 0 ? void 0 : publish.options) === null || _d === void 0 ? void 0 : _d.releaseNotesDir)) !== null && _e !== void 0 ? _e : release_note_file_1.DEFAULT_RELEASE_NOTES_DIR;
22
+ const filePath = (0, devkit_1.joinPathFragments)(project.root, releaseNotesDir, `${version}.md`);
23
+ if (tree.exists(filePath)) {
24
+ throw new Error(`Release note ${filePath} already exists`);
25
+ }
26
+ tree.write(filePath, releaseNoteTemplate(options.project, version));
27
+ }
28
+ // Title and body are left empty on purpose: publishing fails until they are filled in.
29
+ function releaseNoteTemplate(project, version) {
30
+ return `---
31
+ # Release note for ${project} ${version}. \`nx publish ${project}\` sends it to Roma.
32
+ # Fill in the title and write the Markdown body below the closing "---". Publishing fails while either is empty.
33
+ # Format: https://docs.roma.equinor.com/docs/Features/ReleaseNotes
34
+ title: '' # required, at most 140 characters
35
+ summary: '' # optional, at most 280 characters, shown in the list of release notes
36
+ changeType: other # feature | improvement | fix | security | deprecation | other
37
+ keywords: [] # optional, e.g. [pricing, grid]
38
+ links: [] # optional, e.g. [{ rel: jira, href: 'https://oiltradeent.atlassian.net/browse/ROMA-1' }]
39
+ ---
40
+ `;
41
+ }
42
+ exports.default = releaseNoteGenerator;
43
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/release-note/generator.ts"],"names":[],"mappings":";;AASA,oDA8BC;AAvCD,uCAKoB;AACpB,iFAAsF;AAGtF,SAAgB,oBAAoB,CAClC,IAAU,EACV,OAAmC;;IAEnC,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI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E,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,uFAAuF;AACvF,SAAS,mBAAmB,CAAC,OAAe,EAAE,OAAe;IAC3D,OAAO;qBACY,OAAO,IAAI,OAAO,kBAAkB,OAAO;;;;;;;;;CAS/D,CAAC;AACF,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type ReleaseNoteGeneratorSchema = {
2
+ project: string;
3
+ };
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/schema",
3
+ "$id": "ReleaseNote",
4
+ "title": "Release note",
5
+ "description": "Scaffolds release-notes/<version>.md for a Roma app's current package.json version.",
6
+ "type": "object",
7
+ "properties": {
8
+ "project": {
9
+ "type": "string",
10
+ "description": "The Roma app to write a release note for. The file is named after the version in the app's package.json.",
11
+ "$default": { "$source": "argv", "index": 0 },
12
+ "x-dropdown": "projects"
13
+ }
14
+ },
15
+ "required": ["project"]
16
+ }
@@ -17,6 +17,7 @@ Use this skill when you need to:
17
17
  - Use Fusion Framework modules (event system, auth, navigation, service discovery, feature flags, telemetry)
18
18
  - Use Roma custom modules (page titles, real-time SSE events)
19
19
  - Build UI with Roma / EDS components
20
+ - Write and publish release notes for an app version
20
21
 
21
22
  ## Roma Documentation
22
23
 
@@ -62,6 +63,19 @@ import { Button, Card, Typography } from '@equinor/eds-core-react';
62
63
  - Existing apps: run `nx migrate @equinor/roma-nx-plugin` — the `swap-eds-to-roma-ui` migration rewrites
63
64
  imports and dependencies. Code generated by older templates may still import EDS directly; swap it.
64
65
 
66
+ ## Release Notes
67
+
68
+ When a change is user-visible, add a release note for the version being published:
69
+
70
+ 1. Bump `version` in the app's `package.json`.
71
+ 2. Run `nx g @equinor/roma-nx-plugin:release-note <project>` to create `release-notes/<version>.md`.
72
+ 3. Fill in `title` and the Markdown body (both required); add `summary`, `changeType`, `keywords` and `links` as
73
+ needed.
74
+ 4. `nx publish <project>` validates the file before uploading and publishes the note with the app.
75
+
76
+ See the Release Note Generator section of `generators.md` for the file format and publish behaviour, and the Release
77
+ Notes page in the Roma docs for the REST API.
78
+
65
79
  ## Installation
66
80
 
67
81
  This skill was added via the Roma NX plugin generator:
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- The Roma NX plugin (`@equinor/roma-nx-plugin`) provides four generators for scaffolding Roma-compatible projects:
5
+ The Roma NX plugin (`@equinor/roma-nx-plugin`) provides these generators for scaffolding Roma-compatible projects:
6
6
 
7
7
  | Generator | Command | Purpose |
8
8
  |-----------|---------|---------|
@@ -10,6 +10,7 @@ The Roma NX plugin (`@equinor/roma-nx-plugin`) provides four generators for scaf
10
10
  | **preset** | `nx g @equinor/roma-nx-plugin:preset {name}` | Initialize a new Roma NX workspace (wraps the app generator) |
11
11
  | **component-test** | `nx g @equinor/roma-nx-plugin:component-test --project={name}` | Add Cypress component testing to an existing Roma app |
12
12
  | **skill** | `nx g @equinor/roma-nx-plugin:skill` | Add the Roma development skill for AI assistants |
13
+ | **release-note** | `nx g @equinor/roma-nx-plugin:release-note {project}` | Scaffold `release-notes/<version>.md`; `nx publish` validates it before upload and sends it to Roma |
13
14
 
14
15
  ---
15
16
 
@@ -320,6 +321,48 @@ import { mount } from 'cypress/react18';
320
321
 
321
322
  ---
322
323
 
324
+ ## Release Note Generator
325
+
326
+ Scaffolds the release note for the app's current `package.json` version:
327
+
328
+ ```sh
329
+ nx g @equinor/roma-nx-plugin:release-note my-app # writes apps/my-app/release-notes/<version>.md
330
+ ```
331
+
332
+ - The file goes in the publish target's `releaseNotesDir` (default `release-notes`, relative to the project root). A
333
+ `releaseNotesDir` in the target's `defaultConfiguration` takes precedence over `options`.
334
+ - It fails if `package.json` has no `version` or the file already exists.
335
+ - The template leaves `title` and the body empty, so `nx publish` fails until both are filled in.
336
+
337
+ ### File format
338
+
339
+ ```markdown
340
+ ---
341
+ title: Faster grid filtering # required, at most 140 characters
342
+ summary: Filters apply instantly. # optional, at most 280 characters
343
+ changeType: improvement # feature | improvement | fix | security | deprecation | other (default other)
344
+ keywords: [pricing, grid] # optional free text; no commas inside a keyword
345
+ links: # optional; rel is docs | jira | support | changelog; label at most 80 characters
346
+ - { rel: jira, href: 'https://oiltradeent.atlassian.net/browse/ROMA-1', label: ROMA-1 }
347
+ ---
348
+
349
+ Markdown body (required).
350
+ ```
351
+
352
+ Any other front-matter field is an error. A note from a file always targets the app plus its keywords; to target
353
+ services or categories, use the REST API (see the Release Notes docs page).
354
+
355
+ ### Publishing
356
+
357
+ `nx publish` validates `<releaseNotesDir>/<version>.md` before uploading anything and lists every problem if it is
358
+ invalid. Without a file it logs `No release notes for <version>` and continues. After the manifest is published it
359
+ sends `PUT /api/release-notes/apps/{appKey}/versions/{version}` to the same environment (`-c qa` creates a QA note);
360
+ publishing the same version again replaces the note. If that request fails, the publish still succeeds with a
361
+ warning — publish again to retry. The publishing identity needs the `Roma.App` role and must be allowed by the app's
362
+ `config.admins`.
363
+
364
+ ---
365
+
323
366
  ## Skill Generator
324
367
 
325
368
  Adds the Roma development skill files for AI assistants (Claude, Copilot, etc.) to the repository: