nx 19.1.0-canary.20240524-12c6a73 → 19.2.0-canary.20240525-af463c4

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/.eslintrc.json CHANGED
@@ -100,8 +100,7 @@
100
100
  "events", // This is coming from @storybook/builder-manager since it uses the browser polyfill
101
101
  "process", // This is coming from @storybook/builder-manager since it uses the browser polyfill
102
102
  "prettier", // This is coming from @storybook/builder-manager since it uses the browser polyfill
103
- "util", // This is coming from @storybook/builder-manager since it uses the browser polyfill
104
- "js-yaml" // The rule is failing with alias dependencies
103
+ "util" // This is coming from @storybook/builder-manager since it uses the browser polyfill
105
104
  ]
106
105
  }
107
106
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "19.1.0-canary.20240524-12c6a73",
3
+ "version": "19.2.0-canary.20240525-af463c4",
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": {
@@ -39,6 +39,7 @@
39
39
  "dependencies": {
40
40
  "@yarnpkg/lockfile": "^1.1.0",
41
41
  "@yarnpkg/parsers": "3.0.0-rc.46",
42
+ "@zkochan/js-yaml": "0.0.7",
42
43
  "axios": "^1.6.0",
43
44
  "chalk": "^4.1.0",
44
45
  "cli-cursor": "3.1.0",
@@ -52,7 +53,6 @@
52
53
  "fs-extra": "^11.1.0",
53
54
  "ignore": "^5.0.4",
54
55
  "jest-diff": "^29.4.1",
55
- "js-yaml": "npm:@zkochan/js-yaml@0.0.7",
56
56
  "jsonc-parser": "3.2.0",
57
57
  "lines-and-columns": "~2.0.3",
58
58
  "minimatch": "9.0.3",
@@ -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.1.0-canary.20240524-12c6a73"
72
+ "@nrwl/tao": "19.2.0-canary.20240525-af463c4"
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.1.0-canary.20240524-12c6a73",
88
- "@nx/nx-darwin-arm64": "19.1.0-canary.20240524-12c6a73",
89
- "@nx/nx-linux-x64-gnu": "19.1.0-canary.20240524-12c6a73",
90
- "@nx/nx-linux-x64-musl": "19.1.0-canary.20240524-12c6a73",
91
- "@nx/nx-win32-x64-msvc": "19.1.0-canary.20240524-12c6a73",
92
- "@nx/nx-linux-arm64-gnu": "19.1.0-canary.20240524-12c6a73",
93
- "@nx/nx-linux-arm64-musl": "19.1.0-canary.20240524-12c6a73",
94
- "@nx/nx-linux-arm-gnueabihf": "19.1.0-canary.20240524-12c6a73",
95
- "@nx/nx-win32-arm64-msvc": "19.1.0-canary.20240524-12c6a73",
96
- "@nx/nx-freebsd-x64": "19.1.0-canary.20240524-12c6a73"
87
+ "@nx/nx-darwin-x64": "19.2.0-canary.20240525-af463c4",
88
+ "@nx/nx-darwin-arm64": "19.2.0-canary.20240525-af463c4",
89
+ "@nx/nx-linux-x64-gnu": "19.2.0-canary.20240525-af463c4",
90
+ "@nx/nx-linux-x64-musl": "19.2.0-canary.20240525-af463c4",
91
+ "@nx/nx-win32-x64-msvc": "19.2.0-canary.20240525-af463c4",
92
+ "@nx/nx-linux-arm64-gnu": "19.2.0-canary.20240525-af463c4",
93
+ "@nx/nx-linux-arm64-musl": "19.2.0-canary.20240525-af463c4",
94
+ "@nx/nx-linux-arm-gnueabihf": "19.2.0-canary.20240525-af463c4",
95
+ "@nx/nx-win32-arm64-msvc": "19.2.0-canary.20240525-af463c4",
96
+ "@nx/nx-freebsd-x64": "19.2.0-canary.20240525-af463c4"
97
97
  },
