nx 19.6.0-canary.20240725-3890edc → 19.6.0-canary.20240727-efa59fa

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "19.6.0-canary.20240725-3890edc",
3
+ "version": "19.6.0-canary.20240727-efa59fa",
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": {
@@ -41,7 +41,7 @@
41
41
  "@yarnpkg/lockfile": "^1.1.0",
42
42
  "@yarnpkg/parsers": "3.0.0-rc.46",
43
43
  "@zkochan/js-yaml": "0.0.7",
44
- "axios": "^1.6.0",
44
+ "axios": "^1.7.2",
45
45
  "chalk": "^4.1.0",
46
46
  "cli-cursor": "3.1.0",
47
47
  "cli-spinners": "2.6.1",
@@ -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.6.0-canary.20240725-3890edc"
74
+ "@nrwl/tao": "19.6.0-canary.20240727-efa59fa"
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.6.0-canary.20240725-3890edc",
90
- "@nx/nx-darwin-arm64": "19.6.0-canary.20240725-3890edc",
91
- "@nx/nx-linux-x64-gnu": "19.6.0-canary.20240725-3890edc",
92
- "@nx/nx-linux-x64-musl": "19.6.0-canary.20240725-3890edc",
93
- "@nx/nx-win32-x64-msvc": "19.6.0-canary.20240725-3890edc",
94
- "@nx/nx-linux-arm64-gnu": "19.6.0-canary.20240725-3890edc",
95
- "@nx/nx-linux-arm64-musl": "19.6.0-canary.20240725-3890edc",
96
- "@nx/nx-linux-arm-gnueabihf": "19.6.0-canary.20240725-3890edc",
97
- "@nx/nx-win32-arm64-msvc": "19.6.0-canary.20240725-3890edc",
98
- "@nx/nx-freebsd-x64": "19.6.0-canary.20240725-3890edc"
89
+ "@nx/nx-darwin-x64": "19.6.0-canary.20240727-efa59fa",
90
+ "@nx/nx-darwin-arm64": "19.6.0-canary.20240727-efa59fa",
91
+ "@nx/nx-linux-x64-gnu": "19.6.0-canary.20240727-efa59fa",
92
+ "@nx/nx-linux-x64-musl": "19.6.0-canary.20240727-efa59fa",
93
+ "@nx/nx-win32-x64-msvc": "19.6.0-canary.20240727-efa59fa",
94
+ "@nx/nx-linux-arm64-gnu": "19.6.0-canary.20240727-efa59fa",
95
+ "@nx/nx-linux-arm64-musl": "19.6.0-canary.20240727-efa59fa",
96
+ "@nx/nx-linux-arm-gnueabihf": "19.6.0-canary.20240727-efa59fa",
97
+ "@nx/nx-win32-arm64-msvc": "19.6.0-canary.20240727-efa59fa",
98
+ "@nx/nx-freebsd-x64": "19.6.0-canary.20240727-efa59fa"
99
99
  },
