rolldown-pnpm-config 0.1.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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +127 -0
  3. package/bin/rolldown-pnpm-config.js +21 -0
  4. package/catalogs.js +27 -0
  5. package/cli/commands/export.js +118 -0
  6. package/cli/commands/preview.js +73 -0
  7. package/cli/commands/upgrade.js +437 -0
  8. package/cli/diff/build.js +122 -0
  9. package/cli/diff/render.js +103 -0
  10. package/cli/discover.js +128 -0
  11. package/cli/drift.js +22 -0
  12. package/cli/edits.js +41 -0
  13. package/cli/effective.js +42 -0
  14. package/cli/evaluate.js +91 -0
  15. package/cli/interop.js +285 -0
  16. package/cli/local-merge.js +75 -0
  17. package/cli/peer-range.js +34 -0
  18. package/cli/plan.js +66 -0
  19. package/cli/preview-views.js +34 -0
  20. package/cli/release-age.js +74 -0
  21. package/cli/resolve.js +109 -0
  22. package/cli/rewrite.js +22 -0
  23. package/cli/select-file.js +64 -0
  24. package/cli/summary.js +137 -0
  25. package/cli/ui/Preview.js +60 -0
  26. package/cli/ui/Walk.js +55 -0
  27. package/cli/ui/ansi.js +20 -0
  28. package/cli/ui/env.js +20 -0
  29. package/cli/ui/run-preview.js +23 -0
  30. package/cli/ui/run-walk.js +29 -0
  31. package/cli/ui/styled.js +27 -0
  32. package/cli/walk-plan.js +35 -0
  33. package/cli/walk-reducer.js +61 -0
  34. package/cli/workspace-file.js +58 -0
  35. package/cli/workspace-overlay.js +21 -0
  36. package/descriptors/build.js +248 -0
  37. package/descriptors/hoisting.js +175 -0
  38. package/descriptors/index.js +38 -0
  39. package/descriptors/lockfile.js +117 -0
  40. package/descriptors/misc.js +144 -0
  41. package/descriptors/network.js +108 -0
  42. package/descriptors/resolution.js +250 -0
  43. package/descriptors/runtime-cfg.js +90 -0
  44. package/descriptors/schemas.js +26 -0
  45. package/descriptors/workspace.js +116 -0
  46. package/index.d.ts +363 -0
  47. package/index.js +3 -0
  48. package/package.json +60 -0
  49. package/plugin/freeze.js +79 -0
  50. package/plugin/index.js +48 -0
  51. package/plugin/serialize.js +26 -0
  52. package/registry.js +8 -0
  53. package/runtime/ctx.js +39 -0
  54. package/runtime/enforcement.js +36 -0
  55. package/runtime/strategies/arrays.js +37 -0
  56. package/runtime/strategies/catalogs.js +36 -0
  57. package/runtime/strategies/maps.js +46 -0
  58. package/runtime/strategies/overrides.js +57 -0
  59. package/runtime/strategies/scalar.js +57 -0
  60. package/runtime/strategies/table.js +27 -0
  61. package/runtime/warnings.js +61 -0
  62. package/runtime.d.ts +111 -0
  63. package/runtime.js +54 -0
  64. package/tsdoc-metadata.json +11 -0
  65. package/virtual.d.ts +18 -0