98
98
  "nx-migrations": {
99
99
  "migrations": "./migrations.json",
@@ -223,7 +223,7 @@ async function resolveGithubToken() {
223
223
  const ghCLIPath = (0, path_1.joinPathFragments)(process.env.XDG_CONFIG_HOME || (0, path_1.joinPathFragments)((0, node_os_1.homedir)(), '.config'), 'gh', 'hosts.yml');
224
224
  if ((0, node_fs_1.existsSync)(ghCLIPath)) {
225
225
  const yamlContents = await node_fs_1.promises.readFile(ghCLIPath, 'utf8');
226
- const { load } = require('js-yaml');
226
+ const { load } = require('@zkochan/js-yaml');
227
227
  const ghCLIConfig = load(yamlContents);
228
228
  if (ghCLIConfig['github.com']) {
229
229
  // Web based session (the token is already embedded in the config)
@@ -14,7 +14,7 @@ async function resetHandler() {
14
14
  await client_1.daemonClient.stop();
15
15
  output_1.output.log({ title: 'Daemon Server - Stopped' });
16
16
  try {
17
- (0, fs_extra_1.rmSync)(native_file_cache_location_1.nativeFileCacheLocation, { recursive: true, force: true });
17
+ (0, fs_extra_1.rmSync)((0, native_file_cache_location_1.getNativeFileCacheLocation)(), { recursive: true, force: true });
18
18
  }
19
19
  catch (e) {
20
20
  // ignore, deleting the native file cache is not critical and can fail if another process is locking the file
@@ -2,7 +2,7 @@ const { join, basename } = require('path');
2
2
  const { copyFileSync, existsSync, mkdirSync } = require('fs');
3
3
  const Module = require('module');
4
4
  const { nxVersion } = require('../utils/versions');
5
- const { nativeFileCacheLocation } = require('./native-file-cache-location');
5
+ const { getNativeFileCacheLocation } = require('./native-file-cache-location');
6
6
 
7
7
  const nxPackages = new Set([
8
8
  '@nx/nx-android-arm64',
@@ -54,6 +54,7 @@ Module._load = function (request, parent, isMain) {
54
54
  const fileName = basename(nativeLocation);
55
55
 
56
56
  // we copy the file to a workspace-scoped tmp directory and prefix with nxVersion to avoid stale files being loaded
57
+ const nativeFileCacheLocation = getNativeFileCacheLocation();
57
58
  const tmpFile = join(nativeFileCacheLocation, nxVersion + '-' + fileName);
58
59
  if (existsSync(tmpFile)) {
59
60
  return originalLoad.apply(this, [tmpFile, parent, isMain]);
@@ -1 +1 @@
1
- export declare const nativeFileCacheLocation: string;
1
+ export declare function getNativeFileCacheLocation(): string;
@@ -1,8 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nativeFileCacheLocation = void 0;
3
+ exports.getNativeFileCacheLocation = void 0;
4
4
  const os_1 = require("os");
5
5
  const path_1 = require("path");
6
6
  const crypto_1 = require("crypto");
7
7
  const workspace_root_1 = require("../utils/workspace-root");
8
- exports.nativeFileCacheLocation = (0, path_1.join)((0, os_1.tmpdir)(), 'nx-native-file-cache', (0, crypto_1.createHash)('sha256').update(workspace_root_1.workspaceRoot).digest('hex'));
8
+ function getNativeFileCacheLocation() {
9
+ if (process.env.NX_NATIVE_FILE_CACHE_DIRECTORY) {
10
+ return process.env.NX_NATIVE_FILE_CACHE_DIRECTORY;
11
+ }
12
+ else {
13
+ const shortHash = (0, crypto_1.createHash)('sha256')
14
+ .update((0, os_1.userInfo)().username)
15
+ .update(workspace_root_1.workspaceRoot)
16
+ .digest('hex')
17
+ .substring(0, 7);
18
+ return (0, path_1.join)((0, os_1.tmpdir)(), `nx-native-file-cache-${shortHash}`);
19
+ }
20
+ }
21
+ exports.getNativeFileCacheLocation = getNativeFileCacheLocation;
@@ -16,7 +16,7 @@ function loadPnpmHoistedDepsDefinition() {
16
16
  const fullPath = `${workspace_root_1.workspaceRoot}/node_modules/.modules.yaml`;
17
17
  if ((0, fs_1.existsSync)(fullPath)) {
18
18
  const content = (0, fs_1.readFileSync)(fullPath, 'utf-8');
19
- const { load } = require('js-yaml');
19
+ const { load } = require('@zkochan/js-yaml');
20
20
  return load(content)?.hoistedDependencies ?? {};
21
21
  }
22
22
  else {
@@ -32,7 +32,7 @@ exports.loadPnpmHoistedDepsDefinition = loadPnpmHoistedDepsDefinition;
32
32
  * https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/read.ts#L91
33
33
  */
34
34
  function parseAndNormalizePnpmLockfile(content) {
35
- const { load } = require('js-yaml');
35
+ const { load } = require('@zkochan/js-yaml');
36
36
  const lockFileData = load(content);
37
37
  return revertFromInlineSpecifiersFormatIfNecessary(convertFromLockfileFileMutable(lockFileData));
38
38
  }
@@ -77,7 +77,7 @@ function stringifyToPnpmYaml(lockfile) {
77
77
  const adaptedLockfile = isLockfileV6
78
78
  ? convertToInlineSpecifiersFormat(lockfile)
79
79
  : lockfile;
80
- const { dump } = require('js-yaml');
80
+ const { dump } = require('@zkochan/js-yaml');
81
81
  return dump(sortLockfileKeys(normalizeLockfile(adaptedLockfile, isLockfileV6)), LOCKFILE_YAML_FORMAT);
82
82
  }
83
83
  exports.stringifyToPnpmYaml = stringifyToPnpmYaml;
@@ -35,7 +35,7 @@ exports.readJsonFile = readJsonFile;
35
35
  */
36
36
  function readYamlFile(path, options) {
37
37
  const content = (0, fs_1.readFileSync)(path, 'utf-8');
38
- const { load } = require('js-yaml');
38
+ const { load } = require('@zkochan/js-yaml');
39
39
  return load(content, { ...options, filename: path });
40
40
  }
41
41
  exports.readYamlFile = readYamlFile;