@nx/angular 24.0.6 → 24.1.0-canary.20261111-edd9940
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/dist/src/executors/application/application.impl.js +1 -3
- package/dist/src/executors/browser-esbuild/browser-esbuild.impl.js +1 -3
- package/dist/src/generators/convert-to-rspack/convert-to-rspack.js +2 -2
- package/dist/src/generators/directive/directive.js +0 -2
- package/dist/src/generators/library/lib/add-load-children.js +0 -7
- package/dist/src/generators/library/lib/add-project.js +0 -1
- package/dist/src/generators/storybook-configuration/lib/generate-stories.js +0 -2
- package/dist/src/plugins/plugin.js +2 -2
- package/dist/src/utils/nx-devkit/ast-utils.js +2 -2
- package/package.json +11 -11
|
@@ -10,10 +10,8 @@ const ngcli_adapter_1 = require("@nx/devkit/ngcli-adapter");
|
|
|
10
10
|
async function* applicationExecutor(options, context) {
|
|
11
11
|
(0, validate_options_1.validateOptions)(options);
|
|
12
12
|
const { buildLibsFromSource = true, plugins: pluginPaths, indexHtmlTransformer: indexHtmlTransformerPath, ...delegateExecutorOptions } = (0, normalize_options_1.normalizeOptions)(options);
|
|
13
|
-
let dependencies;
|
|
14
13
|
if (!buildLibsFromSource) {
|
|
15
|
-
const { tsConfigPath
|
|
16
|
-
dependencies = foundDependencies;
|
|
14
|
+
const { tsConfigPath } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(delegateExecutorOptions.tsConfig, context);
|
|
17
15
|
delegateExecutorOptions.tsConfig = tsConfigPath;
|
|
18
16
|
}
|
|
19
17
|
const plugins = await (0, esbuild_extensions_1.loadPlugins)(pluginPaths, options.tsConfig);
|
|
@@ -7,10 +7,8 @@ const ngcli_adapter_1 = require("@nx/devkit/ngcli-adapter");
|
|
|
7
7
|
async function* esbuildExecutor(options, context) {
|
|
8
8
|
options.buildLibsFromSource ??= true;
|
|
9
9
|
const { buildLibsFromSource, plugins: pluginPaths, ...delegateExecutorOptions } = options;
|
|
10
|
-
let dependencies;
|
|
11
10
|
if (!buildLibsFromSource) {
|
|
12
|
-
const { tsConfigPath
|
|
13
|
-
dependencies = foundDependencies;
|
|
11
|
+
const { tsConfigPath } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(delegateExecutorOptions.tsConfig, context);
|
|
14
12
|
delegateExecutorOptions.tsConfig = tsConfigPath;
|
|
15
13
|
}
|
|
16
14
|
const plugins = await (0, esbuild_extensions_1.loadPlugins)(pluginPaths, options.tsConfig);
|
|
@@ -82,7 +82,7 @@ const PATH_NORMALIZER = {
|
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
try {
|
|
85
|
-
|
|
85
|
+
require.resolve(path, {
|
|
86
86
|
paths: [(0, posix_1.join)(devkit_1.workspaceRoot, 'node_modules')],
|
|
87
87
|
});
|
|
88
88
|
normalizedPaths.push(path);
|
|
@@ -306,7 +306,7 @@ async function convertToRspack(tree, schema) {
|
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
serveTarget = {
|
|
309
|
+
serveTarget = { config: target };
|
|
310
310
|
targetsToRemove.push(targetName);
|
|
311
311
|
}
|
|
312
312
|
else if (target.executor === '@angular-devkit/build-angular:prerender') {
|
|
@@ -4,12 +4,10 @@ exports.directiveGenerator = directiveGenerator;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const assert_supported_angular_version_1 = require("../../utils/assert-supported-angular-version");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
|
-
const version_utils_1 = require("../utils/version-utils");
|
|
8
7
|
const lib_1 = require("./lib");
|
|
9
8
|
async function directiveGenerator(tree, schema) {
|
|
10
9
|
(0, assert_supported_angular_version_1.assertSupportedAngularVersion)(tree);
|
|
11
10
|
const options = await (0, lib_1.normalizeOptions)(tree, schema);
|
|
12
|
-
const { major: angularMajorVersion } = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
|
13
11
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files'), options.directory, {
|
|
14
12
|
selector: options.selector,
|
|
15
13
|
symbolName: options.symbolName,
|
|
@@ -3,17 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addLoadChildren = addLoadChildren;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const route_utils_1 = require("../../../utils/nx-devkit/route-utils");
|
|
6
|
-
const internal_1 = require("@nx/js/internal");
|
|
7
|
-
let tsModule;
|
|
8
6
|
function addLoadChildren(tree, options) {
|
|
9
7
|
if (!tree.exists(options.parent)) {
|
|
10
8
|
throw new Error(`Cannot find '${options.parent}'`);
|
|
11
9
|
}
|
|
12
|
-
if (!tsModule) {
|
|
13
|
-
tsModule = (0, internal_1.ensureTypescript)();
|
|
14
|
-
}
|
|
15
|
-
const moduleSource = tree.read(options.parent, 'utf-8');
|
|
16
|
-
const sourceFile = tsModule.createSourceFile(options.parent, moduleSource, tsModule.ScriptTarget.Latest, true);
|
|
17
10
|
const route = `{ path: '${(0, devkit_1.names)(options.fileName).fileName}', loadChildren: () => import('${options.importPath}').then(m => m.${options.standalone
|
|
18
11
|
? `${(0, devkit_1.names)(options.name).propertyName}Routes`
|
|
19
12
|
: options.moduleName}) }`;
|
|
@@ -35,7 +35,6 @@ async function addProject(tree, libraryOptions) {
|
|
|
35
35
|
defaultConfiguration: 'production',
|
|
36
36
|
};
|
|
37
37
|
if (libraryOptions.publishable) {
|
|
38
|
-
const nxJson = (0, devkit_1.readJson)(tree, 'nx.json');
|
|
39
38
|
await (0, internal_2.addReleaseConfigForNonTsSolution)(tree, libraryOptions.name, project);
|
|
40
39
|
}
|
|
41
40
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateStories = generateStories;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const stories_1 = require("../../stories/stories");
|
|
6
5
|
async function generateStories(tree, options) {
|
|
7
|
-
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
8
6
|
await (0, stories_1.angularStoriesGenerator)(tree, {
|
|
9
7
|
name: options.project,
|
|
10
8
|
ignorePaths: options.ignorePaths,
|
|
@@ -150,7 +150,7 @@ async function buildAngularProjects(configFilePath, options, angularWorkspaceRoo
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
else if (knownExecutors.test.has(angularTarget.builder)) {
|
|
153
|
-
await updateTestTarget(
|
|
153
|
+
await updateTestTarget(targets[nxTargetName], angularTarget, context, angularWorkspaceRoot, project.root, namedInputs, externalDependencies);
|
|
154
154
|
}
|
|
155
155
|
else if (knownExecutors.server.has(angularTarget.builder)) {
|
|
156
156
|
updateServerTarget(targets[nxTargetName], angularTarget, context, angularWorkspaceRoot, project.root, namedInputs);
|
|
@@ -250,7 +250,7 @@ async function updateBuildTarget(projectName, targetName, target, angularTarget,
|
|
|
250
250
|
target.metadata.help.example.options = { localize: true };
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
async function updateTestTarget(
|
|
253
|
+
async function updateTestTarget(target, angularTarget, context, angularWorkspaceRoot, projectRoot, namedInputs, externalDependencies) {
|
|
254
254
|
target.cache = true;
|
|
255
255
|
target.inputs =
|
|
256
256
|
'production' in namedInputs
|
|
@@ -28,7 +28,7 @@ const js_1 = require("@nx/js");
|
|
|
28
28
|
const internal_1 = require("@nx/js/internal");
|
|
29
29
|
const path_1 = require("path");
|
|
30
30
|
let tsModule;
|
|
31
|
-
function _angularImportsFromNode(node
|
|
31
|
+
function _angularImportsFromNode(node) {
|
|
32
32
|
if (!tsModule) {
|
|
33
33
|
tsModule = (0, internal_1.ensureTypescript)();
|
|
34
34
|
}
|
|
@@ -96,7 +96,7 @@ function getDecoratorMetadata(source, identifier, module) {
|
|
|
96
96
|
tsModule = (0, internal_1.ensureTypescript)();
|
|
97
97
|
}
|
|
98
98
|
const angularImports = (0, js_1.findNodes)(source, tsModule.SyntaxKind.ImportDeclaration)
|
|
99
|
-
.map((node) => _angularImportsFromNode(node
|
|
99
|
+
.map((node) => _angularImportsFromNode(node))
|
|
100
100
|
.reduce((acc, current) => {
|
|
101
101
|
for (const key of Object.keys(current)) {
|
|
102
102
|
acc[key] = current[key];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.1.0-canary.20261111-edd9940",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"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, 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- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"supportsOptionalMigrations": true
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@nx/devkit": "24.0.
|
|
72
|
-
"@nx/eslint": "24.0.
|
|
73
|
-
"@nx/js": "24.0.
|
|
71
|
+
"@nx/devkit": "24.1.0-canary.20261111-edd9940",
|
|
72
|
+
"@nx/eslint": "24.1.0-canary.20261111-edd9940",
|
|
73
|
+
"@nx/js": "24.1.0-canary.20261111-edd9940",
|
|
74
74
|
"@phenomnomnominal/tsquery": "~6.2.0",
|
|
75
75
|
"@typescript-eslint/type-utils": "^8.0.0",
|
|
76
76
|
"jsonc-parser": "^3.2.0",
|
|
@@ -81,20 +81,20 @@
|
|
|
81
81
|
"tslib": "^2.3.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@nx/storybook": "24.0.
|
|
85
|
-
"@nx/vitest": "24.0.
|
|
86
|
-
"nx": "24.0.
|
|
84
|
+
"@nx/storybook": "24.1.0-canary.20261111-edd9940",
|
|
85
|
+
"@nx/vitest": "24.1.0-canary.20261111-edd9940",
|
|
86
|
+
"nx": "24.1.0-canary.20261111-edd9940"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@angular/build": ">= 20.0.0 < 23.0.0",
|
|
90
90
|
"@angular-devkit/build-angular": ">= 20.0.0 < 23.0.0",
|
|
91
91
|
"@angular-devkit/core": ">= 20.0.0 < 23.0.0",
|
|
92
92
|
"@angular-devkit/schematics": ">= 20.0.0 < 23.0.0",
|
|
93
|
-
"@nx/cypress": "24.0.
|
|
94
|
-
"@nx/playwright": "24.0.
|
|
93
|
+
"@nx/cypress": "24.1.0-canary.20261111-edd9940",
|
|
94
|
+
"@nx/playwright": "24.1.0-canary.20261111-edd9940",
|
|
95
95
|
"@schematics/angular": ">= 20.0.0 < 23.0.0",
|
|
96
|
-
"@nx/rspack": "24.0.
|
|
97
|
-
"@nx/webpack": "24.0.
|
|
96
|
+
"@nx/rspack": "24.1.0-canary.20261111-edd9940",
|
|
97
|
+
"@nx/webpack": "24.1.0-canary.20261111-edd9940",
|
|
98
98
|
"ng-packagr": ">= 20.0.0 < 23.0.0",
|
|
99
99
|
"rxjs": "^6.5.3 || ^7.5.0",
|
|
100
100
|
"webpack-merge": "^5.8.0"
|