chore(deps): update dependency nx to v20 (#3497)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
This commit is contained in:
renovate[bot] 2025-01-27 13:00:37 +00:00 коммит произвёл GitHub
Родитель 29208d92aa
Коммит e58018f242
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
6 изменённых файлов: 167 добавлений и 128 удалений

Просмотреть файл

@ -0,0 +1,2 @@
---
---

Просмотреть файл

@ -0,0 +1,23 @@
diff --git a/src/tasks-runner/default-tasks-runner.js b/src/tasks-runner/default-tasks-runner.js
index 56630f64624b0340fa59fc7e912f7a07a909bd1e..bc5d3f5adcf1519184b9ed54747e9858eeec41ba 100644
--- a/src/tasks-runner/default-tasks-runner.js
+++ b/src/tasks-runner/default-tasks-runner.js
@@ -54,16 +54,8 @@ class RemoteCacheV2 {
}
exports.RemoteCacheV2 = RemoteCacheV2;
const defaultTasksRunner = async (tasks, options, context) => {
- if (options['parallel'] === 'false' ||
- options['parallel'] === false) {
- options['parallel'] = 1;
- }
- else if (options['parallel'] === 'true' ||
- options['parallel'] === true ||
- options['parallel'] === undefined ||
- options['parallel'] === '') {
- options['parallel'] = Number(options['maxParallel'] || 3);
- }
+ const threads = require("os").availableParallelism();
+ options['parallel'] = process.env["CI"] ? threads : threads - 1;
await options.lifeCycle.startCommand();
try {
return await runAllTasks(tasks, options, context);

Просмотреть файл

@ -39,14 +39,6 @@
"cache": true
}
},
"tasksRunnerOptions": {
"default": {
"runner": "./scripts/nx-tasks-runner.cjs",
"options": {
"parallel": 0
}
}
},
"pluginsConfig": {
"@nx/js": {
"analyzeSourceFiles": false

Просмотреть файл

@ -40,7 +40,7 @@
"eslint": "^9.0.0",
"knip": "^5.30.2",
"metro": "^0.81.0",
"nx": "~19.8.0",
"nx": "patch:nx@npm%3A20.3.3#~/.yarn/patches/nx-npm-20.3.3-84b801f64d.patch",
"prettier": "^3.0.0",
"prettier-plugin-organize-imports": "^4.0.0",
"tsx": "^4.15.0",

Просмотреть файл

@ -1,23 +0,0 @@
"use strict";
/**
* @typedef {import("nx/src/tasks-runner/default-tasks-runner").DefaultTasksRunnerOptions} DefaultTasksRunnerOptions
* @typedef {import("nx/src/tasks-runner/tasks-runner").TasksRunner} TasksRunner
*
* @type {TasksRunner<DefaultTasksRunnerOptions>}
*/
module.exports = (tasks, options, context) => {
if (options.parallel === 0) {
const os = require("node:os");
const numCpus = os.availableParallelism?.() ?? os.cpus().length;
if (process.env["CI"]) {
options.parallel = Math.max(numCpus, 1);
console.log(`Using ${options.parallel} cores`);
} else {
// Don't use all cores to keep the computer somewhat responsive
options.parallel = Math.max(numCpus - 1, 1);
}
}
const { default: defaultTasksRunner } = require("nx/tasks-runners/default");
return defaultTasksRunner(tasks, options, context);
};

237
yarn.lock
Просмотреть файл

@ -2794,84 +2794,72 @@ __metadata:
languageName: node
linkType: hard
"@nrwl/tao@npm:19.8.14":
version: 19.8.14
resolution: "@nrwl/tao@npm:19.8.14"
dependencies:
nx: "npm:19.8.14"
tslib: "npm:^2.3.0"
bin:
tao: index.js
checksum: 10c0/863a28ab4746f5999a8049d5b86e3d7412c17608135b84513f37997874611672b06c61c026b06cbaa12e37016986c90601d82e65efe34e828414c69b159c4457
languageName: node
linkType: hard
"@nx/nx-darwin-arm64@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-darwin-arm64@npm:19.8.14"
"@nx/nx-darwin-arm64@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-darwin-arm64@npm:20.3.3"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@nx/nx-darwin-x64@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-darwin-x64@npm:19.8.14"
"@nx/nx-darwin-x64@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-darwin-x64@npm:20.3.3"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@nx/nx-freebsd-x64@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-freebsd-x64@npm:19.8.14"
"@nx/nx-freebsd-x64@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-freebsd-x64@npm:20.3.3"
conditions: os=freebsd & cpu=x64
languageName: node
linkType: hard
"@nx/nx-linux-arm-gnueabihf@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-linux-arm-gnueabihf@npm:19.8.14"
"@nx/nx-linux-arm-gnueabihf@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-linux-arm-gnueabihf@npm:20.3.3"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@nx/nx-linux-arm64-gnu@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-linux-arm64-gnu@npm:19.8.14"
"@nx/nx-linux-arm64-gnu@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-linux-arm64-gnu@npm:20.3.3"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@nx/nx-linux-arm64-musl@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-linux-arm64-musl@npm:19.8.14"
"@nx/nx-linux-arm64-musl@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-linux-arm64-musl@npm:20.3.3"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@nx/nx-linux-x64-gnu@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-linux-x64-gnu@npm:19.8.14"
"@nx/nx-linux-x64-gnu@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-linux-x64-gnu@npm:20.3.3"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@nx/nx-linux-x64-musl@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-linux-x64-musl@npm:19.8.14"
"@nx/nx-linux-x64-musl@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-linux-x64-musl@npm:20.3.3"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@nx/nx-win32-arm64-msvc@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-win32-arm64-msvc@npm:19.8.14"
"@nx/nx-win32-arm64-msvc@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-win32-arm64-msvc@npm:20.3.3"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@nx/nx-win32-x64-msvc@npm:19.8.14":
version: 19.8.14
resolution: "@nx/nx-win32-x64-msvc@npm:19.8.14"
"@nx/nx-win32-x64-msvc@npm:20.3.3":
version: 20.3.3
resolution: "@nx/nx-win32-x64-msvc@npm:20.3.3"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
@ -5231,13 +5219,13 @@ __metadata:
languageName: node
linkType: hard
"@yarnpkg/parsers@npm:3.0.0-rc.46":
version: 3.0.0-rc.46
resolution: "@yarnpkg/parsers@npm:3.0.0-rc.46"
"@yarnpkg/parsers@npm:3.0.2":
version: 3.0.2
resolution: "@yarnpkg/parsers@npm:3.0.2"
dependencies:
js-yaml: "npm:^3.10.0"
tslib: "npm:^2.4.0"
checksum: 10c0/c7f421c6885142f351459031c093fb2e79abcce6f4a89765a10e600bb7ab122949c54bcea2b23de9572a2b34ba29f822b17831c1c43ba50373ceb8cb5b336667
checksum: 10c0/a0c340e13129643162423d7e666061c0b39b143bfad3fc5a74c7d92a30fd740f6665d41cd4e61832c20375889d793eea1d1d103cacb39ed68f7acd168add8c53
languageName: node
linkType: hard
@ -6802,13 +6790,6 @@ __metadata:
languageName: node
linkType: hard
"duplexer@npm:^0.1.1":
version: 0.1.2
resolution: "duplexer@npm:0.1.2"
checksum: 10c0/c57bcd4bdf7e623abab2df43a7b5b23d18152154529d166c1e0da6bee341d84c432d157d7e97b32fecb1bf3a8b8857dd85ed81a915789f550637ed25b8e64fc2
languageName: node
linkType: hard
"eastasianwidth@npm:^0.2.0":
version: 0.2.0
resolution: "eastasianwidth@npm:0.2.0"
@ -10938,24 +10919,23 @@ __metadata:
languageName: node
linkType: hard
"nx@npm:19.8.14, nx@npm:~19.8.0":
version: 19.8.14
resolution: "nx@npm:19.8.14"
"nx@npm:20.3.3":
version: 20.3.3
resolution: "nx@npm:20.3.3"
dependencies:
"@napi-rs/wasm-runtime": "npm:0.2.4"
"@nrwl/tao": "npm:19.8.14"
"@nx/nx-darwin-arm64": "npm:19.8.14"
"@nx/nx-darwin-x64": "npm:19.8.14"
"@nx/nx-freebsd-x64": "npm:19.8.14"
"@nx/nx-linux-arm-gnueabihf": "npm:19.8.14"
"@nx/nx-linux-arm64-gnu": "npm:19.8.14"
"@nx/nx-linux-arm64-musl": "npm:19.8.14"
"@nx/nx-linux-x64-gnu": "npm:19.8.14"
"@nx/nx-linux-x64-musl": "npm:19.8.14"
"@nx/nx-win32-arm64-msvc": "npm:19.8.14"
"@nx/nx-win32-x64-msvc": "npm:19.8.14"
"@nx/nx-darwin-arm64": "npm:20.3.3"
"@nx/nx-darwin-x64": "npm:20.3.3"
"@nx/nx-freebsd-x64": "npm:20.3.3"
"@nx/nx-linux-arm-gnueabihf": "npm:20.3.3"
"@nx/nx-linux-arm64-gnu": "npm:20.3.3"
"@nx/nx-linux-arm64-musl": "npm:20.3.3"
"@nx/nx-linux-x64-gnu": "npm:20.3.3"
"@nx/nx-linux-x64-musl": "npm:20.3.3"
"@nx/nx-win32-arm64-msvc": "npm:20.3.3"
"@nx/nx-win32-x64-msvc": "npm:20.3.3"
"@yarnpkg/lockfile": "npm:^1.1.0"
"@yarnpkg/parsers": "npm:3.0.0-rc.46"
"@yarnpkg/parsers": "npm:3.0.2"
"@zkochan/js-yaml": "npm:0.0.7"
axios: "npm:^1.7.4"
chalk: "npm:^4.1.0"
@ -10977,13 +10957,14 @@ __metadata:
npm-run-path: "npm:^4.0.1"
open: "npm:^8.4.0"
ora: "npm:5.3.0"
resolve.exports: "npm:2.0.3"
semver: "npm:^7.5.3"
string-width: "npm:^4.2.3"
strong-log-transformer: "npm:^2.1.0"
tar-stream: "npm:~2.2.0"
tmp: "npm:~0.2.1"
tsconfig-paths: "npm:^4.1.2"
tslib: "npm:^2.3.0"
yaml: "npm:^2.6.0"
yargs: "npm:^17.6.2"
yargs-parser: "npm:21.1.1"
peerDependencies:
@ -11018,7 +10999,91 @@ __metadata:
bin:
nx: bin/nx.js
nx-cloud: bin/nx-cloud.js
checksum: 10c0/3bc8b33b341054875a9ddbd9da63d001504948e1e4c7e707c138c939c52ea0269d6bc436aa3b9cf66c315177c626974d8f9322d19a5c1deceb4aa6faaaf67309
checksum: 10c0/72bd639082e0bd8c839e53f4276f72693bcb71613fb235ee732c44412458b9e59b332d0a64751521e54360ac6622af3591eaab26132d1c702ef5863e2355ace1
languageName: node
linkType: hard
"nx@patch:nx@npm%3A20.3.3#~/.yarn/patches/nx-npm-20.3.3-84b801f64d.patch":
version: 20.3.3
resolution: "nx@patch:nx@npm%3A20.3.3#~/.yarn/patches/nx-npm-20.3.3-84b801f64d.patch::version=20.3.3&hash=e2a4cf"
dependencies:
"@napi-rs/wasm-runtime": "npm:0.2.4"
"@nx/nx-darwin-arm64": "npm:20.3.3"
"@nx/nx-darwin-x64": "npm:20.3.3"
"@nx/nx-freebsd-x64": "npm:20.3.3"
"@nx/nx-linux-arm-gnueabihf": "npm:20.3.3"
"@nx/nx-linux-arm64-gnu": "npm:20.3.3"
"@nx/nx-linux-arm64-musl": "npm:20.3.3"
"@nx/nx-linux-x64-gnu": "npm:20.3.3"
"@nx/nx-linux-x64-musl": "npm:20.3.3"
"@nx/nx-win32-arm64-msvc": "npm:20.3.3"
"@nx/nx-win32-x64-msvc": "npm:20.3.3"
"@yarnpkg/lockfile": "npm:^1.1.0"
"@yarnpkg/parsers": "npm:3.0.2"
"@zkochan/js-yaml": "npm:0.0.7"
axios: "npm:^1.7.4"
chalk: "npm:^4.1.0"
cli-cursor: "npm:3.1.0"
cli-spinners: "npm:2.6.1"
cliui: "npm:^8.0.1"
dotenv: "npm:~16.4.5"
dotenv-expand: "npm:~11.0.6"
enquirer: "npm:~2.3.6"
figures: "npm:3.2.0"
flat: "npm:^5.0.2"
front-matter: "npm:^4.0.2"
ignore: "npm:^5.0.4"
jest-diff: "npm:^29.4.1"
jsonc-parser: "npm:3.2.0"
lines-and-columns: "npm:2.0.3"
minimatch: "npm:9.0.3"
node-machine-id: "npm:1.1.12"
npm-run-path: "npm:^4.0.1"
open: "npm:^8.4.0"
ora: "npm:5.3.0"
resolve.exports: "npm:2.0.3"
semver: "npm:^7.5.3"
string-width: "npm:^4.2.3"
tar-stream: "npm:~2.2.0"
tmp: "npm:~0.2.1"
tsconfig-paths: "npm:^4.1.2"
tslib: "npm:^2.3.0"
yaml: "npm:^2.6.0"
yargs: "npm:^17.6.2"
yargs-parser: "npm:21.1.1"
peerDependencies:
"@swc-node/register": ^1.8.0
"@swc/core": ^1.3.85
dependenciesMeta:
"@nx/nx-darwin-arm64":
optional: true
"@nx/nx-darwin-x64":
optional: true
"@nx/nx-freebsd-x64":
optional: true
"@nx/nx-linux-arm-gnueabihf":
optional: true
"@nx/nx-linux-arm64-gnu":
optional: true
"@nx/nx-linux-arm64-musl":
optional: true
"@nx/nx-linux-x64-gnu":
optional: true
"@nx/nx-linux-x64-musl":
optional: true
"@nx/nx-win32-arm64-msvc":
optional: true
"@nx/nx-win32-x64-msvc":
optional: true
peerDependenciesMeta:
"@swc-node/register":
optional: true
"@swc/core":
optional: true
bin:
nx: bin/nx.js
nx-cloud: bin/nx-cloud.js
checksum: 10c0/d1e975cbf947500c846ecef354f5ab0ab836b3a98df7ceca219d15fb7f8651d81e819c479550598527468abb24e7422713753a14979282dca8c7decd966e6414
languageName: node
linkType: hard
@ -12380,10 +12445,10 @@ __metadata:
languageName: node
linkType: hard
"resolve.exports@npm:^2.0.0":
version: 2.0.2
resolution: "resolve.exports@npm:2.0.2"
checksum: 10c0/cc4cffdc25447cf34730f388dca5021156ba9302a3bad3d7f168e790dc74b2827dff603f1bc6ad3d299bac269828dca96dd77e036dc9fba6a2a1807c47ab5c98
"resolve.exports@npm:2.0.3, resolve.exports@npm:^2.0.0":
version: 2.0.3
resolution: "resolve.exports@npm:2.0.3"
checksum: 10c0/1ade1493f4642a6267d0a5e68faeac20b3d220f18c28b140343feb83694d8fed7a286852aef43689d16042c61e2ddb270be6578ad4a13990769e12065191200d
languageName: node
linkType: hard
@ -12489,7 +12554,7 @@ __metadata:
eslint: "npm:^9.0.0"
knip: "npm:^5.30.2"
metro: "npm:^0.81.0"
nx: "npm:~19.8.0"
nx: "patch:nx@npm%3A20.3.3#~/.yarn/patches/nx-npm-20.3.3-84b801f64d.patch"
prettier: "npm:^3.0.0"
prettier-plugin-organize-imports: "npm:^4.0.0"
tsx: "npm:^4.15.0"
@ -13288,19 +13353,6 @@ __metadata:
languageName: node
linkType: hard
"strong-log-transformer@npm:^2.1.0":
version: 2.1.0
resolution: "strong-log-transformer@npm:2.1.0"
dependencies:
duplexer: "npm:^0.1.1"
minimist: "npm:^1.2.0"
through: "npm:^2.3.4"
bin:
sl-log-transformer: bin/sl-log-transformer.js
checksum: 10c0/3c3b8aa8f34d661910563ff996412e2f527fc814e699a376854b554d4a4294ab7e285b4e2c08a080a7b19c5600a9b93a98798d3ac600fe3de545ca6605c07829
languageName: node
linkType: hard
"sudo-prompt@npm:^9.0.0":
version: 9.2.1
resolution: "sudo-prompt@npm:9.2.1"
@ -13464,13 +13516,6 @@ __metadata:
languageName: node
linkType: hard
"through@npm:^2.3.4":
version: 2.3.8
resolution: "through@npm:2.3.8"
checksum: 10c0/4b09f3774099de0d4df26d95c5821a62faee32c7e96fb1f4ebd54a2d7c11c57fe88b0a0d49cf375de5fee5ae6bf4eb56dbbf29d07366864e2ee805349970d3cc
languageName: node
linkType: hard
"tmp@npm:^0.0.33":
version: 0.0.33
resolution: "tmp@npm:0.0.33"
@ -14245,7 +14290,7 @@ __metadata:
languageName: node
linkType: hard
"yaml@npm:^2.2.1, yaml@npm:^2.6.1":
"yaml@npm:^2.2.1, yaml@npm:^2.6.0, yaml@npm:^2.6.1":
version: 2.7.0
resolution: "yaml@npm:2.7.0"
bin: