@nx/angular 19.3.0 → 19.3.2
Sign up to get free protection for your applications and to get access to all the features.
- package/migrations.json +12 -0
- package/package.json +8 -8
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +4 -1
- package/src/executors/utilities/typescript.js +2 -3
- package/src/generators/ng-add/migrators/projects/app.migrator.js +1 -1
- package/src/generators/ng-add/migrators/projects/lib.migrator.js +1 -1
- package/src/generators/ng-add/utilities/validation-logging.js +1 -2
- package/src/migrations/update-17-1-0/browser-target-to-build-target.js +1 -1
- package/src/runtime/nx/data-persistence.d.ts +1 -1
- package/src/utils/index.d.ts +1 -1
- package/src/utils/index.js +2 -1
- package/src/utils/nx-devkit/ast-utils.d.ts +8 -0
- package/src/utils/nx-devkit/ast-utils.js +12 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/migrations.json
CHANGED
@@ -1921,6 +1921,18 @@
|
|
1921
1921
|
"alwaysAddToPackageJson": false
|
1922
1922
|
}
|
1923
1923
|
}
|
1924
|
+
},
|
1925
|
+
"19.4.0-ngrx": {
|
1926
|
+
"version": "19.4.0-beta.1",
|
1927
|
+
"requires": {
|
1928
|
+
"@angular/core": "^18.0.0"
|
1929
|
+
},
|
1930
|
+
"packages": {
|
1931
|
+
"@ngrx/store": {
|
1932
|
+
"version": "^18.0.0",
|
1933
|
+
"alwaysAddToPackageJson": false
|
1934
|
+
}
|
1935
|
+
}
|
1924
1936
|
}
|
1925
1937
|
}
|
1926
1938
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/angular",
|
3
|
-
"version": "19.3.
|
3
|
+
"version": "19.3.2",
|
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, Playwright 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- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
6
6
|
"repository": {
|
@@ -79,14 +79,14 @@
|
|
79
79
|
"tslib": "^2.3.0",
|
80
80
|
"webpack": "^5.80.0",
|
81
81
|
"webpack-merge": "^5.8.0",
|
82
|
-
"@nx/devkit": "19.3.
|
83
|
-
"@nx/js": "19.3.
|
84
|
-
"@nx/eslint": "19.3.
|
85
|
-
"@nx/webpack": "19.3.
|
86
|
-
"@nx/web": "19.3.
|
87
|
-
"@nx/workspace": "19.3.
|
82
|
+
"@nx/devkit": "19.3.2",
|
83
|
+
"@nx/js": "19.3.2",
|
84
|
+
"@nx/eslint": "19.3.2",
|
85
|
+
"@nx/webpack": "19.3.2",
|
86
|
+
"@nx/web": "19.3.2",
|
87
|
+
"@nx/workspace": "19.3.2",
|
88
88
|
"piscina": "^4.4.0",
|
89
|
-
"@nrwl/angular": "19.3.
|
89
|
+
"@nrwl/angular": "19.3.2"
|
90
90
|
},
|
91
91
|
"peerDependencies": {
|
92
92
|
"@angular-devkit/build-angular": ">= 16.0.0 < 19.0.0",
|
@@ -43,11 +43,14 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
|
|
43
43
|
}
|
44
44
|
});
|
45
45
|
staticProcess.stderr.on('data', (data) => devkit_1.logger.info(data.toString()));
|
46
|
-
staticProcess.
|
46
|
+
staticProcess.once('exit', (code) => {
|
47
47
|
stdoutStream.end();
|
48
|
+
staticProcess.stdout.removeAllListeners('data');
|
49
|
+
staticProcess.stderr.removeAllListeners('data');
|
48
50
|
if (code !== 0) {
|
49
51
|
throw new Error(`Remote failed to start. A complete log can be found in: ${remoteBuildLogFile}`);
|
50
52
|
}
|
53
|
+
res();
|
51
54
|
});
|
52
55
|
process.on('SIGTERM', () => staticProcess.kill('SIGTERM'));
|
53
56
|
process.on('exit', () => staticProcess.kill('SIGTERM'));
|
@@ -16,15 +16,14 @@ const module_loader_1 = require("./module-loader");
|
|
16
16
|
async function readDefaultTsConfig(fileName) {
|
17
17
|
// these options are mandatory
|
18
18
|
const extraOptions = {
|
19
|
-
target: ts.ScriptTarget.
|
20
|
-
experimentalDecorators: true,
|
19
|
+
target: ts.ScriptTarget.ES2022,
|
21
20
|
// sourcemaps
|
22
21
|
sourceMap: false,
|
23
22
|
inlineSources: true,
|
24
23
|
inlineSourceMap: true,
|
25
24
|
outDir: '',
|
26
25
|
declaration: true,
|
27
|
-
// ng compiler
|
26
|
+
// ng compiler
|
28
27
|
enableResourceInlining: true,
|
29
28
|
// these are required to set the appropriate EmitFlags
|
30
29
|
flatModuleId: 'AUTOGENERATED',
|
@@ -53,10 +53,10 @@ class AppMigrator extends project_migrator_1.ProjectMigrator {
|
|
53
53
|
: undefined);
|
54
54
|
}
|
55
55
|
async migrate() {
|
56
|
+
await super.migrate();
|
56
57
|
if (this.skipMigration === true) {
|
57
58
|
return;
|
58
59
|
}
|
59
|
-
await super.migrate();
|
60
60
|
this.updateProjectConfiguration();
|
61
61
|
await this.e2eMigrator.migrate();
|
62
62
|
this.moveProjectFiles();
|
@@ -16,10 +16,10 @@ class LibMigrator extends project_migrator_1.ProjectMigrator {
|
|
16
16
|
super(tree, options, {}, project, 'libs', logger, supportedBuilderMigrators);
|
17
17
|
}
|
18
18
|
async migrate() {
|
19
|
+
await super.migrate();
|
19
20
|
if (this.skipMigration === true) {
|
20
21
|
return;
|
21
22
|
}
|
22
|
-
await super.migrate();
|
23
23
|
await this.updateProjectConfiguration();
|
24
24
|
this.moveProjectFiles();
|
25
25
|
for (const builderMigrator of this.builderMigrators ?? []) {
|
@@ -1,8 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getProjectValidationResultMessage = exports.arrayToString = void 0;
|
4
|
-
const
|
5
|
-
const chalk = tslib_1.__importStar(require("chalk"));
|
4
|
+
const chalk = require("chalk");
|
6
5
|
function arrayToString(array) {
|
7
6
|
if (array.length === 0) {
|
8
7
|
return '';
|
@@ -43,7 +43,7 @@ async function default_1(tree) {
|
|
43
43
|
}
|
44
44
|
exports.default = default_1;
|
45
45
|
function updateConfig(config) {
|
46
|
-
if (config.browserTarget) {
|
46
|
+
if (config && config.browserTarget) {
|
47
47
|
config.buildTarget ??= config.browserTarget;
|
48
48
|
delete config.browserTarget;
|
49
49
|
}
|
@@ -268,4 +268,4 @@ export declare function fetch<T extends Array<unknown>, A extends Action>(opts:
|
|
268
268
|
* @param component
|
269
269
|
* @param opts
|
270
270
|
*/
|
271
|
-
export declare function navigation<T extends Array<unknown>, A extends Action>(component: Type<any>, opts: HandleNavigationOpts<T>): (source: ActionStatesStream<T, A>) => Observable<Action
|
271
|
+
export declare function navigation<T extends Array<unknown>, A extends Action>(component: Type<any>, opts: HandleNavigationOpts<T>): (source: ActionStatesStream<T, A>) => Observable<Action<string>>;
|
package/src/utils/index.d.ts
CHANGED
@@ -3,5 +3,5 @@
|
|
3
3
|
*
|
4
4
|
* Try hard to not add to this API to reduce the surface area we need to maintain.
|
5
5
|
*/
|
6
|
-
export { isStandalone, addImportToComponent, addImportToDirective, addImportToPipe, addImportToModule, addProviderToBootstrapApplication, addProviderToAppConfig, addProviderToComponent, addProviderToModule, } from './nx-devkit/ast-utils';
|
6
|
+
export { isStandalone, addImportToComponent, addImportToDirective, addImportToPipe, addImportToModule, addProviderToBootstrapApplication, addProviderToAppConfig, addProviderToComponent, addProviderToModule, addViewProviderToComponent, } from './nx-devkit/ast-utils';
|
7
7
|
export { addRoute, addProviderToRoute } from './nx-devkit/route-utils';
|
package/src/utils/index.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Try hard to not add to this API to reduce the surface area we need to maintain.
|
6
6
|
*/
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
exports.addProviderToRoute = exports.addRoute = exports.addProviderToModule = exports.addProviderToComponent = exports.addProviderToAppConfig = exports.addProviderToBootstrapApplication = exports.addImportToModule = exports.addImportToPipe = exports.addImportToDirective = exports.addImportToComponent = exports.isStandalone = void 0;
|
8
|
+
exports.addProviderToRoute = exports.addRoute = exports.addViewProviderToComponent = exports.addProviderToModule = exports.addProviderToComponent = exports.addProviderToAppConfig = exports.addProviderToBootstrapApplication = exports.addImportToModule = exports.addImportToPipe = exports.addImportToDirective = exports.addImportToComponent = exports.isStandalone = void 0;
|
9
9
|
var ast_utils_1 = require("./nx-devkit/ast-utils");
|
10
10
|
Object.defineProperty(exports, "isStandalone", { enumerable: true, get: function () { return ast_utils_1.isStandalone; } });
|
11
11
|
Object.defineProperty(exports, "addImportToComponent", { enumerable: true, get: function () { return ast_utils_1.addImportToComponent; } });
|
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "addProviderToBootstrapApplication", { enumerable
|
|
16
16
|
Object.defineProperty(exports, "addProviderToAppConfig", { enumerable: true, get: function () { return ast_utils_1.addProviderToAppConfig; } });
|
17
17
|
Object.defineProperty(exports, "addProviderToComponent", { enumerable: true, get: function () { return ast_utils_1.addProviderToComponent; } });
|
18
18
|
Object.defineProperty(exports, "addProviderToModule", { enumerable: true, get: function () { return ast_utils_1.addProviderToModule; } });
|
19
|
+
Object.defineProperty(exports, "addViewProviderToComponent", { enumerable: true, get: function () { return ast_utils_1.addViewProviderToComponent; } });
|
19
20
|
var route_utils_1 = require("./nx-devkit/route-utils");
|
20
21
|
Object.defineProperty(exports, "addRoute", { enumerable: true, get: function () { return route_utils_1.addRoute; } });
|
21
22
|
Object.defineProperty(exports, "addProviderToRoute", { enumerable: true, get: function () { return route_utils_1.addProviderToRoute; } });
|
@@ -78,6 +78,14 @@ export declare function addProviderToModule(host: Tree, source: ts.SourceFile, m
|
|
78
78
|
* @param symbolName The provider to add
|
79
79
|
*/
|
80
80
|
export declare function addProviderToComponent(host: Tree, source: ts.SourceFile, componentPath: string, symbolName: string): ts.SourceFile;
|
81
|
+
/**
|
82
|
+
* Add a view provider to a Standalone Component
|
83
|
+
* @param host Virtual Tree
|
84
|
+
* @param source TS Source File containing the Component
|
85
|
+
* @param componentPath Path to the Component
|
86
|
+
* @param symbolName The provider to add
|
87
|
+
*/
|
88
|
+
export declare function addViewProviderToComponent(host: Tree, source: ts.SourceFile, componentPath: string, symbolName: string): ts.SourceFile;
|
81
89
|
export declare function addDeclarationToModule(host: Tree, source: ts.SourceFile, modulePath: string, symbolName: string): ts.SourceFile;
|
82
90
|
export declare function addEntryComponents(host: Tree, source: ts.SourceFile, modulePath: string, symbolName: string): ts.SourceFile;
|
83
91
|
export declare function readBootstrapInfo(host: Tree, app: string): {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getTsSourceFile = exports.getDecoratorPropertyValueNode = exports.readBootstrapInfo = exports.addEntryComponents = exports.addDeclarationToModule = exports.addProviderToComponent = exports.addProviderToModule = exports.addProviderToAppConfig = exports.addProviderToBootstrapApplication = exports.isNgStandaloneApp = exports.addRouteToNgModule = exports.getBootstrapComponent = exports.replaceIntoToTestBed = exports.addDeclarationsToTestBed = exports.addImportToTestBed = exports.addImportToModule = exports.addImportToPipe = exports.addImportToDirective = exports.addImportToComponent = exports.removeFromNgModule = exports.getDecoratorMetadata = exports.isStandalone = void 0;
|
3
|
+
exports.getTsSourceFile = exports.getDecoratorPropertyValueNode = exports.readBootstrapInfo = exports.addEntryComponents = exports.addDeclarationToModule = exports.addViewProviderToComponent = exports.addProviderToComponent = exports.addProviderToModule = exports.addProviderToAppConfig = exports.addProviderToBootstrapApplication = exports.isNgStandaloneApp = exports.addRouteToNgModule = exports.getBootstrapComponent = exports.replaceIntoToTestBed = exports.addDeclarationsToTestBed = exports.addImportToTestBed = exports.addImportToModule = exports.addImportToPipe = exports.addImportToDirective = exports.addImportToComponent = exports.removeFromNgModule = exports.getDecoratorMetadata = exports.isStandalone = void 0;
|
4
4
|
const js_1 = require("@nx/js");
|
5
5
|
const path_1 = require("path");
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
@@ -501,6 +501,17 @@ function addProviderToComponent(host, source, componentPath, symbolName) {
|
|
501
501
|
return _addSymbolToDecoratorMetadata(host, source, componentPath, 'providers', symbolName, 'Component');
|
502
502
|
}
|
503
503
|
exports.addProviderToComponent = addProviderToComponent;
|
504
|
+
/**
|
505
|
+
* Add a view provider to a Standalone Component
|
506
|
+
* @param host Virtual Tree
|
507
|
+
* @param source TS Source File containing the Component
|
508
|
+
* @param componentPath Path to the Component
|
509
|
+
* @param symbolName The provider to add
|
510
|
+
*/
|
511
|
+
function addViewProviderToComponent(host, source, componentPath, symbolName) {
|
512
|
+
return _addSymbolToDecoratorMetadata(host, source, componentPath, 'viewProviders', symbolName, 'Component');
|
513
|
+
}
|
514
|
+
exports.addViewProviderToComponent = addViewProviderToComponent;
|
504
515
|
function addDeclarationToModule(host, source, modulePath, symbolName) {
|
505
516
|
return _addSymbolToNgModuleMetadata(host, source, modulePath, 'declarations', symbolName);
|
506
517
|
}
|
package/src/utils/versions.d.ts
CHANGED
@@ -2,7 +2,7 @@ export declare const nxVersion: any;
|
|
2
2
|
export declare const angularVersion = "~18.0.0";
|
3
3
|
export declare const angularDevkitVersion = "~18.0.0";
|
4
4
|
export declare const ngPackagrVersion = "~18.0.0";
|
5
|
-
export declare const ngrxVersion = "
|
5
|
+
export declare const ngrxVersion = "^18.0.0";
|
6
6
|
export declare const rxjsVersion = "~7.8.0";
|
7
7
|
export declare const zoneJsVersion = "~0.14.3";
|
8
8
|
export declare const angularJsVersion = "1.7.9";
|
package/src/utils/versions.js
CHANGED
@@ -5,7 +5,7 @@ exports.nxVersion = require('../../package.json').version;
|
|
5
5
|
exports.angularVersion = '~18.0.0';
|
6
6
|
exports.angularDevkitVersion = '~18.0.0';
|
7
7
|
exports.ngPackagrVersion = '~18.0.0';
|
8
|
-
exports.ngrxVersion = '
|
8
|
+
exports.ngrxVersion = '^18.0.0';
|
9
9
|
exports.rxjsVersion = '~7.8.0';
|
10
10
|
exports.zoneJsVersion = '~0.14.3';
|
11
11
|
exports.angularJsVersion = '1.7.9';
|