@nx/angular 0.0.0-pr-3-49a51e7 → 0.0.0-pr-30418-80f02f7
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/ng-package.json +1 -1
- package/package.json +10 -10
- package/src/executors/delegate-build/delegate-build.impl.d.ts +1 -3
- package/src/executors/delegate-build/delegate-build.impl.js +0 -3
- package/src/executors/package/package.impl.js +1 -4
- package/src/generators/convert-to-rspack/lib/update-tsconfig.js +17 -5
- package/src/generators/library/lib/add-project.js +3 -1
- package/src/generators/stories/stories.js +2 -2
- package/src/migrations/update-19-6-0/turn-off-dts-by-default.js +2 -2
package/ng-package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-30418-80f02f7",
|
|
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": {
|
|
@@ -67,19 +67,19 @@
|
|
|
67
67
|
"@typescript-eslint/type-utils": "^8.0.0",
|
|
68
68
|
"enquirer": "~2.3.6",
|
|
69
69
|
"picocolors": "^1.1.0",
|
|
70
|
+
"picomatch": "4.0.2",
|
|
70
71
|
"magic-string": "~0.30.2",
|
|
71
|
-
"minimatch": "9.0.3",
|
|
72
72
|
"semver": "^7.5.3",
|
|
73
73
|
"tslib": "^2.3.0",
|
|
74
74
|
"webpack-merge": "^5.8.0",
|
|
75
|
-
"@nx/devkit": "0.0.0-pr-
|
|
76
|
-
"@nx/js": "0.0.0-pr-
|
|
77
|
-
"@nx/eslint": "0.0.0-pr-
|
|
78
|
-
"@nx/webpack": "0.0.0-pr-
|
|
79
|
-
"@nx/rspack": "0.0.0-pr-
|
|
80
|
-
"@nx/module-federation": "0.0.0-pr-
|
|
81
|
-
"@nx/web": "0.0.0-pr-
|
|
82
|
-
"@nx/workspace": "0.0.0-pr-
|
|
75
|
+
"@nx/devkit": "0.0.0-pr-30418-80f02f7",
|
|
76
|
+
"@nx/js": "0.0.0-pr-30418-80f02f7",
|
|
77
|
+
"@nx/eslint": "0.0.0-pr-30418-80f02f7",
|
|
78
|
+
"@nx/webpack": "0.0.0-pr-30418-80f02f7",
|
|
79
|
+
"@nx/rspack": "0.0.0-pr-30418-80f02f7",
|
|
80
|
+
"@nx/module-federation": "0.0.0-pr-30418-80f02f7",
|
|
81
|
+
"@nx/web": "0.0.0-pr-30418-80f02f7",
|
|
82
|
+
"@nx/workspace": "0.0.0-pr-30418-80f02f7",
|
|
83
83
|
"piscina": "^4.4.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
@@ -2,7 +2,5 @@ import type { ExecutorContext } from '@nx/devkit';
|
|
|
2
2
|
import type { DelegateBuildExecutorSchema } from './schema';
|
|
3
3
|
export declare function delegateBuildExecutor(options: DelegateBuildExecutorSchema, context: ExecutorContext): AsyncGenerator<{
|
|
4
4
|
success: boolean;
|
|
5
|
-
},
|
|
6
|
-
success: boolean;
|
|
7
|
-
}, any>;
|
|
5
|
+
}, void, any>;
|
|
8
6
|
export default delegateBuildExecutor;
|
|
@@ -6,9 +6,6 @@ const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
|
6
6
|
async function* delegateBuildExecutor(options, context) {
|
|
7
7
|
const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
|
|
8
8
|
options.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, devkit_1.joinPathFragments)(context.root, options.tsConfig), context.root, target.data.root, dependencies);
|
|
9
|
-
if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
|
|
10
|
-
return { success: false };
|
|
11
|
-
}
|
|
12
9
|
const { buildTarget, ...targetOptions } = options;
|
|
13
10
|
const delegateTarget = (0, devkit_1.parseTargetString)(buildTarget, context);
|
|
14
11
|
yield* await (0, devkit_1.runExecutor)(delegateTarget, targetOptions, context);
|
|
@@ -31,10 +31,7 @@ function createLibraryExecutor(initializeNgPackagr) {
|
|
|
31
31
|
if (angularMajorVersion < 18 && options.poll !== undefined) {
|
|
32
32
|
throw new Error(`The "poll" option requires Angular version 18.0.0 or greater. You are currently using version ${angularVersion}.`);
|
|
33
33
|
}
|
|
34
|
-
const {
|
|
35
|
-
if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
|
|
36
|
-
return Promise.resolve({ success: false });
|
|
37
|
-
}
|
|
34
|
+
const { dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
|
|
38
35
|
if (options.watch) {
|
|
39
36
|
return yield* (0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.mapTo)({ success: true })));
|
|
40
37
|
}
|
|
@@ -2,13 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateTsconfig = updateTsconfig;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const js_1 = require("@nx/js");
|
|
5
6
|
function updateTsconfig(tree, projectRoot) {
|
|
6
7
|
const tsconfigPath = (0, devkit_1.joinPathFragments)(projectRoot, 'tsconfig.json');
|
|
7
8
|
const tsconfig = (0, devkit_1.readJson)(tree, tsconfigPath);
|
|
8
|
-
tsconfig['ts-node']
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
tsconfig['ts-node'] ??= {};
|
|
10
|
+
tsconfig['ts-node'].compilerOptions ??= {};
|
|
11
|
+
tsconfig['ts-node'].compilerOptions.module = 'CommonJS';
|
|
12
|
+
tsconfig['ts-node'].compilerOptions.moduleResolution = 'Node10';
|
|
13
|
+
if (tsconfig.compilerOptions?.customConditions) {
|
|
14
|
+
tsconfig['ts-node'].compilerOptions.customConditions = null;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const rootTsconfigFile = (0, js_1.getRootTsConfigFileName)(tree);
|
|
18
|
+
if (rootTsconfigFile) {
|
|
19
|
+
const rootTsconfigJson = (0, devkit_1.readJson)(tree, rootTsconfigFile);
|
|
20
|
+
if (rootTsconfigJson.compilerOptions?.customConditions) {
|
|
21
|
+
tsconfig['ts-node'].compilerOptions.customConditions = null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
13
25
|
(0, devkit_1.writeJson)(tree, tsconfigPath, tsconfig);
|
|
14
26
|
}
|
|
@@ -4,6 +4,7 @@ exports.addProject = addProject;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
|
|
6
6
|
const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
|
|
7
|
+
const use_legacy_versioning_1 = require("nx/src/command-line/release/config/use-legacy-versioning");
|
|
7
8
|
async function addProject(tree, libraryOptions) {
|
|
8
9
|
const project = {
|
|
9
10
|
name: libraryOptions.name,
|
|
@@ -36,7 +37,8 @@ async function addProject(tree, libraryOptions) {
|
|
|
36
37
|
defaultConfiguration: 'production',
|
|
37
38
|
};
|
|
38
39
|
if (libraryOptions.publishable) {
|
|
39
|
-
|
|
40
|
+
const nxJson = (0, devkit_1.readJson)(tree, 'nx.json');
|
|
41
|
+
await (0, add_release_config_1.addReleaseConfigForNonTsSolution)((0, use_legacy_versioning_1.shouldUseLegacyVersioning)(nxJson.release), tree, libraryOptions.name, project);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
(0, devkit_1.addProjectConfiguration)(tree, libraryOptions.name, project);
|
|
@@ -7,7 +7,7 @@ const component_story_1 = tslib_1.__importDefault(require("../component-story/co
|
|
|
7
7
|
const component_info_1 = require("../utils/storybook-ast/component-info");
|
|
8
8
|
const entry_point_1 = require("../utils/storybook-ast/entry-point");
|
|
9
9
|
const module_info_1 = require("../utils/storybook-ast/module-info");
|
|
10
|
-
const
|
|
10
|
+
const picomatch = require("picomatch");
|
|
11
11
|
const versions_1 = require("../../utils/versions");
|
|
12
12
|
async function angularStoriesGenerator(tree, options) {
|
|
13
13
|
const entryPoints = (0, entry_point_1.getProjectEntryPoints)(tree, options.name);
|
|
@@ -17,7 +17,7 @@ async function angularStoriesGenerator(tree, options) {
|
|
|
17
17
|
componentsInfo.push(...(0, component_info_1.getComponentsInfo)(tree, entryPoint, moduleFilePaths, options.name), ...(0, component_info_1.getStandaloneComponentsInfo)(tree, entryPoint));
|
|
18
18
|
}
|
|
19
19
|
const componentInfos = componentsInfo.filter((f) => !options.ignorePaths?.some((pattern) => {
|
|
20
|
-
const shouldIgnorePath = (
|
|
20
|
+
const shouldIgnorePath = picomatch(pattern)((0, devkit_1.joinPathFragments)(f.moduleFolderPath, f.path, `${f.componentFileName}.ts`));
|
|
21
21
|
return shouldIgnorePath;
|
|
22
22
|
}));
|
|
23
23
|
for (const info of componentInfos) {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = default_1;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const picomatch = require("picomatch");
|
|
6
6
|
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
7
7
|
async function default_1(tree) {
|
|
8
8
|
(0, devkit_1.visitNotIgnoredFiles)(tree, '', (path) => {
|
|
9
9
|
const webpackConfigGlob = '**/webpack*.config*.{js,ts,mjs,cjs}';
|
|
10
|
-
const result = (
|
|
10
|
+
const result = picomatch(webpackConfigGlob)(path);
|
|
11
11
|
if (!result) {
|
|
12
12
|
return;
|
|
13
13
|
}
|