diff --git a/exec/build-modules/src/index.ts b/exec/build-modules/src/index.ts index b5e2fd4d07..041b45e4c8 100644 --- a/exec/build-modules/src/index.ts +++ b/exec/build-modules/src/index.ts @@ -20,7 +20,7 @@ import { } from '@pnpm/types' import pDefer, { type DeferredPromise } from 'p-defer' import { pickBy } from 'ramda' -import runGroups from 'run-groups' +import { runGroups } from 'run-groups' import { buildSequence, type DependenciesGraph, type DependenciesGraphNode } from './buildSequence.js' export type { DepsStateCache } @@ -94,7 +94,7 @@ export async function buildModules ( } ) }) - await runGroups.default(getWorkspaceConcurrency(opts.childConcurrency), groups) + await runGroups(getWorkspaceConcurrency(opts.childConcurrency), groups) if (opts.ignoredBuiltDependencies?.length) { // We already ignore the build of these dependencies. // No need to report them. diff --git a/exec/lifecycle/src/runLifecycleHooksConcurrently.ts b/exec/lifecycle/src/runLifecycleHooksConcurrently.ts index 3873ce3607..8de13a8d90 100644 --- a/exec/lifecycle/src/runLifecycleHooksConcurrently.ts +++ b/exec/lifecycle/src/runLifecycleHooksConcurrently.ts @@ -5,7 +5,7 @@ import path from 'path' import { fetchFromDir } from '@pnpm/directory-fetcher' import { type StoreController } from '@pnpm/store-controller-types' import { type ProjectManifest, type ProjectRootDir } from '@pnpm/types' -import runGroups from 'run-groups' +import { runGroups } from 'run-groups' import { runLifecycleHook, type RunLifecycleHookOptions } from './runLifecycleHook.js' export type RunLifecycleHooksConcurrentlyOptions = Omit): Promise { diff --git a/exec/plugin-commands-rebuild/src/implementation/index.ts b/exec/plugin-commands-rebuild/src/implementation/index.ts index ffbbf16266..32398cb501 100644 --- a/exec/plugin-commands-rebuild/src/implementation/index.ts +++ b/exec/plugin-commands-rebuild/src/implementation/index.ts @@ -39,7 +39,7 @@ import * as dp from '@pnpm/dependency-path' import { safeReadPackageJsonFromDir } from '@pnpm/read-package-json' import { hardLinkDir } from '@pnpm/worker' import { loadJsonFile } from 'load-json-file' -import runGroups from 'run-groups' +import { runGroups } from 'run-groups' import { graphSequencer } from '@pnpm/deps.graph-sequencer' import npa from '@pnpm/npm-package-arg' import pLimit from 'p-limit' @@ -442,7 +442,7 @@ async function _rebuild ( } )) - await runGroups.default(opts.childConcurrency || 5, groups) + await runGroups(opts.childConcurrency || 5, groups) if (builtDepPaths.size > 0) { // It may be optimized because some bins were already linked before running lifecycle scripts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5713f82c41..aa778534b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -637,8 +637,8 @@ catalogs: specifier: ^3.1.0 version: 3.1.0 run-groups: - specifier: ^3.0.1 - version: 3.0.1 + specifier: ^4.0.0 + version: 4.0.0 rxjs: specifier: ^7.8.2 version: 7.8.2 @@ -2625,7 +2625,7 @@ importers: version: '@pnpm/ramda@0.28.1' run-groups: specifier: 'catalog:' - version: 3.0.1 + version: 4.0.0 devDependencies: '@pnpm/build-modules': specifier: workspace:* @@ -2671,7 +2671,7 @@ importers: version: 5.0.0 run-groups: specifier: 'catalog:' - version: 3.0.1 + version: 4.0.0 shlex: specifier: 'catalog:' version: 3.0.0 @@ -2817,7 +2817,7 @@ importers: version: 1.0.3 run-groups: specifier: 'catalog:' - version: 3.0.1 + version: 4.0.0 semver: specifier: 'catalog:' version: 7.7.2 @@ -5131,7 +5131,7 @@ importers: version: '@pnpm/ramda@0.28.1' run-groups: specifier: 'catalog:' - version: 3.0.1 + version: 4.0.0 semver: specifier: 'catalog:' version: 7.7.2 @@ -14883,6 +14883,10 @@ packages: resolution: {integrity: sha512-7LbrpOjbzBWFHFgRtVrIAwBwW1bB7c7n914Q2+CXr1TvOfbTrVHAEH1Ya9PwDwAoKLeiRrczymYWPwaHNOQ0vA==} engines: {node: '>=20'} + p-limit@7.2.0: + resolution: {integrity: sha512-ATHLtwoTNDloHRFFxFJdHnG6n2WUeFjaR8XQMFdKIv0xkXjrER8/iG9iu265jOM95zXHAfv9oTkqhrfbIzosrQ==} + engines: {node: '>=20'} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -15539,6 +15543,10 @@ packages: resolution: {integrity: sha512-2hIL01Osd6FWsQVhVGqJ7drNikmTaUg2A/VBR98+LuhQ1jV1Xlh43BQH4gJiNaOzfHJTasD0pw5YviIfdVVY4g==} engines: {node: '>=10'} + run-groups@4.0.0: + resolution: {integrity: sha512-P2JW1SZrHtO3ag0NsO4/jzo1njhaGUB1uYnfxi9Rf6ZVvqmKyhmtBr4HL8MPtPrfJATh+8MvVWvxk91Q4H4jBw==} + engines: {node: '>=20.19'} + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -18364,7 +18372,7 @@ snapshots: '@pnpm/fs.packlist': 2.0.0 '@pnpm/logger': 1001.0.0 '@pnpm/prepare-package': 1000.0.16(@pnpm/logger@1001.0.0)(typanion@3.14.0) - '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) '@zkochan/rimraf': 3.0.2 execa: safe-execa@0.1.2 transitivePeerDependencies: @@ -18499,7 +18507,7 @@ snapshots: '@pnpm/find-workspace-dir': 1000.1.0 '@pnpm/logger': 1001.0.0 '@pnpm/types': 1000.6.0 - '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) '@pnpm/workspace.find-packages': 1000.0.25(@pnpm/logger@1001.0.0)(@pnpm/worker@1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30))(typanion@3.14.0) '@pnpm/workspace.read-manifest': 1000.1.5 load-json-file: 7.0.1 @@ -18705,7 +18713,7 @@ snapshots: '@pnpm/store-controller-types': 1003.0.2 '@pnpm/store.cafs': 1000.0.13 '@pnpm/types': 1000.6.0 - '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) p-defer: 3.0.0 p-limit: 3.1.0 p-queue: 6.6.2 @@ -18724,7 +18732,7 @@ snapshots: '@pnpm/store-controller-types': 1003.0.2 '@pnpm/store.cafs': 1000.0.13 '@pnpm/types': 1000.6.0 - '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) '@zkochan/rimraf': 3.0.2 load-json-file: 6.2.0 ramda: '@pnpm/ramda@0.28.1' @@ -19003,7 +19011,7 @@ snapshots: '@pnpm/graceful-fs': 1000.0.0 '@pnpm/logger': 1001.0.0 '@pnpm/prepare-package': 1000.0.16(@pnpm/logger@1001.0.0)(typanion@3.14.0) - '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) '@zkochan/retry': 0.2.0 lodash.throttle: 4.1.1 p-map-values: 1.0.0 @@ -19042,7 +19050,7 @@ snapshots: dependencies: isexe: 2.0.0 - '@pnpm/worker@1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30)': + '@pnpm/worker@1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30)': dependencies: '@pnpm/cafs-types': 1000.0.0 '@pnpm/create-cafs-store': 1000.0.14(@pnpm/logger@1001.0.0) @@ -19051,7 +19059,7 @@ snapshots: '@pnpm/exec.pkg-requires-build': 1000.0.8 '@pnpm/fs.hard-link-dir': 1000.0.1(@pnpm/logger@1001.0.0) '@pnpm/graceful-fs': 1000.0.0 - '@pnpm/logger': 1001.0.0 + '@pnpm/logger': link:packages/logger '@pnpm/store.cafs': 1000.0.13 '@pnpm/symlink-dependency': 1000.0.9(@pnpm/logger@1001.0.0) '@rushstack/worker-pool': 0.4.9(@types/node@22.15.30) @@ -23862,6 +23870,10 @@ snapshots: dependencies: yocto-queue: 1.2.1 + p-limit@7.2.0: + dependencies: + yocto-queue: 1.2.1 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 @@ -24531,6 +24543,10 @@ snapshots: dependencies: p-limit: 3.1.0 + run-groups@4.0.0: + dependencies: + p-limit: 7.2.0 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 08cacbe668..8a38bd6f44 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -263,7 +263,7 @@ catalog: resolve-link-target: ^2.0.0 rimraf: ^6.0.1 root-link-target: ^3.1.0 - run-groups: ^3.0.1 + run-groups: ^4.0.0 rxjs: ^7.8.2 safe-buffer: 5.2.1 safe-execa: ^0.2.0 @@ -342,6 +342,7 @@ minimumReleaseAgeExclude: - publish-packed@5.0.0 - glob@11.1.0 - jws@3.2.3 + - run-groups@4.0.0 nodeVersion: 20.19.4