nx 19.5.6 → 19.6.0-beta.0
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 +12 -12
- package/release/index.d.ts +1 -1
- package/release/index.js +2 -1
- package/schemas/nx-schema.json +3 -0
- package/src/adapter/compat.d.ts +1 -1
- package/src/adapter/compat.js +2 -0
- package/src/command-line/affected/affected.js +1 -1
- package/src/command-line/connect/connect-to-nx-cloud.js +7 -3
- package/src/command-line/release/changelog.d.ts +2 -7
- package/src/command-line/release/changelog.js +361 -347
- package/src/command-line/release/command-object.d.ts +1 -0
- package/src/command-line/release/command-object.js +14 -0
- package/src/command-line/release/config/deep-merge-json.d.ts +1 -0
- package/src/command-line/release/config/deep-merge-json.js +28 -0
- package/src/command-line/release/index.d.ts +16 -4
- package/src/command-line/release/index.js +23 -9
- package/src/command-line/release/plan.d.ts +2 -1
- package/src/command-line/release/plan.js +90 -77
- package/src/command-line/release/publish.d.ts +2 -6
- package/src/command-line/release/publish.js +67 -52
- package/src/command-line/release/release.d.ts +2 -1
- package/src/command-line/release/release.js +181 -165
- package/src/command-line/release/utils/print-config.d.ts +7 -0
- package/src/command-line/release/utils/print-config.js +36 -0
- package/src/command-line/release/version.d.ts +2 -6
- package/src/command-line/release/version.js +179 -165
- package/src/command-line/run/run-one.js +1 -1
- package/src/command-line/run-many/run-many.js +1 -1
- package/src/command-line/yargs-utils/shared-options.d.ts +1 -0
- package/src/command-line/yargs-utils/shared-options.js +5 -0
- package/src/commands-runner/create-command-graph.js +4 -2
- package/src/config/nx-json.d.ts +10 -1
- package/src/devkit-internals.d.ts +1 -1
- package/src/devkit-internals.js +2 -1
- package/src/generators/utils/project-configuration.js +41 -11
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +4 -2
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +61 -20
- package/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +1 -0
- package/src/nx-cloud/utilities/axios.js +9 -2
- package/src/nx-cloud/utilities/get-cloud-options.d.ts +1 -1
- package/src/nx-cloud/utilities/get-cloud-options.js +3 -2
- package/src/plugins/package-json/create-nodes.js +9 -1
- package/src/project-graph/plugins/isolation/plugin-pool.js +32 -10
- package/src/project-graph/utils/project-configuration-utils.d.ts +1 -0
- package/src/project-graph/utils/project-configuration-utils.js +1 -0
- package/src/tasks-runner/cache.js +1 -1
- package/src/tasks-runner/run-command.js +6 -1
- package/src/tasks-runner/utils.js +14 -10
- package/src/utils/command-line-utils.d.ts +1 -0
- package/src/utils/nx-cloud-utils.js +3 -1
- package/src/utils/package-json.d.ts +2 -9
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.
|
3
|
+
"version": "19.6.0-beta.0",
|
4
4
|
"private": false,
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
6
6
|
"repository": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"yargs-parser": "21.1.1",
|
72
72
|
"node-machine-id": "1.1.12",
|
73
73
|
"ora": "5.3.0",
|
74
|
-
"@nrwl/tao": "19.
|
74
|
+
"@nrwl/tao": "19.6.0-beta.0"
|
75
75
|
},
|
76
76
|
"peerDependencies": {
|
77
77
|
"@swc-node/register": "^1.8.0",
|
@@ -86,16 +86,16 @@
|
|
86
86
|
}
|
87
87
|
},
|
88
88
|
"optionalDependencies": {
|
89
|
-
"@nx/nx-darwin-x64": "19.
|
90
|
-
"@nx/nx-darwin-arm64": "19.
|
91
|
-
"@nx/nx-linux-x64-gnu": "19.
|
92
|
-
"@nx/nx-linux-x64-musl": "19.
|
93
|
-
"@nx/nx-win32-x64-msvc": "19.
|
94
|
-
"@nx/nx-linux-arm64-gnu": "19.
|
95
|
-
"@nx/nx-linux-arm64-musl": "19.
|
96
|
-
"@nx/nx-linux-arm-gnueabihf": "19.
|
97
|
-
"@nx/nx-win32-arm64-msvc": "19.
|
98
|
-
"@nx/nx-freebsd-x64": "19.
|
89
|
+
"@nx/nx-darwin-x64": "19.6.0-beta.0",
|
90
|
+
"@nx/nx-darwin-arm64": "19.6.0-beta.0",
|
91
|
+
"@nx/nx-linux-x64-gnu": "19.6.0-beta.0",
|
92
|
+
"@nx/nx-linux-x64-musl": "19.6.0-beta.0",
|
93
|
+
"@nx/nx-win32-x64-msvc": "19.6.0-beta.0",
|
94
|
+
"@nx/nx-linux-arm64-gnu": "19.6.0-beta.0",
|
95
|
+
"@nx/nx-linux-arm64-musl": "19.6.0-beta.0",
|
96
|
+
"@nx/nx-linux-arm-gnueabihf": "19.6.0-beta.0",
|
97
|
+
"@nx/nx-win32-arm64-msvc": "19.6.0-beta.0",
|
98
|
+
"@nx/nx-freebsd-x64": "19.6.0-beta.0"
|
99
99
|
},
|
100
100
|
"nx-migrations": {
|
101
101
|
"migrations": "./migrations.json",
|
package/release/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/**
|
2
2
|
* @public Programmatic API for nx release
|
3
3
|
*/
|
4
|
-
export { release, releaseChangelog, releasePublish, releaseVersion, } from '../src/command-line/release';
|
4
|
+
export { ReleaseClient, release, releaseChangelog, releasePublish, releaseVersion, } from '../src/command-line/release';
|
package/release/index.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.releaseVersion = exports.releasePublish = exports.releaseChangelog = exports.release = void 0;
|
3
|
+
exports.releaseVersion = exports.releasePublish = exports.releaseChangelog = exports.release = exports.ReleaseClient = void 0;
|
4
4
|
/**
|
5
5
|
* @public Programmatic API for nx release
|
6
6
|
*/
|
7
7
|
var release_1 = require("../src/command-line/release");
|
8
|
+
Object.defineProperty(exports, "ReleaseClient", { enumerable: true, get: function () { return release_1.ReleaseClient; } });
|
8
9
|
Object.defineProperty(exports, "release", { enumerable: true, get: function () { return release_1.release; } });
|
9
10
|
Object.defineProperty(exports, "releaseChangelog", { enumerable: true, get: function () { return release_1.releaseChangelog; } });
|
10
11
|
Object.defineProperty(exports, "releasePublish", { enumerable: true, get: function () { return release_1.releasePublish; } });
|
package/schemas/nx-schema.json
CHANGED
package/src/adapter/compat.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
export declare const allowedProjectExtensions: readonly ["tags", "implicitDependencies", "configFilePath", "$schema", "generators", "namedInputs", "name", "files", "root", "sourceRoot", "projectType", "release", "includedScripts", "metadata"];
|
2
|
-
export declare const allowedWorkspaceExtensions: readonly ["implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins"];
|
2
|
+
export declare const allowedWorkspaceExtensions: readonly ["implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudId", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins", "neverConnectToCloud"];
|
package/src/adapter/compat.js
CHANGED
@@ -54,12 +54,14 @@ exports.allowedWorkspaceExtensions = [
|
|
54
54
|
'installation',
|
55
55
|
'release',
|
56
56
|
'nxCloudAccessToken',
|
57
|
+
'nxCloudId',
|
57
58
|
'nxCloudUrl',
|
58
59
|
'nxCloudEncryptionKey',
|
59
60
|
'parallel',
|
60
61
|
'cacheDirectory',
|
61
62
|
'useDaemonProcess',
|
62
63
|
'useInferencePlugins',
|
64
|
+
'neverConnectToCloud',
|
63
65
|
];
|
64
66
|
if (!patched) {
|
65
67
|
Module.prototype.require = function () {
|
@@ -17,7 +17,7 @@ const find_matching_projects_1 = require("../../utils/find-matching-projects");
|
|
17
17
|
const graph_1 = require("../graph/graph");
|
18
18
|
const all_file_data_1 = require("../../utils/all-file-data");
|
19
19
|
async function affected(command, args, extraTargetDependencies = {}, extraOptions = {
|
20
|
-
excludeTaskDependencies:
|
20
|
+
excludeTaskDependencies: args.excludeTaskDependencies,
|
21
21
|
loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false',
|
22
22
|
}) {
|
23
23
|
perf_hooks_1.performance.mark('code-loading:end');
|
@@ -25,7 +25,8 @@ function onlyDefaultRunnerIsUsed(nxJson) {
|
|
25
25
|
// No tasks runner options OR no default runner defined:
|
26
26
|
// - If access token defined, uses cloud runner
|
27
27
|
// - If no access token defined, uses default
|
28
|
-
return !(nxJson.nxCloudAccessToken ?? process.env.NX_CLOUD_ACCESS_TOKEN)
|
28
|
+
return (!(nxJson.nxCloudAccessToken ?? process.env.NX_CLOUD_ACCESS_TOKEN) &&
|
29
|
+
!nxJson.nxCloudId);
|
29
30
|
}
|
30
31
|
return defaultRunner === 'nx/tasks-runners/default';
|
31
32
|
}
|
@@ -55,12 +56,15 @@ async function connectWorkspaceToCloud(options, directory = workspace_root_1.wor
|
|
55
56
|
}
|
56
57
|
async function connectToNxCloudCommand(command) {
|
57
58
|
const nxJson = (0, configuration_1.readNxJson)();
|
59
|
+
const installationSource = process.env.NX_CONSOLE
|
60
|
+
? 'nx-console'
|
61
|
+
: 'nx-connect';
|
58
62
|
if ((0, nx_cloud_utils_1.isNxCloudUsed)(nxJson)) {
|
59
63
|
const token = process.env.NX_CLOUD_ACCESS_TOKEN || nxJson.nxCloudAccessToken;
|
60
64
|
if (!token) {
|
61
65
|
throw new Error(`Unable to authenticate. Either define accessToken in nx.json or set the NX_CLOUD_ACCESS_TOKEN env variable.`);
|
62
66
|
}
|
63
|
-
const connectCloudUrl = await (0, url_shorten_1.createNxCloudOnboardingURL)(
|
67
|
+
const connectCloudUrl = await (0, url_shorten_1.createNxCloudOnboardingURL)(installationSource, token);
|
64
68
|
output_1.output.log({
|
65
69
|
title: '✔ This workspace already has Nx Cloud set up',
|
66
70
|
bodyLines: [
|
@@ -73,7 +77,7 @@ async function connectToNxCloudCommand(command) {
|
|
73
77
|
return false;
|
74
78
|
}
|
75
79
|
const token = await connectWorkspaceToCloud({
|
76
|
-
installationSource: command ??
|
80
|
+
installationSource: command ?? installationSource,
|
77
81
|
});
|
78
82
|
const connectCloudUrl = await (0, url_shorten_1.createNxCloudOnboardingURL)('nx-connect', token);
|
79
83
|
try {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NxReleaseChangelogConfiguration } from '../../config/nx-json';
|
1
|
+
import { NxReleaseChangelogConfiguration, NxReleaseConfiguration } from '../../config/nx-json';
|
2
2
|
import { ChangelogOptions } from './command-object';
|
3
3
|
import { Reference } from './utils/git';
|
4
4
|
import { ReleaseVersion } from './utils/shared';
|
@@ -30,10 +30,5 @@ export interface ChangelogChange {
|
|
30
30
|
revertedHashes?: string[];
|
31
31
|
}
|
32
32
|
export declare const releaseChangelogCLIHandler: (args: ChangelogOptions) => Promise<number>;
|
33
|
-
|
34
|
-
* NOTE: This function is also exported for programmatic usage and forms part of the public API
|
35
|
-
* of Nx. We intentionally do not wrap the implementation with handleErrors because users need
|
36
|
-
* to have control over their own error handling when using the API.
|
37
|
-
*/
|
38
|
-
export declare function releaseChangelog(args: ChangelogOptions): Promise<NxReleaseChangelogResult>;
|
33
|
+
export declare function createAPI(overrideReleaseConfig: NxReleaseConfiguration): (args: ChangelogOptions) => Promise<NxReleaseChangelogResult>;
|
39
34
|
export declare function shouldCreateGitHubRelease(changelogConfig: NxReleaseChangelogConfiguration | false | undefined, createReleaseArg?: ChangelogOptions['createRelease'] | undefined): boolean;
|