nx 19.2.0-canary.20240528-7f11a1d → 19.2.0-canary.20240530-316dcb9
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.2.0-canary.
|
3
|
+
"version": "19.2.0-canary.20240530-316dcb9",
|
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": {
|
@@ -69,7 +69,7 @@
|
|
69
69
|
"yargs-parser": "21.1.1",
|
70
70
|
"node-machine-id": "1.1.12",
|
71
71
|
"ora": "5.3.0",
|
72
|
-
"@nrwl/tao": "19.2.0-canary.
|
72
|
+
"@nrwl/tao": "19.2.0-canary.20240530-316dcb9"
|
73
73
|
},
|
74
74
|
"peerDependencies": {
|
75
75
|
"@swc-node/register": "^1.8.0",
|
@@ -84,16 +84,16 @@
|
|
84
84
|
}
|
85
85
|
},
|
86
86
|
"optionalDependencies": {
|
87
|
-
"@nx/nx-darwin-x64": "19.2.0-canary.
|
88
|
-
"@nx/nx-darwin-arm64": "19.2.0-canary.
|
89
|
-
"@nx/nx-linux-x64-gnu": "19.2.0-canary.
|
90
|
-
"@nx/nx-linux-x64-musl": "19.2.0-canary.
|
91
|
-
"@nx/nx-win32-x64-msvc": "19.2.0-canary.
|
92
|
-
"@nx/nx-linux-arm64-gnu": "19.2.0-canary.
|
93
|
-
"@nx/nx-linux-arm64-musl": "19.2.0-canary.
|
94
|
-
"@nx/nx-linux-arm-gnueabihf": "19.2.0-canary.
|
95
|
-
"@nx/nx-win32-arm64-msvc": "19.2.0-canary.
|
96
|
-
"@nx/nx-freebsd-x64": "19.2.0-canary.
|
87
|
+
"@nx/nx-darwin-x64": "19.2.0-canary.20240530-316dcb9",
|
88
|
+
"@nx/nx-darwin-arm64": "19.2.0-canary.20240530-316dcb9",
|
89
|
+
"@nx/nx-linux-x64-gnu": "19.2.0-canary.20240530-316dcb9",
|
90
|
+
"@nx/nx-linux-x64-musl": "19.2.0-canary.20240530-316dcb9",
|
91
|
+
"@nx/nx-win32-x64-msvc": "19.2.0-canary.20240530-316dcb9",
|
92
|
+
"@nx/nx-linux-arm64-gnu": "19.2.0-canary.20240530-316dcb9",
|
93
|
+
"@nx/nx-linux-arm64-musl": "19.2.0-canary.20240530-316dcb9",
|
94
|
+
"@nx/nx-linux-arm-gnueabihf": "19.2.0-canary.20240530-316dcb9",
|
95
|
+
"@nx/nx-win32-arm64-msvc": "19.2.0-canary.20240530-316dcb9",
|
96
|
+
"@nx/nx-freebsd-x64": "19.2.0-canary.20240530-316dcb9"
|
97
97
|
},
|
98
98
|
"nx-migrations": {
|
99
99
|
"migrations": "./migrations.json",
|
@@ -23,3 +23,4 @@ export { retrieveProjectConfigurations } from './project-graph/utils/retrieve-wo
|
|
23
23
|
export { LoadedNxPlugin } from './project-graph/plugins/internal-api';
|
24
24
|
export * from './project-graph/error-types';
|
25
25
|
export { registerTsProject } from './plugins/js/utils/register';
|
26
|
+
export { interpolate } from './tasks-runner/utils';
|
package/src/devkit-internals.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.readProjectConfigurationsFromRootMap = exports.mergeTargetConfigurations = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0;
|
3
|
+
exports.interpolate = exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.readProjectConfigurationsFromRootMap = exports.mergeTargetConfigurations = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
/**
|
6
6
|
* Note to developers: STOP! These exports are available via requireNx in @nx/devkit.
|
@@ -47,3 +47,5 @@ Object.defineProperty(exports, "LoadedNxPlugin", { enumerable: true, get: functi
|
|
47
47
|
tslib_1.__exportStar(require("./project-graph/error-types"), exports);
|
48
48
|
var register_1 = require("./plugins/js/utils/register");
|
49
49
|
Object.defineProperty(exports, "registerTsProject", { enumerable: true, get: function () { return register_1.registerTsProject; } });
|
50
|
+
var utils_1 = require("./tasks-runner/utils");
|
51
|
+
Object.defineProperty(exports, "interpolate", { enumerable: true, get: function () { return utils_1.interpolate; } });
|
@@ -233,7 +233,7 @@ function getNodes(data, keyMap, isV5) {
|
|
233
233
|
function getHoistedVersion(hoistedDependencies, packageName, isV5) {
|
234
234
|
let version = (0, package_json_1.getHoistedPackageVersion)(packageName);
|
235
235
|
if (!version) {
|
236
|
-
const key = Object.keys(hoistedDependencies).find((k) => k.startsWith(
|
236
|
+
const key = Object.keys(hoistedDependencies).find((k) => k.startsWith(`/${packageName}/`));
|
237
237
|
if (key) {
|
238
238
|
version = parseBaseVersion(getVersion(key.slice(1), packageName), isV5);
|
239
239
|
}
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.unparse = exports.isCacheableTask = exports.shouldStreamOutput = exports.getSerializedArgsForTask = exports.getPrintableCommandArgsForTask = exports.getCliPath = exports.calculateReverseDeps = exports.removeIdsFromGraph = exports.removeTasksFromTaskGraph = exports.getCustomHasher = exports.getExecutorForTask = exports.getExecutorNameForTask = exports.getTargetConfigurationForTask = exports.interpolate = exports.getOutputsForTargetAndConfiguration = exports.transformLegacyOutputs = exports.validateOutputs = exports.getOutputs = exports.expandDependencyConfigSyntaxSugar = exports.getDependencyConfigs = void 0;
|
4
4
|
const output_1 = require("../utils/output");
|
5
5
|
const path_1 = require("path");
|
6
|
+
const posix_1 = require("path/posix");
|
6
7
|
const workspace_root_1 = require("../utils/workspace-root");
|
7
8
|
const path_2 = require("../utils/path");
|
8
9
|
const fileutils_1 = require("../utils/fileutils");
|
@@ -166,18 +167,32 @@ function getOutputsForTargetAndConfiguration(taskTargetOrTask, overridesOrNode,
|
|
166
167
|
}
|
167
168
|
}
|
168
169
|
exports.getOutputsForTargetAndConfiguration = getOutputsForTargetAndConfiguration;
|
170
|
+
/**
|
171
|
+
* Matches portions of a string which need to be interpolated.
|
172
|
+
* Matches anything within curly braces, excluding the braces.
|
173
|
+
*/
|
174
|
+
const replacementRegex = /{([\s\S]+?)}/g;
|
169
175
|
function interpolate(template, data) {
|
176
|
+
// Path is absolute or doesn't need interpolation
|
177
|
+
if (template.startsWith('/') || !replacementRegex.test(template)) {
|
178
|
+
return template;
|
179
|
+
}
|
170
180
|
if (template.includes('{workspaceRoot}', 1)) {
|
171
181
|
throw new Error(`Output '${template}' is invalid. {workspaceRoot} can only be used at the beginning of the expression.`);
|
172
182
|
}
|
173
183
|
if (data.projectRoot == '.' && template.includes('{projectRoot}', 1)) {
|
174
184
|
throw new Error(`Output '${template}' is invalid. When {projectRoot} is '.', it can only be used at the beginning of the expression.`);
|
175
185
|
}
|
176
|
-
|
186
|
+
const parts = template.split('/').map((s) => _interpolate(s, data));
|
187
|
+
return (0, posix_1.join)(...parts).replace('{workspaceRoot}/', '');
|
188
|
+
}
|
189
|
+
exports.interpolate = interpolate;
|
190
|
+
function _interpolate(template, data) {
|
191
|
+
let res = template;
|
177
192
|
if (data.projectRoot == '.') {
|
178
|
-
res = res.replace('{projectRoot}
|
193
|
+
res = res.replace('{projectRoot}', '');
|
179
194
|
}
|
180
|
-
return res.replace(
|
195
|
+
return res.replace(replacementRegex, (match) => {
|
181
196
|
let value = data;
|
182
197
|
let path = match.slice(1, -1).trim().split('.');
|
183
198
|
for (let idx = 0; idx < path.length; idx++) {
|
@@ -189,7 +204,6 @@ function interpolate(template, data) {
|
|
189
204
|
return value;
|
190
205
|
});
|
191
206
|
}
|
192
|
-
exports.interpolate = interpolate;
|
193
207
|
function getTargetConfigurationForTask(task, projectGraph) {
|
194
208
|
const project = projectGraph.nodes[task.target.project].data;
|
195
209
|
return project.targets[task.target.target];
|
package/src/utils/print-help.js
CHANGED
@@ -226,7 +226,7 @@ function generateLinkOutput({ pluginName, name, type, }) {
|
|
226
226
|
!pluginName.startsWith(nrwlPackagePrefix)) {
|
227
227
|
return '';
|
228
228
|
}
|
229
|
-
const link = `https://nx.dev/
|
229
|
+
const link = `https://nx.dev/nx-api/${pluginName.substring(pluginName.startsWith(nxPackagePrefix)
|
230
230
|
? nxPackagePrefix.length
|
231
231
|
: nrwlPackagePrefix.length)}/${type}/${name}`;
|
232
232
|
return `\n\n${chalk.dim('Find more information and examples at:')} ${chalk.bold(link)}`;
|