@nx/angular 17.2.0-beta.0 → 17.2.0-beta.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/package.json +10 -10
- package/plugins/component-testing.js +4 -3
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js +3 -3
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ngc/compile-source-files.js +1 -3
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +1 -3
- package/src/generators/library/lib/add-standalone-component.d.ts +2 -2
- package/src/generators/library/lib/add-standalone-component.js +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "17.2.0-beta.
|
|
3
|
+
"version": "17.2.0-beta.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, 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": {
|
|
@@ -78,15 +78,15 @@
|
|
|
78
78
|
"tslib": "^2.3.0",
|
|
79
79
|
"webpack": "^5.80.0",
|
|
80
80
|
"webpack-merge": "^5.8.0",
|
|
81
|
-
"@nx/devkit": "17.2.0-beta.
|
|
82
|
-
"@nx/cypress": "17.2.0-beta.
|
|
83
|
-
"@nx/jest": "17.2.0-beta.
|
|
84
|
-
"@nx/js": "17.2.0-beta.
|
|
85
|
-
"@nx/eslint": "17.2.0-beta.
|
|
86
|
-
"@nx/webpack": "17.2.0-beta.
|
|
87
|
-
"@nx/web": "17.2.0-beta.
|
|
88
|
-
"@nx/workspace": "17.2.0-beta.
|
|
89
|
-
"@nrwl/angular": "17.2.0-beta.
|
|
81
|
+
"@nx/devkit": "17.2.0-beta.2",
|
|
82
|
+
"@nx/cypress": "17.2.0-beta.2",
|
|
83
|
+
"@nx/jest": "17.2.0-beta.2",
|
|
84
|
+
"@nx/js": "17.2.0-beta.2",
|
|
85
|
+
"@nx/eslint": "17.2.0-beta.2",
|
|
86
|
+
"@nx/webpack": "17.2.0-beta.2",
|
|
87
|
+
"@nx/web": "17.2.0-beta.2",
|
|
88
|
+
"@nx/workspace": "17.2.0-beta.2",
|
|
89
|
+
"@nrwl/angular": "17.2.0-beta.2"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@angular-devkit/build-angular": ">= 15.0.0 < 18.0.0",
|
|
@@ -43,7 +43,7 @@ ${e.stack ? e.stack : e}`);
|
|
|
43
43
|
const ctContext = (0, ct_helpers_1.createExecutorContext)(graph, ctProjectConfig.targets, ctProjectConfig.name, options?.ctTargetName || 'component-test', ctConfigurationName);
|
|
44
44
|
const buildTarget = getBuildableTarget(ctContext);
|
|
45
45
|
if (!buildTarget.project && !graph.nodes?.[buildTarget.project]?.data) {
|
|
46
|
-
throw new Error((0, devkit_1.stripIndents) `Unable to find project configuration for build target.
|
|
46
|
+
throw new Error((0, devkit_1.stripIndents) `Unable to find project configuration for build target.
|
|
47
47
|
Project Name? ${buildTarget.project}
|
|
48
48
|
Has project config? ${!!graph.nodes?.[buildTarget.project]?.data}`);
|
|
49
49
|
}
|
|
@@ -199,8 +199,8 @@ Note: this may fail, setting the correct 'sourceRoot' for ${buildContext.project
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
function withSchemaDefaults(options) {
|
|
202
|
-
if (!options.main) {
|
|
203
|
-
throw new Error('Missing executor options "main"');
|
|
202
|
+
if (!options.main && !options.browser) {
|
|
203
|
+
throw new Error('Missing executor options "main" and "browser"');
|
|
204
204
|
}
|
|
205
205
|
if (!options.index) {
|
|
206
206
|
throw new Error('Missing executor options "index"');
|
|
@@ -225,6 +225,7 @@ function withSchemaDefaults(options) {
|
|
|
225
225
|
options.outputHashing ??= 'none';
|
|
226
226
|
options.progress ??= true;
|
|
227
227
|
options.scripts ??= [];
|
|
228
|
+
options.main = options.main ??= options.browser;
|
|
228
229
|
return options;
|
|
229
230
|
}
|
|
230
231
|
/**
|
|
@@ -62,7 +62,8 @@ function startStaticRemotesFileServer(remotes, projectGraph, options, context) {
|
|
|
62
62
|
if (!commonOutputDirectory) {
|
|
63
63
|
commonOutputDirectory = directoryOfOutputPath;
|
|
64
64
|
}
|
|
65
|
-
else if (commonOutputDirectory !== directoryOfOutputPath
|
|
65
|
+
else if (commonOutputDirectory !== directoryOfOutputPath ||
|
|
66
|
+
!outputPath.endsWith(app)) {
|
|
66
67
|
shouldMoveToCommonLocation = true;
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -70,8 +71,7 @@ function startStaticRemotesFileServer(remotes, projectGraph, options, context) {
|
|
|
70
71
|
commonOutputDirectory = (0, path_1.join)(devkit_1.workspaceRoot, 'tmp/static-remotes');
|
|
71
72
|
for (const app of remotes.staticRemotes) {
|
|
72
73
|
const outputPath = projectGraph.nodes[app].data.targets['build'].options.outputPath;
|
|
73
|
-
|
|
74
|
-
(0, fs_2.cpSync)(outputPath, (0, path_1.join)(commonOutputDirectory, outputPathParts[outputPathParts.length - 1]), {
|
|
74
|
+
(0, fs_2.cpSync)(outputPath, (0, path_1.join)(commonOutputDirectory, app), {
|
|
75
75
|
force: true,
|
|
76
76
|
recursive: true,
|
|
77
77
|
});
|
|
@@ -56,9 +56,7 @@ async function compileSourceFiles(graph, tsConfig, moduleResolutionCache, option
|
|
|
56
56
|
cache.oldNgtscProgram = angularProgram;
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
|
-
|
|
60
|
-
// using an abstract builder that only wraps a TypeScript program.
|
|
61
|
-
builder = ts.createAbstractBuilder(typeScriptProgram, tsCompilerHost);
|
|
59
|
+
builder = ts.createEmitAndSemanticDiagnosticsBuilderProgram(typeScriptProgram, tsCompilerHost);
|
|
62
60
|
}
|
|
63
61
|
// Update semantic diagnostics cache
|
|
64
62
|
const affectedFiles = new Set();
|
|
@@ -59,9 +59,7 @@ async function compileSourceFiles(graph, tsConfig, moduleResolutionCache, option
|
|
|
59
59
|
cache.oldNgtscProgram = angularProgram;
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
|
-
|
|
63
|
-
// using an abstract builder that only wraps a TypeScript program.
|
|
64
|
-
builder = ts.createAbstractBuilder(typeScriptProgram, tsCompilerHost);
|
|
62
|
+
builder = ts.createEmitAndSemanticDiagnosticsBuilderProgram(typeScriptProgram, tsCompilerHost);
|
|
65
63
|
}
|
|
66
64
|
// Update semantic diagnostics cache
|
|
67
65
|
const affectedFiles = new Set();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Tree } from 'nx/
|
|
2
|
-
import { NormalizedSchema } from './normalized-schema';
|
|
1
|
+
import { type Tree } from '@nx/devkit';
|
|
2
|
+
import type { NormalizedSchema } from './normalized-schema';
|
|
3
3
|
export declare function addStandaloneComponent(tree: Tree, { libraryOptions, componentOptions }: NormalizedSchema): Promise<void>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addStandaloneComponent = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const component_1 = require("../../component/component");
|
|
5
|
-
const add_load_children_1 = require("./add-load-children");
|
|
6
6
|
const add_children_1 = require("./add-children");
|
|
7
|
+
const add_load_children_1 = require("./add-load-children");
|
|
7
8
|
async function addStandaloneComponent(tree, { libraryOptions, componentOptions }) {
|
|
8
|
-
await (0, component_1.
|
|
9
|
+
await (0, component_1.componentGenerator)(tree, {
|
|
9
10
|
...componentOptions,
|
|
10
11
|
name: componentOptions.name,
|
|
12
|
+
directory: (0, devkit_1.joinPathFragments)(libraryOptions.projectRoot, 'src', 'lib', componentOptions.flat ? '' : componentOptions.name),
|
|
13
|
+
nameAndDirectoryFormat: 'as-provided',
|
|
11
14
|
standalone: true,
|
|
12
15
|
export: true,
|
|
13
|
-
project: libraryOptions.name,
|
|
14
|
-
flat: componentOptions.flat,
|
|
15
16
|
skipFormat: true,
|
|
16
17
|
});
|
|
17
18
|
if (libraryOptions.routing) {
|