@vitest-agent/pnpm-plugin-vitest-agent 0.0.0-stage → 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 C. Spencer Beggs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,72 @@
1
- # Temporary Holding Version
1
+ # @vitest-agent/pnpm-plugin-vitest-agent
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm](https://img.shields.io/npm/v/@vitest-agent%2Fpnpm-plugin-vitest-agent?label=npm&color=cb3837)](https://www.npmjs.com/package/@vitest-agent/pnpm-plugin-vitest-agent)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-4caf50.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node.js %3E%3D24.11.0](https://img.shields.io/badge/Node.js-%3E%3D24.11.0-5fa04e.svg)](https://nodejs.org/)
6
+ [![pnpm](https://img.shields.io/badge/pnpm-%3E%3D11-f69220.svg)](https://pnpm.io/)
7
+
8
+ A pnpm [config dependency](https://pnpm.io/config-dependencies) that serves two [pnpm catalogs](https://pnpm.io/catalogs) to your workspace:
9
+
10
+ - **`vitest-agent`**: every published `@vitest-agent/*` package at its current release.
11
+ - **`vitest`**: Vitest, `@vitest/coverage-v8`, `@vitest/coverage-istanbul` and `vite`, at the ranges `@vitest-agent/plugin` is built and tested against.
12
+
13
+ Each has a `:peers` twin (`vitest-agent:peers`, `vitest:peers`) with every range floored to its minor, for use in `peerDependencies`.
14
+
15
+ ## Why
16
+
17
+ `@vitest-agent/plugin` declares which Vitest it supports through its peer ranges. Copy those ranges into your own manifests and they drift: the plugin moves to a new Vitest, your literal `^5.1.0` stays behind, and every bump means editing every manifest by hand. With this config dependency your manifests write `catalog:vitest`, and one config-dependency bump moves Vitest in step with the plugin.
18
+
19
+ ## Install
20
+
21
+ Add it as a **config dependency**, not a regular dependency:
22
+
23
+ ```bash
24
+ pnpm add --config @vitest-agent/pnpm-plugin-vitest-agent
25
+ ```
26
+
27
+ Requires pnpm 11 or newer and Node.js >=24.11.0. Config dependencies and catalogs are pnpm features; there is no npm or bun equivalent.
28
+
29
+ If your workspace sets `minimumReleaseAge`, exclude the plugin so a fresh release installs at once:
30
+
31
+ ```yaml
32
+ minimumReleaseAgeExclude:
33
+ - "@vitest-agent/pnpm-plugin-vitest-agent"
34
+ ```
35
+
36
+ The plugin itself adds `@vitest-agent/*` to `minimumReleaseAgeExclude`, so the family's own releases install the day they ship. It leaves Vitest and vite under your quarantine; add `vitest`, `@vitest/*` and `vite` to your own list if you want them to install at once.
37
+
38
+ ## Usage
39
+
40
+ Dependencies take `vitest-agent` and `vitest`:
41
+
42
+ ```json
43
+ {
44
+ "devDependencies": {
45
+ "@vitest-agent/plugin": "catalog:vitest-agent",
46
+ "@vitest/coverage-v8": "catalog:vitest",
47
+ "vitest": "catalog:vitest"
48
+ }
49
+ }
50
+ ```
51
+
52
+ A package that publishes a peer on Vitest takes it from `vitest:peers`:
53
+
54
+ ```json
55
+ {
56
+ "peerDependencies": {
57
+ "vitest": "catalog:vitest:peers"
58
+ }
59
+ }
60
+ ```
61
+
62
+ Use the `:peers` twin for every peer. `pnpm pack` writes a `catalog:` specifier as the catalog's value, so a peer spelled `catalog:vitest` publishes the dependency range rather than the floored peer range.
63
+
64
+ A catalog entry in your own `pnpm-workspace.yaml` wins over the served one; the plugin prints a warning naming each override at install time.
65
+
66
+ ## What it does not do
67
+
68
+ It ships catalogs, `minimumReleaseAgeExclude` entries and a `publicHoistPattern` of `vitest`, `@vitest/*` and `vite`, which puts the `vitest` bin, the coverage providers and vite at the workspace root so a root `vitest.config.ts` and a root `vitest run` resolve them even when only a workspace package declares them. No overrides, and no code API beyond a read-only `catalogs` export.
69
+
70
+ ## License
71
+
72
+ [MIT](./LICENSE)
@@ -0,0 +1,29 @@
1
+ @vitest-agent/pnpm-plugin-vitest-agent includes code from the following packages, inlined at build time.
2
+
3
+ --------------------------------------------------------------------------------
4
+ rolldown-pnpm-config@3.0.7
5
+ License: MIT
6
+
7
+ LICENSE:
8
+
9
+ MIT License
10
+
11
+ Copyright (c) 2026 C. Spencer Beggs
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
package/index.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The catalogs a consumer installs, as the plugin's `updateConfig` hook presents
3
+ * them to pnpm: `vitest-agent` (every publishable `@vitest-agent/*` package) and
4
+ * `vitest` (Vitest and the packages `@vitest-agent/plugin` peers on), each with a
5
+ * `:peers` twin whose ranges are floored to their minor for use in
6
+ * `peerDependencies`.
7
+ *
8
+ * @public
9
+ */
10
+ export declare const catalogs: ReadonlyMap<string, ReadonlyMap<string, string>>;
11
+ //# sourceMappingURL=index.d.ts.map
package/index.js ADDED
@@ -0,0 +1,54 @@
1
+ // \0rolldown-pnpm-config/virtual/catalogs
2
+ const catalogs$1 = /* @__PURE__ */ new Map([
3
+ ["vitest", /* @__PURE__ */ new Map([
4
+ ["@vitest/coverage-istanbul", "^5.1.2"],
5
+ ["@vitest/coverage-v8", "^5.1.2"],
6
+ ["vite", "^8.4.0"],
7
+ ["vitest", "^5.1.2"]
8
+ ])],
9
+ ["vitest-agent", /* @__PURE__ */ new Map([
10
+ ["@vitest-agent/cli", "^4.1.23"],
11
+ ["@vitest-agent/engine", "^3.4.3"],
12
+ ["@vitest-agent/mcp", "^6.3.3"],
13
+ ["@vitest-agent/plugin", "^6.2.3"],
14
+ ["@vitest-agent/reporter", "^6.2.2"],
15
+ ["@vitest-agent/sdk", "^9.2.2"],
16
+ ["@vitest-agent/sidecar", "^2.2.25"],
17
+ ["@vitest-agent/ui", "^6.1.2"]
18
+ ])],
19
+ ["vitest-agent:peers", /* @__PURE__ */ new Map([
20
+ ["@vitest-agent/cli", "^4.1.0"],
21
+ ["@vitest-agent/engine", "^3.4.0"],
22
+ ["@vitest-agent/mcp", "^6.3.0"],
23
+ ["@vitest-agent/plugin", "^6.2.0"],
24
+ ["@vitest-agent/reporter", "^6.2.0"],
25
+ ["@vitest-agent/sdk", "^9.2.0"],
26
+ ["@vitest-agent/sidecar", "^2.2.0"],
27
+ ["@vitest-agent/ui", "^6.1.0"]
28
+ ])],
29
+ ["vitest:peers", /* @__PURE__ */ new Map([
30
+ ["@vitest/coverage-istanbul", "^5.1.0"],
31
+ ["@vitest/coverage-v8", "^5.1.0"],
32
+ ["vite", "^8.4.0"],
33
+ ["vitest", "^5.1.0"]
34
+ ])]
35
+ ]);
36
+
37
+ // src/index.ts
38
+ /**
39
+ * The catalogs a consumer installs, as the plugin's `updateConfig` hook presents
40
+ * them to pnpm: `vitest-agent` (every publishable `@vitest-agent/*` package) and
41
+ * `vitest` (Vitest and the packages `@vitest-agent/plugin` peers on), each with a
42
+ * `:peers` twin whose ranges are floored to their minor for use in
43
+ * `peerDependencies`.
44
+ *
45
+ * @public
46
+ */
47
+ const catalogs = /* @__PURE__ */ new Map([
48
+ ["vitest-agent", new Map(catalogs$1.get("vitest-agent") ?? [])],
49
+ ["vitest-agent:peers", new Map(catalogs$1.get("vitest-agent:peers") ?? [])],
50
+ ["vitest", new Map(catalogs$1.get("vitest") ?? [])],
51
+ ["vitest:peers", new Map(catalogs$1.get("vitest:peers") ?? [])]
52
+ ]);
53
+
54
+ export { catalogs };
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
- "name": "@vitest-agent/pnpm-plugin-vitest-agent",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@vitest-agent/pnpm-plugin-vitest-agent",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "description": "pnpm config dependency serving the vitest-agent and vitest catalogs.",
6
+ "keywords": [
7
+ "pnpm",
8
+ "pnpm-plugin",
9
+ "config-dependency",
10
+ "catalog",
11
+ "vitest",
12
+ "vitest-agent"
13
+ ],
14
+ "homepage": "https://github.com/spencerbeggs/vitest-agent/tree/main/packages/pnpm-plugin-vitest-agent#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/spencerbeggs/vitest-agent/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/spencerbeggs/vitest-agent.git",
21
+ "directory": "packages/pnpm-plugin-vitest-agent"
22
+ },
23
+ "license": "MIT",
24
+ "author": {
25
+ "name": "C. Spencer Beggs",
26
+ "email": "spencer@beggs.codes",
27
+ "url": "https://spencerbeg.gs"
28
+ },
29
+ "type": "module",
30
+ "exports": {
31
+ ".": {
32
+ "types": "./index.d.ts",
33
+ "import": "./index.js",
34
+ "default": "./index.js"
35
+ },
36
+ "./package.json": "./package.json"
37
+ },
38
+ "engines": {
39
+ "node": ">=24.11.0"
40
+ }
41
+ }
package/pnpmfile.mjs ADDED
@@ -0,0 +1,571 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+
4
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/ctx.js
5
+ /**
6
+ * Resolve the consuming repo's root package name. Prefers pnpm's
7
+ * `rootProjectManifest.name`, falling back to reading `package.json` from the
8
+ * workspace/lockfile dir.
9
+ *
10
+ * @internal
11
+ */
12
+ function resolveRootName(config) {
13
+ const c = config;
14
+ if (c.rootProjectManifest?.name) return c.rootProjectManifest.name;
15
+ const rootDir = c.rootProjectManifestDir ?? c.lockfileDir ?? c.workspaceDir ?? c.dir ?? process.cwd();
16
+ try {
17
+ return JSON.parse(readFileSync(join(rootDir, "package.json"), "utf8")).name;
18
+ } catch {
19
+ return;
20
+ }
21
+ }
22
+ /**
23
+ * Drop packages assigned to the consuming repo from a merged hoist list.
24
+ * Drop packages listed in the per-repo exclusion table (`byRepo`).
25
+ *
26
+ * @param merged - The full merged hoist-pattern list before repo-specific exclusions.
27
+ * @param ctx - Runtime context; `ctx.rootName` is the consuming repo's root `package.json` `name`.
28
+ * @param byRepo Keyed by consuming-repo package.json name; value = hoist patterns dropped in that repo.
29
+ * @internal
30
+ */
31
+ function excludeByRepo(merged, ctx, byRepo) {
32
+ const exclude = ctx.rootName ? byRepo[ctx.rootName] : void 0;
33
+ if (!exclude || exclude.length === 0) return merged;
34
+ const set = new Set(exclude);
35
+ return merged.filter((p) => !set.has(p));
36
+ }
37
+
38
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/enforcement.js
39
+ /**
40
+ * Thrown when an `error`-enforced field diverges. A zero-dependency plain
41
+ * `Error` subclass (NOT an Effect type) so it survives in the bundled pnpmfile.
42
+ * It is intended to fail the install and must never be swallowed by an install
43
+ * guard — see the note in `runtime/index.ts`.
44
+ *
45
+ * @internal
46
+ */
47
+ var EnforcementError = class extends Error {
48
+ constructor(message) {
49
+ super(message);
50
+ this.name = "EnforcementError";
51
+ }
52
+ };
53
+ /**
54
+ * Apply enforcement to a strategy result, partitioning its divergences into
55
+ * override and security buckets for the runtime to print. When enforcement is
56
+ * `error` and there is at least one divergence, throws {@link EnforcementError}.
57
+ *
58
+ * @internal
59
+ */
60
+ function applyEnforcement(field, result, enforcement) {
61
+ const overrides = [];
62
+ const security = [];
63
+ if (result.divergences.length > 0 && enforcement === "error") throw new EnforcementError(`Field "${field}" is enforced (error) but the local config diverges: ${result.divergences.map((d) => d.setting).join(", ")}`);
64
+ if (result.divergences.length > 0 && enforcement === "warn") for (const d of result.divergences) (d.kind === "security" ? security : overrides).push(d);
65
+ return {
66
+ value: result.merged,
67
+ overrides,
68
+ security
69
+ };
70
+ }
71
+
72
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/strategies/arrays.js
73
+ /** Code-unit order: locale-independent, so the render is the same on every machine. */
74
+ const byCodeUnit = (a, b) => a < b ? -1 : a > b ? 1 : 0;
75
+ /** Union `managed` with `local` (when present), deduped and sorted for a stable render. @internal */
76
+ function unionSort(managed, local) {
77
+ const set = new Set(managed);
78
+ for (const item of local ?? []) set.add(item);
79
+ return [...set].sort(byCodeUnit);
80
+ }
81
+ /**
82
+ * Union + sort string arrays; child entries are added to the managed set. Quiet.
83
+ *
84
+ * @internal
85
+ */
86
+ const arrayUnion = (base, local) => ({
87
+ merged: unionSort(base ?? [], local),
88
+ divergences: []
89
+ });
90
+ /**
91
+ * Per-axis union of a record of string arrays; drops empty axes. Quiet.
92
+ *
93
+ * @internal
94
+ */
95
+ const arrayRecordUnion = (base, local) => {
96
+ const managed = base ?? {};
97
+ const child = local ?? {};
98
+ const keys = /* @__PURE__ */ new Set([...Object.keys(managed), ...Object.keys(child)]);
99
+ const result = {};
100
+ for (const key of [...keys].sort(byCodeUnit)) {
101
+ const merged = unionSort(managed[key] ?? [], child[key]);
102
+ if (merged.length > 0) result[key] = merged;
103
+ }
104
+ return {
105
+ merged: result,
106
+ divergences: []
107
+ };
108
+ };
109
+ /**
110
+ * A settings section with list and scalar keys (`audit`, `update`): a key whose
111
+ * managed or local value is a string list is unioned like `arrayUnion`, so a
112
+ * consumer's `audit.ignore` adds to the managed advisories instead of replacing
113
+ * them; any other key is `child ?? managed`. Quiet.
114
+ *
115
+ * @internal
116
+ */
117
+ const sectionMerge = (base, local) => {
118
+ const managed = base ?? {};
119
+ const child = local ?? {};
120
+ const result = {};
121
+ for (const key of [.../* @__PURE__ */ new Set([...Object.keys(managed), ...Object.keys(child)])].sort(byCodeUnit)) {
122
+ const m = managed[key];
123
+ const c = child[key];
124
+ if (Array.isArray(m) || Array.isArray(c)) result[key] = unionSort(Array.isArray(m) ? m : [], Array.isArray(c) ? c : void 0);
125
+ else {
126
+ const value = c ?? m;
127
+ if (value !== void 0) result[key] = value;
128
+ }
129
+ }
130
+ return {
131
+ merged: result,
132
+ divergences: []
133
+ };
134
+ };
135
+
136
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/strategies/overrides.js
137
+ /**
138
+ * Child wins per key over a managed string map; any differing key is reported
139
+ * as an override divergence under `<prefix>.<key>`.
140
+ *
141
+ * @internal
142
+ */
143
+ function mergeMapDetect(prefix, managed, child) {
144
+ const merged = { ...managed };
145
+ const divergences = [];
146
+ for (const [k, childVersion] of Object.entries(child)) {
147
+ const managedVersion = managed[k];
148
+ if (managedVersion !== void 0 && managedVersion !== childVersion) divergences.push({
149
+ setting: `${prefix}.${k}`,
150
+ managedValue: managedVersion,
151
+ localValue: childVersion,
152
+ detail: "Local version overrides the managed version.",
153
+ kind: "override"
154
+ });
155
+ merged[k] = childVersion;
156
+ }
157
+ return {
158
+ merged,
159
+ divergences
160
+ };
161
+ }
162
+ /**
163
+ * Security overrides: child wins per key; any diff → override divergence.
164
+ * Merge overrides, flagging local divergences.
165
+ *
166
+ * @internal
167
+ */
168
+ const overrides = (base, local) => {
169
+ const { merged, divergences } = mergeMapDetect("overrides", base ?? {}, local ?? {});
170
+ return {
171
+ merged,
172
+ divergences
173
+ };
174
+ };
175
+ /**
176
+ * peerDependencyRules: `allowedVersions` is override-detected; `ignoreMissing`
177
+ * and `allowAny` are unioned + sorted. Merges peer-dependency rules,
178
+ * flagging version overrides.
179
+ *
180
+ * @internal
181
+ */
182
+ const peerDependencyRules = (base, local) => {
183
+ const managed = base ?? {};
184
+ const child = local ?? {};
185
+ const av = mergeMapDetect("peerDependencyRules.allowedVersions", managed.allowedVersions ?? {}, child.allowedVersions ?? {});
186
+ return {
187
+ merged: {
188
+ allowedVersions: av.merged,
189
+ ignoreMissing: unionSort(managed.ignoreMissing ?? [], child.ignoreMissing),
190
+ allowAny: unionSort(managed.allowAny ?? [], child.allowAny)
191
+ },
192
+ divergences: av.divergences
193
+ };
194
+ };
195
+
196
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/strategies/single-version.js
197
+ /** One comparator (`^`, `~`, `>=`, `=` or none) on one full version, prerelease allowed. */
198
+ const SINGLE_VERSION_RE = /^(?:\^|~|>=|=)?(\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)$/;
199
+ /**
200
+ * The single version a range names, or `null` when it names none (compound,
201
+ * wildcard, tag, `<`, `>`, partial). A zero-dependency mirror of the build's
202
+ * `singleVersionOf` in `catalogs.ts`; a test pins the two together.
203
+ *
204
+ * @internal
205
+ */
206
+ function singleVersionOf(range) {
207
+ return SINGLE_VERSION_RE.exec(range.trim())?.[1] ?? null;
208
+ }
209
+
210
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/strategies/catalogs.js
211
+ /**
212
+ * Merge each named catalog; child wins per package. Emits override divergences
213
+ * when a local version differs from the managed one.
214
+ *
215
+ * `options.exactCatalogs` lists the catalogs whose managed `<name>:exact`
216
+ * variant was derived from their ranges at build time. A local override of
217
+ * `<name>.<pkg>` naming a single version re-derives `<name>:exact.<pkg>` (only
218
+ * where the managed exact catalog carries `<pkg>`, and an explicit local
219
+ * `<name>:exact` entry wins). Without the option nothing is re-derived.
220
+ * `<name>:peers` is authored separately and is never re-derived; the
221
+ * divergence only notes that it keeps its managed value.
222
+ *
223
+ * @internal
224
+ */
225
+ const catalogs = (base, local, _ctx, options) => {
226
+ const managed = base ?? {};
227
+ const child = local ?? {};
228
+ const exactNames = new Set(Array.isArray(options?.exactCatalogs) ? options.exactCatalogs : []);
229
+ const divergences = [];
230
+ const merged = { ...child };
231
+ const followed = /* @__PURE__ */ new Map();
232
+ for (const [name, entries] of Object.entries(managed)) {
233
+ const cat = mergeMapDetect(`catalogs.${name}`, entries, child[name] ?? {});
234
+ merged[name] = cat.merged;
235
+ const managedExact = exactNames.has(name) ? managed[`${name}:exact`] : void 0;
236
+ const managedPeers = managed[`${name}:peers`];
237
+ const derived = {};
238
+ for (const d of cat.divergences) {
239
+ const pkg = d.setting.slice(`catalogs.${name}.`.length);
240
+ const notes = [];
241
+ if (managedExact?.[pkg] !== void 0 && child[`${name}:exact`]?.[pkg] !== void 0) notes.push(`The local ${name}:exact entry sets it instead.`);
242
+ else if (managedExact?.[pkg] !== void 0) {
243
+ const version = singleVersionOf(d.localValue);
244
+ if (version !== null) {
245
+ derived[pkg] = version;
246
+ notes.push(`${name}:exact followed it to ${version}.`);
247
+ } else notes.push(`${name}:exact was left at its managed value (${managedExact[pkg]}).`);
248
+ }
249
+ if (managedPeers?.[pkg] !== void 0) notes.push(`${name}:peers keeps its managed value.`);
250
+ divergences.push(notes.length > 0 ? {
251
+ ...d,
252
+ detail: `${d.detail} ${notes.join(" ")}`
253
+ } : d);
254
+ }
255
+ followed.set(`${name}:exact`, derived);
256
+ }
257
+ for (const [exactName, derived] of followed) {
258
+ if (Object.keys(derived).length === 0 || managed[exactName] === void 0) continue;
259
+ merged[exactName] = {
260
+ ...merged[exactName],
261
+ ...derived,
262
+ ...child[exactName] ?? {}
263
+ };
264
+ }
265
+ return {
266
+ merged,
267
+ divergences
268
+ };
269
+ };
270
+
271
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/strategies/maps.js
272
+ /**
273
+ * `{...managed, ...child}` — child wins per key. Quiet. Merges two maps,
274
+ * preferring child values.
275
+ *
276
+ * @internal
277
+ */
278
+ const mapChildWins = (base, local) => {
279
+ const managed = base ?? {};
280
+ const child = local;
281
+ return {
282
+ merged: child ? {
283
+ ...managed,
284
+ ...child
285
+ } : { ...managed },
286
+ divergences: []
287
+ };
288
+ };
289
+ /**
290
+ * `{...managed, ...child}`; flags enabling a build the managed config blocked.
291
+ * Detects allow-builds loosening.
292
+ *
293
+ * @internal
294
+ */
295
+ const allowBuilds = (base, local) => {
296
+ const managed = base ?? {};
297
+ const child = local ?? {};
298
+ const divergences = [];
299
+ for (const [pkg, childAllowed] of Object.entries(child)) if (childAllowed === true && managed[pkg] === false) divergences.push({
300
+ setting: `allowBuilds.${pkg}`,
301
+ managedValue: "false",
302
+ localValue: "true",
303
+ detail: `Enables build scripts for "${pkg}" that the managed config blocked.`,
304
+ kind: "security"
305
+ });
306
+ return {
307
+ merged: {
308
+ ...managed,
309
+ ...child
310
+ },
311
+ divergences
312
+ };
313
+ };
314
+
315
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/strategies/scalar.js
316
+ /**
317
+ * `child ?? base` — quiet (no divergences). Prefer local, fall back to managed.
318
+ *
319
+ * @internal
320
+ */
321
+ const scalar = (base, local) => ({
322
+ merged: local ?? base,
323
+ divergences: []
324
+ });
325
+ /**
326
+ * `child ?? base`; flags when child disables a managed boolean. The strategy is
327
+ * field-agnostic, so it emits `setting: ""`; the runtime fills the field name.
328
+ * Detects flag loosening.
329
+ *
330
+ * @internal
331
+ */
332
+ const securityFlag = (base, local) => {
333
+ const merged = local ?? base;
334
+ const divergences = [];
335
+ if (base === true && local === false) divergences.push({
336
+ setting: "",
337
+ managedValue: "true",
338
+ localValue: "false",
339
+ detail: "Disables a security check the managed config enabled.",
340
+ kind: "security"
341
+ });
342
+ return {
343
+ merged,
344
+ divergences
345
+ };
346
+ };
347
+ /**
348
+ * `child ?? base`; flags when child lowers a managed numeric floor (e.g. the
349
+ * release-age quarantine). Field-agnostic, so it emits `setting: ""`; the
350
+ * runtime fills the field name.
351
+ *
352
+ * @internal
353
+ */
354
+ const securityMin = (base, local) => {
355
+ const merged = local ?? base;
356
+ const divergences = [];
357
+ if (typeof base === "number" && typeof local === "number" && local < base) divergences.push({
358
+ setting: "",
359
+ managedValue: String(base),
360
+ localValue: String(local),
361
+ detail: `Lowers a managed security minimum from ${base} to ${local}.`,
362
+ kind: "security"
363
+ });
364
+ return {
365
+ merged,
366
+ divergences
367
+ };
368
+ };
369
+
370
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/strategies/table.js
371
+ /**
372
+ * Built-in strategies keyed by manifest name.
373
+ *
374
+ * @internal
375
+ */
376
+ const STRATEGY_TABLE = {
377
+ scalar,
378
+ catalogs,
379
+ mapChildWins,
380
+ arrayUnion,
381
+ arrayRecordUnion,
382
+ sectionMerge,
383
+ overrides,
384
+ peerDependencyRules,
385
+ securityFlag,
386
+ securityMin,
387
+ allowBuilds
388
+ };
389
+
390
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime/warnings.js
391
+ const WARNING_BOX_WIDTH = 75;
392
+ function pad(line) {
393
+ return `│${line}${" ".repeat(Math.max(0, WARNING_BOX_WIDTH - line.length - 2))}│`;
394
+ }
395
+ /**
396
+ * Format override divergences into a prominent warning box for console output,
397
+ * tagged with the emitting config's `name`. `Divergence.setting` is the
398
+ * already-resolved config path, printed directly.
399
+ *
400
+ * @internal
401
+ */
402
+ function formatOverrideWarning(divergences, name) {
403
+ if (divergences.length === 0) return "";
404
+ const border = "─".repeat(73);
405
+ const lines = [];
406
+ lines.push(`┌${border}┐`);
407
+ lines.push(pad(` [${name}]`));
408
+ lines.push(pad(" ⚠️ CATALOG OVERRIDE DETECTED"));
409
+ lines.push(`├${border}┤`);
410
+ lines.push(pad(" The following entries override managed versions:"));
411
+ lines.push(pad(""));
412
+ for (const d of divergences) {
413
+ lines.push(pad(` ${d.setting}`));
414
+ lines.push(pad(` Managed version: ${d.managedValue}`));
415
+ lines.push(pad(` Local override: ${d.localValue}`));
416
+ lines.push(pad(""));
417
+ }
418
+ lines.push(pad(" Local versions will be used. To use the managed defaults, remove"));
419
+ lines.push(pad(" these entries from your pnpm-workspace.yaml."));
420
+ lines.push(`└${border}┘`);
421
+ return lines.join("\n");
422
+ }
423
+ /**
424
+ * Format security-loosening divergences into a prominent box, tagged with the
425
+ * emitting config's `name`.
426
+ *
427
+ * @internal
428
+ */
429
+ function formatSecurityWarning(divergences, name) {
430
+ if (divergences.length === 0) return "";
431
+ const border = "─".repeat(73);
432
+ const lines = [];
433
+ lines.push(`┌${border}┐`);
434
+ lines.push(pad(` [${name}]`));
435
+ lines.push(pad(" ⚠️ SECURITY OVERRIDE DETECTED"));
436
+ lines.push(`├${border}┤`);
437
+ lines.push(pad(" The following entries weaken managed security defaults:"));
438
+ lines.push(pad(""));
439
+ for (const d of divergences) {
440
+ lines.push(pad(` ${d.setting}: managed=${d.managedValue} -> local=${d.localValue}`));
441
+ lines.push(pad(` ${d.detail}`));
442
+ lines.push(pad(""));
443
+ }
444
+ lines.push(pad(" Local values will be used. Review these before shipping."));
445
+ lines.push(`└${border}┘`);
446
+ return lines.join("\n");
447
+ }
448
+
449
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.0.7_@types+react@19.3.3_redis@6.4.0_rolldown@1.3.4/node_modules/rolldown-pnpm-config/runtime.js
450
+ /**
451
+ * Build the pnpm hooks from frozen base data + a field→strategy manifest.
452
+ * Zero dependencies — bundled verbatim into the shipped pnpmfile.
453
+ *
454
+ * @remarks
455
+ * `updateConfig` deliberately has no catch-and-fall-back-to-local guard: an
456
+ * `error`-enforced divergence throws `EnforcementError`, which is meant to
457
+ * propagate and fail the install. If a swallow-guard is ever added here, it MUST
458
+ * rethrow `EnforcementError` (check `err instanceof EnforcementError` /
459
+ * `err.name === "EnforcementError"`) rather than fall back to the local config.
460
+ *
461
+ * @public
462
+ */
463
+ function createHooks(base, manifest, name) {
464
+ return { updateConfig(config) {
465
+ const ctx = { rootName: resolveRootName(config) };
466
+ const out = { ...config };
467
+ const allOverrides = [];
468
+ const allSecurity = [];
469
+ for (const [field, entry] of Object.entries(manifest)) {
470
+ const strategy = STRATEGY_TABLE[entry.strategy];
471
+ if (!strategy) continue;
472
+ const result = strategy(base[field], config[field], ctx, entry.options);
473
+ let merged = result.merged;
474
+ const byRepo = entry.options?.excludeByRepo;
475
+ if (byRepo && Array.isArray(merged)) merged = excludeByRepo(merged, ctx, byRepo);
476
+ const named = result.divergences.map((d) => d.setting === "" ? {
477
+ ...d,
478
+ setting: field
479
+ } : d);
480
+ const { value, overrides, security } = applyEnforcement(field, {
481
+ merged,
482
+ divergences: named
483
+ }, entry.enforcement);
484
+ allOverrides.push(...overrides);
485
+ allSecurity.push(...security);
486
+ if (value !== void 0 && !(typeof value === "object" && value !== null && Object.keys(value).length === 0)) out[field] = value;
487
+ }
488
+ const ob = formatOverrideWarning(allOverrides, name);
489
+ if (ob) console.warn(ob);
490
+ const sb = formatSecurityWarning(allSecurity, name);
491
+ if (sb) console.warn(sb);
492
+ return out;
493
+ } };
494
+ }
495
+
496
+ // \0rolldown-pnpm-config/virtual/pnpmfile
497
+ const hooks$1 = createHooks({
498
+ "catalogs": {
499
+ "vitest": {
500
+ "@vitest/coverage-istanbul": "^5.1.2",
501
+ "@vitest/coverage-v8": "^5.1.2",
502
+ "vite": "^8.4.0",
503
+ "vitest": "^5.1.2"
504
+ },
505
+ "vitest-agent": {
506
+ "@vitest-agent/cli": "^4.1.23",
507
+ "@vitest-agent/engine": "^3.4.3",
508
+ "@vitest-agent/mcp": "^6.3.3",
509
+ "@vitest-agent/plugin": "^6.2.3",
510
+ "@vitest-agent/reporter": "^6.2.2",
511
+ "@vitest-agent/sdk": "^9.2.2",
512
+ "@vitest-agent/sidecar": "^2.2.25",
513
+ "@vitest-agent/ui": "^6.1.2"
514
+ },
515
+ "vitest-agent:peers": {
516
+ "@vitest-agent/cli": "^4.1.0",
517
+ "@vitest-agent/engine": "^3.4.0",
518
+ "@vitest-agent/mcp": "^6.3.0",
519
+ "@vitest-agent/plugin": "^6.2.0",
520
+ "@vitest-agent/reporter": "^6.2.0",
521
+ "@vitest-agent/sdk": "^9.2.0",
522
+ "@vitest-agent/sidecar": "^2.2.0",
523
+ "@vitest-agent/ui": "^6.1.0"
524
+ },
525
+ "vitest:peers": {
526
+ "@vitest/coverage-istanbul": "^5.1.0",
527
+ "@vitest/coverage-v8": "^5.1.0",
528
+ "vite": "^8.4.0",
529
+ "vitest": "^5.1.0"
530
+ }
531
+ },
532
+ "minimumReleaseAgeExclude": ["@vitest-agent/*"],
533
+ "publicHoistPattern": [
534
+ "vitest",
535
+ "@vitest/*",
536
+ "vite"
537
+ ]
538
+ }, {
539
+ "catalogs": {
540
+ "enforcement": "warn",
541
+ "strategy": "catalogs"
542
+ },
543
+ "minimumReleaseAgeExclude": {
544
+ "enforcement": "absent",
545
+ "strategy": "arrayUnion"
546
+ },
547
+ "publicHoistPattern": {
548
+ "enforcement": "absent",
549
+ "strategy": "arrayUnion"
550
+ }
551
+ }, "@vitest-agent/pnpm-plugin-vitest-agent");
552
+
553
+ // src/pnpmfile.ts
554
+ /**
555
+ * The plugin's pnpm hooks: the generated `updateConfig`, unchanged.
556
+ *
557
+ * @remarks
558
+ * It serves all four declared catalogs. `vitest-agent` and `vitest` are for
559
+ * dependencies; `vitest-agent:peers` and `vitest:peers` floor each range to its
560
+ * minor and are for peers. `pnpm pack` writes a `catalog:` specifier as the
561
+ * catalog's value, so a peer spelled `catalog:vitest` would publish the
562
+ * dependency range rather than the peer floor. A consumer's own catalog entries
563
+ * win over the served ones.
564
+ *
565
+ * @public
566
+ */
567
+ const hooks = { updateConfig(config) {
568
+ return hooks$1.updateConfig(config);
569
+ } };
570
+
571
+ export { hooks };
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.60.2"
9
+ }
10
+ ]
11
+ }