rolldown-pnpm-config 2.5.1 → 3.0.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.
@@ -1,246 +0,0 @@
1
- import { Bool, BooleanRecord, Num, Str, StringArray, StringArrayRecord, StringRecord, UnknownRecord } from "./schemas.js";
2
- import { Schema } from "effect";
3
-
4
- // src/descriptors/resolution.ts
5
- const PeerRulesSchema = Schema.Struct({
6
- allowedVersions: Schema.optional(StringRecord),
7
- ignoreMissing: Schema.optional(StringArray),
8
- allowAny: Schema.optional(StringArray)
9
- });
10
- /**
11
- * Dependency-resolution category fields. Includes the parity-locked fields
12
- * migrated from registry.ts + freeze.ts (catalogs, overrides, packageExtensions,
13
- * allowedDeprecatedVersions, publicHoistPattern, minimumReleaseAgeExclude,
14
- * supportedArchitectures, auditConfig, peerDependencyRules, strictDepBuilds,
15
- * blockExoticSubdeps, minimumReleaseAge, allowBuilds, confirmModulesPurge) plus
16
- * net-new resolution/trust/catalog fields.
17
- *
18
- * @internal
19
- */
20
- const resolution = {
21
- catalogs: {
22
- schema: Schema.Record(Str, StringRecord),
23
- kind: "object",
24
- strategy: "catalogs",
25
- enforcement: "warn",
26
- doc: "Named version catalogs injected into pnpm config.",
27
- workspaceYaml: true,
28
- anchor: "catalogs",
29
- samples: {
30
- valid: [{ default: { lodash: "^4" } }],
31
- invalid: ["x"]
32
- }
33
- },
34
- confirmModulesPurge: {
35
- schema: Bool,
36
- kind: "boolean",
37
- strategy: "scalar",
38
- enforcement: "absent",
39
- doc: "Whether pnpm prompts before purging node_modules (undocumented upstream).",
40
- workspaceYaml: false
41
- },
42
- packageExtensions: {
43
- schema: UnknownRecord,
44
- kind: "unknownRecord",
45
- strategy: "mapChildWins",
46
- enforcement: "absent",
47
- doc: "Per-package manifest overrides merged into the dependency graph.",
48
- workspaceYaml: true,
49
- anchor: "packageextensions"
50
- },
51
- allowedDeprecatedVersions: {
52
- schema: StringRecord,
53
- kind: "stringRecord",
54
- strategy: "mapChildWins",
55
- enforcement: "absent",
56
- doc: "Deprecated versions explicitly allowed, keyed by package.",
57
- workspaceYaml: true,
58
- anchor: "alloweddeprecatedversions"
59
- },
60
- publicHoistPattern: {
61
- schema: StringArray,
62
- kind: "stringArray",
63
- strategy: "arrayUnion",
64
- enforcement: "absent",
65
- doc: "Glob patterns hoisted to the root node_modules.",
66
- workspaceYaml: true,
67
- anchor: "publichoistpattern",
68
- options: { excludeByRepo: true }
69
- },
70
- minimumReleaseAgeExclude: {
71
- schema: StringArray,
72
- kind: "stringArray",
73
- strategy: "arrayUnion",
74
- enforcement: "absent",
75
- doc: "Packages excluded from the minimum-release-age quarantine.",
76
- workspaceYaml: true,
77
- anchor: "minimumreleaseageexclude"
78
- },
79
- supportedArchitectures: {
80
- schema: StringArrayRecord,
81
- kind: "stringArrayRecord",
82
- strategy: "arrayRecordUnion",
83
- enforcement: "absent",
84
- doc: "Supported architectures, keyed by axis (os/cpu/libc).",
85
- workspaceYaml: true,
86
- anchor: "supportedarchitectures"
87
- },
88
- auditConfig: {
89
- schema: StringArrayRecord,
90
- kind: "stringArrayRecord",
91
- strategy: "arrayRecordUnion",
92
- enforcement: "absent",
93
- doc: "Audit config exclusions, keyed by axis.",
94
- workspaceYaml: true,
95
- anchor: "auditconfig"
96
- },
97
- overrides: {
98
- schema: StringRecord,
99
- kind: "stringRecord",
100
- strategy: "overrides",
101
- enforcement: "warn",
102
- doc: "Security version overrides, keyed by package selector.",
103
- workspaceYaml: true,
104
- anchor: "overrides"
105
- },
106
- peerDependencyRules: {
107
- schema: PeerRulesSchema,
108
- kind: "object",
109
- strategy: "peerDependencyRules",
110
- enforcement: "warn",
111
- doc: "Peer dependency rules: allowed versions plus ignore/allow-any lists.",
112
- workspaceYaml: true,
113
- anchor: "peerdependencyrules",
114
- samples: {
115
- valid: [{ allowedVersions: { react: "18" } }, {}],
116
- invalid: ["x"]
117
- }
118
- },
119
- strictDepBuilds: {
120
- schema: Bool,
121
- kind: "boolean",
122
- strategy: "securityFlag",
123
- enforcement: "warn",
124
- doc: "Whether dependency build scripts are blocked unless explicitly allowed.",
125
- workspaceYaml: true,
126
- anchor: "strictdepbuilds"
127
- },
128
- blockExoticSubdeps: {
129
- schema: Bool,
130
- kind: "boolean",
131
- strategy: "securityFlag",
132
- enforcement: "warn",
133
- doc: "Whether exotic (non-registry) subdependencies are blocked.",
134
- workspaceYaml: true,
135
- anchor: "blockexoticsubdeps"
136
- },
137
- minimumReleaseAge: {
138
- schema: Num,
139
- kind: "number",
140
- strategy: "securityMin",
141
- enforcement: "warn",
142
- doc: "Minimum age (minutes) a release must reach before it is installable.",
143
- workspaceYaml: true,
144
- anchor: "minimumreleaseage"
145
- },
146
- allowBuilds: {
147
- schema: BooleanRecord,
148
- kind: "booleanRecord",
149
- strategy: "allowBuilds",
150
- enforcement: "warn",
151
- doc: "Packages whose build scripts are explicitly allowed to run.",
152
- workspaceYaml: true,
153
- anchor: "allowbuilds"
154
- },
155
- ignoredOptionalDependencies: {
156
- schema: StringArray,
157
- kind: "stringArray",
158
- strategy: "arrayUnion",
159
- enforcement: "absent",
160
- doc: "Optional dependencies excluded from installation entirely.",
161
- workspaceYaml: true,
162
- anchor: "ignoredoptionaldependencies"
163
- },
164
- updateConfig: {
165
- schema: Schema.Struct({ ignoreDependencies: Schema.optional(StringArray) }),
166
- kind: "object",
167
- strategy: "mapChildWins",
168
- enforcement: "absent",
169
- doc: "Per-dependency update behavior: which packages to ignore during updates.",
170
- workspaceYaml: true,
171
- anchor: "updateconfig",
172
- samples: {
173
- valid: [{}, { ignoreDependencies: ["a"] }],
174
- invalid: ["x"]
175
- }
176
- },
177
- catalog: {
178
- schema: StringRecord,
179
- kind: "stringRecord",
180
- strategy: "mapChildWins",
181
- enforcement: "warn",
182
- doc: "Default version catalog entries merged as a single `default` catalog.",
183
- workspaceYaml: true,
184
- anchor: "catalog"
185
- },
186
- minimumReleaseAgeStrict: {
187
- schema: Bool,
188
- kind: "boolean",
189
- strategy: "scalar",
190
- enforcement: "warn",
191
- doc: "Whether any resolution fails when a package violates minimum-release-age.",
192
- workspaceYaml: true,
193
- anchor: "minimumreleaseagestrict"
194
- },
195
- minimumReleaseAgeIgnoreMissingTime: {
196
- schema: Bool,
197
- kind: "boolean",
198
- strategy: "scalar",
199
- enforcement: "warn",
200
- doc: "Whether to skip the release-age check when publish-time metadata is absent.",
201
- workspaceYaml: true,
202
- anchor: "minimumreleaseageignoremissingtime"
203
- },
204
- trustPolicy: {
205
- schema: Schema.Literals(["off", "no-downgrade"]),
206
- kind: "enum",
207
- strategy: "scalar",
208
- enforcement: "warn",
209
- doc: "Defines what package integrity verification is enforced on installs.",
210
- workspaceYaml: true,
211
- anchor: "trustpolicy",
212
- samples: {
213
- valid: ["off"],
214
- invalid: ["x"]
215
- }
216
- },
217
- trustPolicyExclude: {
218
- schema: StringArray,
219
- kind: "stringArray",
220
- strategy: "arrayUnion",
221
- enforcement: "warn",
222
- doc: "Packages excluded from trust-policy enforcement.",
223
- workspaceYaml: true,
224
- anchor: "trustpolicyexclude"
225
- },
226
- trustPolicyIgnoreAfter: {
227
- schema: Num,
228
- kind: "number",
229
- strategy: "scalar",
230
- enforcement: "warn",
231
- doc: "Minutes after installation after which the trust check is skipped.",
232
- workspaceYaml: true,
233
- anchor: "trustpolicyignoreafter"
234
- },
235
- trustLockfile: {
236
- schema: Bool,
237
- kind: "boolean",
238
- strategy: "scalar",
239
- enforcement: "warn",
240
- doc: "Whether the lockfile alone is trusted without re-verifying each package's integrity.",
241
- workspaceYaml: true,
242
- anchor: "trustlockfile"
243
- }
244
- };
245
-
246
- export { resolution };
@@ -1,99 +0,0 @@
1
- import { Bool, Str, UnknownRecord } from "./schemas.js";
2
- import { Schema } from "effect";
3
-
4
- // src/descriptors/runtime-cfg.ts
5
- /** The 8 package-manager version + node-version fields. @internal */
6
- const runtimeCfg = {
7
- packageManagerStrict: {
8
- schema: Bool,
9
- kind: "boolean",
10
- strategy: "scalar",
11
- enforcement: "absent",
12
- doc: "Whether pnpm enforces use of the package manager specified in packageManager.",
13
- workspaceYaml: true,
14
- anchor: "packagemanagerstrict"
15
- },
16
- packageManagerStrictVersion: {
17
- schema: Bool,
18
- kind: "boolean",
19
- strategy: "scalar",
20
- enforcement: "absent",
21
- doc: "Whether pnpm enforces the exact version of the package manager specified in packageManager.",
22
- workspaceYaml: true,
23
- anchor: "packagemanagerstrictversion"
24
- },
25
- managePackageManagerVersions: {
26
- schema: Bool,
27
- kind: "boolean",
28
- strategy: "scalar",
29
- enforcement: "absent",
30
- doc: "Whether pnpm automatically downloads and uses the version of pnpm specified in packageManager.",
31
- workspaceYaml: true,
32
- anchor: "managepackagemanagerversions"
33
- },
34
- pmOnFail: {
35
- schema: Schema.Literals([
36
- "download",
37
- "error",
38
- "warn",
39
- "ignore"
40
- ]),
41
- kind: "enum",
42
- strategy: "scalar",
43
- enforcement: "absent",
44
- doc: "Action taken when the package manager version does not match the packageManager field.",
45
- workspaceYaml: true,
46
- anchor: "pmonfail",
47
- samples: {
48
- valid: ["download"],
49
- invalid: ["x"]
50
- }
51
- },
52
- runtimeOnFail: {
53
- schema: Schema.Literals([
54
- "download",
55
- "error",
56
- "warn",
57
- "ignore"
58
- ]),
59
- kind: "enum",
60
- strategy: "scalar",
61
- enforcement: "absent",
62
- doc: "Action taken when the Node.js version does not match the engines.node field.",
63
- workspaceYaml: true,
64
- anchor: "runtimeonfail",
65
- samples: {
66
- valid: ["error"],
67
- invalid: ["x"]
68
- }
69
- },
70
- nodeVersion: {
71
- schema: Str,
72
- kind: "string",
73
- strategy: "scalar",
74
- enforcement: "absent",
75
- doc: "The Node.js version to use when checking packages' engines field.",
76
- workspaceYaml: true,
77
- anchor: "nodeversion"
78
- },
79
- useNodeVersion: {
80
- schema: Str,
81
- kind: "string",
82
- strategy: "scalar",
83
- enforcement: "absent",
84
- doc: "The exact Node.js version that pnpm should use for running scripts.",
85
- workspaceYaml: true,
86
- anchor: "usenodeversion"
87
- },
88
- nodeDownloadMirrors: {
89
- schema: UnknownRecord,
90
- kind: "unknownRecord",
91
- strategy: "mapChildWins",
92
- enforcement: "absent",
93
- doc: "Mirror URLs for downloading Node.js, keyed by distribution name.",
94
- workspaceYaml: true,
95
- anchor: "nodedownloadmirrors"
96
- }
97
- };
98
-
99
- export { runtimeCfg };
@@ -1,13 +0,0 @@
1
- import { Schema } from "effect";
2
-
3
- // src/descriptors/schemas.ts
4
- /** @internal */ const Bool = Schema.Boolean;
5
- /** @internal */ const Num = Schema.Number;
6
- /** @internal */ const Str = Schema.String;
7
- /** @internal */ const StringArray = Schema.Array(Schema.String);
8
- /** @internal */ const StringRecord = Schema.Record(Schema.String, Schema.String);
9
- /** @internal */ const BooleanRecord = Schema.Record(Schema.String, Schema.Boolean);
10
- /** @internal */ const UnknownRecord = Schema.Record(Schema.String, Schema.Unknown);
11
- /** @internal */ const StringArrayRecord = Schema.Record(Schema.String, StringArray);
12
-
13
- export { Bool, BooleanRecord, Num, Str, StringArray, StringArrayRecord, StringRecord, UnknownRecord };
@@ -1,124 +0,0 @@
1
- import { Bool, Num } from "./schemas.js";
2
- import { Schema } from "effect";
3
-
4
- // src/descriptors/workspace.ts
5
- /** The 10 catalog + workspace + audit fields. @internal */
6
- const workspace = {
7
- catalogMode: {
8
- schema: Schema.Literals([
9
- "strict",
10
- "prefer",
11
- "manual"
12
- ]),
13
- kind: "enum",
14
- strategy: "scalar",
15
- enforcement: "absent",
16
- doc: "Controls how dependencies are resolved against entries defined in the catalogs field.",
17
- workspaceYaml: true,
18
- anchor: "catalogmode",
19
- samples: {
20
- valid: ["manual"],
21
- invalid: ["x"]
22
- }
23
- },
24
- cleanupUnusedCatalogs: {
25
- schema: Bool,
26
- kind: "boolean",
27
- strategy: "scalar",
28
- enforcement: "absent",
29
- doc: "Whether pnpm removes catalog entries that are not used by any project in the workspace.",
30
- workspaceYaml: true,
31
- anchor: "cleanupunusedcatalogs"
32
- },
33
- linkWorkspacePackages: {
34
- schema: Schema.Union([Schema.Boolean, Schema.Literals(["deep"])]),
35
- kind: "union",
36
- strategy: "scalar",
37
- enforcement: "absent",
38
- doc: "Whether workspace packages are linked from the workspace, not downloaded from the registry.",
39
- workspaceYaml: true,
40
- anchor: "linkworkspacepackages",
41
- samples: {
42
- valid: [true, "deep"],
43
- invalid: ["x"]
44
- }
45
- },
46
- preferWorkspacePackages: {
47
- schema: Bool,
48
- kind: "boolean",
49
- strategy: "scalar",
50
- enforcement: "absent",
51
- doc: "Whether versions of packages from the workspace are preferred over versions from the registry.",
52
- workspaceYaml: true,
53
- anchor: "preferworkspacepackages"
54
- },
55
- saveWorkspaceProtocol: {
56
- schema: Schema.Union([Schema.Boolean, Schema.Literals(["rolling"])]),
57
- kind: "union",
58
- strategy: "scalar",
59
- enforcement: "absent",
60
- doc: "Controls whether the workspace: range protocol is used when saving workspace package versions.",
61
- workspaceYaml: true,
62
- anchor: "saveworkspaceprotocol",
63
- samples: {
64
- valid: [false, "rolling"],
65
- invalid: ["x"]
66
- }
67
- },
68
- includeWorkspaceRoot: {
69
- schema: Bool,
70
- kind: "boolean",
71
- strategy: "scalar",
72
- enforcement: "absent",
73
- doc: "Whether tasks of the root workspace project are included when executing commands recursively.",
74
- workspaceYaml: true,
75
- anchor: "includeworkspaceroot"
76
- },
77
- ignoreWorkspaceCycles: {
78
- schema: Bool,
79
- kind: "boolean",
80
- strategy: "scalar",
81
- enforcement: "absent",
82
- doc: "Whether workspace dependency cycles are silently ignored.",
83
- workspaceYaml: true,
84
- anchor: "ignoreworkspacecycles"
85
- },
86
- disallowWorkspaceCycles: {
87
- schema: Bool,
88
- kind: "boolean",
89
- strategy: "scalar",
90
- enforcement: "absent",
91
- doc: "Whether an error is thrown when a workspace dependency cycle is detected.",
92
- workspaceYaml: true,
93
- anchor: "disallowworkspacecycles"
94
- },
95
- workspaceConcurrency: {
96
- schema: Num,
97
- kind: "number",
98
- strategy: "scalar",
99
- enforcement: "absent",
100
- doc: "Number of projects built in parallel when running commands recursively.",
101
- workspaceYaml: true,
102
- anchor: "workspaceconcurrency"
103
- },
104
- auditLevel: {
105
- schema: Schema.Literals([
106
- "low",
107
- "moderate",
108
- "high",
109
- "critical"
110
- ]),
111
- kind: "enum",
112
- strategy: "scalar",
113
- enforcement: "absent",
114
- doc: "Minimum severity level for audit reports (low, moderate, high, critical).",
115
- workspaceYaml: true,
116
- anchor: "auditlevel",
117
- samples: {
118
- valid: ["low"],
119
- invalid: ["x"]
120
- }
121
- }
122
- };
123
-
124
- export { workspace };