Comparing version 19.5.1 to 19.6.0-canary.20240719-83b88a1
{ | ||
"name": "nx", | ||
"version": "19.5.1", | ||
"version": "19.6.0-canary.20240719-83b88a1", | ||
"private": false, | ||
@@ -74,3 +74,3 @@ "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", | ||
"ora": "5.3.0", | ||
"@nrwl/tao": "19.5.1" | ||
"@nrwl/tao": "19.6.0-canary.20240719-83b88a1" | ||
}, | ||
@@ -90,12 +90,12 @@ "peerDependencies": { | ||
"optionalDependencies": { | ||
"@nx/nx-darwin-x64": "19.5.1", | ||
"@nx/nx-darwin-arm64": "19.5.1", | ||
"@nx/nx-linux-x64-gnu": "19.5.1", | ||
"@nx/nx-linux-x64-musl": "19.5.1", | ||
"@nx/nx-win32-x64-msvc": "19.5.1", | ||
"@nx/nx-linux-arm64-gnu": "19.5.1", | ||
"@nx/nx-linux-arm64-musl": "19.5.1", | ||
"@nx/nx-linux-arm-gnueabihf": "19.5.1", | ||
"@nx/nx-win32-arm64-msvc": "19.5.1", | ||
"@nx/nx-freebsd-x64": "19.5.1" | ||
"@nx/nx-darwin-x64": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-darwin-arm64": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-linux-x64-gnu": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-linux-x64-musl": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-win32-x64-msvc": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-linux-arm64-gnu": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-linux-arm64-musl": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-linux-arm-gnueabihf": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-win32-arm64-msvc": "19.6.0-canary.20240719-83b88a1", | ||
"@nx/nx-freebsd-x64": "19.6.0-canary.20240719-83b88a1" | ||
}, | ||
@@ -102,0 +102,0 @@ "nx-migrations": { |
@@ -802,4 +802,6 @@ "use strict"; | ||
} | ||
readExecutorsJson(nodeModule, builder) { | ||
const { json: packageJson, path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(nodeModule, this.projects, this.root ? [this.root, __dirname] : [__dirname]); | ||
readExecutorsJson(nodeModule, builder, extraRequirePaths = []) { | ||
const { json: packageJson, path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(nodeModule, this.projects, this.root | ||
? [this.root, __dirname, ...extraRequirePaths] | ||
: [__dirname, ...extraRequirePaths]); | ||
const executorsFile = packageJson.executors ?? packageJson.builders; | ||
@@ -809,3 +811,4 @@ if (!executorsFile) { | ||
} | ||
const executorsFilePath = require.resolve((0, path_1.join)((0, path_1.dirname)(packageJsonPath), executorsFile)); | ||
const basePath = (0, path_1.dirname)(packageJsonPath); | ||
const executorsFilePath = require.resolve((0, path_1.join)(basePath, executorsFile)); | ||
const executorsJson = (0, fileutils_1.readJsonFile)(executorsFilePath); | ||
@@ -819,3 +822,3 @@ const executorConfig = executorsJson.builders?.[builder] ?? executorsJson.executors?.[builder]; | ||
const [packageName, executorName] = executorConfig.split(':'); | ||
return this.readExecutorsJson(packageName, executorName); | ||
return this.readExecutorsJson(packageName, executorName, [basePath]); | ||
} | ||
@@ -822,0 +825,0 @@ return { executorsFilePath, executorConfig, isNgCompat: true }; |
@@ -56,6 +56,12 @@ "use strict"; | ||
} | ||
function readExecutorJson(nodeModule, executor, root, projects) { | ||
function readExecutorJson(nodeModule, executor, root, projects, extraRequirePaths = []) { | ||
const { json: packageJson, path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(nodeModule, projects, root | ||
? [root, __dirname, process.cwd(), ...(0, installation_directory_1.getNxRequirePaths)()] | ||
: [__dirname, process.cwd(), ...(0, installation_directory_1.getNxRequirePaths)()]); | ||
? [ | ||
root, | ||
__dirname, | ||
process.cwd(), | ||
...(0, installation_directory_1.getNxRequirePaths)(), | ||
...extraRequirePaths, | ||
] | ||
: [__dirname, process.cwd(), ...(0, installation_directory_1.getNxRequirePaths)(), ...extraRequirePaths]); | ||
const executorsFile = packageJson.executors ?? packageJson.builders; | ||
@@ -65,3 +71,4 @@ if (!executorsFile) { | ||
} | ||
const executorsFilePath = require.resolve((0, path_1.join)((0, path_1.dirname)(packageJsonPath), executorsFile)); | ||
const basePath = (0, path_1.dirname)(packageJsonPath); | ||
const executorsFilePath = require.resolve((0, path_1.join)(basePath, executorsFile)); | ||
const executorsJson = (0, fileutils_1.readJsonFile)(executorsFilePath); | ||
@@ -75,3 +82,5 @@ const executorConfig = executorsJson.executors?.[executor] || executorsJson.builders?.[executor]; | ||
const [packageName, executorName] = executorConfig.split(':'); | ||
return readExecutorJson(packageName, executorName, root, projects); | ||
return readExecutorJson(packageName, executorName, root, projects, [ | ||
basePath, | ||
]); | ||
} | ||
@@ -78,0 +87,0 @@ const isNgCompat = !executorsJson.executors?.[executor]; |
@@ -117,3 +117,3 @@ "use strict"; | ||
bodyLines.push(''); | ||
bodyLines.push(...Object.keys(plugin.executors).map((name) => `${chalk.bold(name)} : ${resolveExecutorDescription(plugin.executors[name], projects)}`)); | ||
bodyLines.push(...Object.keys(plugin.executors).map((name) => `${chalk.bold(name)} : ${resolveExecutorDescription(pluginName, plugin.executors[name], projects)}`)); | ||
} | ||
@@ -131,3 +131,3 @@ if (hasProjectGraphExtension) { | ||
} | ||
function resolveExecutorDescription(executorJsonEntry, projects) { | ||
function resolveExecutorDescription(pluginName, executorJsonEntry, projects, requirePaths = (0, installation_directory_1.getNxRequirePaths)(workspace_root_1.workspaceRoot)) { | ||
try { | ||
@@ -137,4 +137,11 @@ if (typeof executorJsonEntry === 'string') { | ||
const [pkgName, executor] = executorJsonEntry.split(':'); | ||
const collection = loadExecutorsCollection(workspace_root_1.workspaceRoot, pkgName, projects); | ||
return resolveExecutorDescription(collection[executor], projects); | ||
// read the package.json of the parent plugin | ||
const { path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(pluginName, projects, requirePaths); | ||
// accumulate the require paths to resolve nested packages | ||
const cummulativeRequirePaths = [ | ||
...requirePaths, | ||
(0, path_1.dirname)(packageJsonPath), | ||
]; | ||
const collection = loadExecutorsCollection(pkgName, projects, cummulativeRequirePaths); | ||
return resolveExecutorDescription(pkgName, collection[executor], projects, cummulativeRequirePaths); | ||
} | ||
@@ -147,4 +154,4 @@ return executorJsonEntry.description; | ||
} | ||
function loadExecutorsCollection(workspaceRoot, pluginName, projects) { | ||
const { json: packageJson, path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(pluginName, projects, (0, installation_directory_1.getNxRequirePaths)(workspaceRoot)); | ||
function loadExecutorsCollection(pluginName, projects, requirePaths) { | ||
const { json: packageJson, path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(pluginName, projects, requirePaths); | ||
return { | ||
@@ -151,0 +158,0 @@ ...tryGetCollection(packageJsonPath, packageJson.builders, 'builders'), |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7164752
49014
1
+ Added@nrwl/tao@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-darwin-arm64@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-darwin-x64@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-freebsd-x64@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-linux-arm-gnueabihf@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-linux-arm64-gnu@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-linux-arm64-musl@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-linux-x64-gnu@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-linux-x64-musl@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-win32-arm64-msvc@19.6.0-canary.20240719-83b88a1(transitive)
+ Added@nx/nx-win32-x64-msvc@19.6.0-canary.20240719-83b88a1(transitive)
- Removed@nrwl/tao@19.5.1(transitive)
- Removed@nx/nx-darwin-arm64@19.5.1(transitive)
- Removed@nx/nx-darwin-x64@19.5.1(transitive)
- Removed@nx/nx-freebsd-x64@19.5.1(transitive)
- Removed@nx/nx-linux-arm-gnueabihf@19.5.1(transitive)
- Removed@nx/nx-linux-arm64-gnu@19.5.1(transitive)
- Removed@nx/nx-linux-arm64-musl@19.5.1(transitive)
- Removed@nx/nx-linux-x64-gnu@19.5.1(transitive)
- Removed@nx/nx-linux-x64-musl@19.5.1(transitive)
- Removed@nx/nx-win32-arm64-msvc@19.5.1(transitive)
- Removed@nx/nx-win32-x64-msvc@19.5.1(transitive)