@pnpm/workspace.project-manifest-reader 1100.0.8 → 1100.0.10

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.
Files changed (2) hide show
  1. package/lib/index.js +12 -8
  2. package/package.json +12 -8
package/lib/index.js CHANGED
@@ -7,18 +7,22 @@ import { writeProjectManifest } from '@pnpm/workspace.project-manifest-writer';
7
7
  import detectIndent from 'detect-indent';
8
8
  import equal from 'fast-deep-equal';
9
9
  import isWindows from 'is-windows';
10
+ import pLimit from 'p-limit';
10
11
  import { readYamlFile } from 'read-yaml-file';
11
12
  import { readJson5File, readJsonFile, } from './readFile.js';
13
+ const limitProjectManifestReads = pLimit(4);
12
14
  export async function safeReadProjectManifestOnly(projectDir) {
13
- try {
14
- return await readProjectManifestOnly(projectDir);
15
- }
16
- catch (err) { // eslint-disable-line
17
- if (err.code === 'ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND') {
18
- return null;
15
+ return limitProjectManifestReads(async () => {
16
+ try {
17
+ return await readProjectManifestOnly(projectDir);
19
18
  }
20
- throw err;
21
- }
19
+ catch (err) { // eslint-disable-line
20
+ if (err.code === 'ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND') {
21
+ return null;
22
+ }
23
+ throw err;
24
+ }
25
+ });
22
26
  }
23
27
  export async function readProjectManifest(projectDir) {
24
28
  const result = await tryReadProjectManifest(projectDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/workspace.project-manifest-reader",
3
- "version": "1100.0.8",
3
+ "version": "1100.0.10",
4
4
  "description": "Read a project manifest (called package.json in most cases)",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -8,7 +8,10 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "funding": "https://opencollective.com/pnpm",
11
- "repository": "https://github.com/pnpm/pnpm/tree/main/workspace/project-manifest-reader",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/pnpm/pnpm/tree/main/workspace/project-manifest-reader"
14
+ },
12
15
  "homepage": "https://github.com/pnpm/pnpm/tree/main/workspace/project-manifest-reader#readme",
13
16
  "bugs": {
14
17
  "url": "https://github.com/pnpm/pnpm/issues"
@@ -28,18 +31,19 @@
28
31
  "fast-deep-equal": "^3.1.3",
29
32
  "is-windows": "^1.0.2",
30
33
  "json5": "^2.2.3",
34
+ "p-limit": "^7.3.0",
31
35
  "parse-json": "^8.3.0",
32
36
  "read-yaml-file": "^3.0.0",
33
37
  "strip-bom": "^5.0.0",
34
38
  "@pnpm/error": "1100.0.0",
35
- "@pnpm/pkg-manifest.utils": "1100.2.0",
39
+ "@pnpm/types": "1101.3.0",
40
+ "@pnpm/pkg-manifest.utils": "1100.2.2",
36
41
  "@pnpm/text.comments-parser": "1100.0.0",
37
- "@pnpm/types": "1101.1.1",
38
- "@pnpm/fs.graceful-fs": "1100.1.0",
39
- "@pnpm/workspace.project-manifest-writer": "1100.0.4"
42
+ "@pnpm/workspace.project-manifest-writer": "1100.0.6",
43
+ "@pnpm/fs.graceful-fs": "1100.1.0"
40
44
  },
41
45
  "peerDependencies": {
42
- "@pnpm/logger": ">=1001.0.0 <1002.0.0"
46
+ "@pnpm/logger": "^1001.0.1"
43
47
  },
44
48
  "devDependencies": {
45
49
  "@jest/globals": "30.3.0",
@@ -47,7 +51,7 @@
47
51
  "@types/parse-json": "^4.0.2",
48
52
  "tempy": "3.0.0",
49
53
  "@pnpm/test-fixtures": "1100.0.0",
50
- "@pnpm/workspace.project-manifest-reader": "1100.0.8"
54
+ "@pnpm/workspace.project-manifest-reader": "1100.0.10"
51
55
  },
52
56
  "engines": {
53
57
  "node": ">=22.13"