@@ -0,0 +1,38 @@
1
+ import { build } from "./build.js";
2
+ import { hoisting } from "./hoisting.js";
3
+ import { lockfile } from "./lockfile.js";
4
+ import { misc } from "./misc.js";
5
+ import { network } from "./network.js";
6
+ import { resolution } from "./resolution.js";
7
+ import { runtimeCfg } from "./runtime-cfg.js";
8
+ import { workspace } from "./workspace.js";
9
+
10
+ //#region src/descriptors/index.ts
11
+ const DESCRIPTORS = {
12
+ ...resolution,
13
+ ...hoisting,
14
+ ...lockfile,
15
+ ...build,
16
+ ...runtimeCfg,
17
+ ...workspace,
18
+ ...misc,
19
+ ...network
20
+ };
21
+ /** Derive the per-field validation schemas consumed by freeze(). @internal */
22
+ function deriveSchemas(d) {
23
+ const out = {};
24
+ for (const [field, desc] of Object.entries(d)) out[field] = desc.schema;
25
+ return out;
26
+ }
27
+ /** Derive the strategy + enforcement registry consumed by freeze(). @internal */
28
+ function deriveRegistry(d) {
29
+ const out = {};
30
+ for (const [field, desc] of Object.entries(d)) out[field] = {
31
+ strategy: desc.strategy,
32
+ enforcement: desc.enforcement
33
+ };
34
+ return out;
35
+ }
36
+
37
+ //#endregion
38
+ export { DESCRIPTORS, deriveRegistry, deriveSchemas };
@@ -0,0 +1,117 @@
1
+ import { Bool, Num, StringArray } from "./schemas.js";
2
+
3
+ //#region src/descriptors/lockfile.ts
4
+ /** The 12 lockfile + peers fields. @internal */
5
+ const lockfile = {
6
+ lockfile: {
7
+ schema: Bool,
8
+ kind: "boolean",
9
+ strategy: "scalar",
10
+ enforcement: "absent",
11
+ doc: "Whether a lockfile is used and generated when running commands that install packages.",
12
+ workspaceYaml: true,
13
+ anchor: "lockfile"
14
+ },
15
+ preferFrozenLockfile: {
16
+ schema: Bool,
17
+ kind: "boolean",
18
+ strategy: "scalar",
19
+ enforcement: "absent",
20
+ doc: "If true, pnpm does not generate a lockfile and fails if the lockfile is out of date.",
21
+ workspaceYaml: true,
22
+ anchor: "preferfrozenlockfile"
23
+ },
24
+ lockfileIncludeTarballUrl: {
25
+ schema: Bool,
26
+ kind: "boolean",
27
+ strategy: "scalar",
28
+ enforcement: "absent",
29
+ doc: "Whether the lockfile includes the full tarball URL for each resolved dependency.",
30
+ workspaceYaml: true,
31
+ anchor: "lockfileincludetarballurl"
32
+ },
33
+ gitBranchLockfile: {
34
+ schema: Bool,
35
+ kind: "boolean",
36
+ strategy: "scalar",
37
+ enforcement: "absent",
38
+ doc: "When enabled, the generated lockfile name is based on the current branch name.",
39
+ workspaceYaml: true,
40
+ anchor: "gitbranchlockfile"
41
+ },
42
+ mergeGitBranchLockfilesBranchPattern: {
43
+ schema: StringArray,
44
+ kind: "stringArray",
45
+ strategy: "arrayUnion",
46
+ enforcement: "absent",
47
+ doc: "Branch name patterns whose lockfiles are merged into the main lockfile on install.",
48
+ workspaceYaml: true,
49
+ anchor: "mergegitbranchlockfilesbranchpattern"
50
+ },
51
+ peersSuffixMaxLength: {
52
+ schema: Num,
53
+ kind: "number",
54
+ strategy: "scalar",
55
+ enforcement: "absent",
56
+ doc: "Maximum length of the peers suffix appended to dependency directory names in the virtual store.",
57
+ workspaceYaml: true,
58
+ anchor: "peerssuffixmaxlength"
59
+ },
60
+ sharedWorkspaceLockfile: {
61
+ schema: Bool,
62
+ kind: "boolean",
63
+ strategy: "scalar",
64
+ enforcement: "absent",
65
+ doc: "Whether a single shared lockfile is used for all projects in the workspace.",
66
+ workspaceYaml: true,
67
+ anchor: "sharedworkspacelockfile"
68
+ },
69
+ autoInstallPeers: {
70
+ schema: Bool,
71
+ kind: "boolean",
72
+ strategy: "scalar",
73
+ enforcement: "absent",
74
+ doc: "Whether missing peer dependencies are installed automatically.",
75
+ workspaceYaml: true,
76
+ anchor: "autoinstallpeers"
77
+ },
78
+ dedupePeerDependents: {
79
+ schema: Bool,
80
+ kind: "boolean",
81
+ strategy: "scalar",
82
+ enforcement: "absent",
83
+ doc: "Whether packages with peer dependencies are deduplicated after peers are resolved.",
84
+ workspaceYaml: true,
85
+ anchor: "dedupepeerdependents"
86
+ },
87
+ dedupePeers: {
88
+ schema: Bool,
89
+ kind: "boolean",
90
+ strategy: "scalar",
91
+ enforcement: "absent",
92
+ doc: "Whether peer dependencies are deduplicated during resolution.",
93
+ workspaceYaml: true,
94
+ anchor: "dedupepeers"
95
+ },
96
+ strictPeerDependencies: {
97
+ schema: Bool,
98
+ kind: "boolean",
99
+ strategy: "scalar",
100
+ enforcement: "absent",
101
+ doc: "If true, commands fail when there are missing or invalid peer dependencies.",
102
+ workspaceYaml: true,
103
+ anchor: "strictpeerdependencies"
104
+ },
105
+ resolvePeersFromWorkspaceRoot: {
106
+ schema: Bool,
107
+ kind: "boolean",
108
+ strategy: "scalar",
109
+ enforcement: "absent",
110
+ doc: "Whether peer dependencies are resolved using packages installed in the workspace root.",
111
+ workspaceYaml: true,
112
+ anchor: "resolvepeersfromworkspaceroot"
113
+ }
114
+ };
115
+
116
+ //#endregion
117
+ export { lockfile };
@@ -0,0 +1,144 @@
1
+ import { Bool, Str } from "./schemas.js";
2
+ import { Schema } from "effect";
3
+
4
+ //#region src/descriptors/misc.ts
5
+ /** The 14 resolution/misc preference fields. @internal */
6
+ const misc = {
7
+ resolutionMode: {
8
+ schema: Schema.Literal("highest", "time-based", "lowest-direct"),
9
+ kind: "enum",
10
+ strategy: "scalar",
11
+ enforcement: "absent",
12
+ doc: "Algorithm used to resolve dependencies from the registry.",
13
+ workspaceYaml: true,
14
+ anchor: "resolutionmode",
15
+ samples: {
16
+ valid: ["highest"],
17
+ invalid: ["x"]
18
+ }
19
+ },
20
+ savePrefix: {
21
+ schema: Schema.Literal("^", "~", ""),
22
+ kind: "enum",
23
+ strategy: "scalar",
24
+ enforcement: "absent",
25
+ doc: "Version prefix prepended to package versions saved in package.json.",
26
+ workspaceYaml: true,
27
+ anchor: "saveprefix",
28
+ samples: {
29
+ valid: ["^"],
30
+ invalid: ["x"]
31
+ }
32
+ },
33
+ saveExact: {
34
+ schema: Bool,
35
+ kind: "boolean",
36
+ strategy: "scalar",
37
+ enforcement: "absent",
38
+ doc: "Whether packages are saved with an exact version instead of a semver range.",
39
+ workspaceYaml: true,
40
+ anchor: "saveexact"
41
+ },
42
+ tag: {
43
+ schema: Str,
44
+ kind: "string",
45
+ strategy: "scalar",
46
+ enforcement: "absent",
47
+ doc: "The default tag used when adding packages without a specified version.",
48
+ workspaceYaml: true,
49
+ anchor: "tag"
50
+ },
51
+ preferOffline: {
52
+ schema: Bool,
53
+ kind: "boolean",
54
+ strategy: "scalar",
55
+ enforcement: "absent",
56
+ doc: "Whether cached data is used without network requests, failing only if data is missing.",
57
+ workspaceYaml: true,
58
+ anchor: "preferoffline"
59
+ },
60
+ dedupeDirectDeps: {
61
+ schema: Bool,
62
+ kind: "boolean",
63
+ strategy: "scalar",
64
+ enforcement: "absent",
65
+ doc: "Whether direct dependencies are deduplicated when they can be satisfied by an existing dependency.",
66
+ workspaceYaml: true,
67
+ anchor: "dedupedirectdeps"
68
+ },
69
+ deployAllFiles: {
70
+ schema: Bool,
71
+ kind: "boolean",
72
+ strategy: "scalar",
73
+ enforcement: "absent",
74
+ doc: "Whether all files of a deployed package are copied including those in node_modules.",
75
+ workspaceYaml: true,
76
+ anchor: "deployallfiles"
77
+ },
78
+ forceLegacyDeploy: {
79
+ schema: Bool,
80
+ kind: "boolean",
81
+ strategy: "scalar",
82
+ enforcement: "absent",
83
+ doc: "Whether the legacy deployment algorithm (copying files) is used instead of the default.",
84
+ workspaceYaml: true,
85
+ anchor: "forcelegacydeploy"
86
+ },
87
+ extendNodePath: {
88
+ schema: Bool,
89
+ kind: "boolean",
90
+ strategy: "scalar",
91
+ enforcement: "absent",
92
+ doc: "Whether the NODE_PATH environment variable is set when running scripts.",
93
+ workspaceYaml: true,
94
+ anchor: "extendnodepath"
95
+ },
96
+ preferSymlinkedExecutables: {
97
+ schema: Bool,
98
+ kind: "boolean",
99
+ strategy: "scalar",
100
+ enforcement: "absent",
101
+ doc: "Whether symlinks to executables are created instead of shell shims on non-Windows systems.",
102
+ workspaceYaml: true,
103
+ anchor: "prefersymlinkedexecutables"
104
+ },
105
+ ignoreCompatibilityDb: {
106
+ schema: Bool,
107
+ kind: "boolean",
108
+ strategy: "scalar",
109
+ enforcement: "absent",
110
+ doc: "Whether the built-in compatibility database of lifecycle script overrides is ignored.",
111
+ workspaceYaml: true,
112
+ anchor: "ignorecompatibilitydb"
113
+ },
114
+ optimisticRepeatInstall: {
115
+ schema: Bool,
116
+ kind: "boolean",
117
+ strategy: "scalar",
118
+ enforcement: "absent",
119
+ doc: "Whether pnpm skips integrity checks when the lockfile is up to date to speed up repeat installs.",
120
+ workspaceYaml: true,
121
+ anchor: "optimisticrepeatinstall"
122
+ },
123
+ recursiveInstall: {
124
+ schema: Bool,
125
+ kind: "boolean",
126
+ strategy: "scalar",
127
+ enforcement: "absent",
128
+ doc: "Whether pnpm installs all projects in the workspace when running install in a workspace.",
129
+ workspaceYaml: true,
130
+ anchor: "recursiveinstall"
131
+ },
132
+ engineStrict: {
133
+ schema: Bool,
134
+ kind: "boolean",
135
+ strategy: "scalar",
136
+ enforcement: "absent",
137
+ doc: "Whether pnpm fails if a dependency's engines field is incompatible with the current Node.js version.",
138
+ workspaceYaml: true,
139
+ anchor: "enginestrict"
140
+ }
141
+ };
142
+
143
+ //#endregion
144
+ export { misc };
@@ -0,0 +1,108 @@
1
+ import { Bool, Num, Str, StringArray } from "./schemas.js";
2
+
3
+ //#region src/descriptors/network.ts
4
+ /** The 11 network tuning + publish fields. @internal */
5
+ const network = {
6
+ networkConcurrency: {
7
+ schema: Num,
8
+ kind: "number",
9
+ strategy: "scalar",
10
+ enforcement: "absent",
11
+ doc: "Maximum number of concurrent network requests pnpm is allowed to make.",
12
+ workspaceYaml: true,
13
+ anchor: "networkconcurrency"
14
+ },
15
+ fetchRetries: {
16
+ schema: Num,
17
+ kind: "number",
18
+ strategy: "scalar",
19
+ enforcement: "absent",
20
+ doc: "Number of times pnpm retries fetching a package from the registry on failure.",
21
+ workspaceYaml: true,
22
+ anchor: "fetchretries"
23
+ },
24
+ fetchRetryFactor: {
25
+ schema: Num,
26
+ kind: "number",
27
+ strategy: "scalar",
28
+ enforcement: "absent",
29
+ doc: "Exponential factor used when calculating retry delays for failed fetches.",
30
+ workspaceYaml: true,
31
+ anchor: "fetchretryfactor"
32
+ },
33
+ fetchRetryMintimeout: {
34
+ schema: Num,
35
+ kind: "number",
36
+ strategy: "scalar",
37
+ enforcement: "absent",
38
+ doc: "Minimum timeout (ms) for a single fetch retry attempt.",
39
+ workspaceYaml: true,
40
+ anchor: "fetchretrymintimeout"
41
+ },
42
+ fetchRetryMaxtimeout: {
43
+ schema: Num,
44
+ kind: "number",
45
+ strategy: "scalar",
46
+ enforcement: "absent",
47
+ doc: "Maximum timeout (ms) for a single fetch retry attempt.",
48
+ workspaceYaml: true,
49
+ anchor: "fetchretrymaxtimeout"
50
+ },
51
+ fetchTimeout: {
52
+ schema: Num,
53
+ kind: "number",
54
+ strategy: "scalar",
55
+ enforcement: "absent",
56
+ doc: "Maximum amount of time (ms) to wait for an HTTP response from the registry.",
57
+ workspaceYaml: true,
58
+ anchor: "fetchtimeout"
59
+ },
60
+ gitShallowHosts: {
61
+ schema: StringArray,
62
+ kind: "stringArray",
63
+ strategy: "arrayUnion",
64
+ enforcement: "absent",
65
+ doc: "Hosts from which git-protocol dependencies are cloned using a shallow fetch.",
66
+ workspaceYaml: true,
67
+ anchor: "gitshallowhosts"
68
+ },
69
+ provenance: {
70
+ schema: Bool,
71
+ kind: "boolean",
72
+ strategy: "scalar",
73
+ enforcement: "absent",
74
+ doc: "Whether packages are published with provenance attestation when supported by the registry.",
75
+ workspaceYaml: true,
76
+ anchor: "provenance"
77
+ },
78
+ gitChecks: {
79
+ schema: Bool,
80
+ kind: "boolean",
81
+ strategy: "scalar",
82
+ enforcement: "absent",
83
+ doc: "Whether pnpm checks that the repository is clean before publishing.",
84
+ workspaceYaml: true,
85
+ anchor: "gitchecks"
86
+ },
87
+ embedReadme: {
88
+ schema: Bool,
89
+ kind: "boolean",
90
+ strategy: "scalar",
91
+ enforcement: "absent",
92
+ doc: "Whether the README file is embedded in the package tarball on publish.",
93
+ workspaceYaml: true,
94
+ anchor: "embedreadme"
95
+ },
96
+ publishBranch: {
97
+ schema: Str,
98
+ kind: "string",
99
+ strategy: "scalar",
100
+ enforcement: "absent",
101
+ doc: "Branch that is allowed to publish packages; publishing from other branches is blocked.",
102
+ workspaceYaml: true,
103
+ anchor: "publishbranch"
104
+ }
105
+ };
106
+
107
+ //#endregion
108
+ export { network };
@@ -0,0 +1,250 @@
1
+ import { Bool, BooleanRecord, Num, Str, StringArray, StringArrayRecord, StringRecord, UnknownRecord } from "./schemas.js";
2
+ import { Schema } from "effect";
3
+
4
+ //#region 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({
23
+ key: Str,
24
+ value: StringRecord
25
+ }),
26
+ kind: "object",
27
+ strategy: "catalogs",
28
+ enforcement: "warn",
29
+ doc: "Named version catalogs injected into pnpm config.",
30
+ workspaceYaml: true,
31
+ anchor: "catalogs",
32
+ samples: {
33
+ valid: [{ default: { lodash: "^4" } }],
34
+ invalid: ["x"]
35
+ }
36
+ },
37
+ confirmModulesPurge: {
38
+ schema: Bool,
39
+ kind: "boolean",
40
+ strategy: "scalar",
41
+ enforcement: "absent",
42
+ doc: "Whether pnpm prompts before purging node_modules (undocumented upstream).",
43
+ workspaceYaml: false
44
+ },
45
+ packageExtensions: {
46
+ schema: UnknownRecord,
47
+ kind: "unknownRecord",
48
+ strategy: "mapChildWins",
49
+ enforcement: "absent",
50
+ doc: "Per-package manifest overrides merged into the dependency graph.",
51
+ workspaceYaml: true,
52
+ anchor: "packageextensions"
53
+ },
54
+ allowedDeprecatedVersions: {
55
+ schema: StringRecord,
56
+ kind: "stringRecord",
57
+ strategy: "mapChildWins",
58
+ enforcement: "absent",
59
+ doc: "Deprecated versions explicitly allowed, keyed by package.",
60
+ workspaceYaml: true,
61
+ anchor: "alloweddeprecatedversions"
62
+ },
63
+ publicHoistPattern: {
64
+ schema: StringArray,
65
+ kind: "stringArray",
66
+ strategy: "arrayUnion",
67
+ enforcement: "absent",
68
+ doc: "Glob patterns hoisted to the root node_modules.",
69
+ workspaceYaml: true,
70
+ anchor: "publichoistpattern",
71
+ options: { excludeByRepo: true }
72
+ },
73
+ minimumReleaseAgeExclude: {
74
+ schema: StringArray,
75
+ kind: "stringArray",
76
+ strategy: "arrayUnion",
77
+ enforcement: "absent",
78
+ doc: "Packages excluded from the minimum-release-age quarantine.",
79
+ workspaceYaml: true,
80
+ anchor: "minimumreleaseageexclude"
81
+ },
82
+ supportedArchitectures: {
83
+ schema: StringArrayRecord,
84
+ kind: "stringArrayRecord",
85
+ strategy: "arrayRecordUnion",
86
+ enforcement: "absent",
87
+ doc: "Supported architectures, keyed by axis (os/cpu/libc).",
88
+ workspaceYaml: true,
89
+ anchor: "supportedarchitectures"
90
+ },
91
+ auditConfig: {
92
+ schema: StringArrayRecord,
93
+ kind: "stringArrayRecord",
94
+ strategy: "arrayRecordUnion",
95
+ enforcement: "absent",
96
+ doc: "Audit config exclusions, keyed by axis.",
97
+ workspaceYaml: true,
98
+ anchor: "auditconfig"
99
+ },
100
+ overrides: {
101
+ schema: StringRecord,
102
+ kind: "stringRecord",
103
+ strategy: "overrides",
104
+ enforcement: "warn",
105
+ doc: "Security version overrides, keyed by package selector.",
106
+ workspaceYaml: true,
107
+ anchor: "overrides"
108
+ },
109
+ peerDependencyRules: {
110
+ schema: PeerRulesSchema,
111
+ kind: "object",
112
+ strategy: "peerDependencyRules",
113
+ enforcement: "warn",
114
+ doc: "Peer dependency rules: allowed versions plus ignore/allow-any lists.",
115
+ workspaceYaml: true,
116
+ anchor: "peerdependencyrules",
117
+ samples: {
118
+ valid: [{ allowedVersions: { react: "18" } }, {}],
119
+ invalid: ["x"]
120
+ }
121
+ },
122
+ strictDepBuilds: {
123
+ schema: Bool,
124
+ kind: "boolean",
125
+ strategy: "securityFlag",
126
+ enforcement: "warn",
127
+ doc: "Whether dependency build scripts are blocked unless explicitly allowed.",
128
+ workspaceYaml: true,
129
+ anchor: "strictdepbuilds"
130
+ },
131
+ blockExoticSubdeps: {
132
+ schema: Bool,
133
+ kind: "boolean",
134
+ strategy: "securityFlag",
135
+ enforcement: "warn",
136
+ doc: "Whether exotic (non-registry) subdependencies are blocked.",
137
+ workspaceYaml: true,
138
+ anchor: "blockexoticsubdeps"
139
+ },
140
+ minimumReleaseAge: {
141
+ schema: Num,
142
+ kind: "number",
143
+ strategy: "securityMin",
144
+ enforcement: "warn",
145
+ doc: "Minimum age (minutes) a release must reach before it is installable.",
146
+ workspaceYaml: true,
147
+ anchor: "minimumreleaseage"
148
+ },
149
+ allowBuilds: {
150
+ schema: BooleanRecord,
151
+ kind: "booleanRecord",
152
+ strategy: "allowBuilds",
153
+ enforcement: "warn",
154
+ doc: "Packages whose build scripts are explicitly allowed to run.",
155
+ workspaceYaml: true,
156
+ anchor: "allowbuilds"
157
+ },
158
+ ignoredOptionalDependencies: {
159
+ schema: StringArray,
160
+ kind: "stringArray",
161
+ strategy: "arrayUnion",
162
+ enforcement: "absent",
163
+ doc: "Optional dependencies excluded from installation entirely.",
164
+ workspaceYaml: true,
165
+ anchor: "ignoredoptionaldependencies"
166
+ },
167
+ updateConfig: {
168
+ schema: Schema.Struct({ ignoreDependencies: Schema.optional(StringArray) }),
169
+ kind: "object",
170
+ strategy: "mapChildWins",
171
+ enforcement: "absent",
172
+ doc: "Per-dependency update behavior: which packages to ignore during updates.",
173
+ workspaceYaml: true,
174
+ anchor: "updateconfig",
175
+ samples: {
176
+ valid: [{}, { ignoreDependencies: ["a"] }],
177
+ invalid: ["x"]
178
+ }
179
+ },
180
+ catalog: {
181
+ schema: StringRecord,
182
+ kind: "stringRecord",
183
+ strategy: "mapChildWins",
184
+ enforcement: "warn",
185
+ doc: "Default version catalog entries merged as a single `default` catalog.",
186
+ workspaceYaml: true,
187
+ anchor: "catalog"
188
+ },
189
+ minimumReleaseAgeStrict: {
190
+ schema: Bool,
191
+ kind: "boolean",
192
+ strategy: "scalar",
193
+ enforcement: "warn",
194
+ doc: "Whether any resolution fails when a package violates minimum-release-age.",
195
+ workspaceYaml: true,
196
+ anchor: "minimumreleaseagestrict"
197
+ },
198
+ minimumReleaseAgeIgnoreMissingTime: {
199
+ schema: Bool,
200
+ kind: "boolean",
201
+ strategy: "scalar",
202
+ enforcement: "warn",
203
+ doc: "Whether to skip the release-age check when publish-time metadata is absent.",
204
+ workspaceYaml: true,
205
+ anchor: "minimumreleaseageignoremissingtime"
206
+ },
207
+ trustPolicy: {
208
+ schema: Schema.Literal("off", "no-downgrade"),
209
+ kind: "enum",
210
+ strategy: "scalar",
211
+ enforcement: "warn",
212
+ doc: "Defines what package integrity verification is enforced on installs.",
213
+ workspaceYaml: true,
214
+ anchor: "trustpolicy",
215
+ samples: {
216
+ valid: ["off"],
217
+ invalid: ["x"]
218
+ }
219
+ },
220
+ trustPolicyExclude: {
221
+ schema: StringArray,
222
+ kind: "stringArray",
223
+ strategy: "arrayUnion",
224
+ enforcement: "warn",
225
+ doc: "Packages excluded from trust-policy enforcement.",
226
+ workspaceYaml: true,
227
+ anchor: "trustpolicyexclude"
228
+ },
229
+ trustPolicyIgnoreAfter: {
230
+ schema: Num,
231
+ kind: "number",
232
+ strategy: "scalar",
233
+ enforcement: "warn",
234
+ doc: "Minutes after installation after which the trust check is skipped.",
235
+ workspaceYaml: true,
236
+ anchor: "trustpolicyignoreafter"
237
+ },
238
+ trustLockfile: {
239
+ schema: Bool,
240
+ kind: "boolean",
241
+ strategy: "scalar",
242
+ enforcement: "warn",
243
+ doc: "Whether the lockfile alone is trusted without re-verifying each package's integrity.",
244
+ workspaceYaml: true,
245
+ anchor: "trustlockfile"
246
+ }
247
+ };
248
+
249
+ //#endregion
250
+ export { resolution };