@smartsoft001/claude-plugins 2.206.0 → 2.208.0
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 +1 -1
- package/plugins/smart-angular/.claude-plugin/plugin.json +1 -1
- package/plugins/smart-angular/skills/scaffold-nx-workspace/SKILL.md +14 -9
- package/plugins/smart-angular/skills/scaffold-nx-workspace/references/base-app.md +11 -12
- package/plugins/smart-angular/skills/scaffold-nx-workspace/references/base-shared-lib.md +16 -22
- package/plugins/smart-angular/skills/scaffold-nx-workspace/references/patch-delta.md +17 -17
- package/plugins/smart-angular/skills/scaffold-nx-workspace/references/version-resolution.md +28 -9
- package/plugins/smart-angular/skills/scaffold-nx-workspace/scripts/verify-scaffold.sh +8 -2
- package/plugins/smart-core/.claude-plugin/plugin.json +1 -1
- package/plugins/smart-react/.claude-plugin/plugin.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/claude-plugins",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.208.0",
|
|
4
4
|
"description": "Installs the smartsoft Claude Code plugins into a project: smart-core (hooks and framework-neutral skills) plus smart-angular or smart-react (the component and CRUD skills and agents of one framework).",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smart-angular",
|
|
3
3
|
"description": "Smartsoft for Angular projects - the @smartsoft001/angular component skills and their angular-components agent, the Angular CRUD skill and the Nx + Angular SSR workspace scaffold",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.207.0",
|
|
5
5
|
"dependencies": ["smart-core"]
|
|
6
6
|
}
|
|
@@ -21,8 +21,9 @@ This skill enforces only the build and architecture conventions.
|
|
|
21
21
|
**Versions are never hardcoded** — the Angular version is inferred from the installed
|
|
22
22
|
`@smartsoft001/angular` library, confirmed with the user, and Nx / Node / the rest are derived to
|
|
23
23
|
match (see Step 1).
|
|
24
|
-
- **Caching / affected:** `targetDefaults` cache `build
|
|
25
|
-
|
|
24
|
+
- **Caching / affected:** `targetDefaults` cache `build`; `lint` and `test` are inferred and cached by
|
|
25
|
+
the `@nx/eslint/plugin` and `@nx/jest/plugin` (Nx 24 removed the `@nx/eslint:lint` and `@nx/jest:jest`
|
|
26
|
+
executors); `nx.json` sets `defaultBase` for `nx affected`. No Nx Cloud binding.
|
|
26
27
|
- **Lint / format:** ESLint flat config (`eslint.config.mjs`) with `import/order` + an `@<prefix>/**`
|
|
27
28
|
pathGroup; Prettier (`singleQuote`); husky + commitlint (conventional commits, scopes from `libs/`).
|
|
28
29
|
- **Layout:** monorepo with `apps/` (the SSR `web` app) and `libs/`. Shared lib at `libs/shared/angular`,
|
|
@@ -55,20 +56,24 @@ components. Stop at the buildable shell and defer those to the feature-module sk
|
|
|
55
56
|
`npm view @smartsoft001/angular peerDependencies.@angular/core` (fall back to
|
|
56
57
|
`dependencies.@angular/core`; or read its installed `package.json`). Take `<NG_VERSION>` / `<NG_MAJOR>`.
|
|
57
58
|
- Confirm with `AskUserQuestion`: "Use Angular `<NG_VERSION>` (matches @smartsoft001/angular)? — or type another version."
|
|
58
|
-
- Derive the rest: `<NX_LINE>` = `^<
|
|
59
|
+
- Derive the rest: `<NX_LINE>` = `^<NX_MAJOR>`, the latest stable Nx major that supports `<NG_VERSION>` per the Nx Angular/Nx version matrix (https://nx.dev/docs/kb/angular-nx-version-matrix; e.g. Angular 22.2 → Nx ≥ 24.0.0, so `^24` — not "Angular major + 1"; resolve with `npm view nx version` and check `<NG_VERSION>` against `npm view "@nx/angular@^<NX_MAJOR>" peerDependencies.@angular/build`); `<NODE_VERSION>` = an LTS within `@angular/core@<NG_VERSION>` `engines.node`. Everything else is whatever `create-nx-workspace@<NX_LINE>` installs — not pinned.
|
|
59
60
|
2. **Prefix** — run `scripts/derive-prefix.sh <folder>`, present the candidate via `AskUserQuestion`,
|
|
60
61
|
require confirm/override. Hold as `<PREFIX>` (threaded into tsconfig paths, eslint, imports, package names).
|
|
61
62
|
3. **Base branch** — confirm `<BASE_BRANCH>` for `nx.json` `defaultBase` + husky pre-push (default `origin/development`).
|
|
62
63
|
4. **Create** — run:
|
|
63
64
|
```bash
|
|
64
|
-
npx --yes create-nx-workspace@<NX_LINE> <name> \
|
|
65
|
+
env -u CLAUDECODE -u CLAUDE_CODE npx --yes create-nx-workspace@<NX_LINE> <name> \
|
|
65
66
|
--preset=angular-monorepo --appName=web --style=scss --ssr \
|
|
66
67
|
--e2eTestRunner=playwright --unitTestRunner=jest \
|
|
67
68
|
--packageManager=npm --nxCloud=skip --interactive=false
|
|
68
69
|
```
|
|
69
70
|
Use `--interactive=false` (not `--no-interactive`); `--nxCloud=skip`; no `--bundler` (Angular's builder
|
|
70
|
-
is esbuild by default). `CLAUDECODE
|
|
71
|
-
|
|
71
|
+
is esbuild by default). Unset `CLAUDECODE` / `CLAUDE_CODE` for this command: when they are set,
|
|
72
|
+
`create-nx-workspace` switches to AI-agent mode and replaces `--preset=angular-monorepo` with the
|
|
73
|
+
`nrwl/angular-template` GitHub template, which ignores `--appName`, `--ssr` and `--unitTestRunner`
|
|
74
|
+
(shop/api apps, Vitest). Then verify the build executor is `@angular/build:application`, that
|
|
75
|
+
`nx.json` registers `@nx/eslint/plugin` and `@nx/jest/plugin`, and if the bundled Angular differs
|
|
76
|
+
from `<NG_VERSION>`, align `@angular/*` in Step 5.
|
|
72
77
|
5. **Patch config** — apply `references/patch-delta.md`, threading `<PREFIX>` / `<BASE_BRANCH>` / `<NG_VERSION>` / `<NODE_VERSION>`.
|
|
73
78
|
6. **App + lib** — patch `apps/web` per `references/base-app.md`; generate then patch `libs/shared/angular`
|
|
74
79
|
per `references/base-shared-lib.md`.
|
|
@@ -87,9 +92,9 @@ components. Stop at the buildable shell and defer those to the feature-module sk
|
|
|
87
92
|
|
|
88
93
|
This skill scaffolds an SSR shell, while the example application under `docs/examples/app` is a non-SSR consumer, so it shows the finished shape of a workspace's apps and libs and not the SSR runtime pieces.
|
|
89
94
|
|
|
90
|
-
- `docs/examples/app/apps/web/project.json`: an Angular application project on `@angular/build:application` with `build
|
|
91
|
-
- `docs/examples/app/apps/api/project.json`: the NestJS application beside it
|
|
92
|
-
- `docs/examples/app/libs/model/project.json`: a shared library project with `build
|
|
95
|
+
- `docs/examples/app/apps/web/project.json`: an Angular application project on `@angular/build:application` with `build` and `serve` targets and `scope` and `type` tags; its `lint` and `test` targets are inferred by `@nx/eslint/plugin` and `@nx/jest/plugin`, with `lint` only narrowing the file pattern.
|
|
96
|
+
- `docs/examples/app/apps/api/project.json` with `docs/examples/app/apps/api/webpack.config.js`: the NestJS application beside it. Its `build` target is inferred by `@nx/webpack/plugin` from `webpack.config.js`, which uses `NxAppWebpackPlugin` (`target: 'node'`, `compiler: 'tsc'`, `generatePackageJson`) and writes a CommonJS bundle (`output.library.type: 'commonjs'`) into `dist/`; `project.json` only adds the outputs and the `development` and `production` configurations, and `serve` runs that build with `@nx/js:node`. Nx 24 removed the `@nx/webpack:webpack` executor.
|
|
97
|
+
- `docs/examples/app/libs/model/project.json`: a shared library project with a `build` target and inferred `lint` and `test` targets, the role `libs/shared/angular` plays in a scaffolded workspace.
|
|
93
98
|
- `docs/examples/app/libs/model/src/index.ts`: the barrel the workspace alias `@app/model` in `tsconfig.base.json` points at, the same mechanism as the `@<prefix>/angular` alias this skill sets up.
|
|
94
99
|
- `docs/examples/app/apps/web/eslint.config.mjs`: the flat ESLint config of one app, extending the workspace config and giving the app's own alias the position the `@<prefix>/**` path group takes in a scaffolded workspace.
|
|
95
100
|
- `docs/examples/app/apps/web/jest.config.ts`: Jest on `jest-preset-angular` with a `test-setup.ts`, the unit test setup this skill configures.
|
|
@@ -13,7 +13,12 @@ this base-app↔base-lib coupling is intentional generic SSR infra.
|
|
|
13
13
|
## `apps/web/project.json` (overwrite)
|
|
14
14
|
|
|
15
15
|
Drop feature `scripts` (e.g. masonry) and prod `fileReplacements` only if the base lib provides
|
|
16
|
-
`environment.prod.ts` (it does — keep the fileReplacement). Keep build/serve/
|
|
16
|
+
`environment.prod.ts` (it does — keep the fileReplacement). Keep build/serve/extract-i18n/serve-static.
|
|
17
|
+
|
|
18
|
+
`lint` and `test` are **not** declared here: since Nx 24 removed the `@nx/eslint:lint` and
|
|
19
|
+
`@nx/jest:jest` executors, they are inferred by the `@nx/eslint/plugin` and `@nx/jest/plugin`
|
|
20
|
+
entries in `nx.json` (see `patch-delta.md`) from `apps/web/eslint.config.mjs` and
|
|
21
|
+
`apps/web/jest.config.cts`. Check them with `npx nx show project web`.
|
|
17
22
|
|
|
18
23
|
```json
|
|
19
24
|
{
|
|
@@ -73,6 +78,7 @@ Drop feature `scripts` (e.g. masonry) and prod `fileReplacements` only if the ba
|
|
|
73
78
|
},
|
|
74
79
|
"serve": {
|
|
75
80
|
"continuous": true,
|
|
81
|
+
"readyWhen": { "signal": true },
|
|
76
82
|
"executor": "@angular/build:dev-server",
|
|
77
83
|
"options": { "port": 4210 },
|
|
78
84
|
"configurations": {
|
|
@@ -85,17 +91,10 @@ Drop feature `scripts` (e.g. masonry) and prod `fileReplacements` only if the ba
|
|
|
85
91
|
"executor": "@angular/build:extract-i18n",
|
|
86
92
|
"options": { "buildTarget": "web:build" }
|
|
87
93
|
},
|
|
88
|
-
"lint": { "executor": "@nx/eslint:lint" },
|
|
89
|
-
"test": {
|
|
90
|
-
"executor": "@nx/jest:jest",
|
|
91
|
-
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
92
|
-
"options": {
|
|
93
|
-
"jestConfig": "apps/web/jest.config.ts",
|
|
94
|
-
"tsConfig": "apps/web/tsconfig.spec.json"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
94
|
"serve-static": {
|
|
98
95
|
"continuous": true,
|
|
96
|
+
"readyWhen": { "signal": true },
|
|
97
|
+
"dependsOn": ["build"],
|
|
99
98
|
"executor": "@nx/web:file-server",
|
|
100
99
|
"options": {
|
|
101
100
|
"buildTarget": "web:build",
|
|
@@ -397,9 +396,9 @@ export class App {}
|
|
|
397
396
|
|
|
398
397
|
`apps/web/src/styles.scss`, `apps/web/src/index.html`, `apps/web/src/test-setup.ts`,
|
|
399
398
|
`apps/web/src/app/app.scss`, `apps/web/tsconfig.app.json`, `apps/web/tsconfig.spec.json`,
|
|
400
|
-
`apps/web/tsconfig.json`, `apps/web/eslint.config.mjs`, `apps/web/jest.config.
|
|
399
|
+
`apps/web/tsconfig.json`, `apps/web/eslint.config.mjs`, `apps/web/jest.config.cts`,
|
|
401
400
|
`apps/web/public/**`.
|
|
402
401
|
|
|
403
|
-
> If `apps/web/jest.config.
|
|
402
|
+
> If `apps/web/jest.config.cts` carries a feature `moduleNameMapper` or a feature-scoped
|
|
404
403
|
> `transformIgnorePatterns` entry, strip it to a generic
|
|
405
404
|
> `transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)']`.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Generate the library then patch it to the generic skeleton below. Substitute `<PREFIX>`.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npx nx g @nx/angular:library shared/angular \
|
|
6
|
+
npx nx g @nx/angular:library libs/shared/angular --name=shared-angular \
|
|
7
7
|
--prefix=smart-<PREFIX> --unitTestRunner=jest --linter=eslint \
|
|
8
8
|
--buildable --interactive=false
|
|
9
9
|
```
|
|
@@ -12,7 +12,10 @@ The base lib exports ONLY the SSR environment infra (`environment` + `Environmen
|
|
|
12
12
|
NO feature UI components/services/models/pipes/interceptors/directives — `lib/` folders are
|
|
13
13
|
empty placeholders the module skills fill in later.
|
|
14
14
|
|
|
15
|
-
> The
|
|
15
|
+
> The positional argument is the project directory (Nx ≥ 20), so pass the full `libs/shared/angular`
|
|
16
|
+
> path and the project name separately.
|
|
17
|
+
>
|
|
18
|
+
> The reference's generated `ng-package.json` `dest` and `jest.config.cts` `coverageDirectory`
|
|
16
19
|
> point at `packages/shared/angular` (a generator leftover). Normalize both to
|
|
17
20
|
> `libs/shared/angular` as shown below.
|
|
18
21
|
|
|
@@ -137,6 +140,10 @@ Create empty dirs with a `.gitkeep` each (the module skills populate them):
|
|
|
137
140
|
|
|
138
141
|
## `libs/shared/angular/project.json` (overwrite)
|
|
139
142
|
|
|
143
|
+
`lint` and `test` are inferred by the `@nx/eslint/plugin` and `@nx/jest/plugin` entries in
|
|
144
|
+
`nx.json` from `eslint.config.mjs` and `jest.config.cts` (Nx 24 removed the `@nx/eslint:lint` and
|
|
145
|
+
`@nx/jest:jest` executors), so only `build` and the Storybook targets are declared.
|
|
146
|
+
|
|
140
147
|
```json
|
|
141
148
|
{
|
|
142
149
|
"name": "shared-angular",
|
|
@@ -146,24 +153,6 @@ Create empty dirs with a `.gitkeep` each (the module skills populate them):
|
|
|
146
153
|
"prefix": "smart-<PREFIX>",
|
|
147
154
|
"tags": [],
|
|
148
155
|
"targets": {
|
|
149
|
-
"lint": {
|
|
150
|
-
"executor": "@nx/eslint:lint",
|
|
151
|
-
"options": {
|
|
152
|
-
"lintFilePatterns": [
|
|
153
|
-
"libs/shared/angular/src/**/*.ts",
|
|
154
|
-
"libs/shared/angular/src/**/*.html"
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
"test": {
|
|
159
|
-
"executor": "@nx/jest:jest",
|
|
160
|
-
"outputs": ["{workspaceRoot}/coverage/libs/shared/angular"],
|
|
161
|
-
"options": {
|
|
162
|
-
"jestConfig": "libs/shared/angular/jest.config.ts",
|
|
163
|
-
"passWithNoTests": true,
|
|
164
|
-
"tsConfig": "libs/shared/angular/tsconfig.spec.json"
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
156
|
"build": {
|
|
168
157
|
"executor": "@nx/angular:package",
|
|
169
158
|
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
|
|
@@ -181,6 +170,11 @@ Create empty dirs with a `.gitkeep` each (the module skills populate them):
|
|
|
181
170
|
},
|
|
182
171
|
"storybook": {
|
|
183
172
|
"executor": "@storybook/angular:start-storybook",
|
|
173
|
+
"continuous": true,
|
|
174
|
+
"readyWhen": {
|
|
175
|
+
"port": "{env.SBCONFIG_PORT ?? options.port ?? 9009}",
|
|
176
|
+
"host": "{env.SBCONFIG_HOSTNAME ?? options.host ?? localhost}"
|
|
177
|
+
},
|
|
184
178
|
"options": {
|
|
185
179
|
"port": 4400,
|
|
186
180
|
"configDir": "libs/shared/angular/.storybook",
|
|
@@ -223,10 +217,10 @@ Create empty dirs with a `.gitkeep` each (the module skills populate them):
|
|
|
223
217
|
}
|
|
224
218
|
```
|
|
225
219
|
|
|
226
|
-
## `libs/shared/angular/jest.config.
|
|
220
|
+
## `libs/shared/angular/jest.config.cts` (overwrite — normalized paths)
|
|
227
221
|
|
|
228
222
|
```ts
|
|
229
|
-
|
|
223
|
+
module.exports = {
|
|
230
224
|
displayName: 'angular',
|
|
231
225
|
preset: '../../../jest.preset.js',
|
|
232
226
|
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
|
@@ -28,7 +28,7 @@ Drop `nxCloudId`. Set `defaultBase` to `<BASE_BRANCH>`.
|
|
|
28
28
|
"!{projectRoot}/eslint.config.mjs",
|
|
29
29
|
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
|
30
30
|
"!{projectRoot}/tsconfig.spec.json",
|
|
31
|
-
"!{projectRoot}/jest.config.
|
|
31
|
+
"!{projectRoot}/jest.config.{cjs,mjs,js,cts,mts,ts}",
|
|
32
32
|
"!{projectRoot}/src/test-setup.[jt]s",
|
|
33
33
|
"!{projectRoot}/test-setup.[jt]s",
|
|
34
34
|
"!{projectRoot}/**/*.spec.[jt]s?(x)",
|
|
@@ -42,24 +42,18 @@ Drop `nxCloudId`. Set `defaultBase` to `<BASE_BRANCH>`.
|
|
|
42
42
|
"dependsOn": ["^build"],
|
|
43
43
|
"inputs": ["production", "^production"]
|
|
44
44
|
},
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
"@nx/jest:jest": {
|
|
55
|
-
"cache": true,
|
|
56
|
-
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
|
|
57
|
-
"options": { "passWithNoTests": true },
|
|
58
|
-
"configurations": { "ci": { "ci": true, "codeCoverage": true } }
|
|
59
|
-
}
|
|
45
|
+
"test": [
|
|
46
|
+
{
|
|
47
|
+
"filter": { "plugin": "@nx/jest/plugin" },
|
|
48
|
+
"options": { "passWithNoTests": true },
|
|
49
|
+
"configurations": { "ci": { "ci": true, "coverage": true } }
|
|
50
|
+
}
|
|
51
|
+
]
|
|
60
52
|
},
|
|
61
53
|
"plugins": [
|
|
62
|
-
{ "plugin": "@nx/eslint/plugin", "options": { "targetName": "lint" } }
|
|
54
|
+
{ "plugin": "@nx/eslint/plugin", "options": { "targetName": "lint" } },
|
|
55
|
+
{ "plugin": "@nx/jest/plugin", "options": { "targetName": "test" } },
|
|
56
|
+
{ "plugin": "@nx/playwright/plugin", "options": { "targetName": "e2e" } }
|
|
63
57
|
],
|
|
64
58
|
"generators": {
|
|
65
59
|
"@nx/angular:application": {
|
|
@@ -74,6 +68,12 @@ Drop `nxCloudId`. Set `defaultBase` to `<BASE_BRANCH>`.
|
|
|
74
68
|
}
|
|
75
69
|
```
|
|
76
70
|
|
|
71
|
+
> Nx 24 removed the `@nx/eslint:lint` and `@nx/jest:jest` executors. `lint` and `test` are
|
|
72
|
+
> inferred by the plugins above for every project with an `eslint.config.mjs` / `jest.config.cts`;
|
|
73
|
+
> the plugins cache them and set their inputs (including the root `eslint.config.mjs` and
|
|
74
|
+
> `jest.preset.js`) themselves. The `test` default is filtered to the Jest plugin's targets
|
|
75
|
+
> (an array `targetDefaults` entry with `filter.plugin`), so it never touches other `test` targets.
|
|
76
|
+
>
|
|
77
77
|
> Everything defaults to `scss` — the app, generated libs, and generated components — so styling
|
|
78
78
|
> is consistent workspace-wide.
|
|
79
79
|
|
|
@@ -5,9 +5,9 @@ from it. Resolve it at run time so a scaffold always matches the smartsoft libra
|
|
|
5
5
|
|
|
6
6
|
Placeholders produced here and consumed by the other references:
|
|
7
7
|
|
|
8
|
-
- `<NG_VERSION>` — the confirmed Angular version (e.g. `
|
|
9
|
-
- `<NG_MAJOR>` — its major (e.g. `
|
|
10
|
-
- `<NX_LINE>` — the Nx version range to scaffold with (e.g. `^
|
|
8
|
+
- `<NG_VERSION>` — the confirmed Angular version (e.g. `22.2.2`).
|
|
9
|
+
- `<NG_MAJOR>` — its major (e.g. `22`).
|
|
10
|
+
- `<NX_LINE>` — the Nx version range to scaffold with (e.g. `^24`).
|
|
11
11
|
- `<NODE_VERSION>` — the Node version for `.nvmrc` (e.g. `24.5.0`).
|
|
12
12
|
|
|
13
13
|
## 1. Detect the Angular version the smartsoft library targets
|
|
@@ -26,7 +26,7 @@ node -p "(p=>p.peerDependencies?.['@angular/core']||p.dependencies?.['@angular/c
|
|
|
26
26
|
Resolve the range to a concrete version and take its major:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
# highest published Angular matching the detected range, e.g. ^
|
|
29
|
+
# highest published Angular matching the detected range, e.g. ^22.1.3 -> 22.2.x
|
|
30
30
|
npm view "@angular/core@<detected-range>" version | tail -1
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -44,15 +44,34 @@ Use `AskUserQuestion`:
|
|
|
44
44
|
Whatever the user confirms becomes `<NG_VERSION>` / `<NG_MAJOR>`. If they override to a different
|
|
45
45
|
major, all derived values below recompute from the new major.
|
|
46
46
|
|
|
47
|
-
## 3. Derive the rest from the Angular
|
|
47
|
+
## 3. Derive the rest from the Angular version
|
|
48
48
|
|
|
49
|
-
- **Nx line `<NX_LINE>` = `^<
|
|
50
|
-
|
|
49
|
+
- **Nx line `<NX_LINE>` = `^<NX_MAJOR>`, the latest stable Nx major that supports `<NG_VERSION>`.**
|
|
50
|
+
Source: the Nx documentation's Angular/Nx version matrix,
|
|
51
|
+
<https://nx.dev/docs/kb/angular-nx-version-matrix> (checked 2026-11-18). It states that the latest Nx
|
|
52
|
+
release supports Angular's actively supported versions (current and LTS), recommends the latest Nx
|
|
53
|
+
for them, and gives the minimum Nx per Angular minor:
|
|
54
|
+
|
|
55
|
+
| Angular | Nx (range) |
|
|
56
|
+
| --------- | ------------------- |
|
|
57
|
+
| `~22.2.0` | `>=24.0.0 <=latest` |
|
|
58
|
+
| `~22.1.0` | `>=23.2.0 <=latest` |
|
|
59
|
+
| `~22.0.0` | `>=23.1.0 <=latest` |
|
|
60
|
+
| `~21.2.0` | `>=22.6.0 <=latest` |
|
|
61
|
+
|
|
62
|
+
So the Nx major is **not** "Angular major + 1": Angular 22.2 needs Nx 24, which is what this
|
|
63
|
+
framework uses (Angular 22.2, Nx 24.0.6). Resolve it at run time:
|
|
51
64
|
|
|
52
65
|
```bash
|
|
53
|
-
npm view
|
|
66
|
+
npm view nx version # latest stable, e.g. 24.0.6 -> <NX_MAJOR> = 24
|
|
67
|
+
npm view "@nx/angular@^<NX_MAJOR>" peerDependencies.@angular/build | tail -1 # e.g. >= 20.0.0 < 23.0.0
|
|
54
68
|
```
|
|
55
69
|
|
|
70
|
+
`<NG_VERSION>` must fall inside that `@angular/build` peer range **and** the matrix row for its
|
|
71
|
+
minor must allow the resolved Nx. If the latest Nx no longer supports `<NG_VERSION>` (an Angular
|
|
72
|
+
older than the current LTS), take the highest Nx major whose matrix range and `@nx/angular` peer
|
|
73
|
+
range both cover it.
|
|
74
|
+
|
|
56
75
|
`create-nx-workspace@<NX_LINE>` then scaffolds the matching Angular line and a compatible
|
|
57
76
|
jest / eslint / typescript / playwright / swc / esbuild toolchain. **Do not pin those** — keep
|
|
58
77
|
whatever the generator installs.
|
|
@@ -79,5 +98,5 @@ major, all derived values below recompute from the new major.
|
|
|
79
98
|
## Summary
|
|
80
99
|
|
|
81
100
|
The only thing this skill decides is the _shape_ (which packages, which conventions). The _numbers_
|
|
82
|
-
come from `@smartsoft001/angular` + the Nx/
|
|
101
|
+
come from `@smartsoft001/angular` + the Nx documentation's Angular/Nx version matrix + Angular's own engine range, all at
|
|
83
102
|
run time.
|
|
@@ -61,8 +61,14 @@ absent "tsconfig.base.json" "/domain" "tsconfig has no feature-lib (domain) pat
|
|
|
61
61
|
absent "tsconfig.base.json" "/shell/" "tsconfig has no feature-lib (shell) path aliases"
|
|
62
62
|
absent "nx.json" "nxCloudId" "nx.json has no nxCloudId"
|
|
63
63
|
contains "nx.json" "@angular/build:application" "nx.json build targetDefault"
|
|
64
|
-
contains "nx.json" "@nx/eslint
|
|
65
|
-
contains "nx.json" "@nx/jest
|
|
64
|
+
contains "nx.json" "@nx/eslint/plugin" "nx.json registers @nx/eslint/plugin (infers lint)"
|
|
65
|
+
contains "nx.json" "@nx/jest/plugin" "nx.json registers @nx/jest/plugin (infers test)"
|
|
66
|
+
absent "nx.json" "@nx/eslint:lint" "nx.json has no removed @nx/eslint:lint executor"
|
|
67
|
+
absent "nx.json" "@nx/jest:jest" "nx.json has no removed @nx/jest:jest executor"
|
|
68
|
+
absent "apps/web/project.json" "@nx/eslint:lint" "apps/web uses inferred lint"
|
|
69
|
+
absent "apps/web/project.json" "@nx/jest:jest" "apps/web uses inferred test"
|
|
70
|
+
absent "libs/shared/angular/project.json" "@nx/eslint:lint" "shared lib uses inferred lint"
|
|
71
|
+
absent "libs/shared/angular/project.json" "@nx/jest:jest" "shared lib uses inferred test"
|
|
66
72
|
contains "eslint.config.mjs" "@$PREFIX/**" "eslint pathGroup @$PREFIX/**"
|
|
67
73
|
|
|
68
74
|
echo "--- toolchain ---"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smart-core",
|
|
3
3
|
"description": "Smartsoft core for every project - safety validation, audit logging and auto-formatting hooks, plus the framework-neutral skills (audit-log, format-code, project-conventions, safety-check)",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.207.0"
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smart-react",
|
|
3
3
|
"description": "Smartsoft for React projects - the @smartsoft001/react component, provider and forms skills, their react-components agent, and the React CRUD skill (@smartsoft001/crud-shell-react)",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.207.0",
|
|
5
5
|
"dependencies": ["smart-core"]
|
|
6
6
|
}
|