nx 18.0.4 → 18.0.5
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 +13 -12
- package/src/command-line/add/add.js +3 -1
- package/src/command-line/graph/graph.js +1 -1
- package/src/command-line/init/init-v2.js +16 -11
- package/src/command-line/migrate/command-object.js +17 -2
- package/src/command-line/migrate/migrate.js +13 -1
- package/src/command-line/release/changelog.d.ts +16 -1
- package/src/command-line/release/changelog.js +104 -194
- package/src/command-line/release/command-object.d.ts +1 -0
- package/src/command-line/release/release.js +56 -3
- package/src/command-line/release/utils/git.d.ts +5 -1
- package/src/command-line/release/utils/git.js +26 -11
- package/src/command-line/release/utils/github.d.ts +4 -8
- package/src/command-line/release/utils/github.js +61 -2
- package/src/command-line/release/utils/shared.d.ts +1 -0
- package/src/command-line/release/utils/shared.js +3 -1
- package/src/core/graph/3rdpartylicenses.txt +0 -51
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/polyfills.js +1 -1
- package/src/core/graph/runtime.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +3 -3
- package/src/plugins/js/utils/register.js +1 -0
- package/src/plugins/target-defaults/target-defaults-plugin.d.ts +2 -3
- package/src/plugins/target-defaults/target-defaults-plugin.js +24 -32
- package/src/project-graph/utils/project-configuration-utils.js +13 -6
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +20 -23
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +16 -16
- package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +1 -1
- package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -1
- package/src/tasks-runner/task-orchestrator.js +23 -1
- package/src/utils/json.js +3 -1
- package/src/utils/logger.js +1 -1
- package/src/utils/output.d.ts +0 -1
- package/src/utils/output.js +6 -7
- package/src/utils/package-json.d.ts +1 -1
- package/src/utils/package-json.js +12 -11
- package/src/utils/plugins/core-plugins.js +4 -0
|
@@ -5,6 +5,7 @@ const fs_1 = require("fs");
|
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const fileutils_1 = require("./fileutils");
|
|
7
7
|
const installation_directory_1 = require("./installation-directory");
|
|
8
|
+
const project_configuration_utils_1 = require("../project-graph/utils/project-configuration-utils");
|
|
8
9
|
function normalizePackageGroup(packageGroup) {
|
|
9
10
|
return Array.isArray(packageGroup)
|
|
10
11
|
? packageGroup.map((x) => typeof x === 'string' ? { package: x, version: '*' } : x)
|
|
@@ -37,32 +38,32 @@ function readNxMigrateConfig(json) {
|
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
exports.readNxMigrateConfig = readNxMigrateConfig;
|
|
40
|
-
function buildTargetFromScript(script
|
|
41
|
-
const nxTargetConfiguration = nx?.targets?.[script] || {};
|
|
41
|
+
function buildTargetFromScript(script) {
|
|
42
42
|
return {
|
|
43
|
-
...nxTargetConfiguration,
|
|
44
43
|
executor: 'nx:run-script',
|
|
45
44
|
options: {
|
|
46
|
-
...(nxTargetConfiguration.options || {}),
|
|
47
45
|
script,
|
|
48
46
|
},
|
|
49
47
|
};
|
|
50
48
|
}
|
|
51
49
|
exports.buildTargetFromScript = buildTargetFromScript;
|
|
52
50
|
function readTargetsFromPackageJson(packageJson) {
|
|
53
|
-
const { scripts, nx } = packageJson;
|
|
51
|
+
const { scripts, nx, private: isPrivate } = packageJson ?? {};
|
|
54
52
|
const res = {};
|
|
55
|
-
Object.keys(scripts
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
53
|
+
const includedScripts = nx?.includedScripts || Object.keys(scripts ?? {});
|
|
54
|
+
//
|
|
55
|
+
for (const script of includedScripts) {
|
|
56
|
+
res[script] = buildTargetFromScript(script);
|
|
57
|
+
}
|
|
58
|
+
for (const targetName in nx?.targets) {
|
|
59
|
+
res[targetName] = (0, project_configuration_utils_1.mergeTargetConfigurations)(nx?.targets[targetName], res[targetName]);
|
|
60
|
+
}
|
|
60
61
|
/**
|
|
61
62
|
* Add implicit nx-release-publish target for all package.json files that are
|
|
62
63
|
* not marked as `"private": true` to allow for lightweight configuration for
|
|
63
64
|
* package based repos.
|
|
64
65
|
*/
|
|
65
|
-
if (!
|
|
66
|
+
if (!isPrivate && !res['nx-release-publish']) {
|
|
66
67
|
res['nx-release-publish'] = {
|
|
67
68
|
dependsOn: ['^nx-release-publish'],
|
|
68
69
|
executor: '@nx/js:release-publish',
|