@mouryaamit/nx-polystack 1.0.0 → 1.0.2

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/USER-MANUAL.md CHANGED
@@ -364,13 +364,13 @@ that, and `--ci`, `--ci-cache`, `--flutter`, `--upgrade-schedule` and `--upgrade
364
364
  UTC), plus a manual run. `polystack` scope: `pstack update --to=<latest release>`; `nx-minor` also
365
365
  runs `nx migrate nx@<current major>`, `npm install` and the Nx migrations. Opens or updates the
366
366
  `chore/dependency-upgrade` pull request (`chore(deps): scheduled dependency upgrade`) with
367
- `peter-evans/create-pull-request@v6`, and `subosito/flutter-action@v2` when Flutter is set up. With only `--ci=jenkins` it is skipped, with a note.
367
+ `peter-evans/create-pull-request@v8`, and `subosito/flutter-action@v2` when Flutter is set up. With only `--ci=jenkins` it is skipped, with a note.
368
368
 
369
369
  - **Settings.** The upgrade workflow finds the latest version with `npm view` and needs "Allow GitHub
370
370
  Actions to create and approve pull requests" in the repo settings.
371
371
 
372
- - Actions are pinned to major tags: `actions/checkout@v4`, `actions/setup-node@v4`,
373
- `nrwl/nx-set-shas@v4`, `actions/cache@v4`, `peter-evans/create-pull-request@v6`.
372
+ - Actions are pinned to major tags: `actions/checkout@v5`, `actions/setup-node@v5`,
373
+ `nrwl/nx-set-shas@v5`, `actions/cache@v5`, `peter-evans/create-pull-request@v8`.
374
374
 
375
375
  The llm block is refreshed and lists the new npm scripts. Through the global CLI, `pstack infra`
376
376
  needs nx-polystack 0.9.0 or newer pinned in the workspace.
@@ -82,6 +82,11 @@
82
82
  "version": "1.0.0",
83
83
  "description": "Add the web/ folder (index.html, manifest.json) that flutter build web needs to Flutter apps generated without one",
84
84
  "implementation": "./src/migrations/flutter-web-platform/flutter-web-platform"
85
+ },
86
+ "github-actions-node24": {
87
+ "version": "1.0.2",
88
+ "description": "Move GitHub workflows to the Node 24 action versions (checkout, setup-node, cache, nx-set-shas v5; create-pull-request v8)",
89
+ "implementation": "./src/migrations/github-actions-node24/github-actions-node24"
85
90
  }
86
91
  }
87
92
  }
@@ -25,10 +25,10 @@ jobs:
25
25
  main:
26
26
  runs-on: ubuntu-latest
27
27
  steps:
28
- - uses: actions/checkout@v4
28
+ - uses: actions/checkout@v5
29
29
  with:
30
30
  fetch-depth: 0
31
- - uses: actions/setup-node@v4
31
+ - uses: actions/setup-node@v5
32
32
  with:
33
33
  node-version-file: .nvmrc
34
34
  cache: npm
@@ -53,7 +53,7 @@ jobs:
53
53
  - run: npm ci
54
54
  <%_ if (ciCache) { _%>
55
55
  - name: Nx cache
56
- uses: actions/cache@v4
56
+ uses: actions/cache@v5
57
57
  with:
58
58
  path: <%= cacheDirectory %>
59
59
  key: nx-${{ runner.os }}-${{ hashFiles('package-lock.json') }}-${{ github.sha }}
@@ -61,7 +61,7 @@ jobs:
61
61
  nx-${{ runner.os }}-${{ hashFiles('package-lock.json') }}-
62
62
  nx-${{ runner.os }}-
63
63
  <%_ } _%>
64
- - uses: nrwl/nx-set-shas@v4
64
+ - uses: nrwl/nx-set-shas@v5
65
65
  with:
66
66
  main-branch-name: <%= baseBranch %>
67
67
  - run: npx nx affected -t lint typecheck test build --parallel=3
@@ -13,8 +13,8 @@ jobs:
13
13
  commitlint:
14
14
  runs-on: ubuntu-latest
15
15
  steps:
16
- - uses: actions/checkout@v4
17
- - uses: actions/setup-node@v4
16
+ - uses: actions/checkout@v5
17
+ - uses: actions/setup-node@v5
18
18
  with:
19
19
  node-version-file: .nvmrc
20
20
  cache: npm
@@ -24,10 +24,10 @@ jobs:
24
24
  upgrade:
25
25
  runs-on: ubuntu-latest
26
26
  steps:
27
- - uses: actions/checkout@v4
27
+ - uses: actions/checkout@v5
28
28
  with:
29
29
  ref: <%= baseBranch %>
30
- - uses: actions/setup-node@v4
30
+ - uses: actions/setup-node@v5
31
31
  with:
32
32
  node-version-file: .nvmrc
33
33
  cache: npm
@@ -67,7 +67,7 @@ jobs:
67
67
  rm migrations.json
68
68
  fi
69
69
  <%_ } _%>
70
- - uses: peter-evans/create-pull-request@v6
70
+ - uses: peter-evans/create-pull-request@v8
71
71
  with:
72
72
  branch: chore/dependency-upgrade
73
73
  base: <%= baseBranch %>
@@ -0,0 +1,18 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * Action versions the plugin's workflows used, and the first version of each that runs on
4
+ * Node 24 (GitHub deprecated Node 20 for actions). Only these exact refs are moved.
5
+ */
6
+ export declare const NODE24_ACTIONS: Readonly<Record<string, {
7
+ from: string;
8
+ to: string;
9
+ }>>;
10
+ /** `uses:` lines of the listed actions at their old major moved to the Node 24 major. */
11
+ export declare function bumpWorkflowActions(text: string): string;
12
+ /**
13
+ * v1.0.2: GitHub runs Node 20 actions on Node 24 and has deprecated them. Workflows the plugin
14
+ * generated (CI, PR title, dependency upgrade) move to the actions' Node 24 majors:
15
+ * checkout/setup-node/cache/nx-set-shas v5 and create-pull-request v8. Other actions and pinned
16
+ * SHAs are left alone.
17
+ */
18
+ export default function githubActionsNode24(tree: Tree): Promise<void>;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bumpWorkflowActions = exports.NODE24_ACTIONS = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const WORKFLOWS = '.github/workflows';
6
+ /**
7
+ * Action versions the plugin's workflows used, and the first version of each that runs on
8
+ * Node 24 (GitHub deprecated Node 20 for actions). Only these exact refs are moved.
9
+ */
10
+ exports.NODE24_ACTIONS = {
11
+ 'actions/checkout': { from: 'v4', to: 'v5' },
12
+ 'actions/setup-node': { from: 'v4', to: 'v5' },
13
+ 'actions/cache': { from: 'v4', to: 'v5' },
14
+ 'nrwl/nx-set-shas': { from: 'v4', to: 'v5' },
15
+ 'peter-evans/create-pull-request': { from: 'v6', to: 'v8' },
16
+ };
17
+ const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\/]/g, '\\$&');
18
+ /** `uses:` lines of the listed actions at their old major moved to the Node 24 major. */
19
+ function bumpWorkflowActions(text) {
20
+ let out = text;
21
+ for (const [action, { from, to }] of Object.entries(exports.NODE24_ACTIONS)) {
22
+ const re = new RegExp(`(\\buses:\\s*['"]?${escapeRegExp(action)})@${from}(?![\\w.])`, 'g');
23
+ out = out.replace(re, `$1@${to}`);
24
+ }
25
+ return out;
26
+ }
27
+ exports.bumpWorkflowActions = bumpWorkflowActions;
28
+ /**
29
+ * v1.0.2: GitHub runs Node 20 actions on Node 24 and has deprecated them. Workflows the plugin
30
+ * generated (CI, PR title, dependency upgrade) move to the actions' Node 24 majors:
31
+ * checkout/setup-node/cache/nx-set-shas v5 and create-pull-request v8. Other actions and pinned
32
+ * SHAs are left alone.
33
+ */
34
+ async function githubActionsNode24(tree) {
35
+ if (!tree.exists(WORKFLOWS))
36
+ return;
37
+ const changed = [];
38
+ for (const name of tree.children(WORKFLOWS)) {
39
+ const file = `${WORKFLOWS}/${name}`;
40
+ if (!/\.ya?ml$/.test(name) || !tree.isFile(file))
41
+ continue;
42
+ const text = tree.read(file, 'utf-8') ?? '';
43
+ const next = bumpWorkflowActions(text);
44
+ if (next !== text) {
45
+ tree.write(file, next);
46
+ changed.push(file);
47
+ }
48
+ }
49
+ if (changed.length > 0) {
50
+ devkit_1.logger.info(`github-actions-node24: ${changed.join(', ')} moved to the Node 24 action versions.`);
51
+ }
52
+ }
53
+ exports.default = githubActionsNode24;
54
+ //# sourceMappingURL=github-actions-node24.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-actions-node24.js","sourceRoot":"","sources":["../../../../src/migrations/github-actions-node24/github-actions-node24.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAE1C,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC;;;GAGG;AACU,QAAA,cAAc,GAA2D;IACpF,kBAAkB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE;IAC5C,oBAAoB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,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E,SAAS;QAC3D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,IAAI,KAAK,IAAI,EAAE;YACjB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpB;KACF;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,eAAM,CAAC,IAAI,CACT,0BAA0B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,wCAAwC,CACrF,CAAC;KACH;AACH,CAAC;AAlBD,sCAkBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mouryaamit/nx-polystack",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Nx plugin and pstack CLI that scaffold and build multi-tech monorepos (Angular, Ionic, Flutter) with a hardened release pipeline.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "bin": {
36
- "pstack": "./dist/bin/cli.js"
36
+ "pstack": "dist/bin/cli.js"
37
37
  },
38
38
  "generators": "./dist/generators.json",
39
39
  "executors": "./dist/executors.json",
@@ -116,6 +116,7 @@
116
116
  "url": "https://github.com/mouryaamit/nx-polystack/issues"
117
117
  },
118
118
  "publishConfig": {
119
- "access": "public"
119
+ "access": "public",
120
+ "provenance": true
120
121
  }
121
122
  }