@ngrs/nx 0.3.2 → 0.3.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/generators.json +1 -1
- package/package.json +4 -4
- package/src/generators/init/index.cjs +14 -0
package/generators.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrs/nx",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "First-class Nx Monorepo plugin, executors, and generators for @ngrs (Angular build, Vite dev-server, Vitest unit-test, and APF library compilation)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"executors": "./executors.json",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"src"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ngrs/build": "0.3.
|
|
39
|
-
"@ngrs/compiler": "0.3.
|
|
40
|
-
"@ngrs/vite": "0.3.
|
|
38
|
+
"@ngrs/build": "0.3.3",
|
|
39
|
+
"@ngrs/compiler": "0.3.3",
|
|
40
|
+
"@ngrs/vite": "0.3.3",
|
|
41
41
|
"happy-dom": "^20.0.0",
|
|
42
42
|
"jsonc-parser": "^3.3.1",
|
|
43
43
|
"picomatch": "^4.0.2"
|
|
@@ -275,6 +275,8 @@ function collectProjectJsonPathsInTree(tree) {
|
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
const HAPPY_DOM_VERSION = '^20.0.0';
|
|
278
|
+
const ownPkg = require('../../../package.json');
|
|
279
|
+
const NGRS_NX_VERSION = `^${ownPkg.version}`;
|
|
278
280
|
|
|
279
281
|
function migratePackageJsonForHappyDom(rawPkgText) {
|
|
280
282
|
const pkg = parse(rawPkgText, [], { allowTrailingComma: true });
|
|
@@ -299,6 +301,18 @@ function migratePackageJsonForHappyDom(rawPkgText) {
|
|
|
299
301
|
}
|
|
300
302
|
}
|
|
301
303
|
|
|
304
|
+
const hasNgrsNx =
|
|
305
|
+
(pkg.devDependencies && '@ngrs/nx' in pkg.devDependencies) ||
|
|
306
|
+
(pkg.dependencies && '@ngrs/nx' in pkg.dependencies);
|
|
307
|
+
|
|
308
|
+
if (!hasNgrsNx) {
|
|
309
|
+
const edits = modify(updatedText, ['devDependencies', '@ngrs/nx'], NGRS_NX_VERSION, {
|
|
310
|
+
formattingOptions: { tabSize: 2, insertSpaces: true },
|
|
311
|
+
});
|
|
312
|
+
updatedText = applyEdits(updatedText, edits);
|
|
313
|
+
updates.push({ packageJson: 'add', dependency: '@ngrs/nx', version: NGRS_NX_VERSION });
|
|
314
|
+
}
|
|
315
|
+
|
|
302
316
|
const hasHappyDom =
|
|
303
317
|
(pkg.devDependencies && 'happy-dom' in pkg.devDependencies) ||
|
|
304
318
|
(pkg.dependencies && 'happy-dom' in pkg.dependencies);
|