@vitest-agent/pnpm-plugin-vitest-agent 0.0.0-stage → 0.1.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.
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.1.0
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.24"],
11
+ ["@vitest-agent/engine", "^3.5.0"],
12
+ ["@vitest-agent/mcp", "^6.4.0"],
13
+ ["@vitest-agent/plugin", "^6.2.4"],
14
+ ["@vitest-agent/reporter", "^6.2.3"],
15
+ ["@vitest-agent/sdk", "^9.3.0"],
16
+ ["@vitest-agent/sidecar", "^2.2.26"],
17
+ ["@vitest-agent/ui", "^6.1.3"]
18
+ ])],
19
+ ["vitest-agent:peers", /* @__PURE__ */ new Map([
20
+ ["@vitest-agent/cli", "^4.1.0"],
21
+ ["@vitest-agent/engine", "^3.5.0"],
22
+ ["@vitest-agent/mcp", "^6.4.0"],
23
+ ["@vitest-agent/plugin", "^6.2.0"],
24
+ ["@vitest-agent/reporter", "^6.2.0"],
25
+ ["@vitest-agent/sdk", "^9.3.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.1",
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,576 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+
4
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/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.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/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.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/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 two records of string arrays, sorted by key; drops empty
92
+ * axes. Shared by the strategy and by `export`'s keep-the-file merge.
93
+ *
94
+ * @internal
95
+ */
96
+ function unionRecord(managed, child) {
97
+ const keys = /* @__PURE__ */ new Set([...Object.keys(managed), ...Object.keys(child)]);
98
+ const result = {};
99
+ for (const key of [...keys].sort(byCodeUnit)) {
100
+ const merged = unionSort(managed[key] ?? [], child[key]);
101
+ if (merged.length > 0) result[key] = merged;
102
+ }
103
+ return result;
104
+ }
105
+ /**
106
+ * Per-axis union of a record of string arrays; drops empty axes. Quiet.
107
+ *
108
+ * @internal
109
+ */
110
+ const arrayRecordUnion = (base, local) => ({
111
+ merged: unionRecord(base ?? {}, local ?? {}),
112
+ divergences: []
113
+ });
114
+ /**
115
+ * A settings section with list and scalar keys (`audit`, `update`): a key whose
116
+ * managed or local value is a string list is unioned like `arrayUnion`, so a
117
+ * consumer's `audit.ignore` adds to the managed advisories instead of replacing
118
+ * them; any other key is `child ?? managed`. Quiet.
119
+ *
120
+ * @internal
121
+ */
122
+ const sectionMerge = (base, local) => {
123
+ const managed = base ?? {};
124
+ const child = local ?? {};
125
+ const result = {};
126
+ for (const key of [.../* @__PURE__ */ new Set([...Object.keys(managed), ...Object.keys(child)])].sort(byCodeUnit)) {
127
+ const m = managed[key];
128
+ const c = child[key];
129
+ if (Array.isArray(m) || Array.isArray(c)) result[key] = unionSort(Array.isArray(m) ? m : [], Array.isArray(c) ? c : void 0);
130
+ else {
131
+ const value = c ?? m;
132
+ if (value !== void 0) result[key] = value;
133
+ }
134
+ }
135
+ return {
136
+ merged: result,
137
+ divergences: []
138
+ };
139
+ };
140
+
141
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/node_modules/rolldown-pnpm-config/runtime/strategies/overrides.js
142
+ /**
143
+ * Child wins per key over a managed string map; any differing key is reported
144
+ * as an override divergence under `<prefix>.<key>`.
145
+ *
146
+ * @internal
147
+ */
148
+ function mergeMapDetect(prefix, managed, child) {
149
+ const merged = { ...managed };
150
+ const divergences = [];
151
+ for (const [k, childVersion] of Object.entries(child)) {
152
+ const managedVersion = managed[k];
153
+ if (managedVersion !== void 0 && managedVersion !== childVersion) divergences.push({
154
+ setting: `${prefix}.${k}`,
155
+ managedValue: managedVersion,
156
+ localValue: childVersion,
157
+ detail: "Local version overrides the managed version.",
158
+ kind: "override"
159
+ });
160
+ merged[k] = childVersion;
161
+ }
162
+ return {
163
+ merged,
164
+ divergences
165
+ };
166
+ }
167
+ /**
168
+ * Security overrides: child wins per key; any diff → override divergence.
169
+ * Merge overrides, flagging local divergences.
170
+ *
171
+ * @internal
172
+ */
173
+ const overrides = (base, local) => {
174
+ const { merged, divergences } = mergeMapDetect("overrides", base ?? {}, local ?? {});
175
+ return {
176
+ merged,
177
+ divergences
178
+ };
179
+ };
180
+ /**
181
+ * peerDependencyRules: `allowedVersions` is override-detected; `ignoreMissing`
182
+ * and `allowAny` are unioned + sorted. Merges peer-dependency rules,
183
+ * flagging version overrides.
184
+ *
185
+ * @internal
186
+ */
187
+ const peerDependencyRules = (base, local) => {
188
+ const managed = base ?? {};
189
+ const child = local ?? {};
190
+ const av = mergeMapDetect("peerDependencyRules.allowedVersions", managed.allowedVersions ?? {}, child.allowedVersions ?? {});
191
+ return {
192
+ merged: {
193
+ allowedVersions: av.merged,
194
+ ignoreMissing: unionSort(managed.ignoreMissing ?? [], child.ignoreMissing),
195
+ allowAny: unionSort(managed.allowAny ?? [], child.allowAny)
196
+ },
197
+ divergences: av.divergences
198
+ };
199
+ };
200
+
201
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/node_modules/rolldown-pnpm-config/runtime/strategies/single-version.js
202
+ /** One comparator (`^`, `~`, `>=`, `=` or none) on one full version, prerelease allowed. */
203
+ const SINGLE_VERSION_RE = /^(?:\^|~|>=|=)?(\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)$/;
204
+ /**
205
+ * The single version a range names, or `null` when it names none (compound,
206
+ * wildcard, tag, `<`, `>`, partial). A zero-dependency mirror of the build's
207
+ * `singleVersionOf` in `catalogs.ts`; a test pins the two together.
208
+ *
209
+ * @internal
210
+ */
211
+ function singleVersionOf(range) {
212
+ return SINGLE_VERSION_RE.exec(range.trim())?.[1] ?? null;
213
+ }
214
+
215
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/node_modules/rolldown-pnpm-config/runtime/strategies/catalogs.js
216
+ /**
217
+ * Merge each named catalog; child wins per package. Emits override divergences
218
+ * when a local version differs from the managed one.
219
+ *
220
+ * `options.exactCatalogs` lists the catalogs whose managed `<name>:exact`
221
+ * variant was derived from their ranges at build time. A local override of
222
+ * `<name>.<pkg>` naming a single version re-derives `<name>:exact.<pkg>` (only
223
+ * where the managed exact catalog carries `<pkg>`, and an explicit local
224
+ * `<name>:exact` entry wins). Without the option nothing is re-derived.
225
+ * `<name>:peers` is authored separately and is never re-derived; the
226
+ * divergence only notes that it keeps its managed value.
227
+ *
228
+ * @internal
229
+ */
230
+ const catalogs = (base, local, _ctx, options) => {
231
+ const managed = base ?? {};
232
+ const child = local ?? {};
233
+ const exactNames = new Set(Array.isArray(options?.exactCatalogs) ? options.exactCatalogs : []);
234
+ const divergences = [];
235
+ const merged = { ...child };
236
+ const followed = /* @__PURE__ */ new Map();
237
+ for (const [name, entries] of Object.entries(managed)) {
238
+ const cat = mergeMapDetect(`catalogs.${name}`, entries, child[name] ?? {});
239
+ merged[name] = cat.merged;
240
+ const managedExact = exactNames.has(name) ? managed[`${name}:exact`] : void 0;
241
+ const managedPeers = managed[`${name}:peers`];
242
+ const derived = {};
243
+ for (const d of cat.divergences) {
244
+ const pkg = d.setting.slice(`catalogs.${name}.`.length);
245
+ const notes = [];
246
+ if (managedExact?.[pkg] !== void 0 && child[`${name}:exact`]?.[pkg] !== void 0) notes.push(`The local ${name}:exact entry sets it instead.`);
247
+ else if (managedExact?.[pkg] !== void 0) {
248
+ const version = singleVersionOf(d.localValue);
249
+ if (version !== null) {
250
+ derived[pkg] = version;
251
+ notes.push(`${name}:exact followed it to ${version}.`);
252
+ } else notes.push(`${name}:exact was left at its managed value (${managedExact[pkg]}).`);
253
+ }
254
+ if (managedPeers?.[pkg] !== void 0) notes.push(`${name}:peers keeps its managed value.`);
255
+ divergences.push(notes.length > 0 ? {
256
+ ...d,
257
+ detail: `${d.detail} ${notes.join(" ")}`
258
+ } : d);
259
+ }
260
+ followed.set(`${name}:exact`, derived);
261
+ }
262
+ for (const [exactName, derived] of followed) {
263
+ if (Object.keys(derived).length === 0 || managed[exactName] === void 0) continue;
264
+ merged[exactName] = {
265
+ ...merged[exactName],
266
+ ...derived,
267
+ ...child[exactName] ?? {}
268
+ };
269
+ }
270
+ return {
271
+ merged,
272
+ divergences
273
+ };
274
+ };
275
+
276
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/node_modules/rolldown-pnpm-config/runtime/strategies/maps.js
277
+ /**
278
+ * `{...managed, ...child}` — child wins per key. Quiet. Merges two maps,
279
+ * preferring child values.
280
+ *
281
+ * @internal
282
+ */
283
+ const mapChildWins = (base, local) => {
284
+ const managed = base ?? {};
285
+ const child = local;
286
+ return {
287
+ merged: child ? {
288
+ ...managed,
289
+ ...child
290
+ } : { ...managed },
291
+ divergences: []
292
+ };
293
+ };
294
+ /**
295
+ * `{...managed, ...child}`; flags enabling a build the managed config blocked.
296
+ * Detects allow-builds loosening.
297
+ *
298
+ * @internal
299
+ */
300
+ const allowBuilds = (base, local) => {
301
+ const managed = base ?? {};
302
+ const child = local ?? {};
303
+ const divergences = [];
304
+ for (const [pkg, childAllowed] of Object.entries(child)) if (childAllowed === true && managed[pkg] === false) divergences.push({
305
+ setting: `allowBuilds.${pkg}`,
306
+ managedValue: "false",
307
+ localValue: "true",
308
+ detail: `Enables build scripts for "${pkg}" that the managed config blocked.`,
309
+ kind: "security"
310
+ });
311
+ return {
312
+ merged: {
313
+ ...managed,
314
+ ...child
315
+ },
316
+ divergences
317
+ };
318
+ };
319
+
320
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/node_modules/rolldown-pnpm-config/runtime/strategies/scalar.js
321
+ /**
322
+ * `child ?? base` — quiet (no divergences). Prefer local, fall back to managed.
323
+ *
324
+ * @internal
325
+ */
326
+ const scalar = (base, local) => ({
327
+ merged: local ?? base,
328
+ divergences: []
329
+ });
330
+ /**
331
+ * `child ?? base`; flags when child disables a managed boolean. The strategy is
332
+ * field-agnostic, so it emits `setting: ""`; the runtime fills the field name.
333
+ * Detects flag loosening.
334
+ *
335
+ * @internal
336
+ */
337
+ const securityFlag = (base, local) => {
338
+ const merged = local ?? base;
339
+ const divergences = [];
340
+ if (base === true && local === false) divergences.push({
341
+ setting: "",
342
+ managedValue: "true",
343
+ localValue: "false",
344
+ detail: "Disables a security check the managed config enabled.",
345
+ kind: "security"
346
+ });
347
+ return {
348
+ merged,
349
+ divergences
350
+ };
351
+ };
352
+ /**
353
+ * `child ?? base`; flags when child lowers a managed numeric floor (e.g. the
354
+ * release-age quarantine). Field-agnostic, so it emits `setting: ""`; the
355
+ * runtime fills the field name.
356
+ *
357
+ * @internal
358
+ */
359
+ const securityMin = (base, local) => {
360
+ const merged = local ?? base;
361
+ const divergences = [];
362
+ if (typeof base === "number" && typeof local === "number" && local < base) divergences.push({
363
+ setting: "",
364
+ managedValue: String(base),
365
+ localValue: String(local),
366
+ detail: `Lowers a managed security minimum from ${base} to ${local}.`,
367
+ kind: "security"
368
+ });
369
+ return {
370
+ merged,
371
+ divergences
372
+ };
373
+ };
374
+
375
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/node_modules/rolldown-pnpm-config/runtime/strategies/table.js
376
+ /**
377
+ * Built-in strategies keyed by manifest name.
378
+ *
379
+ * @internal
380
+ */
381
+ const STRATEGY_TABLE = {
382
+ scalar,
383
+ catalogs,
384
+ mapChildWins,
385
+ arrayUnion,
386
+ arrayRecordUnion,
387
+ sectionMerge,
388
+ overrides,
389
+ peerDependencyRules,
390
+ securityFlag,
391
+ securityMin,
392
+ allowBuilds
393
+ };
394
+
395
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/node_modules/rolldown-pnpm-config/runtime/warnings.js
396
+ const WARNING_BOX_WIDTH = 75;
397
+ function pad(line) {
398
+ return `│${line}${" ".repeat(Math.max(0, WARNING_BOX_WIDTH - line.length - 2))}│`;
399
+ }
400
+ /**
401
+ * Format override divergences into a prominent warning box for console output,
402
+ * tagged with the emitting config's `name`. `Divergence.setting` is the
403
+ * already-resolved config path, printed directly.
404
+ *
405
+ * @internal
406
+ */
407
+ function formatOverrideWarning(divergences, name) {
408
+ if (divergences.length === 0) return "";
409
+ const border = "─".repeat(73);
410
+ const lines = [];
411
+ lines.push(`┌${border}┐`);
412
+ lines.push(pad(` [${name}]`));
413
+ lines.push(pad(" ⚠️ CATALOG OVERRIDE DETECTED"));
414
+ lines.push(`├${border}┤`);
415
+ lines.push(pad(" The following entries override managed versions:"));
416
+ lines.push(pad(""));
417
+ for (const d of divergences) {
418
+ lines.push(pad(` ${d.setting}`));
419
+ lines.push(pad(` Managed version: ${d.managedValue}`));
420
+ lines.push(pad(` Local override: ${d.localValue}`));
421
+ lines.push(pad(""));
422
+ }
423
+ lines.push(pad(" Local versions will be used. To use the managed defaults, remove"));
424
+ lines.push(pad(" these entries from your pnpm-workspace.yaml."));
425
+ lines.push(`└${border}┘`);
426
+ return lines.join("\n");
427
+ }
428
+ /**
429
+ * Format security-loosening divergences into a prominent box, tagged with the
430
+ * emitting config's `name`.
431
+ *
432
+ * @internal
433
+ */
434
+ function formatSecurityWarning(divergences, name) {
435
+ if (divergences.length === 0) return "";
436
+ const border = "─".repeat(73);
437
+ const lines = [];
438
+ lines.push(`┌${border}┐`);
439
+ lines.push(pad(` [${name}]`));
440
+ lines.push(pad(" ⚠️ SECURITY OVERRIDE DETECTED"));
441
+ lines.push(`├${border}┤`);
442
+ lines.push(pad(" The following entries weaken managed security defaults:"));
443
+ lines.push(pad(""));
444
+ for (const d of divergences) {
445
+ lines.push(pad(` ${d.setting}: managed=${d.managedValue} -> local=${d.localValue}`));
446
+ lines.push(pad(` ${d.detail}`));
447
+ lines.push(pad(""));
448
+ }
449
+ lines.push(pad(" Local values will be used. Review these before shipping."));
450
+ lines.push(`└${border}┘`);
451
+ return lines.join("\n");
452
+ }
453
+
454
+ // ../../node_modules/.pnpm/rolldown-pnpm-config@3.1.0_@effected+markdown-lint@0.3.2_@effected+toml@0.20.0_effect@4_a87c5ab72aa3836e2655add115da0874/node_modules/rolldown-pnpm-config/runtime.js
455
+ /**
456
+ * Build the pnpm hooks from frozen base data + a field→strategy manifest.
457
+ * Zero dependencies — bundled verbatim into the shipped pnpmfile.
458
+ *
459
+ * @remarks
460
+ * `updateConfig` deliberately has no catch-and-fall-back-to-local guard: an
461
+ * `error`-enforced divergence throws `EnforcementError`, which is meant to
462
+ * propagate and fail the install. If a swallow-guard is ever added here, it MUST
463
+ * rethrow `EnforcementError` (check `err instanceof EnforcementError` /
464
+ * `err.name === "EnforcementError"`) rather than fall back to the local config.
465
+ *
466
+ * @public
467
+ */
468
+ function createHooks(base, manifest, name) {
469
+ return { updateConfig(config) {
470
+ const ctx = { rootName: resolveRootName(config) };
471
+ const out = { ...config };
472
+ const allOverrides = [];
473
+ const allSecurity = [];
474
+ for (const [field, entry] of Object.entries(manifest)) {
475
+ const strategy = STRATEGY_TABLE[entry.strategy];
476
+ if (!strategy) continue;
477
+ const result = strategy(base[field], config[field], ctx, entry.options);
478
+ let merged = result.merged;
479
+ const byRepo = entry.options?.excludeByRepo;
480
+ if (byRepo && Array.isArray(merged)) merged = excludeByRepo(merged, ctx, byRepo);
481
+ const named = result.divergences.map((d) => d.setting === "" ? {
482
+ ...d,
483
+ setting: field
484
+ } : d);
485
+ const { value, overrides, security } = applyEnforcement(field, {
486
+ merged,
487
+ divergences: named
488
+ }, entry.enforcement);
489
+ allOverrides.push(...overrides);
490
+ allSecurity.push(...security);
491
+ if (value !== void 0 && !(typeof value === "object" && value !== null && Object.keys(value).length === 0)) out[field] = value;
492
+ }
493
+ const ob = formatOverrideWarning(allOverrides, name);
494
+ if (ob) console.warn(ob);
495
+ const sb = formatSecurityWarning(allSecurity, name);
496
+ if (sb) console.warn(sb);
497
+ return out;
498
+ } };
499
+ }
500
+
501
+ // \0rolldown-pnpm-config/virtual/pnpmfile
502
+ const hooks$1 = createHooks({
503
+ "catalogs": {
504
+ "vitest": {
505
+ "@vitest/coverage-istanbul": "^5.1.2",
506
+ "@vitest/coverage-v8": "^5.1.2",
507
+ "vite": "^8.4.0",
508
+ "vitest": "^5.1.2"
509
+ },
510
+ "vitest-agent": {
511
+ "@vitest-agent/cli": "^4.1.24",
512
+ "@vitest-agent/engine": "^3.5.0",
513
+ "@vitest-agent/mcp": "^6.4.0",
514
+ "@vitest-agent/plugin": "^6.2.4",
515
+ "@vitest-agent/reporter": "^6.2.3",
516
+ "@vitest-agent/sdk": "^9.3.0",
517
+ "@vitest-agent/sidecar": "^2.2.26",
518
+ "@vitest-agent/ui": "^6.1.3"
519
+ },
520
+ "vitest-agent:peers": {
521
+ "@vitest-agent/cli": "^4.1.0",
522
+ "@vitest-agent/engine": "^3.5.0",
523
+ "@vitest-agent/mcp": "^6.4.0",
524
+ "@vitest-agent/plugin": "^6.2.0",
525
+ "@vitest-agent/reporter": "^6.2.0",
526
+ "@vitest-agent/sdk": "^9.3.0",
527
+ "@vitest-agent/sidecar": "^2.2.0",
528
+ "@vitest-agent/ui": "^6.1.0"
529
+ },
530
+ "vitest:peers": {
531
+ "@vitest/coverage-istanbul": "^5.1.0",
532
+ "@vitest/coverage-v8": "^5.1.0",
533
+ "vite": "^8.4.0",
534
+ "vitest": "^5.1.0"
535
+ }
536
+ },
537
+ "minimumReleaseAgeExclude": ["@vitest-agent/*"],
538
+ "publicHoistPattern": [
539
+ "vitest",
540
+ "@vitest/*",
541
+ "vite"
542
+ ]
543
+ }, {
544
+ "catalogs": {
545
+ "enforcement": "warn",
546
+ "strategy": "catalogs"
547
+ },
548
+ "minimumReleaseAgeExclude": {
549
+ "enforcement": "absent",
550
+ "strategy": "arrayUnion"
551
+ },
552
+ "publicHoistPattern": {
553
+ "enforcement": "absent",
554
+ "strategy": "arrayUnion"
555
+ }
556
+ }, "@vitest-agent/pnpm-plugin-vitest-agent");
557
+
558
+ // src/pnpmfile.ts
559
+ /**
560
+ * The plugin's pnpm hooks: the generated `updateConfig`, unchanged.
561
+ *
562
+ * @remarks
563
+ * It serves all four declared catalogs. `vitest-agent` and `vitest` are for
564
+ * dependencies; `vitest-agent:peers` and `vitest:peers` floor each range to its
565
+ * minor and are for peers. `pnpm pack` writes a `catalog:` specifier as the
566
+ * catalog's value, so a peer spelled `catalog:vitest` would publish the
567
+ * dependency range rather than the peer floor. A consumer's own catalog entries
568
+ * win over the served ones.
569
+ *
570
+ * @public
571
+ */
572
+ const hooks = { updateConfig(config) {
573
+ return hooks$1.updateConfig(config);
574
+ } };
575
+
576
+ 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
+ }