@nx/angular 16.0.1 → 16.0.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/migrations.json +9 -0
- package/package.json +10 -10
- package/src/generators/setup-ssr/files/base/src/__main__ +1 -0
- package/src/generators/setup-ssr/lib/generate-files.js +6 -2
- package/src/generators/setup-ssr/lib/generate-files.js.map +1 -1
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.d.ts +2 -0
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +65 -0
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js.map +1 -0
- /package/src/generators/setup-ssr/files/{__serverFileName__ → base/__serverFileName__} +0 -0
- /package/src/generators/setup-ssr/files/{src → base/src}/app/__rootModuleFileName__ +0 -0
- /package/src/generators/setup-ssr/files/{src → base/src}/main.ts__tpl__ +0 -0
- /package/src/generators/setup-ssr/files/{tsconfig.server.json__tpl__ → base/tsconfig.server.json__tpl__} +0 -0
- /package/src/generators/setup-ssr/files/{src → v14/src}/__main__ +0 -0
package/migrations.json
CHANGED
|
@@ -191,6 +191,15 @@
|
|
|
191
191
|
"version": "16.0.0-beta.6",
|
|
192
192
|
"description": "Remove karma as default unitTestRunner from nxJson and project configurations",
|
|
193
193
|
"implementation": "./src/migrations/update-16-0-0/remove-karma-defaults"
|
|
194
|
+
},
|
|
195
|
+
"remove-render-module-platform-server-exports": {
|
|
196
|
+
"cli": "nx",
|
|
197
|
+
"version": "16.1.0-beta.0",
|
|
198
|
+
"requires": {
|
|
199
|
+
"@angular/core": ">=15.0.0"
|
|
200
|
+
},
|
|
201
|
+
"description": "Remove exported `@angular/platform-server` `renderModule` method. The `renderModule` method is now exported by the Angular CLI.",
|
|
202
|
+
"factory": "./src/migrations/update-16-1-0/remove-render-module-platform-server-exports"
|
|
194
203
|
}
|
|
195
204
|
},
|
|
196
205
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"migrations": "./migrations.json"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@nrwl/angular": "16.0.
|
|
76
|
-
"@nx/cypress": "16.0.
|
|
77
|
-
"@nx/devkit": "16.0.
|
|
78
|
-
"@nx/jest": "16.0.
|
|
79
|
-
"@nx/js": "16.0.
|
|
80
|
-
"@nx/linter": "16.0.
|
|
81
|
-
"@nx/webpack": "16.0.
|
|
82
|
-
"@nx/workspace": "16.0.
|
|
75
|
+
"@nrwl/angular": "16.0.3",
|
|
76
|
+
"@nx/cypress": "16.0.3",
|
|
77
|
+
"@nx/devkit": "16.0.3",
|
|
78
|
+
"@nx/jest": "16.0.3",
|
|
79
|
+
"@nx/js": "16.0.3",
|
|
80
|
+
"@nx/linter": "16.0.3",
|
|
81
|
+
"@nx/webpack": "16.0.3",
|
|
82
|
+
"@nx/workspace": "16.0.3",
|
|
83
83
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
84
84
|
"chalk": "^4.1.0",
|
|
85
85
|
"chokidar": "^3.5.1",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"fesm2015": "fesm2015/nx-angular.mjs",
|
|
120
120
|
"typings": "index.d.ts",
|
|
121
121
|
"sideEffects": false,
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "66c54fbd122aacf94061c5b7007dc60b6c6f91f7"
|
|
123
123
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { <%= rootModuleClassName %> } from './app/<%= rootModuleFileName.slice(0, -3) %>';
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateSSRFiles = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const version_utils_1 = require("../../utils/version-utils");
|
|
5
6
|
function generateSSRFiles(tree, schema) {
|
|
6
7
|
const projectRoot = (0, devkit_1.readProjectConfiguration)(tree, schema.project).root;
|
|
7
|
-
|
|
8
|
-
(0,
|
|
8
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '..', 'files', 'base'), projectRoot, Object.assign(Object.assign({}, schema), { tpl: '' }));
|
|
9
|
+
const angularMajorVersion = (0, version_utils_1.getInstalledAngularMajorVersion)(tree);
|
|
10
|
+
if (angularMajorVersion < 15) {
|
|
11
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '..', 'files', 'v14'), projectRoot, Object.assign(Object.assign({}, schema), { tpl: '' }));
|
|
12
|
+
}
|
|
9
13
|
}
|
|
10
14
|
exports.generateSSRFiles = generateSSRFiles;
|
|
11
15
|
//# sourceMappingURL=generate-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-files.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-ssr/lib/generate-files.ts"],"names":[],"mappings":";;;AACA,uCAIoB;
|
|
1
|
+
{"version":3,"file":"generate-files.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-ssr/lib/generate-files.ts"],"names":[],"mappings":";;;AACA,uCAIoB;AACpB,6DAA4E;AAG5E,SAAgB,gBAAgB,CAAC,IAAU,EAAE,MAAc;IACzD,MAAM,WAAW,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;IAExE,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EACnD,WAAW,kCACN,MAAM,KAAE,GAAG,EAAE,EAAE,IACrB,CAAC;IAEF,MAAM,mBAAmB,GAAG,IAAA,+CAA+B,EAAC,IAAI,CAAC,CAAC;IAClE,IAAI,mBAAmB,GAAG,EAAE,EAAE;QAC5B,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,EAClD,WAAW,kCACN,MAAM,KAAE,GAAG,EAAE,EAAE,IACrB,CAAC;KACH;AACH,CAAC;AAnBD,4CAmBC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const ts = require("typescript");
|
|
6
|
+
const file_change_recorder_1 = require("../../utils/file-change-recorder");
|
|
7
|
+
function default_1(tree) {
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '/', (path) => {
|
|
10
|
+
if (path.endsWith('.ts') && !path.endsWith('.d.ts')) {
|
|
11
|
+
const content = tree.read(path, 'utf8');
|
|
12
|
+
if (content.includes('@angular/platform-server') &&
|
|
13
|
+
content.includes('renderModule')) {
|
|
14
|
+
const source = ts.createSourceFile(path, content.toString().replace(/^\uFEFF/, ''), ts.ScriptTarget.Latest, true);
|
|
15
|
+
let recorder;
|
|
16
|
+
let printer;
|
|
17
|
+
ts.forEachChild(source, function analyze(node) {
|
|
18
|
+
if (!(ts.isExportDeclaration(node) &&
|
|
19
|
+
node.moduleSpecifier &&
|
|
20
|
+
ts.isStringLiteral(node.moduleSpecifier) &&
|
|
21
|
+
node.moduleSpecifier.text === '@angular/platform-server' &&
|
|
22
|
+
node.exportClause &&
|
|
23
|
+
ts.isNamedExports(node.exportClause))) {
|
|
24
|
+
// Not a @angular/platform-server named export.
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const exportClause = node.exportClause;
|
|
28
|
+
const newElements = [];
|
|
29
|
+
for (const element of exportClause.elements) {
|
|
30
|
+
if (element.name.text !== 'renderModule') {
|
|
31
|
+
newElements.push(element);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (newElements.length === exportClause.elements.length) {
|
|
35
|
+
// No changes
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
recorder !== null && recorder !== void 0 ? recorder : (recorder = new file_change_recorder_1.FileChangeRecorder(tree, path));
|
|
39
|
+
if (newElements.length) {
|
|
40
|
+
// Update named exports as there are leftovers.
|
|
41
|
+
const newExportClause = ts.factory.updateNamedExports(exportClause, newElements);
|
|
42
|
+
printer !== null && printer !== void 0 ? printer : (printer = ts.createPrinter());
|
|
43
|
+
const fix = printer.printNode(ts.EmitHint.Unspecified, newExportClause, source);
|
|
44
|
+
const index = exportClause.getStart();
|
|
45
|
+
const length = exportClause.getWidth();
|
|
46
|
+
recorder.remove(index, index + length);
|
|
47
|
+
recorder.insertLeft(index, fix);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
// Delete export as no exports remain.
|
|
51
|
+
recorder.remove(node.getStart(), node.getStart() + node.getWidth());
|
|
52
|
+
}
|
|
53
|
+
ts.forEachChild(node, analyze);
|
|
54
|
+
});
|
|
55
|
+
if (recorder) {
|
|
56
|
+
recorder.applyChanges();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
exports.default = default_1;
|
|
65
|
+
//# sourceMappingURL=remove-render-module-platform-server-exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-render-module-platform-server-exports.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.ts"],"names":[],"mappings":";;;AACA,uCAA+D;AAC/D,iCAAiC;AACjC,2EAAsE;AAEtE,mBAA+B,IAAU;;QACvC,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACvC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;gBACnD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;gBACxC,IACE,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC;oBAC5C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAChC;oBACA,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAChC,IAAI,EACJ,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EACzC,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;oBAEF,IAAI,QAAwC,CAAC;oBAC7C,IAAI,OAA+B,CAAC;oBAEpC,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,OAAO,CAAC,IAAI;wBAC3C,IACE,CAAC,CACC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC;4BAC5B,IAAI,CAAC,eAAe;4BACpB,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC;4BACxC,IAAI,CAAC,eAAe,CAAC,IAAI,KAAK,0BAA0B;4BACxD,IAAI,CAAC,YAAY;4BACjB,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CACr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