100
100
  "nx-migrations": {
101
101
  "migrations": "./migrations.json",
@@ -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: false,
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');
@@ -311,6 +311,10 @@ exports.examples = {
311
311
  command: 'show projects --projects api-*',
312
312
  description: 'Show all projects with names starting with "api-". The "projects" option is useful to see which projects would be selected by run-many',
313
313
  },
314
+ {
315
+ command: 'show projects --projects tag:ui-*',
316
+ description: 'Show all projects with a tag starting with "ui-". The "projects" option is useful to see which projects would be selected by run-many',
317
+ },
314
318
  {
315
319
  command: 'show projects --with-target serve',
316
320
  description: 'Show all projects with a serve target',
@@ -30,6 +30,7 @@ const child_process_2 = require("../../utils/child-process");
30
30
  const client_1 = require("../../daemon/client/client");
31
31
  const nx_cloud_utils_1 = require("../../utils/nx-cloud-utils");
32
32
  const project_graph_1 = require("../../project-graph/project-graph");
33
+ const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
33
34
  const execAsync = (0, util_1.promisify)(child_process_1.exec);
34
35
  function normalizeVersion(version) {
35
36
  const [semver, ...prereleaseTagParts] = version.split('-');
@@ -669,10 +670,10 @@ function readPackageMigrationConfig(packageName, dir) {
669
670
  };
670
671
  }
671
672
  }
672
- function createMigrationsFile(root, migrations) {
673
- (0, fileutils_1.writeJsonFile)((0, path_1.join)(root, 'migrations.json'), { migrations });
673
+ async function createMigrationsFile(root, migrations) {
674
+ await writeFormattedJsonFile((0, path_1.join)(root, 'migrations.json'), { migrations });
674
675
  }
675
- function updatePackageJson(root, updatedPackages) {
676
+ async function updatePackageJson(root, updatedPackages) {
676
677
  const packageJsonPath = (0, path_1.join)(root, 'package.json');
677
678
  if (!(0, fs_1.existsSync)(packageJsonPath)) {
678
679
  return;
@@ -694,7 +695,7 @@ function updatePackageJson(root, updatedPackages) {
694
695
  json[dependencyType][p] = updatedPackages[p].version;
695
696
  }
696
697
  });
697
- (0, fileutils_1.writeJsonFile)(packageJsonPath, json, {
698
+ await writeFormattedJsonFile(packageJsonPath, json, {
698
699
  appendNewLine: parseOptions.endsWithNewline,
699
700
  });
700
701
  }
@@ -719,7 +720,7 @@ async function updateInstallationDetails(root, updatedPackages) {
719
720
  }
720
721
  }
721
722
  }
722
- (0, fileutils_1.writeJsonFile)(nxJsonPath, nxJson, {
723
+ await writeFormattedJsonFile(nxJsonPath, nxJson, {
723
724
  appendNewLine: parseOptions.endsWithNewline,
724
725
  });
725
726
  }
@@ -765,10 +766,10 @@ async function generateMigrationsJsonAndUpdatePackageJson(root, opts) {
765
766
  excludeAppliedMigrations: opts.excludeAppliedMigrations,
766
767
  });
767
768
  const { migrations, packageUpdates, minVersionWithSkippedUpdates } = await migrator.migrate(opts.targetPackage, opts.targetVersion);
768
- updatePackageJson(root, packageUpdates);
769
+ await updatePackageJson(root, packageUpdates);
769
770
  await updateInstallationDetails(root, packageUpdates);
770
771
  if (migrations.length > 0) {
771
- createMigrationsFile(root, [
772
+ await createMigrationsFile(root, [
772
773
  ...addSplitConfigurationMigrationIfAvailable(from, packageUpdates),
773
774
  ...migrations,
774
775
  ]);
@@ -835,6 +836,17 @@ async function generateMigrationsJsonAndUpdatePackageJson(root, opts) {
835
836
  throw e;
836
837
  }
837
838
  }
839
+ async function writeFormattedJsonFile(filePath, content, options) {
840
+ const formattedContent = await (0, format_changed_files_with_prettier_if_available_1.formatFilesWithPrettierIfAvailable)([{ path: filePath, content: JSON.stringify(content) }], workspace_root_1.workspaceRoot, { silent: true });
841
+ if (formattedContent.has(filePath)) {
842
+ (0, fs_1.writeFileSync)(filePath, formattedContent.get(filePath), {
843
+ encoding: 'utf-8',
844
+ });
845
+ }
846
+ else {
847
+ (0, fileutils_1.writeJsonFile)(filePath, content, options);
848
+ }
849
+ }
838
850
  function addSplitConfigurationMigrationIfAvailable(from, packageJson) {
839
851
  if (!packageJson['@nrwl/workspace'])
840
852
  return [];
@@ -48,7 +48,9 @@ async function releasePublish(args, isCLI = false) {
48
48
  * If the user is filtering to a subset of projects or groups, we should not run the publish task
49
49
  * for dependencies, because that could cause projects outset of the filtered set to be published.
50
50
  */
51
- const shouldExcludeTaskDependencies = _args.projects?.length > 0 || _args.groups?.length > 0;
51
+ const shouldExcludeTaskDependencies = _args.projects?.length > 0 ||
52
+ _args.groups?.length > 0 ||
53
+ args.excludeTaskDependencies;
52
54
  let overallExitStatus = 0;
53
55
  if (args.projects?.length) {
54
56
  /**
@@ -31,6 +31,7 @@ export interface ReportData {
31
31
  migrateTarget: string;
32
32
  };
33
33
  projectGraphError?: Error | null;
34
+ nativeTarget: string | null;
34
35
  }
35
36
  export declare function getReportData(): Promise<ReportData>;
36
37
  interface OutOfSyncPackageGroup {
@@ -43,14 +43,18 @@ const LINE_SEPARATOR = '---------------------------------------';
43
43
  *
44
44
  */
45
45
  async function reportHandler() {
46
- const { pm, pmVersion, localPlugins, communityPlugins, registeredPlugins, packageVersionsWeCareAbout, outOfSyncPackageGroup, projectGraphError, } = await getReportData();
47
- const bodyLines = [
48
- `Node : ${process.versions.node}`,
49
- `OS : ${process.platform}-${process.arch}`,
50
- `${pm.padEnd(7)}: ${pmVersion}`,
51
- ``,
46
+ const { pm, pmVersion, localPlugins, communityPlugins, registeredPlugins, packageVersionsWeCareAbout, outOfSyncPackageGroup, projectGraphError, nativeTarget, } = await getReportData();
47
+ const fields = [
48
+ ['Node', process.versions.node],
49
+ ['OS', `${process.platform}-${process.arch}`],
50
+ ['Native Target', nativeTarget ?? 'Unavailable'],
51
+ [pm, pmVersion],
52
52
  ];
53
- let padding = Math.max(...packageVersionsWeCareAbout.map((x) => x.package.length)) + 1;
53
+ let padding = Math.max(...fields.map((f) => f[0].length));
54
+ const bodyLines = fields.map(([field, value]) => `${field.padEnd(padding)} : ${value}`);
55
+ bodyLines.push('');
56
+ padding =
57
+ Math.max(...packageVersionsWeCareAbout.map((x) => x.package.length)) + 1;
54
58
  packageVersionsWeCareAbout.forEach((p) => {
55
59
  bodyLines.push(`${chalk.green(p.package.padEnd(padding))} : ${chalk.bold(p.version)}`);
56
60
  });
@@ -116,6 +120,7 @@ async function getReportData() {
116
120
  });
117
121
  }
118
122
  const outOfSyncPackageGroup = findMisalignedPackagesForPackage(nxPackageJson);
123
+ const native = isNativeAvailable();
119
124
  return {
120
125
  pm,
121
126
  pmVersion,
@@ -125,6 +130,7 @@ async function getReportData() {
125
130
  packageVersionsWeCareAbout,
126
131
  outOfSyncPackageGroup,
127
132
  projectGraphError,
133
+ nativeTarget: native ? native.getBinaryTarget() : null,
128
134
  };
129
135
  }
130
136
  async function tryGetProjectGraph() {
@@ -248,8 +254,7 @@ function findInstalledPackagesWeCareAbout() {
248
254
  }
249
255
  function isNativeAvailable() {
250
256
  try {
251
- require('../../native');
252
- return true;
257
+ return require('../../native');
253
258
  }
254
259
  catch {
255
260
  return false;
@@ -14,7 +14,7 @@ const calculate_default_project_name_1 = require("../../config/calculate-default
14
14
  const workspace_configuration_check_1 = require("../../utils/workspace-configuration-check");
15
15
  const graph_1 = require("../graph/graph");
16
16
  async function runOne(cwd, args, extraTargetDependencies = {}, extraOptions = {
17
- excludeTaskDependencies: false,
17
+ excludeTaskDependencies: args.excludeTaskDependencies,
18
18
  loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false',
19
19
  }) {
20
20
  perf_hooks_1.performance.mark('code-loading:end');
@@ -15,7 +15,7 @@ const find_matching_projects_1 = require("../../utils/find-matching-projects");
15
15
  const workspace_configuration_check_1 = require("../../utils/workspace-configuration-check");
16
16
  const graph_1 = require("../graph/graph");
17
17
  async function runMany(args, extraTargetDependencies = {}, extraOptions = {
18
- excludeTaskDependencies: false,
18
+ excludeTaskDependencies: args.excludeTaskDependencies,
19
19
  loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false',
20
20
  }) {
21
21
  perf_hooks_1.performance.mark('code-loading:end');
@@ -18,6 +18,7 @@ export interface RunOptions {
18
18
  dte: boolean;
19
19
  batch: boolean;
20
20
  useAgents: boolean;
21
+ excludeTaskDependencies: boolean;
21
22
  }
22
23
  export declare function withRunOptions<T>(yargs: Argv<T>): Argv<T & RunOptions>;
23
24
  export declare function withTargetAndConfigurationOption(yargs: Argv, demandOption?: boolean): Argv<{
@@ -66,6 +66,11 @@ function withRunOptions(yargs) {
66
66
  describe: 'Rerun the tasks even when the results are available in the cache',
67
67
  type: 'boolean',
68
68
  default: false,
69
+ })
70
+ .options('excludeTaskDependencies', {
71
+ describe: 'Skips running dependent tasks first',
72
+ type: 'boolean',
73
+ default: false,
69
74
  })
70
75
  .options('cloud', {
71
76
  type: 'boolean',
@@ -36,8 +36,10 @@ const recursiveResolveDeps = (projectGraph, projectName, resolved) => {
36
36
  };
37
37
  function createCommandGraph(projectGraph, projectNames, nxArgs) {
38
38
  const dependencies = {};
39
- for (const projectName of projectNames) {
40
- recursiveResolveDeps(projectGraph, projectName, dependencies);
39
+ if (!nxArgs.excludeTaskDependencies) {
40
+ for (const projectName of projectNames) {
41
+ recursiveResolveDeps(projectGraph, projectName, dependencies);
42
+ }
41
43
  }
42
44
  const roots = Object.keys(dependencies).filter((d) => dependencies[d].length === 0);
43
45
  const commandGraph = {
@@ -6,3 +6,9 @@ import type { Tree } from '../tree';
6
6
  export declare function formatChangedFilesWithPrettierIfAvailable(tree: Tree, options?: {
7
7
  silent?: boolean;
8
8
  }): Promise<void>;
9
+ export declare function formatFilesWithPrettierIfAvailable(files: {
10
+ path: string;
11
+ content: string | Buffer;
12
+ }[], root: string, options?: {
13
+ silent?: boolean;
14
+ }): Promise<Map<string, string>>;
@@ -1,23 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.formatChangedFilesWithPrettierIfAvailable = formatChangedFilesWithPrettierIfAvailable;
4
+ exports.formatFilesWithPrettierIfAvailable = formatFilesWithPrettierIfAvailable;
4
5
  const path = require("path");
5
6
  /**
6
7
  * Formats all the created or updated files using Prettier
7
8
  * @param tree - the file system tree
8
9
  */
9
10
  async function formatChangedFilesWithPrettierIfAvailable(tree, options) {
11
+ const files = new Set(tree.listChanges().filter((file) => file.type !== 'DELETE'));
12
+ const results = await formatFilesWithPrettierIfAvailable(Array.from(files), tree.root, options);
13
+ for (const [path, content] of results) {
14
+ tree.write(path, content);
15
+ }
16
+ }
17
+ async function formatFilesWithPrettierIfAvailable(files, root, options) {
18
+ const results = new Map();
10
19
  let prettier;
11
20
  try {
12
21
  prettier = await Promise.resolve().then(() => require('prettier'));
13
22
  }
14
23
  catch { }
15
- if (!prettier)
16
- return;
17
- const files = new Set(tree.listChanges().filter((file) => file.type !== 'DELETE'));
24
+ if (!prettier) {
25
+ return results;
26
+ }
18
27
  await Promise.all(Array.from(files).map(async (file) => {
19
28
  try {
20
- const systemPath = path.join(tree.root, file.path);
29
+ const systemPath = path.join(root, file.path);
21
30
  let options = {
22
31
  filepath: systemPath,
23
32
  };
@@ -35,7 +44,7 @@ async function formatChangedFilesWithPrettierIfAvailable(tree, options) {
35
44
  if (support.ignored || !support.inferredParser) {
36
45
  return;
37
46
  }
38
- tree.write(file.path,
47
+ results.set(file.path,
39
48
  // In prettier v3 the format result is a promise
40
49
  await prettier.format(file.content.toString('utf-8'), options));
41
50
  }
@@ -45,4 +54,5 @@ async function formatChangedFilesWithPrettierIfAvailable(tree, options) {
45
54
  }
46
55
  }
47
56
  }));
57
+ return results;
48
58
  }
@@ -17,10 +17,10 @@ const workspace_context_1 = require("../../utils/workspace-context");
17
17
  const output_1 = require("../../utils/output");
18
18
  const path_2 = require("../../utils/path");
19
19
  const json_1 = require("./json");
20
- const nx_json_1 = require("./nx-json");
21
- var nx_json_2 = require("./nx-json");
22
- Object.defineProperty(exports, "readNxJson", { enumerable: true, get: function () { return nx_json_2.readNxJson; } });
23
- Object.defineProperty(exports, "updateNxJson", { enumerable: true, get: function () { return nx_json_2.updateNxJson; } });
20
+ const to_project_name_1 = require("../../config/to-project-name");
21
+ var nx_json_1 = require("./nx-json");
22
+ Object.defineProperty(exports, "readNxJson", { enumerable: true, get: function () { return nx_json_1.readNxJson; } });
23
+ Object.defineProperty(exports, "updateNxJson", { enumerable: true, get: function () { return nx_json_1.updateNxJson; } });
24
24
  /**
25
25
  * Adds project configuration to the Nx workspace.
26
26
  *
@@ -56,10 +56,35 @@ function addProjectConfiguration(tree, projectName, projectConfiguration, standa
56
56
  * @param projectConfiguration - project configuration
57
57
  */
58
58
  function updateProjectConfiguration(tree, projectName, projectConfiguration) {
59
- const projectConfigFile = (0, path_2.joinPathFragments)(projectConfiguration.root, 'project.json');
60
- if (!tree.exists(projectConfigFile)) {
59
+ if (tree.exists((0, path_2.joinPathFragments)(projectConfiguration.root, 'project.json'))) {
60
+ updateProjectConfigurationInProjectJson(tree, projectName, projectConfiguration);
61
+ }
62
+ else if (tree.exists((0, path_2.joinPathFragments)(projectConfiguration.root, 'package.json'))) {
63
+ updateProjectConfigurationInPackageJson(tree, projectName, projectConfiguration);
64
+ }
65
+ else {
61
66
  throw new Error(`Cannot update Project ${projectName} at ${projectConfiguration.root}. It either doesn't exist yet, or may not use project.json for configuration. Use \`addProjectConfiguration()\` instead if you want to create a new project.`);
62
67
  }
68
+ }
69
+ function updateProjectConfigurationInPackageJson(tree, projectName, projectConfiguration) {
70
+ const packageJsonFile = (0, path_2.joinPathFragments)(projectConfiguration.root, 'package.json');
71
+ const packageJson = (0, json_1.readJson)(tree, packageJsonFile);
72
+ if (packageJson.name === projectConfiguration.name ?? projectName) {
73
+ delete projectConfiguration.name;
74
+ }
75
+ if (projectConfiguration.targets &&
76
+ !Object.keys(projectConfiguration.targets).length) {
77
+ delete projectConfiguration.targets;
78
+ }
79
+ packageJson.nx = {
80
+ ...packageJson.nx,
81
+ ...projectConfiguration,
82
+ root: undefined,
83
+ };
84
+ (0, json_1.writeJson)(tree, packageJsonFile, packageJson);
85
+ }
86
+ function updateProjectConfigurationInProjectJson(tree, projectName, projectConfiguration) {
87
+ const projectConfigFile = (0, path_2.joinPathFragments)(projectConfiguration.root, 'project.json');
63
88
  handleEmptyTargets(projectName, projectConfiguration);
64
89
  (0, json_1.writeJson)(tree, projectConfigFile, {
65
90
  name: projectConfiguration.name ?? projectName,
@@ -147,15 +172,20 @@ function readAndCombineAllProjectConfigurations(tree) {
147
172
  }
148
173
  else if ((0, path_1.basename)(projectFile) === 'package.json') {
149
174
  const packageJson = (0, json_1.readJson)(tree, projectFile);
150
- const config = (0, package_json_1.buildProjectConfigurationFromPackageJson)(packageJson, tree.root, projectFile, (0, nx_json_1.readNxJson)(tree));
175
+ // We don't want to have all of the extra inferred stuff in here, as
176
+ // when generators update the project they shouldn't inline that stuff.
177
+ // so rather than using `buildProjectFromPackageJson` and stripping it out
178
+ // we are going to build the config manually.
179
+ const config = {
180
+ root: (0, path_1.dirname)(projectFile),
181
+ name: packageJson.name ?? (0, to_project_name_1.toProjectName)(projectFile),
182
+ ...packageJson.nx,
183
+ };
151
184
  if (!rootMap[config.root]) {
152
185
  (0, project_configuration_utils_1.mergeProjectConfigurationIntoRootMap)(rootMap,
153
186
  // Inferred targets, tags, etc don't show up when running generators
154
187
  // This is to help avoid running into issues when trying to update the workspace
155
- {
156
- name: config.name,
157
- root: config.root,
158
- }, undefined, undefined, true);
188
+ config, undefined, undefined, true);
159
189
  }
160
190
  }
161
191
  }
@@ -116,6 +116,8 @@ export interface FileSetInput {
116
116
 
117
117
  export declare export function findImports(projectFileMap: Record<string, Array<string>>): Array<ImportResult>
118
118
 
119
+ export declare export function getBinaryTarget(): string
120
+
119
121
  /**
120
122
  * Expands the given outputs into a list of existing files.
121
123
  * This is used when hashing outputs
@@ -372,6 +372,7 @@ module.exports.copy = nativeBinding.copy
372
372
  module.exports.EventType = nativeBinding.EventType
373
373
  module.exports.expandOutputs = nativeBinding.expandOutputs
374
374
  module.exports.findImports = nativeBinding.findImports
375
+ module.exports.getBinaryTarget = nativeBinding.getBinaryTarget
375
376
  module.exports.getFilesForOutputs = nativeBinding.getFilesForOutputs
376
377
  module.exports.hashArray = nativeBinding.hashArray
377
378
  module.exports.hashFile = nativeBinding.hashFile
@@ -88,39 +88,40 @@ function __napi_rs_initialize_modules(__napiInstance) {
88
88
  __napiInstance.exports['__napi_register__copy_3']?.()
89
89
  __napiInstance.exports['__napi_register__hash_array_4']?.()
90
90
  __napiInstance.exports['__napi_register__hash_file_5']?.()
91
- __napiInstance.exports['__napi_register__ImportResult_struct_6']?.()
92
- __napiInstance.exports['__napi_register__find_imports_7']?.()
93
- __napiInstance.exports['__napi_register__transfer_project_graph_8']?.()
94
- __napiInstance.exports['__napi_register__ExternalNode_struct_9']?.()
95
- __napiInstance.exports['__napi_register__Target_struct_10']?.()
96
- __napiInstance.exports['__napi_register__Project_struct_11']?.()
97
- __napiInstance.exports['__napi_register__ProjectGraph_struct_12']?.()
98
- __napiInstance.exports['__napi_register__HashPlanner_struct_13']?.()
99
- __napiInstance.exports['__napi_register__HashPlanner_impl_17']?.()
100
- __napiInstance.exports['__napi_register__HashDetails_struct_18']?.()
101
- __napiInstance.exports['__napi_register__HasherOptions_struct_19']?.()
102
- __napiInstance.exports['__napi_register__TaskHasher_struct_20']?.()
103
- __napiInstance.exports['__napi_register__TaskHasher_impl_23']?.()
104
- __napiInstance.exports['__napi_register__Task_struct_24']?.()
105
- __napiInstance.exports['__napi_register__TaskTarget_struct_25']?.()
106
- __napiInstance.exports['__napi_register__TaskGraph_struct_26']?.()
107
- __napiInstance.exports['__napi_register__FileData_struct_27']?.()
108
- __napiInstance.exports['__napi_register__InputsInput_struct_28']?.()
109
- __napiInstance.exports['__napi_register__FileSetInput_struct_29']?.()
110
- __napiInstance.exports['__napi_register__RuntimeInput_struct_30']?.()
111
- __napiInstance.exports['__napi_register__EnvironmentInput_struct_31']?.()
112
- __napiInstance.exports['__napi_register__ExternalDependenciesInput_struct_32']?.()
113
- __napiInstance.exports['__napi_register__DepsOutputsInput_struct_33']?.()
114
- __napiInstance.exports['__napi_register__NxJson_struct_34']?.()
115
- __napiInstance.exports['__napi_register__WorkspaceContext_struct_35']?.()
116
- __napiInstance.exports['__napi_register__WorkspaceContext_impl_44']?.()
117
- __napiInstance.exports['__napi_register__WorkspaceErrors_45']?.()
118
- __napiInstance.exports['__napi_register__NxWorkspaceFiles_struct_46']?.()
119
- __napiInstance.exports['__napi_register__NxWorkspaceFilesExternals_struct_47']?.()
120
- __napiInstance.exports['__napi_register__UpdatedWorkspaceFiles_struct_48']?.()
121
- __napiInstance.exports['__napi_register__FileMap_struct_49']?.()
122
- __napiInstance.exports['__napi_register____test_only_transfer_file_map_50']?.()
123
- __napiInstance.exports['__napi_register__IS_WASM_51']?.()
91
+ __napiInstance.exports['__napi_register__IS_WASM_6']?.()
92
+ __napiInstance.exports['__napi_register__get_binary_target_7']?.()
93
+ __napiInstance.exports['__napi_register__ImportResult_struct_8']?.()
94
+ __napiInstance.exports['__napi_register__find_imports_9']?.()
95
+ __napiInstance.exports['__napi_register__transfer_project_graph_10']?.()
96
+ __napiInstance.exports['__napi_register__ExternalNode_struct_11']?.()
97
+ __napiInstance.exports['__napi_register__Target_struct_12']?.()
98
+ __napiInstance.exports['__napi_register__Project_struct_13']?.()
99
+ __napiInstance.exports['__napi_register__ProjectGraph_struct_14']?.()
100
+ __napiInstance.exports['__napi_register__HashPlanner_struct_15']?.()
101
+ __napiInstance.exports['__napi_register__HashPlanner_impl_19']?.()
102
+ __napiInstance.exports['__napi_register__HashDetails_struct_20']?.()
103
+ __napiInstance.exports['__napi_register__HasherOptions_struct_21']?.()
104
+ __napiInstance.exports['__napi_register__TaskHasher_struct_22']?.()
105
+ __napiInstance.exports['__napi_register__TaskHasher_impl_25']?.()
106
+ __napiInstance.exports['__napi_register__Task_struct_26']?.()
107
+ __napiInstance.exports['__napi_register__TaskTarget_struct_27']?.()
108
+ __napiInstance.exports['__napi_register__TaskGraph_struct_28']?.()
109
+ __napiInstance.exports['__napi_register__FileData_struct_29']?.()
110
+ __napiInstance.exports['__napi_register__InputsInput_struct_30']?.()
111
+ __napiInstance.exports['__napi_register__FileSetInput_struct_31']?.()
112
+ __napiInstance.exports['__napi_register__RuntimeInput_struct_32']?.()
113
+ __napiInstance.exports['__napi_register__EnvironmentInput_struct_33']?.()
114
+ __napiInstance.exports['__napi_register__ExternalDependenciesInput_struct_34']?.()
115
+ __napiInstance.exports['__napi_register__DepsOutputsInput_struct_35']?.()
116
+ __napiInstance.exports['__napi_register__NxJson_struct_36']?.()
117
+ __napiInstance.exports['__napi_register__WorkspaceContext_struct_37']?.()
118
+ __napiInstance.exports['__napi_register__WorkspaceContext_impl_46']?.()
119
+ __napiInstance.exports['__napi_register__WorkspaceErrors_47']?.()
120
+ __napiInstance.exports['__napi_register__NxWorkspaceFiles_struct_48']?.()
121
+ __napiInstance.exports['__napi_register__NxWorkspaceFilesExternals_struct_49']?.()
122
+ __napiInstance.exports['__napi_register__UpdatedWorkspaceFiles_struct_50']?.()
123
+ __napiInstance.exports['__napi_register__FileMap_struct_51']?.()
124
+ __napiInstance.exports['__napi_register____test_only_transfer_file_map_52']?.()
124
125
  }
125
126
  module.exports.HashPlanner = __napiModule.exports.HashPlanner
126
127
  module.exports.ImportResult = __napiModule.exports.ImportResult
@@ -129,6 +130,7 @@ module.exports.WorkspaceContext = __napiModule.exports.WorkspaceContext
129
130
  module.exports.copy = __napiModule.exports.copy
130
131
  module.exports.expandOutputs = __napiModule.exports.expandOutputs
131
132
  module.exports.findImports = __napiModule.exports.findImports
133
+ module.exports.getBinaryTarget = __napiModule.exports.getBinaryTarget
132
134
  module.exports.getFilesForOutputs = __napiModule.exports.getFilesForOutputs
133
135
  module.exports.hashArray = __napiModule.exports.hashArray
134
136
  module.exports.hashFile = __napiModule.exports.hashFile
Binary file
@@ -8,6 +8,7 @@ exports.unloadDotEnvFile = unloadDotEnvFile;
8
8
  const dotenv_1 = require("dotenv");
9
9
  const dotenv_expand_1 = require("dotenv-expand");
10
10
  const workspace_root_1 = require("../utils/workspace-root");
11
+ const node_path_1 = require("node:path");
11
12
  function getEnvVariablesForBatchProcess(skipNxCache, captureStderr) {
12
13
  return {
13
14
  // User Process Env Variables override Dotenv Variables
@@ -158,13 +159,13 @@ function getEnvFilesForTask(task) {
158
159
  function loadDotEnvFilesForTask(task, environmentVariables) {
159
160
  const dotEnvFiles = getEnvFilesForTask(task);
160
161
  for (const file of dotEnvFiles) {
161
- loadAndExpandDotEnvFile(file, environmentVariables);
162
+ loadAndExpandDotEnvFile((0, node_path_1.join)(workspace_root_1.workspaceRoot, file), environmentVariables);
162
163
  }
163
164
  return environmentVariables;
164
165
  }
165
166
  function unloadDotEnvFiles(environmentVariables) {
166
167
  for (const file of ['.env', '.local.env', '.env.local']) {
167
- unloadDotEnvFile(file, environmentVariables);
168
+ unloadDotEnvFile((0, node_path_1.join)(workspace_root_1.workspaceRoot, file), environmentVariables);
168
169
  }
169
170
  return environmentVariables;
170
171
  }
@@ -29,6 +29,7 @@ export interface NxArgs {
29
29
  nxIgnoreCycles?: boolean;
30
30
  type?: string;
31
31
  batch?: boolean;
32
+ excludeTaskDependencies?: boolean;
32
33
  }
33
34
  export declare function createOverrides(__overrides_unparsed__?: string[]): Record<string, any>;
34
35
  export declare function splitArgsIntoNxArgsAndOverrides(args: {
@@ -1,13 +1,6 @@
1
- import { InputDefinition, ProjectMetadata, TargetConfiguration } from '../config/workspace-json-project-json';
1
+ import { ProjectConfiguration, ProjectMetadata, TargetConfiguration } from '../config/workspace-json-project-json';
2
2
  import { PackageManagerCommands } from './package-manager';
3
- export interface NxProjectPackageJsonConfiguration {
4
- name?: string;
5
- implicitDependencies?: string[];
6
- tags?: string[];
7
- namedInputs?: {
8
- [inputName: string]: (string | InputDefinition)[];
9
- };
10
- targets?: Record<string, TargetConfiguration>;
3
+ export interface NxProjectPackageJsonConfiguration extends Partial<ProjectConfiguration> {
11
4
  includedScripts?: string[];
12
5
  }
13
6
  export type ArrayPackageGroup = {