nx 24.1.0-beta.1 → 24.1.0-beta.2

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.
Files changed (48) hide show
  1. package/dist/src/command-line/release/utils/repository-git-tags.js +3 -3
  2. package/dist/src/command-line/reset/reset.js +51 -2
  3. package/dist/src/daemon/client/daemon-environment.js +15 -0
  4. package/dist/src/devkit-internals.d.ts +3 -3
  5. package/dist/src/devkit-internals.js +6 -3
  6. package/dist/src/generators/utils/glob.js +3 -3
  7. package/dist/src/hasher/hash-task.d.ts +3 -1
  8. package/dist/src/hasher/hash-task.js +3 -2
  9. package/dist/src/native/index.d.ts +0 -4
  10. package/dist/src/native/index.js +13 -0
  11. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  12. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  13. package/dist/src/plugins/js/index.js +24 -9
  14. package/dist/src/plugins/js/lock-file/bun-parser.d.ts +74 -2
  15. package/dist/src/plugins/js/lock-file/bun-parser.js +971 -139
  16. package/dist/src/plugins/js/lock-file/lock-file.d.ts +32 -12
  17. package/dist/src/plugins/js/lock-file/lock-file.js +189 -43
  18. package/dist/src/plugins/js/lock-file/npm-parser.d.ts +1 -0
  19. package/dist/src/plugins/js/lock-file/npm-parser.js +66 -2
  20. package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +5 -1
  21. package/dist/src/plugins/js/lock-file/pnpm-parser.js +107 -54
  22. package/dist/src/plugins/js/lock-file/pruned-output.d.ts +52 -10
  23. package/dist/src/plugins/js/lock-file/pruned-output.js +132 -66
  24. package/dist/src/plugins/js/lock-file/utils/local-path-hashes.d.ts +27 -0
  25. package/dist/src/plugins/js/lock-file/utils/local-path-hashes.js +155 -0
  26. package/dist/src/plugins/js/lock-file/utils/package-json.d.ts +1 -1
  27. package/dist/src/plugins/js/lock-file/utils/package-json.js +2 -1
  28. package/dist/src/plugins/js/package-json/create-package-json.d.ts +1 -0
  29. package/dist/src/plugins/js/package-json/create-package-json.js +197 -8
  30. package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +1 -1
  31. package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +2 -2
  32. package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +16 -9
  33. package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +17 -28
  34. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +47 -1
  35. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +261 -15
  36. package/dist/src/project-graph/error-types.d.ts +2 -2
  37. package/dist/src/project-graph/error-types.js +2 -2
  38. package/dist/src/tasks-runner/init-tasks-runner.js +23 -17
  39. package/dist/src/tasks-runner/task-orchestrator.js +16 -2
  40. package/dist/src/tasks-runner/tasks-schedule.js +1 -1
  41. package/dist/src/tasks-runner/utils.d.ts +2 -1
  42. package/dist/src/tasks-runner/utils.js +2 -1
  43. package/dist/src/utils/find-matching-projects.js +7 -9
  44. package/dist/src/utils/handle-import.js +8 -2
  45. package/dist/src/utils/json.js +5 -0
  46. package/dist/src/utils/package-json.d.ts +7 -0
  47. package/dist/src/utils/package-json.js +9 -0
  48. package/package.json +13 -12
@@ -66,6 +66,8 @@ export interface PackageJson {
66
66
  };
67
67
  overrides?: PackageOverride;
68
68
  allowScripts?: Record<string, boolean>;
69
+ trustedDependencies?: string[];
70
+ patchedDependencies?: Record<string, string>;
69
71
  bin?: Record<string, string> | string;
