nx 19.1.0-canary.20240510-1a85787 → 19.1.0-canary.20240511-f7dcf43
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.1.0-canary.
|
3
|
+
"version": "19.1.0-canary.20240511-f7dcf43",
|
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": {
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"yargs-parser": "21.1.1",
|
67
67
|
"node-machine-id": "1.1.12",
|
68
68
|
"ora": "5.3.0",
|
69
|
-
"@nrwl/tao": "19.1.0-canary.
|
69
|
+
"@nrwl/tao": "19.1.0-canary.20240511-f7dcf43"
|
70
70
|
},
|
71
71
|
"peerDependencies": {
|
72
72
|
"@swc-node/register": "^1.8.0",
|
@@ -81,16 +81,16 @@
|
|
81
81
|
}
|
82
82
|
},
|
83
83
|
"optionalDependencies": {
|
84
|
-
"@nx/nx-darwin-x64": "19.1.0-canary.
|
85
|
-
"@nx/nx-darwin-arm64": "19.1.0-canary.
|
86
|
-
"@nx/nx-linux-x64-gnu": "19.1.0-canary.
|
87
|
-
"@nx/nx-linux-x64-musl": "19.1.0-canary.
|
88
|
-
"@nx/nx-win32-x64-msvc": "19.1.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "19.1.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-musl": "19.1.0-canary.
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "19.1.0-canary.
|
92
|
-
"@nx/nx-win32-arm64-msvc": "19.1.0-canary.
|
93
|
-
"@nx/nx-freebsd-x64": "19.1.0-canary.
|
84
|
+
"@nx/nx-darwin-x64": "19.1.0-canary.20240511-f7dcf43",
|
85
|
+
"@nx/nx-darwin-arm64": "19.1.0-canary.20240511-f7dcf43",
|
86
|
+
"@nx/nx-linux-x64-gnu": "19.1.0-canary.20240511-f7dcf43",
|
87
|
+
"@nx/nx-linux-x64-musl": "19.1.0-canary.20240511-f7dcf43",
|
88
|
+
"@nx/nx-win32-x64-msvc": "19.1.0-canary.20240511-f7dcf43",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "19.1.0-canary.20240511-f7dcf43",
|
90
|
+
"@nx/nx-linux-arm64-musl": "19.1.0-canary.20240511-f7dcf43",
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "19.1.0-canary.20240511-f7dcf43",
|
92
|
+
"@nx/nx-win32-arm64-msvc": "19.1.0-canary.20240511-f7dcf43",
|
93
|
+
"@nx/nx-freebsd-x64": "19.1.0-canary.20240511-f7dcf43"
|
94
94
|
},
|
95
95
|
"nx-migrations": {
|
96
96
|
"migrations": "./migrations.json",
|
@@ -9,12 +9,12 @@ import { LoadedNxPlugin } from '../plugins/internal-api';
|
|
9
9
|
* @param nxJson
|
10
10
|
*/
|
11
11
|
export declare function retrieveWorkspaceFiles(workspaceRoot: string, projectRootMap: Record<string, string>): Promise<{
|
12
|
-
allWorkspaceFiles: import("
|
12
|
+
allWorkspaceFiles: import("nx/src/devkit-exports").FileData[];
|
13
13
|
fileMap: {
|
14
14
|
projectFileMap: ProjectFiles;
|
15
|
-
nonProjectFiles: import("
|
15
|
+
nonProjectFiles: import("nx/src/native").FileData[];
|
16
16
|
};
|
17
|
-
rustReferences: import("
|
17
|
+
rustReferences: import("nx/src/native").NxWorkspaceFilesExternals;
|
18
18
|
}>;
|
19
19
|
/**
|
20
20
|
* Walk through the workspace and return `ProjectConfigurations`. Only use this if the projectFileMap is not needed.
|
package/src/utils/ab-testing.js
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.recordStat = exports.messages = exports.PromptMessages = void 0;
|
4
|
+
const node_child_process_1 = require("node:child_process");
|
4
5
|
const is_ci_1 = require("./is-ci");
|
6
|
+
const package_manager_1 = require("./package-manager");
|
5
7
|
const messageOptions = {
|
6
8
|
setupNxCloud: [
|
7
9
|
{
|
@@ -63,12 +65,9 @@ exports.messages = new PromptMessages();
|
|
63
65
|
*/
|
64
66
|
async function recordStat(opts) {
|
65
67
|
try {
|
66
|
-
|
67
|
-
|
68
|
-
console.log(`Record stat. Major: ${major}`);
|
68
|
+
if (!shouldRecordStats()) {
|
69
|
+
return;
|
69
70
|
}
|
70
|
-
if (major < 10 || major > 19)
|
71
|
-
return; // test version, skip it
|
72
71
|
const axios = require('axios');
|
73
72
|
await (axios['default'] ?? axios)
|
74
73
|
.create({
|
@@ -89,3 +88,16 @@ async function recordStat(opts) {
|
|
89
88
|
}
|
90
89
|
}
|
91
90
|
exports.recordStat = recordStat;
|
91
|
+
function shouldRecordStats() {
|
92
|
+
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
93
|
+
try {
|
94
|
+
const stdout = (0, node_child_process_1.execSync)(pmc.getRegistryUrl, { encoding: 'utf-8' });
|
95
|
+
const url = new URL(stdout.trim());
|
96
|
+
// don't record stats when testing locally
|
97
|
+
return url.hostname !== 'localhost';
|
98
|
+
}
|
99
|
+
catch {
|
100
|
+
// fallback to true if we can't detect the registry
|
101
|
+
return true;
|
102
|
+
}
|
103
|
+
}
|
@@ -76,6 +76,9 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
|
|
76
76
|
dlx: useBerry ? 'yarn dlx' : 'yarn',
|
77
77
|
run: (script, args) => `yarn ${script} ${args}`,
|
78
78
|
list: useBerry ? 'yarn info --name-only' : 'yarn list',
|
79
|
+
getRegistryUrl: useBerry
|
80
|
+
? 'yarn config get npmRegistryServer'
|
81
|
+
: 'yarn config get registry',
|
79
82
|
};
|
80
83
|
},
|
81
84
|
pnpm: () => {
|
@@ -96,6 +99,7 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
|
|
96
99
|
? `pnpm run ${script} -- ${args}`
|
97
100
|
: `pnpm run ${script} ${args}`,
|
98
101
|
list: 'pnpm ls --depth 100',
|
102
|
+
getRegistryUrl: 'pnpm config get registry',
|
99
103
|
};
|
100
104
|
},
|
101
105
|
npm: () => {
|
@@ -112,6 +116,7 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
|
|
112
116
|
dlx: 'npx',
|
113
117
|
run: (script, args) => `npm run ${script} -- ${args}`,
|
114
118
|
list: 'npm ls',
|
119
|
+
getRegistryUrl: 'npm config get registry',
|
115
120
|
};
|
116
121
|
},
|
117
122
|
};
|