nx 19.0.7 → 19.1.0-beta.1
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/bin/init-local.js +1 -1
- package/package.json +13 -17
- package/src/command-line/examples.js +4 -0
- package/src/command-line/format/format.js +25 -47
- package/src/command-line/show/command-object.js +10 -4
- package/src/core/graph/main.js +1 -1
- package/src/utils/package-json.d.ts +1 -2
- package/src/utils/package-json.js +4 -3
@@ -1,5 +1,4 @@
|
|
1
1
|
import { InputDefinition, TargetConfiguration } from '../config/workspace-json-project-json';
|
2
|
-
import { PackageManagerCommands } from './package-manager';
|
3
2
|
export interface NxProjectPackageJsonConfiguration {
|
4
3
|
implicitDependencies?: string[];
|
5
4
|
tags?: string[];
|
@@ -66,7 +65,7 @@ export declare function normalizePackageGroup(packageGroup: PackageGroup): Array
|
|
66
65
|
export declare function readNxMigrateConfig(json: Partial<PackageJson>): NxMigrationsConfiguration & {
|
67
66
|
packageGroup?: ArrayPackageGroup;
|
68
67
|
};
|
69
|
-
export declare function buildTargetFromScript(script: string, scripts
|
68
|
+
export declare function buildTargetFromScript(script: string, scripts?: Record<string, string>): TargetConfiguration;
|
70
69
|
export declare function readTargetsFromPackageJson(packageJson: PackageJson): Record<string, TargetConfiguration<any>>;
|
71
70
|
/**
|
72
71
|
* Uses `require.resolve` to read the package.json for a module.
|
@@ -39,7 +39,8 @@ function readNxMigrateConfig(json) {
|
|
39
39
|
};
|
40
40
|
}
|
41
41
|
exports.readNxMigrateConfig = readNxMigrateConfig;
|
42
|
-
function buildTargetFromScript(script, scripts = {}
|
42
|
+
function buildTargetFromScript(script, scripts = {}) {
|
43
|
+
const packageManagerCommand = (0, package_manager_1.getPackageManagerCommand)();
|
43
44
|
return {
|
44
45
|
executor: 'nx:run-script',
|
45
46
|
options: {
|
@@ -56,9 +57,9 @@ function readTargetsFromPackageJson(packageJson) {
|
|
56
57
|
const { scripts, nx, private: isPrivate } = packageJson ?? {};
|
57
58
|
const res = {};
|
58
59
|
const includedScripts = nx?.includedScripts || Object.keys(scripts ?? {});
|
59
|
-
|
60
|
+
//
|
60
61
|
for (const script of includedScripts) {
|
61
|
-
res[script] = buildTargetFromScript(script, scripts
|
62
|
+
res[script] = buildTargetFromScript(script, scripts);
|
62
63
|
}
|
63
64
|
for (const targetName in nx?.targets) {
|
64
65
|
res[targetName] = (0, project_configuration_utils_1.mergeTargetConfigurations)(nx?.targets[targetName], res[targetName]);
|