70
72
  workspaces?: string[] | {
71
73
  packages: string[];
@@ -260,4 +262,9 @@ export declare function getDependencyVersionFromPackageJson(tree: Tree, packageN
260
262
  export declare function getDependencyVersionFromPackageJson(tree: Tree, packageName: string, packageJson?: PackageJson, dependencyLookup?: PackageJsonDependencySection[]): string | null;
261
263
  export declare function getDependencyVersionFromPackageJson(packageName: string, workspaceRootPath?: string, packageJsonPath?: string, dependencyLookup?: PackageJsonDependencySection[]): string | null;
262
264
  export declare function getDependencyVersionFromPackageJson(packageName: string, workspaceRootPath?: string, packageJson?: PackageJson, dependencyLookup?: PackageJsonDependencySection[]): string | null;
265
+ /**
266
+ * Whether a local dependency path names a tarball rather than a directory, by
267
+ * the rule npm and Bun share: a `.tgz`, `.tar.gz` or `.tar` suffix in any case.
268
+ */
269
+ export declare function isTarballPath(path: string): boolean;
263
270
  export {};
@@ -12,6 +12,7 @@ exports.resolveWithoutCachePollution = resolveWithoutCachePollution;
12
12
  exports.installPackageToTmp = installPackageToTmp;
13
13
  exports.installPackageToTmpAsync = installPackageToTmpAsync;
14
14
  exports.getDependencyVersionFromPackageJson = getDependencyVersionFromPackageJson;
15
+ exports.isTarballPath = isTarballPath;
15
16
  const tslib_1 = require("tslib");
16
17
  const child_process_1 = require("child_process");
17
18
  const util_1 = require("util");
@@ -468,6 +469,14 @@ function getDependencyVersionFromPackageJsonFromFileSystem(packageName, root = w
468
469
  }
469
470
  return version;
470
471
  }
472
+ const TARBALL_PATH = /\.(?:tgz|tar\.gz|tar)$/i;
473
+ /**
474
+ * Whether a local dependency path names a tarball rather than a directory, by
475
+ * the rule npm and Bun share: a `.tgz`, `.tar.gz` or `.tar` suffix in any case.
476
+ */
477
+ function isTarballPath(path) {
478
+ return TARBALL_PATH.test(path);
479
+ }
471
480
  /**
472
481
  * Generates necessary files needed for the package manager to work
473
482
  * and for the node_modules to be accessible.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "24.1.0-beta.1",
3
+ "version": "24.1.0-beta.2",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
@@ -53,6 +53,7 @@
53
53
  "@emnapi/core": "1.4.5",
54
54
  "@emnapi/runtime": "1.4.5",
55
55
  "@emnapi/wasi-threads": "1.0.4",
56
+ "@isaacs/nonrecursive-glob-match": "1.1.0",
56
57
  "@jest/diff-sequences": "30.3.0",
57
58
  "@napi-rs/wasm-runtime": "0.2.4",
58
59
  "@tybys/wasm-util": "0.9.0",
@@ -100,7 +101,7 @@
100
101
  "lines-and-columns": "2.0.3",
101
102
  "log-symbols": "4.1.0",
102
103
  "mimic-fn": "2.1.0",
103
- "minimatch": "10.2.5",
104
+ "minimatch": "11.0.8",
104
105
  "minimist": "1.2.8",
105
106
  "npm-run-path": "4.0.1",
106
107
  "once": "1.4.0",
@@ -150,16 +151,16 @@
150
151
  }
151
152
  },
152
153
  "optionalDependencies": {
153
- "@nx/nx-darwin-arm64": "24.1.0-beta.1",
154
- "@nx/nx-darwin-x64": "24.1.0-beta.1",
155
- "@nx/nx-freebsd-x64": "24.1.0-beta.1",
156
- "@nx/nx-linux-arm-gnueabihf": "24.1.0-beta.1",
157
- "@nx/nx-linux-arm64-gnu": "24.1.0-beta.1",
158
- "@nx/nx-linux-arm64-musl": "24.1.0-beta.1",
159
- "@nx/nx-linux-x64-gnu": "24.1.0-beta.1",
160
- "@nx/nx-linux-x64-musl": "24.1.0-beta.1",
161
- "@nx/nx-win32-arm64-msvc": "24.1.0-beta.1",
162
- "@nx/nx-win32-x64-msvc": "24.1.0-beta.1"
154
+ "@nx/nx-darwin-arm64": "24.1.0-beta.2",
155
+ "@nx/nx-darwin-x64": "24.1.0-beta.2",
156
+ "@nx/nx-freebsd-x64": "24.1.0-beta.2",
157
+ "@nx/nx-linux-arm-gnueabihf": "24.1.0-beta.2",
158
+ "@nx/nx-linux-arm64-gnu": "24.1.0-beta.2",
159
+ "@nx/nx-linux-arm64-musl": "24.1.0-beta.2",
160
+ "@nx/nx-linux-x64-gnu": "24.1.0-beta.2",
161
+ "@nx/nx-linux-x64-musl": "24.1.0-beta.2",
162
+ "@nx/nx-win32-arm64-msvc": "24.1.0-beta.2",
163
+ "@nx/nx-win32-x64-msvc": "24.1.0-beta.2"
163
164
  },
164
165
  "nx-migrations": {
165
166
  "migrations": "./migrations.json",