@pnpm/plugin-trusted-deps 0.2.0 → 0.2.1

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/package.json +10 -6
  2. package/pnpmfile.cjs +13 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/plugin-trusted-deps",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A list of OSS packages that are known to require lifecycle scripts to function properly",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -8,11 +8,19 @@
8
8
  "allow.json",
9
9
  "pnpmfile.cjs"
10
10
  ],
11
+ "scripts": {
12
+ "lint": "eslint .",
13
+ "test": "node test.js",
14
+ "update-list": "ts-node updateList.ts"
15
+ },
11
16
  "keywords": [
12
17
  "pnpm-config"
13
18
  ],
14
19
  "license": "MIT",
20
+ "packageManager": "pnpm@10.27.0",
15
21
  "devDependencies": {
22
+ "eslint": "^9.39.2",
23
+ "neostandard": "^0.12.2",
16
24
  "ts-node": "^10.9.2"
17
25
  },
18
26
  "funding": "https://opencollective.com/pnpm",
@@ -23,9 +31,5 @@
23
31
  "homepage": "https://github.com/pnpm/trusted-deps#readme",
24
32
  "bugs": {
25
33
  "url": "https://github.com/pnpm/trusted-deps/issues"
26
- },
27
- "scripts": {
28
- "test": "node test.js",
29
- "update-list": "ts-node updateList.ts"
30
34
  }
31
- }
35
+ }
package/pnpmfile.cjs CHANGED
@@ -4,9 +4,18 @@ module.exports = {
4
4
  if (config.onlyBuiltDependencies == null) {
5
5
  config.onlyBuiltDependencies = []
6
6
  }
7
- config.onlyBuiltDependencies.push(...require('./allow.json'))
7
+ const defaultAllowed = require('./allow.json')
8
+ if (!config.ignoredBuiltDependencies?.length) {
9
+ config.onlyBuiltDependencies.push(...defaultAllowed)
10
+ } else {
11
+ const ignored = new Set(config.ignoredBuiltDependencies)
12
+ for (const allowed of defaultAllowed) {
13
+ if (!ignored.has(allowed)) {
14
+ config.onlyBuiltDependencies.push(allowed)
15
+ }
16
+ }
17
+ }
8
18
  return config
9
- }
10
- }
19
+ },
20
+ },
11
21
  }
12
-