@savvy-web/pnpm-plugin-silk 0.2.0 → 0.3.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/README.md +14 -15
- package/index.cjs +25 -3
- package/index.d.ts +12 -0
- package/package.json +16 -9
- package/pnpmfile.cjs +37 -4
- package/tsdoc-metadata.json +1 -1
package/README.md
CHANGED
|
@@ -6,19 +6,20 @@
|
|
|
6
6
|
[](https://pnpm.io/)
|
|
7
7
|
|
|
8
8
|
Centralized dependency version management for the Silk ecosystem via pnpm
|
|
9
|
-
config dependencies. Share curated dependency catalogs,
|
|
10
|
-
across multiple repositories from a single source
|
|
9
|
+
config dependencies. Share curated dependency catalogs, security overrides,
|
|
10
|
+
and build configurations across multiple repositories from a single source
|
|
11
|
+
of truth.
|
|
11
12
|
|
|
12
13
|
## Features
|
|
13
14
|
|
|
14
15
|
- **Dual catalog strategy** - Current versions for direct dependencies
|
|
15
16
|
(`catalog:silk`), permissive ranges for peer dependencies (`catalog:silkPeers`)
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
- **
|
|
19
|
-
|
|
20
|
-
- **
|
|
21
|
-
|
|
17
|
+
- **Security overrides** - Centralized CVE fixes via `silkOverrides` that
|
|
18
|
+
propagate to all consuming repositories
|
|
19
|
+
- **Build configuration sync** - Shared `onlyBuiltDependencies` and
|
|
20
|
+
`publicHoistPattern` settings
|
|
21
|
+
- **Non-destructive merging** - Local definitions always take precedence with
|
|
22
|
+
clear warnings for divergences
|
|
22
23
|
|
|
23
24
|
## Installation
|
|
24
25
|
|
|
@@ -33,12 +34,9 @@ hash:
|
|
|
33
34
|
|
|
34
35
|
```yaml
|
|
35
36
|
configDependencies:
|
|
36
|
-
"@savvy-web/pnpm-plugin-silk": "0.
|
|
37
|
+
"@savvy-web/pnpm-plugin-silk": "0.2.0+sha512-..."
|
|
37
38
|
```
|
|
38
39
|
|
|
39
|
-
> **Note:** Config dependencies require exact versions with SHA-512 integrity
|
|
40
|
-
> checksums. The `pnpm add --config` command generates this automatically.
|
|
41
|
-
|
|
42
40
|
## Quick Start
|
|
43
41
|
|
|
44
42
|
Reference Silk catalogs in your `package.json`:
|
|
@@ -55,9 +53,10 @@ Reference Silk catalogs in your `package.json`:
|
|
|
55
53
|
}
|
|
56
54
|
```
|
|
57
55
|
|
|
58
|
-
The `silk` catalog provides current/latest versions for
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
The `silk` catalog provides current/latest versions for direct dependencies,
|
|
57
|
+
while `silkPeers` provides permissive ranges for peer dependencies. Security
|
|
58
|
+
overrides, build script allowlists, and hoist patterns are automatically
|
|
59
|
+
merged during `pnpm install`.
|
|
61
60
|
|
|
62
61
|
## More Information
|
|
63
62
|
|
package/index.cjs
CHANGED
|
@@ -30,7 +30,7 @@ const silkCatalogs = {
|
|
|
30
30
|
"@changesets/cli": "^2.29.8",
|
|
31
31
|
"@commitlint/cli": "^20.4.1",
|
|
32
32
|
"@commitlint/config-conventional": "^20.4.1",
|
|
33
|
-
"@microsoft/api-extractor": "^7.56.
|
|
33
|
+
"@microsoft/api-extractor": "^7.56.2",
|
|
34
34
|
"@rslib/core": "^0.19.4",
|
|
35
35
|
"@types/node": "^25.2.0",
|
|
36
36
|
"@typescript/native-preview": "^7.0.0-dev.20260203.1",
|
|
@@ -49,7 +49,7 @@ const silkCatalogs = {
|
|
|
49
49
|
"@biomejs/biome": "^2.3.12",
|
|
50
50
|
"@commitlint/cli": "^20.4.1",
|
|
51
51
|
"@commitlint/config-conventional": "^20.4.1",
|
|
52
|
-
"@microsoft/api-extractor": "^7.
|
|
52
|
+
"@microsoft/api-extractor": "^7.56.2",
|
|
53
53
|
"@types/node": "^25.0.10",
|
|
54
54
|
"@typescript/native-preview": "^7.0.0-dev.20260124.1",
|
|
55
55
|
commitizen: "^4.3.1",
|
|
@@ -60,7 +60,29 @@ const silkCatalogs = {
|
|
|
60
60
|
"@isaacs/brace-expansion": ">=5.0.1",
|
|
61
61
|
lodash: ">=4.17.23",
|
|
62
62
|
tmp: ">=0.2.4"
|
|
63
|
-
}
|
|
63
|
+
},
|
|
64
|
+
silkOnlyBuiltDependencies: [
|
|
65
|
+
"@parcel/watcher",
|
|
66
|
+
"@savvy-web/commitlint",
|
|
67
|
+
"@savvy-web/lint-staged",
|
|
68
|
+
"core-js",
|
|
69
|
+
"esbuild",
|
|
70
|
+
"msgpackr-extract"
|
|
71
|
+
],
|
|
72
|
+
silkPublicHoistPattern: [
|
|
73
|
+
"@commitlint/cli",
|
|
74
|
+
"@commitlint/config-conventional",
|
|
75
|
+
"@commitlint/cz-commitlint",
|
|
76
|
+
"@microsoft/api-extractor",
|
|
77
|
+
"@rslib/core",
|
|
78
|
+
"@typescript/native-preview",
|
|
79
|
+
"husky",
|
|
80
|
+
"lint-staged",
|
|
81
|
+
"markdownlint-cli2",
|
|
82
|
+
"markdownlint-cli2-formatter-codequality",
|
|
83
|
+
"turbo",
|
|
84
|
+
"typescript"
|
|
85
|
+
]
|
|
64
86
|
};
|
|
65
87
|
exports.silkCatalogs = __webpack_exports__.silkCatalogs;
|
|
66
88
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
package/index.d.ts
CHANGED
|
@@ -77,6 +77,16 @@ export declare interface SilkCatalogs {
|
|
|
77
77
|
* Synced to pnpm `overrides` configuration.
|
|
78
78
|
*/
|
|
79
79
|
readonly silkOverrides: Catalog;
|
|
80
|
+
/**
|
|
81
|
+
* Packages allowed to run build scripts during install.
|
|
82
|
+
* Synced to pnpm `onlyBuiltDependencies` configuration.
|
|
83
|
+
*/
|
|
84
|
+
readonly silkOnlyBuiltDependencies: readonly string[];
|
|
85
|
+
/**
|
|
86
|
+
* Packages to hoist to the virtual store root.
|
|
87
|
+
* Synced to pnpm `publicHoistPattern` configuration.
|
|
88
|
+
*/
|
|
89
|
+
readonly silkPublicHoistPattern: readonly string[];
|
|
80
90
|
}
|
|
81
91
|
|
|
82
92
|
/**
|
|
@@ -85,6 +95,8 @@ export declare interface SilkCatalogs {
|
|
|
85
95
|
* - `silk`: Current/latest versions for direct dependencies
|
|
86
96
|
* - `silkPeers`: Permissive ranges for peerDependencies
|
|
87
97
|
* - `silkOverrides`: Security overrides for known CVEs
|
|
98
|
+
* - `silkOnlyBuiltDependencies`: Packages allowed to run build scripts
|
|
99
|
+
* - `silkPublicHoistPattern`: Packages to hoist to virtual store root
|
|
88
100
|
*/
|
|
89
101
|
export declare const silkCatalogs: SilkCatalogs;
|
|
90
102
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/pnpm-plugin-silk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "pnpm config dependency for centralized catalog management across the Silk ecosystem.",
|
|
6
6
|
"keywords": [
|
|
@@ -32,14 +32,21 @@
|
|
|
32
32
|
"import": "./index.js"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
"
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@types/node": "^25.2.0",
|
|
37
|
+
"@typescript/native-preview": "^7.0.0-dev.20260203.1",
|
|
38
|
+
"typescript": "^5.9.3"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"@types/node": {
|
|
42
|
+
"optional": false
|
|
43
|
+
},
|
|
44
|
+
"@typescript/native-preview": {
|
|
45
|
+
"optional": false
|
|
46
|
+
},
|
|
47
|
+
"typescript": {
|
|
48
|
+
"optional": false
|
|
49
|
+
}
|
|
43
50
|
},
|
|
44
51
|
"files": [
|
|
45
52
|
"!pnpm-plugin-silk.api.json",
|
package/pnpmfile.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const silkCatalogs = {
|
|
|
5
5
|
"@changesets/cli": "^2.29.8",
|
|
6
6
|
"@commitlint/cli": "^20.4.1",
|
|
7
7
|
"@commitlint/config-conventional": "^20.4.1",
|
|
8
|
-
"@microsoft/api-extractor": "^7.56.
|
|
8
|
+
"@microsoft/api-extractor": "^7.56.2",
|
|
9
9
|
"@rslib/core": "^0.19.4",
|
|
10
10
|
"@types/node": "^25.2.0",
|
|
11
11
|
"@typescript/native-preview": "^7.0.0-dev.20260203.1",
|
|
@@ -24,7 +24,7 @@ const silkCatalogs = {
|
|
|
24
24
|
"@biomejs/biome": "^2.3.12",
|
|
25
25
|
"@commitlint/cli": "^20.4.1",
|
|
26
26
|
"@commitlint/config-conventional": "^20.4.1",
|
|
27
|
-
"@microsoft/api-extractor": "^7.
|
|
27
|
+
"@microsoft/api-extractor": "^7.56.2",
|
|
28
28
|
"@types/node": "^25.0.10",
|
|
29
29
|
"@typescript/native-preview": "^7.0.0-dev.20260124.1",
|
|
30
30
|
commitizen: "^4.3.1",
|
|
@@ -35,7 +35,29 @@ const silkCatalogs = {
|
|
|
35
35
|
"@isaacs/brace-expansion": ">=5.0.1",
|
|
36
36
|
lodash: ">=4.17.23",
|
|
37
37
|
tmp: ">=0.2.4"
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
|
+
silkOnlyBuiltDependencies: [
|
|
40
|
+
"@parcel/watcher",
|
|
41
|
+
"@savvy-web/commitlint",
|
|
42
|
+
"@savvy-web/lint-staged",
|
|
43
|
+
"core-js",
|
|
44
|
+
"esbuild",
|
|
45
|
+
"msgpackr-extract"
|
|
46
|
+
],
|
|
47
|
+
silkPublicHoistPattern: [
|
|
48
|
+
"@commitlint/cli",
|
|
49
|
+
"@commitlint/config-conventional",
|
|
50
|
+
"@commitlint/cz-commitlint",
|
|
51
|
+
"@microsoft/api-extractor",
|
|
52
|
+
"@rslib/core",
|
|
53
|
+
"@typescript/native-preview",
|
|
54
|
+
"husky",
|
|
55
|
+
"lint-staged",
|
|
56
|
+
"markdownlint-cli2",
|
|
57
|
+
"markdownlint-cli2-formatter-codequality",
|
|
58
|
+
"turbo",
|
|
59
|
+
"typescript"
|
|
60
|
+
]
|
|
39
61
|
};
|
|
40
62
|
const WARNING_BOX_WIDTH = 75;
|
|
41
63
|
function formatOverrideWarning(overrides) {
|
|
@@ -98,6 +120,13 @@ function mergeOverrides(silkOverrides, localOverrides, overrideWarnings) {
|
|
|
98
120
|
}
|
|
99
121
|
return merged;
|
|
100
122
|
}
|
|
123
|
+
function mergeStringArrays(silkArray, localArray) {
|
|
124
|
+
const merged = new Set(silkArray);
|
|
125
|
+
if (localArray) for (const item of localArray)merged.add(item);
|
|
126
|
+
return [
|
|
127
|
+
...merged
|
|
128
|
+
].sort((a, b)=>a.localeCompare(b));
|
|
129
|
+
}
|
|
101
130
|
function updateConfig(config) {
|
|
102
131
|
try {
|
|
103
132
|
const warnings = [];
|
|
@@ -105,6 +134,8 @@ function updateConfig(config) {
|
|
|
105
134
|
const mergedSilk = mergeSingleCatalog("silk", silkCatalogs.silk, existingCatalogs.silk, warnings);
|
|
106
135
|
const mergedSilkPeers = mergeSingleCatalog("silkPeers", silkCatalogs.silkPeers, existingCatalogs.silkPeers, warnings);
|
|
107
136
|
const mergedOverrides = mergeOverrides(silkCatalogs.silkOverrides, config.overrides, warnings);
|
|
137
|
+
const mergedOnlyBuiltDependencies = mergeStringArrays(silkCatalogs.silkOnlyBuiltDependencies, config.onlyBuiltDependencies);
|
|
138
|
+
const mergedPublicHoistPattern = mergeStringArrays(silkCatalogs.silkPublicHoistPattern, config.publicHoistPattern);
|
|
108
139
|
warnOverrides(warnings);
|
|
109
140
|
return {
|
|
110
141
|
...config,
|
|
@@ -113,7 +144,9 @@ function updateConfig(config) {
|
|
|
113
144
|
silk: mergedSilk,
|
|
114
145
|
silkPeers: mergedSilkPeers
|
|
115
146
|
},
|
|
116
|
-
overrides: mergedOverrides
|
|
147
|
+
overrides: mergedOverrides,
|
|
148
|
+
onlyBuiltDependencies: mergedOnlyBuiltDependencies,
|
|
149
|
+
publicHoistPattern: mergedPublicHoistPattern
|
|
117
150
|
};
|
|
118
151
|
} catch (error) {
|
|
119
152
|
console.warn("[pnpm-plugin-silk] Error merging catalogs, using local config only:", error instanceof Error ? error.message : String(error));
|