@yarnpkg/plugin-pnpm 2.1.1 → 2.2.0

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/lib/PnpmLinker.js CHANGED
@@ -64,11 +64,11 @@ exports.PnpmLinker = PnpmLinker;
64
64
  class PnpmInstaller {
65
65
  constructor(opts) {
66
66
  this.opts = opts;
67
- this.asyncActions = new core_1.miscUtils.AsyncActions(10);
68
67
  this.customData = {
69
68
  pathsByLocator: new Map(),
70
69
  locatorByPath: new Map(),
71
70
  };
71
+ this.asyncActions = new core_1.miscUtils.AsyncActions(opts.project.configuration.get(`pnpmInstallConcurrency`));
72
72
  this.indexFolderPromise = (0, fslib_1.setupCopyIndex)(fslib_1.xfs, {
73
73
  indexPath: fslib_1.ppath.join(opts.project.configuration.get(`globalFolder`), `index`),
74
74
  });
@@ -319,7 +319,7 @@ async function removeIfEmpty(dir) {
319
319
  await fslib_1.xfs.rmdirPromise(dir);
320
320
  }
321
321
  catch (error) {
322
- if (error.code !== `ENOENT` && error.code !== `ENOTEMPTY`) {
322
+ if (error.code !== `ENOENT` && error.code !== `ENOTEMPTY` && error.code !== `EBUSY`) {
323
323
  throw error;
324
324
  }
325
325
  }
package/lib/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { PnpmLinker };
5
5
  declare module '@yarnpkg/core' {
6
6
  interface ConfigurationValueMap {
7
7
  pnpmStoreFolder: PortablePath;
8
+ pnpmInstallConcurrency: number;
8
9
  }
9
10
  }
10
11
  declare const plugin: Plugin;
package/lib/index.js CHANGED
@@ -11,6 +11,11 @@ const plugin = {
11
11
  type: core_1.SettingsType.ABSOLUTE_PATH,
12
12
  default: `./node_modules/.store`,
13
13
  },
14
+ pnpmInstallConcurrency: {
15
+ description: `Maximum number of packages the pnpm linker will install in parallel. Lower this on monorepos with very large caches if you hit "Couldn't allocate enough memory" from the bundled libzip WASM heap.`,
16
+ type: core_1.SettingsType.NUMBER,
17
+ default: 10,
18
+ },
14
19
  },
15
20
  linkers: [
16
21
  PnpmLinker_1.PnpmLinker,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarnpkg/plugin-pnpm",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "license": "BSD-2-Clause",
5
5
  "main": "./lib/index.js",
6
6
  "exports": {
@@ -8,20 +8,20 @@
8
8
  "./package.json": "./package.json"
9
9
  },
10
10
  "dependencies": {
11
- "@yarnpkg/fslib": "^3.1.2",
12
- "@yarnpkg/plugin-pnp": "^4.1.1",
11
+ "@yarnpkg/fslib": "^3.1.5",
12
+ "@yarnpkg/plugin-pnp": "^4.1.6",
13
13
  "@yarnpkg/plugin-stage": "^4.0.2",
14
14
  "clipanion": "^4.0.0-rc.2",
15
15
  "p-limit": "^2.2.0",
16
16
  "tslib": "^2.4.0"
17
17
  },
18
18
  "peerDependencies": {
19
- "@yarnpkg/cli": "^4.9.2",
20
- "@yarnpkg/core": "^4.4.2"
19
+ "@yarnpkg/cli": "^4.15.0",
20
+ "@yarnpkg/core": "^4.8.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@yarnpkg/cli": "^4.9.2",
24
- "@yarnpkg/core": "^4.4.2"
23
+ "@yarnpkg/cli": "^4.15.0",
24
+ "@yarnpkg/core": "^4.8.0"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",