@effected/pnpm-plugin-effected 0.0.0-stage → 0.21.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 +21 -0
- package/README.md +119 -2
- package/index.d.ts +8 -0
- package/index.js +163 -0
- package/package.json +40 -5
- package/pnpmfile.mjs +664 -0
- package/tsdoc-metadata.json +11 -0
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,120 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @effected/pnpm-plugin-effected
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@effected/pnpm-plugin-effected)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://pnpm.io/)
|
|
8
|
+
|
|
9
|
+
A pnpm [config dependency](https://pnpm.io/config-dependencies) that centralizes versioning for the Effect ecosystem and the `@effected/*` kit through one [pnpm catalog](https://pnpm.io/catalogs), `effected`. It covers `effect` and its `@effect/*` satellites on one [Effect v4](https://effect.website/) minor, `@effect/tsgo` at its own independent pin, and every published `@effected/*` package except this one. Install it once and `catalog:effected` is available to every package in your workspace, in dependencies and peer ranges alike.
|
|
10
|
+
|
|
11
|
+
> **Pre-`1.0.0`.** This package is part of the `@effected/*` kit, built on stable
|
|
12
|
+
> Effect v4 (`effect` `~4.1.0`) and still in `0.x` development. Stable Effect
|
|
13
|
+
> makes a kit `1.0.0` possible, not automatic. To keep your `effect` and
|
|
14
|
+
> `@effect/*` versions on the line the kit is built and tested against, install
|
|
15
|
+
> this package as a config dependency (below).
|
|
16
|
+
>
|
|
17
|
+
> **Stability: unstable.** This package's API surface is not yet considered
|
|
18
|
+
> complete and may change across `0.x` releases. Pin an exact version — even a
|
|
19
|
+
> package marked *stable* before `1.0.0` can introduce a breaking change by
|
|
20
|
+
> accident, and an exact pin turns that into a type-check error rather than a
|
|
21
|
+
> runtime surprise. Full policy: [release strategy](https://github.com/spencerbeggs/effected#release-strategy).
|
|
22
|
+
|
|
23
|
+
## Why @effected/pnpm-plugin-effected
|
|
24
|
+
|
|
25
|
+
Effect ships as a couple of dozen packages that have to move together. Pin them by hand and the pins drift: one `@effect/*` package advances, its `effect` peer no longer matches the core you installed, and the failure surfaces as a type error in a file nobody touched, or as a crash at import. Keeping the pins in one place is the whole idea, and pnpm catalogs are the mechanism — `catalog:effected` in a manifest instead of a version string, and one place that moves when the pin advances.
|
|
26
|
+
|
|
27
|
+
The `@effected/*` kit has the same problem with a sharper edge. Every kit package is on `0.x`, where a caret does not cross a minor, so a hand-written `^0.14.0` stops resolving anything current the moment that package cuts `0.15.0`. Spread across a dozen manifests, those ranges rot quietly and independently. `catalog:effected` replaces the ranges with a name, and upgrading the config dependency moves the whole kit surface at once.
|
|
28
|
+
|
|
29
|
+
A catalog only reaches the manifests you write. Your dependencies name `effect` and its satellites too, and a caret there can pair a satellite with a core it was not built for. The plugin's overrides close that gap across the whole graph. This is a convenience, not a requirement — it packages the way [effected](https://github.com/spencerbeggs/effected) pins its own dependencies, so a project that wants the same discipline can adopt it instead of rebuilding it. It ships a catalog and a pnpmfile, not a code API.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
Add it as a **config dependency** — not a regular dependency. Config dependencies are installed ahead of the rest of the tree, which is what lets them contribute catalogs and hooks to the install that follows:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm add --config @effected/pnpm-plugin-effected
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Requires pnpm 11 or newer, and Node.js >=24.11.0. There is no npm or yarn equivalent: config dependencies and catalogs are pnpm features.
|
|
40
|
+
|
|
41
|
+
The command writes the package into your `pnpm-workspace.yaml` at a plain version:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
configDependencies:
|
|
45
|
+
"@effected/pnpm-plugin-effected": <version>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
A plain version is the canonical form. pnpm still honours a `+sha512-…` integrity suffix on the entry if one is there, but you do not need to add one.
|
|
49
|
+
|
|
50
|
+
If your workspace sets `minimumReleaseAge`, add the plugin to `minimumReleaseAgeExclude` so a release that is only hours old still installs:
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
minimumReleaseAgeExclude:
|
|
54
|
+
- "@effected/pnpm-plugin-effected"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Usage
|
|
58
|
+
|
|
59
|
+
Once installed, `catalog:effected` is available to every package in the workspace. Reference it from `package.json` in place of a version range — in every dependency field.
|
|
60
|
+
|
|
61
|
+
An application:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"effect": "catalog:effected",
|
|
67
|
+
"@effect/ai-openai": "catalog:effected",
|
|
68
|
+
"@effected/workspaces": "catalog:effected"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
A library uses the same catalog on both sides:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"effect": "catalog:effected",
|
|
79
|
+
"@effected/workspaces": "catalog:effected"
|
|
80
|
+
},
|
|
81
|
+
"peerDependencies": {
|
|
82
|
+
"effect": "catalog:effected",
|
|
83
|
+
"@effected/workspaces": "catalog:effected"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
pnpm rewrites `catalog:` specifiers to concrete ranges when it packs, so what lands on the registry is an ordinary manifest. Nothing downstream needs this plugin, or pnpm. A packed peer advertises the catalog's range — `effect: ~4.<minor>.<patch>` at the catalog's current Effect release, and each `@effected/*` package at its current release. If a library needs a wider peer, write that range by hand in its own manifest.
|
|
89
|
+
|
|
90
|
+
## What it ships
|
|
91
|
+
|
|
92
|
+
| Entries | Range | Notes |
|
|
93
|
+
| ------- | ----- | ----- |
|
|
94
|
+
| `effect` and every `@effect/*` package | one Effect minor, with a tilde (`~4.<minor>.<patch>`) | a new Effect minor arrives with a new plugin release, never through a range |
|
|
95
|
+
| `@effect/tsgo` | its own `0.x` line | versions independently of `effect` |
|
|
96
|
+
| every published `@effected/*` package | its current release, with a caret | on `0.x` a caret pins the minor |
|
|
97
|
+
|
|
98
|
+
There is one catalog. `catalog:effect`, `catalog:effect:peers` and `catalog:effected:peers` do not exist for a consumer, and a manifest that still names one fails the install. A `catalog:effected` entry you declare yourself wins over the plugin's for the same package, and your other catalogs are kept.
|
|
99
|
+
|
|
100
|
+
`@effected/pnpm-plugin-effected` itself is deliberately absent from the catalog — it is the package the catalog ships inside, and listing it would make every catalog rewrite bump the package that carries the catalog.
|
|
101
|
+
|
|
102
|
+
It also ships a pnpmfile, which pnpm loads from the config dependency automatically. There is nothing to import and nothing to call. Besides the catalog, the pnpmfile applies these settings to every consumer:
|
|
103
|
+
|
|
104
|
+
- **Effect family overrides:** one override per `effect` and `@effect/*` package, `"<name>@^4.0.0": "<catalog version>"`, derived from the catalog so it moves with it, and one for `@effect/tsgo` on its own line. They hold every copy in your graph, including the ones your dependencies name, to the catalog version, so a satellite can never pair with a core it was not built for. Never hand-write these pins.
|
|
105
|
+
- **Release-age exclusion:** `effect`, `@effect/*` and `@effect/tsgo-*` are exempt from `minimumReleaseAge`, so a pinned Effect release that is only hours old still installs.
|
|
106
|
+
- **Scoped overrides:** `@effect/platform-node-shared` is pinned to its parent's version under `@effect/platform-node@4.0.0-rc.117` and `@effect/platform-node@4.0.0-rc.118`. Tools still built on those release candidates take the shared package with a caret, and a fresh resolve would pair it with a newer one built for a different `effect`, which crashes the tool at startup. Each override applies only under its own parent, so a stable install is never touched.
|
|
107
|
+
|
|
108
|
+
Your own `overrides` are kept alongside the plugin's. If you set the same selector yourself, your value wins.
|
|
109
|
+
|
|
110
|
+
The Effect entries move when the kit advances its Effect pin. The kit entries are rebuilt automatically as kit packages release, so each new version of this package carries the kit's current versions; upgrading the config dependency is how a consumer picks them up:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pnpm update --config @effected/pnpm-plugin-effected
|
|
114
|
+
pnpm install
|
|
115
|
+
# every catalog:effected specifier in the workspace re-resolves to the new pins
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## License
|
|
119
|
+
|
|
120
|
+
[MIT](LICENSE)
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one catalog a consumer installs, `effected`: the Effect family and the
|
|
3
|
+
* kit, exactly as the plugin's `updateConfig` hook presents it to pnpm.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const catalogs: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.js
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// \0rolldown-pnpm-config/virtual/catalogs
|
|
2
|
+
const catalogs$1 = /* @__PURE__ */ new Map([["effected", /* @__PURE__ */ new Map([
|
|
3
|
+
["@effect/ai-anthropic", "~4.1.2"],
|
|
4
|
+
["@effect/ai-openai", "~4.1.2"],
|
|
5
|
+
["@effect/ai-openai-compat", "~4.1.2"],
|
|
6
|
+
["@effect/ai-openrouter", "~4.1.2"],
|
|
7
|
+
["@effect/atom-react", "~4.1.2"],
|
|
8
|
+
["@effect/atom-solid", "~4.1.2"],
|
|
9
|
+
["@effect/atom-vue", "~4.1.2"],
|
|
10
|
+
["@effect/openapi-generator", "~4.1.2"],
|
|
11
|
+
["@effect/opentelemetry", "~4.1.2"],
|
|
12
|
+
["@effect/platform-browser", "~4.1.2"],
|
|
13
|
+
["@effect/platform-bun", "~4.1.2"],
|
|
14
|
+
["@effect/platform-node", "~4.1.2"],
|
|
15
|
+
["@effect/platform-node-shared", "~4.1.2"],
|
|
16
|
+
["@effect/sql-clickhouse", "~4.1.2"],
|
|
17
|
+
["@effect/sql-d1", "~4.1.2"],
|
|
18
|
+
["@effect/sql-libsql", "~4.1.2"],
|
|
19
|
+
["@effect/sql-mssql", "~4.1.2"],
|
|
20
|
+
["@effect/sql-mysql2", "~4.1.2"],
|
|
21
|
+
["@effect/sql-pg", "~4.1.2"],
|
|
22
|
+
["@effect/sql-pglite", "~4.1.2"],
|
|
23
|
+
["@effect/sql-sqlite-bun", "~4.1.2"],
|
|
24
|
+
["@effect/sql-sqlite-do", "~4.1.2"],
|
|
25
|
+
["@effect/sql-sqlite-node", "~4.1.2"],
|
|
26
|
+
["@effect/sql-sqlite-react-native", "~4.1.2"],
|
|
27
|
+
["@effect/sql-sqlite-wasm", "~4.1.2"],
|
|
28
|
+
["@effect/tsgo", "^0.63.0"],
|
|
29
|
+
["@effect/vitest", "~4.1.2"],
|
|
30
|
+
["@effected/app", "^0.31.0"],
|
|
31
|
+
["@effected/cli", "^0.26.0"],
|
|
32
|
+
["@effected/cli-kit", "^0.26.0"],
|
|
33
|
+
["@effected/commands", "^0.20.0"],
|
|
34
|
+
["@effected/config-file", "^0.24.0"],
|
|
35
|
+
["@effected/crypto", "^0.5.0"],
|
|
36
|
+
["@effected/engine", "^0.12.0"],
|
|
37
|
+
["@effected/env", "^0.10.0"],
|
|
38
|
+
["@effected/git", "^0.30.0"],
|
|
39
|
+
["@effected/github", "^0.28.0"],
|
|
40
|
+
["@effected/github-actions", "^0.31.0"],
|
|
41
|
+
["@effected/github-commands", "^0.9.0"],
|
|
42
|
+
["@effected/github-references", "^0.14.0"],
|
|
43
|
+
["@effected/glob", "^0.18.0"],
|
|
44
|
+
["@effected/images", "^0.9.0"],
|
|
45
|
+
["@effected/jsonc", "^0.23.0"],
|
|
46
|
+
["@effected/jsonl", "^0.18.0"],
|
|
47
|
+
["@effected/jwt", "^0.9.0"],
|
|
48
|
+
["@effected/kit", "^0.12.0"],
|
|
49
|
+
["@effected/lockfiles", "^0.22.0"],
|
|
50
|
+
["@effected/lsp", "^0.8.0"],
|
|
51
|
+
["@effected/markdown", "^0.26.0"],
|
|
52
|
+
["@effected/mcp", "^0.13.0"],
|
|
53
|
+
["@effected/mcp-kit", "^0.13.0"],
|
|
54
|
+
["@effected/memfs", "^0.23.0"],
|
|
55
|
+
["@effected/npm", "^0.30.0"],
|
|
56
|
+
["@effected/oidc", "^0.4.0"],
|
|
57
|
+
["@effected/package-json", "^0.29.0"],
|
|
58
|
+
["@effected/plugin", "^0.1.0"],
|
|
59
|
+
["@effected/runtimes", "^0.18.0"],
|
|
60
|
+
["@effected/sbom", "^0.20.0"],
|
|
61
|
+
["@effected/schema-org", "^0.14.0"],
|
|
62
|
+
["@effected/schemastore", "^0.29.0"],
|
|
63
|
+
["@effected/schemastore-cli", "^0.29.0"],
|
|
64
|
+
["@effected/semver", "^0.21.0"],
|
|
65
|
+
["@effected/source", "^0.3.0"],
|
|
66
|
+
["@effected/spdx", "^0.19.0"],
|
|
67
|
+
["@effected/store", "^0.23.0"],
|
|
68
|
+
["@effected/templates", "^0.17.0"],
|
|
69
|
+
["@effected/toml", "^0.19.0"],
|
|
70
|
+
["@effected/tsconfig-json", "^0.20.0"],
|
|
71
|
+
["@effected/walker", "^0.25.0"],
|
|
72
|
+
["@effected/webhooks", "^0.4.0"],
|
|
73
|
+
["@effected/workspaces", "^0.42.0"],
|
|
74
|
+
["@effected/xdg", "^0.19.0"],
|
|
75
|
+
["@effected/yaml", "^0.28.0"],
|
|
76
|
+
["effect", "~4.1.2"]
|
|
77
|
+
])], ["effected:peers", /* @__PURE__ */ new Map([
|
|
78
|
+
["@effect/ai-anthropic", "~4.1.0"],
|
|
79
|
+
["@effect/ai-openai", "~4.1.0"],
|
|
80
|
+
["@effect/ai-openai-compat", "~4.1.0"],
|
|
81
|
+
["@effect/ai-openrouter", "~4.1.0"],
|
|
82
|
+
["@effect/atom-react", "~4.1.0"],
|
|
83
|
+
["@effect/atom-solid", "~4.1.0"],
|
|
84
|
+
["@effect/atom-vue", "~4.1.0"],
|
|
85
|
+
["@effect/openapi-generator", "~4.1.0"],
|
|
86
|
+
["@effect/opentelemetry", "~4.1.0"],
|
|
87
|
+
["@effect/platform-browser", "~4.1.0"],
|
|
88
|
+
["@effect/platform-bun", "~4.1.0"],
|
|
89
|
+
["@effect/platform-node", "~4.1.0"],
|
|
90
|
+
["@effect/platform-node-shared", "~4.1.0"],
|
|
91
|
+
["@effect/sql-clickhouse", "~4.1.0"],
|
|
92
|
+
["@effect/sql-d1", "~4.1.0"],
|
|
93
|
+
["@effect/sql-libsql", "~4.1.0"],
|
|
94
|
+
["@effect/sql-mssql", "~4.1.0"],
|
|
95
|
+
["@effect/sql-mysql2", "~4.1.0"],
|
|
96
|
+
["@effect/sql-pg", "~4.1.0"],
|
|
97
|
+
["@effect/sql-pglite", "~4.1.0"],
|
|
98
|
+
["@effect/sql-sqlite-bun", "~4.1.0"],
|
|
99
|
+
["@effect/sql-sqlite-do", "~4.1.0"],
|
|
100
|
+
["@effect/sql-sqlite-node", "~4.1.0"],
|
|
101
|
+
["@effect/sql-sqlite-react-native", "~4.1.0"],
|
|
102
|
+
["@effect/sql-sqlite-wasm", "~4.1.0"],
|
|
103
|
+
["@effect/tsgo", "^0.63.0"],
|
|
104
|
+
["@effect/vitest", "~4.1.0"],
|
|
105
|
+
["@effected/app", "^0.31.0"],
|
|
106
|
+
["@effected/cli", "^0.26.0"],
|
|
107
|
+
["@effected/cli-kit", "^0.26.0"],
|
|
108
|
+
["@effected/commands", "^0.20.0"],
|
|
109
|
+
["@effected/config-file", "^0.24.0"],
|
|
110
|
+
["@effected/crypto", "^0.5.0"],
|
|
111
|
+
["@effected/engine", "^0.12.0"],
|
|
112
|
+
["@effected/env", "^0.10.0"],
|
|
113
|
+
["@effected/git", "^0.30.0"],
|
|
114
|
+
["@effected/github", "^0.28.0"],
|
|
115
|
+
["@effected/github-actions", "^0.31.0"],
|
|
116
|
+
["@effected/github-commands", "^0.9.0"],
|
|
117
|
+
["@effected/github-references", "^0.14.0"],
|
|
118
|
+
["@effected/glob", "^0.18.0"],
|
|
119
|
+
["@effected/images", "^0.9.0"],
|
|
120
|
+
["@effected/jsonc", "^0.23.0"],
|
|
121
|
+
["@effected/jsonl", "^0.18.0"],
|
|
122
|
+
["@effected/jwt", "^0.9.0"],
|
|
123
|
+
["@effected/kit", "^0.12.0"],
|
|
124
|
+
["@effected/lockfiles", "^0.22.0"],
|
|
125
|
+
["@effected/lsp", "^0.8.0"],
|
|
126
|
+
["@effected/markdown", "^0.26.0"],
|
|
127
|
+
["@effected/mcp", "^0.13.0"],
|
|
128
|
+
["@effected/mcp-kit", "^0.13.0"],
|
|
129
|
+
["@effected/memfs", "^0.23.0"],
|
|
130
|
+
["@effected/npm", "^0.30.0"],
|
|
131
|
+
["@effected/oidc", "^0.4.0"],
|
|
132
|
+
["@effected/package-json", "^0.29.0"],
|
|
133
|
+
["@effected/plugin", "^0.1.0"],
|
|
134
|
+
["@effected/runtimes", "^0.18.0"],
|
|
135
|
+
["@effected/sbom", "^0.20.0"],
|
|
136
|
+
["@effected/schema-org", "^0.14.0"],
|
|
137
|
+
["@effected/schemastore", "^0.29.0"],
|
|
138
|
+
["@effected/schemastore-cli", "^0.29.0"],
|
|
139
|
+
["@effected/semver", "^0.21.0"],
|
|
140
|
+
["@effected/source", "^0.3.0"],
|
|
141
|
+
["@effected/spdx", "^0.19.0"],
|
|
142
|
+
["@effected/store", "^0.23.0"],
|
|
143
|
+
["@effected/templates", "^0.17.0"],
|
|
144
|
+
["@effected/toml", "^0.19.0"],
|
|
145
|
+
["@effected/tsconfig-json", "^0.20.0"],
|
|
146
|
+
["@effected/walker", "^0.25.0"],
|
|
147
|
+
["@effected/webhooks", "^0.4.0"],
|
|
148
|
+
["@effected/workspaces", "^0.42.0"],
|
|
149
|
+
["@effected/xdg", "^0.19.0"],
|
|
150
|
+
["@effected/yaml", "^0.28.0"],
|
|
151
|
+
["effect", "~4.1.0"]
|
|
152
|
+
])]]);
|
|
153
|
+
|
|
154
|
+
// src/index.ts
|
|
155
|
+
/**
|
|
156
|
+
* The one catalog a consumer installs, `effected`: the Effect family and the
|
|
157
|
+
* kit, exactly as the plugin's `updateConfig` hook presents it to pnpm.
|
|
158
|
+
*
|
|
159
|
+
* @public
|
|
160
|
+
*/
|
|
161
|
+
const catalogs = /* @__PURE__ */ new Map([["effected", new Map(catalogs$1.get("effected") ?? [])]]);
|
|
162
|
+
|
|
163
|
+
export { catalogs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@effected/pnpm-plugin-effected",
|
|
3
|
+
"version": "0.21.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "pnpm config dependency for centralized catalog management across the Effected ecosystem.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pnpm",
|
|
8
|
+
"pnpm-plugin",
|
|
9
|
+
"config-dependency",
|
|
10
|
+
"catalog",
|
|
11
|
+
"monorepo",
|
|
12
|
+
"effected"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/spencerbeggs/effected/tree/main/packages/pnpm-plugin-effected#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/spencerbeggs/effected/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/spencerbeggs/effected.git",
|
|
21
|
+
"directory": "packages/pnpm-plugin-effected"
|
|
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,664 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
|
|
4
|
+
// ../../node_modules/.pnpm/rolldown-pnpm-config@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/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@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/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@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/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
|
+
// ../../node_modules/.pnpm/rolldown-pnpm-config@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/node_modules/rolldown-pnpm-config/runtime/strategies/overrides.js
|
|
111
|
+
/**
|
|
112
|
+
* Child wins per key over a managed string map; any differing key is reported
|
|
113
|
+
* as an override divergence under `<prefix>.<key>`.
|
|
114
|
+
*
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
function mergeMapDetect(prefix, managed, child) {
|
|
118
|
+
const merged = { ...managed };
|
|
119
|
+
const divergences = [];
|
|
120
|
+
for (const [k, childVersion] of Object.entries(child)) {
|
|
121
|
+
const managedVersion = managed[k];
|
|
122
|
+
if (managedVersion !== void 0 && managedVersion !== childVersion) divergences.push({
|
|
123
|
+
setting: `${prefix}.${k}`,
|
|
124
|
+
managedValue: managedVersion,
|
|
125
|
+
localValue: childVersion,
|
|
126
|
+
detail: "Local version overrides the managed version.",
|
|
127
|
+
kind: "override"
|
|
128
|
+
});
|
|
129
|
+
merged[k] = childVersion;
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
merged,
|
|
133
|
+
divergences
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Security overrides: child wins per key; any diff → override divergence.
|
|
138
|
+
* Merge overrides, flagging local divergences.
|
|
139
|
+
*
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
|
+
const overrides = (base, local) => {
|
|
143
|
+
const { merged, divergences } = mergeMapDetect("overrides", base ?? {}, local ?? {});
|
|
144
|
+
return {
|
|
145
|
+
merged,
|
|
146
|
+
divergences
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* peerDependencyRules: `allowedVersions` is override-detected; `ignoreMissing`
|
|
151
|
+
* and `allowAny` are unioned + sorted. Merges peer-dependency rules,
|
|
152
|
+
* flagging version overrides.
|
|
153
|
+
*
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
const peerDependencyRules = (base, local) => {
|
|
157
|
+
const managed = base ?? {};
|
|
158
|
+
const child = local ?? {};
|
|
159
|
+
const av = mergeMapDetect("peerDependencyRules.allowedVersions", managed.allowedVersions ?? {}, child.allowedVersions ?? {});
|
|
160
|
+
return {
|
|
161
|
+
merged: {
|
|
162
|
+
allowedVersions: av.merged,
|
|
163
|
+
ignoreMissing: unionSort(managed.ignoreMissing ?? [], child.ignoreMissing),
|
|
164
|
+
allowAny: unionSort(managed.allowAny ?? [], child.allowAny)
|
|
165
|
+
},
|
|
166
|
+
divergences: av.divergences
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// ../../node_modules/.pnpm/rolldown-pnpm-config@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/node_modules/rolldown-pnpm-config/runtime/strategies/catalogs.js
|
|
171
|
+
/**
|
|
172
|
+
* Merge each named catalog; child wins per package. Emits override divergences
|
|
173
|
+
* when a local version differs from the managed one.
|
|
174
|
+
*
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
const catalogs = (base, local) => {
|
|
178
|
+
const managed = base ?? {};
|
|
179
|
+
const child = local ?? {};
|
|
180
|
+
const divergences = [];
|
|
181
|
+
const merged = { ...child };
|
|
182
|
+
for (const [name, entries] of Object.entries(managed)) {
|
|
183
|
+
const cat = mergeMapDetect(`catalogs.${name}`, entries, child[name] ?? {});
|
|
184
|
+
merged[name] = cat.merged;
|
|
185
|
+
divergences.push(...cat.divergences);
|
|
186
|
+
}
|
|
187
|
+
return {
|
|
188
|
+
merged,
|
|
189
|
+
divergences
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
// ../../node_modules/.pnpm/rolldown-pnpm-config@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/node_modules/rolldown-pnpm-config/runtime/strategies/maps.js
|
|
194
|
+
/**
|
|
195
|
+
* `{...managed, ...child}` — child wins per key. Quiet. Merges two maps,
|
|
196
|
+
* preferring child values.
|
|
197
|
+
*
|
|
198
|
+
* @internal
|
|
199
|
+
*/
|
|
200
|
+
const mapChildWins = (base, local) => {
|
|
201
|
+
const managed = base ?? {};
|
|
202
|
+
const child = local;
|
|
203
|
+
return {
|
|
204
|
+
merged: child ? {
|
|
205
|
+
...managed,
|
|
206
|
+
...child
|
|
207
|
+
} : { ...managed },
|
|
208
|
+
divergences: []
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* `{...managed, ...child}`; flags enabling a build the managed config blocked.
|
|
213
|
+
* Detects allow-builds loosening.
|
|
214
|
+
*
|
|
215
|
+
* @internal
|
|
216
|
+
*/
|
|
217
|
+
const allowBuilds = (base, local) => {
|
|
218
|
+
const managed = base ?? {};
|
|
219
|
+
const child = local ?? {};
|
|
220
|
+
const divergences = [];
|
|
221
|
+
for (const [pkg, childAllowed] of Object.entries(child)) if (childAllowed === true && managed[pkg] === false) divergences.push({
|
|
222
|
+
setting: `allowBuilds.${pkg}`,
|
|
223
|
+
managedValue: "false",
|
|
224
|
+
localValue: "true",
|
|
225
|
+
detail: `Enables build scripts for "${pkg}" that the managed config blocked.`,
|
|
226
|
+
kind: "security"
|
|
227
|
+
});
|
|
228
|
+
return {
|
|
229
|
+
merged: {
|
|
230
|
+
...managed,
|
|
231
|
+
...child
|
|
232
|
+
},
|
|
233
|
+
divergences
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
// ../../node_modules/.pnpm/rolldown-pnpm-config@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/node_modules/rolldown-pnpm-config/runtime/strategies/scalar.js
|
|
238
|
+
/**
|
|
239
|
+
* `child ?? base` — quiet (no divergences). Prefer local, fall back to managed.
|
|
240
|
+
*
|
|
241
|
+
* @internal
|
|
242
|
+
*/
|
|
243
|
+
const scalar = (base, local) => ({
|
|
244
|
+
merged: local ?? base,
|
|
245
|
+
divergences: []
|
|
246
|
+
});
|
|
247
|
+
/**
|
|
248
|
+
* `child ?? base`; flags when child disables a managed boolean. The strategy is
|
|
249
|
+
* field-agnostic, so it emits `setting: ""`; the runtime fills the field name.
|
|
250
|
+
* Detects flag loosening.
|
|
251
|
+
*
|
|
252
|
+
* @internal
|
|
253
|
+
*/
|
|
254
|
+
const securityFlag = (base, local) => {
|
|
255
|
+
const merged = local ?? base;
|
|
256
|
+
const divergences = [];
|
|
257
|
+
if (base === true && local === false) divergences.push({
|
|
258
|
+
setting: "",
|
|
259
|
+
managedValue: "true",
|
|
260
|
+
localValue: "false",
|
|
261
|
+
detail: "Disables a security check the managed config enabled.",
|
|
262
|
+
kind: "security"
|
|
263
|
+
});
|
|
264
|
+
return {
|
|
265
|
+
merged,
|
|
266
|
+
divergences
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* `child ?? base`; flags when child lowers a managed numeric floor (e.g. the
|
|
271
|
+
* release-age quarantine). Field-agnostic, so it emits `setting: ""`; the
|
|
272
|
+
* runtime fills the field name.
|
|
273
|
+
*
|
|
274
|
+
* @internal
|
|
275
|
+
*/
|
|
276
|
+
const securityMin = (base, local) => {
|
|
277
|
+
const merged = local ?? base;
|
|
278
|
+
const divergences = [];
|
|
279
|
+
if (typeof base === "number" && typeof local === "number" && local < base) divergences.push({
|
|
280
|
+
setting: "",
|
|
281
|
+
managedValue: String(base),
|
|
282
|
+
localValue: String(local),
|
|
283
|
+
detail: `Lowers a managed security minimum from ${base} to ${local}.`,
|
|
284
|
+
kind: "security"
|
|
285
|
+
});
|
|
286
|
+
return {
|
|
287
|
+
merged,
|
|
288
|
+
divergences
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
// ../../node_modules/.pnpm/rolldown-pnpm-config@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/node_modules/rolldown-pnpm-config/runtime/strategies/table.js
|
|
293
|
+
/**
|
|
294
|
+
* Built-in strategies keyed by manifest name.
|
|
295
|
+
*
|
|
296
|
+
* @internal
|
|
297
|
+
*/
|
|
298
|
+
const STRATEGY_TABLE = {
|
|
299
|
+
scalar,
|
|
300
|
+
catalogs,
|
|
301
|
+
mapChildWins,
|
|
302
|
+
arrayUnion,
|
|
303
|
+
arrayRecordUnion,
|
|
304
|
+
overrides,
|
|
305
|
+
peerDependencyRules,
|
|
306
|
+
securityFlag,
|
|
307
|
+
securityMin,
|
|
308
|
+
allowBuilds
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
// ../../node_modules/.pnpm/rolldown-pnpm-config@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/node_modules/rolldown-pnpm-config/runtime/warnings.js
|
|
312
|
+
const WARNING_BOX_WIDTH = 75;
|
|
313
|
+
function pad(line) {
|
|
314
|
+
return `│${line}${" ".repeat(Math.max(0, WARNING_BOX_WIDTH - line.length - 2))}│`;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Format override divergences into a prominent warning box for console output,
|
|
318
|
+
* tagged with the emitting config's `name`. `Divergence.setting` is the
|
|
319
|
+
* already-resolved config path, printed directly.
|
|
320
|
+
*
|
|
321
|
+
* @internal
|
|
322
|
+
*/
|
|
323
|
+
function formatOverrideWarning(divergences, name) {
|
|
324
|
+
if (divergences.length === 0) return "";
|
|
325
|
+
const border = "─".repeat(73);
|
|
326
|
+
const lines = [];
|
|
327
|
+
lines.push(`┌${border}┐`);
|
|
328
|
+
lines.push(pad(` [${name}]`));
|
|
329
|
+
lines.push(pad(" ⚠️ CATALOG OVERRIDE DETECTED"));
|
|
330
|
+
lines.push(`├${border}┤`);
|
|
331
|
+
lines.push(pad(" The following entries override managed versions:"));
|
|
332
|
+
lines.push(pad(""));
|
|
333
|
+
for (const d of divergences) {
|
|
334
|
+
lines.push(pad(` ${d.setting}`));
|
|
335
|
+
lines.push(pad(` Managed version: ${d.managedValue}`));
|
|
336
|
+
lines.push(pad(` Local override: ${d.localValue}`));
|
|
337
|
+
lines.push(pad(""));
|
|
338
|
+
}
|
|
339
|
+
lines.push(pad(" Local versions will be used. To use the managed defaults, remove"));
|
|
340
|
+
lines.push(pad(" these entries from your pnpm-workspace.yaml."));
|
|
341
|
+
lines.push(`└${border}┘`);
|
|
342
|
+
return lines.join("\n");
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Format security-loosening divergences into a prominent box, tagged with the
|
|
346
|
+
* emitting config's `name`.
|
|
347
|
+
*
|
|
348
|
+
* @internal
|
|
349
|
+
*/
|
|
350
|
+
function formatSecurityWarning(divergences, name) {
|
|
351
|
+
if (divergences.length === 0) return "";
|
|
352
|
+
const border = "─".repeat(73);
|
|
353
|
+
const lines = [];
|
|
354
|
+
lines.push(`┌${border}┐`);
|
|
355
|
+
lines.push(pad(` [${name}]`));
|
|
356
|
+
lines.push(pad(" ⚠️ SECURITY OVERRIDE DETECTED"));
|
|
357
|
+
lines.push(`├${border}┤`);
|
|
358
|
+
lines.push(pad(" The following entries weaken managed security defaults:"));
|
|
359
|
+
lines.push(pad(""));
|
|
360
|
+
for (const d of divergences) {
|
|
361
|
+
lines.push(pad(` ${d.setting}: managed=${d.managedValue} -> local=${d.localValue}`));
|
|
362
|
+
lines.push(pad(` ${d.detail}`));
|
|
363
|
+
lines.push(pad(""));
|
|
364
|
+
}
|
|
365
|
+
lines.push(pad(" Local values will be used. Review these before shipping."));
|
|
366
|
+
lines.push(`└${border}┘`);
|
|
367
|
+
return lines.join("\n");
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// ../../node_modules/.pnpm/rolldown-pnpm-config@2.4.0_@effected+config-file@0.23.0_@effected+glob@0.17.0_effect@4._b73931cd516baebb711f8b4b1865c82e/node_modules/rolldown-pnpm-config/runtime.js
|
|
371
|
+
/**
|
|
372
|
+
* Build the pnpm hooks from frozen base data + a field→strategy manifest.
|
|
373
|
+
* Zero dependencies — bundled verbatim into the shipped pnpmfile.
|
|
374
|
+
*
|
|
375
|
+
* @remarks
|
|
376
|
+
* `updateConfig` deliberately has no catch-and-fall-back-to-local guard: an
|
|
377
|
+
* `error`-enforced divergence throws `EnforcementError`, which is meant to
|
|
378
|
+
* propagate and fail the install. If a swallow-guard is ever added here, it MUST
|
|
379
|
+
* rethrow `EnforcementError` (check `err instanceof EnforcementError` /
|
|
380
|
+
* `err.name === "EnforcementError"`) rather than fall back to the local config.
|
|
381
|
+
*
|
|
382
|
+
* @public
|
|
383
|
+
*/
|
|
384
|
+
function createHooks(base, manifest, name) {
|
|
385
|
+
return { updateConfig(config) {
|
|
386
|
+
const ctx = { rootName: resolveRootName(config) };
|
|
387
|
+
const out = { ...config };
|
|
388
|
+
const allOverrides = [];
|
|
389
|
+
const allSecurity = [];
|
|
390
|
+
for (const [field, entry] of Object.entries(manifest)) {
|
|
391
|
+
const strategy = STRATEGY_TABLE[entry.strategy];
|
|
392
|
+
if (!strategy) continue;
|
|
393
|
+
const result = strategy(base[field], config[field], ctx);
|
|
394
|
+
let merged = result.merged;
|
|
395
|
+
const byRepo = entry.options?.excludeByRepo;
|
|
396
|
+
if (byRepo && Array.isArray(merged)) merged = excludeByRepo(merged, ctx, byRepo);
|
|
397
|
+
const named = result.divergences.map((d) => d.setting === "" ? {
|
|
398
|
+
...d,
|
|
399
|
+
setting: field
|
|
400
|
+
} : d);
|
|
401
|
+
const { value, overrides, security } = applyEnforcement(field, {
|
|
402
|
+
merged,
|
|
403
|
+
divergences: named
|
|
404
|
+
}, entry.enforcement);
|
|
405
|
+
allOverrides.push(...overrides);
|
|
406
|
+
allSecurity.push(...security);
|
|
407
|
+
if (value !== void 0 && !(typeof value === "object" && value !== null && Object.keys(value).length === 0)) out[field] = value;
|
|
408
|
+
}
|
|
409
|
+
const ob = formatOverrideWarning(allOverrides, name);
|
|
410
|
+
if (ob) console.warn(ob);
|
|
411
|
+
const sb = formatSecurityWarning(allSecurity, name);
|
|
412
|
+
if (sb) console.warn(sb);
|
|
413
|
+
return out;
|
|
414
|
+
} };
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// \0rolldown-pnpm-config/virtual/pnpmfile
|
|
418
|
+
const hooks$1 = createHooks({
|
|
419
|
+
"catalogs": {
|
|
420
|
+
"effected": {
|
|
421
|
+
"@effect/ai-anthropic": "~4.1.2",
|
|
422
|
+
"@effect/ai-openai": "~4.1.2",
|
|
423
|
+
"@effect/ai-openai-compat": "~4.1.2",
|
|
424
|
+
"@effect/ai-openrouter": "~4.1.2",
|
|
425
|
+
"@effect/atom-react": "~4.1.2",
|
|
426
|
+
"@effect/atom-solid": "~4.1.2",
|
|
427
|
+
"@effect/atom-vue": "~4.1.2",
|
|
428
|
+
"@effect/openapi-generator": "~4.1.2",
|
|
429
|
+
"@effect/opentelemetry": "~4.1.2",
|
|
430
|
+
"@effect/platform-browser": "~4.1.2",
|
|
431
|
+
"@effect/platform-bun": "~4.1.2",
|
|
432
|
+
"@effect/platform-node": "~4.1.2",
|
|
433
|
+
"@effect/platform-node-shared": "~4.1.2",
|
|
434
|
+
"@effect/sql-clickhouse": "~4.1.2",
|
|
435
|
+
"@effect/sql-d1": "~4.1.2",
|
|
436
|
+
"@effect/sql-libsql": "~4.1.2",
|
|
437
|
+
"@effect/sql-mssql": "~4.1.2",
|
|
438
|
+
"@effect/sql-mysql2": "~4.1.2",
|
|
439
|
+
"@effect/sql-pg": "~4.1.2",
|
|
440
|
+
"@effect/sql-pglite": "~4.1.2",
|
|
441
|
+
"@effect/sql-sqlite-bun": "~4.1.2",
|
|
442
|
+
"@effect/sql-sqlite-do": "~4.1.2",
|
|
443
|
+
"@effect/sql-sqlite-node": "~4.1.2",
|
|
444
|
+
"@effect/sql-sqlite-react-native": "~4.1.2",
|
|
445
|
+
"@effect/sql-sqlite-wasm": "~4.1.2",
|
|
446
|
+
"@effect/tsgo": "^0.63.0",
|
|
447
|
+
"@effect/vitest": "~4.1.2",
|
|
448
|
+
"@effected/app": "^0.31.0",
|
|
449
|
+
"@effected/cli": "^0.26.0",
|
|
450
|
+
"@effected/cli-kit": "^0.26.0",
|
|
451
|
+
"@effected/commands": "^0.20.0",
|
|
452
|
+
"@effected/config-file": "^0.24.0",
|
|
453
|
+
"@effected/crypto": "^0.5.0",
|
|
454
|
+
"@effected/engine": "^0.12.0",
|
|
455
|
+
"@effected/env": "^0.10.0",
|
|
456
|
+
"@effected/git": "^0.30.0",
|
|
457
|
+
"@effected/github": "^0.28.0",
|
|
458
|
+
"@effected/github-actions": "^0.31.0",
|
|
459
|
+
"@effected/github-commands": "^0.9.0",
|
|
460
|
+
"@effected/github-references": "^0.14.0",
|
|
461
|
+
"@effected/glob": "^0.18.0",
|
|
462
|
+
"@effected/images": "^0.9.0",
|
|
463
|
+
"@effected/jsonc": "^0.23.0",
|
|
464
|
+
"@effected/jsonl": "^0.18.0",
|
|
465
|
+
"@effected/jwt": "^0.9.0",
|
|
466
|
+
"@effected/kit": "^0.12.0",
|
|
467
|
+
"@effected/lockfiles": "^0.22.0",
|
|
468
|
+
"@effected/lsp": "^0.8.0",
|
|
469
|
+
"@effected/markdown": "^0.26.0",
|
|
470
|
+
"@effected/mcp": "^0.13.0",
|
|
471
|
+
"@effected/mcp-kit": "^0.13.0",
|
|
472
|
+
"@effected/memfs": "^0.23.0",
|
|
473
|
+
"@effected/npm": "^0.30.0",
|
|
474
|
+
"@effected/oidc": "^0.4.0",
|
|
475
|
+
"@effected/package-json": "^0.29.0",
|
|
476
|
+
"@effected/plugin": "^0.1.0",
|
|
477
|
+
"@effected/runtimes": "^0.18.0",
|
|
478
|
+
"@effected/sbom": "^0.20.0",
|
|
479
|
+
"@effected/schema-org": "^0.14.0",
|
|
480
|
+
"@effected/schemastore": "^0.29.0",
|
|
481
|
+
"@effected/schemastore-cli": "^0.29.0",
|
|
482
|
+
"@effected/semver": "^0.21.0",
|
|
483
|
+
"@effected/source": "^0.3.0",
|
|
484
|
+
"@effected/spdx": "^0.19.0",
|
|
485
|
+
"@effected/store": "^0.23.0",
|
|
486
|
+
"@effected/templates": "^0.17.0",
|
|
487
|
+
"@effected/toml": "^0.19.0",
|
|
488
|
+
"@effected/tsconfig-json": "^0.20.0",
|
|
489
|
+
"@effected/walker": "^0.25.0",
|
|
490
|
+
"@effected/webhooks": "^0.4.0",
|
|
491
|
+
"@effected/workspaces": "^0.42.0",
|
|
492
|
+
"@effected/xdg": "^0.19.0",
|
|
493
|
+
"@effected/yaml": "^0.28.0",
|
|
494
|
+
"effect": "~4.1.2"
|
|
495
|
+
},
|
|
496
|
+
"effected:peers": {
|
|
497
|
+
"@effect/ai-anthropic": "~4.1.0",
|
|
498
|
+
"@effect/ai-openai": "~4.1.0",
|
|
499
|
+
"@effect/ai-openai-compat": "~4.1.0",
|
|
500
|
+
"@effect/ai-openrouter": "~4.1.0",
|
|
501
|
+
"@effect/atom-react": "~4.1.0",
|
|
502
|
+
"@effect/atom-solid": "~4.1.0",
|
|
503
|
+
"@effect/atom-vue": "~4.1.0",
|
|
504
|
+
"@effect/openapi-generator": "~4.1.0",
|
|
505
|
+
"@effect/opentelemetry": "~4.1.0",
|
|
506
|
+
"@effect/platform-browser": "~4.1.0",
|
|
507
|
+
"@effect/platform-bun": "~4.1.0",
|
|
508
|
+
"@effect/platform-node": "~4.1.0",
|
|
509
|
+
"@effect/platform-node-shared": "~4.1.0",
|
|
510
|
+
"@effect/sql-clickhouse": "~4.1.0",
|
|
511
|
+
"@effect/sql-d1": "~4.1.0",
|
|
512
|
+
"@effect/sql-libsql": "~4.1.0",
|
|
513
|
+
"@effect/sql-mssql": "~4.1.0",
|
|
514
|
+
"@effect/sql-mysql2": "~4.1.0",
|
|
515
|
+
"@effect/sql-pg": "~4.1.0",
|
|
516
|
+
"@effect/sql-pglite": "~4.1.0",
|
|
517
|
+
"@effect/sql-sqlite-bun": "~4.1.0",
|
|
518
|
+
"@effect/sql-sqlite-do": "~4.1.0",
|
|
519
|
+
"@effect/sql-sqlite-node": "~4.1.0",
|
|
520
|
+
"@effect/sql-sqlite-react-native": "~4.1.0",
|
|
521
|
+
"@effect/sql-sqlite-wasm": "~4.1.0",
|
|
522
|
+
"@effect/tsgo": "^0.63.0",
|
|
523
|
+
"@effect/vitest": "~4.1.0",
|
|
524
|
+
"@effected/app": "^0.31.0",
|
|
525
|
+
"@effected/cli": "^0.26.0",
|
|
526
|
+
"@effected/cli-kit": "^0.26.0",
|
|
527
|
+
"@effected/commands": "^0.20.0",
|
|
528
|
+
"@effected/config-file": "^0.24.0",
|
|
529
|
+
"@effected/crypto": "^0.5.0",
|
|
530
|
+
"@effected/engine": "^0.12.0",
|
|
531
|
+
"@effected/env": "^0.10.0",
|
|
532
|
+
"@effected/git": "^0.30.0",
|
|
533
|
+
"@effected/github": "^0.28.0",
|
|
534
|
+
"@effected/github-actions": "^0.31.0",
|
|
535
|
+
"@effected/github-commands": "^0.9.0",
|
|
536
|
+
"@effected/github-references": "^0.14.0",
|
|
537
|
+
"@effected/glob": "^0.18.0",
|
|
538
|
+
"@effected/images": "^0.9.0",
|
|
539
|
+
"@effected/jsonc": "^0.23.0",
|
|
540
|
+
"@effected/jsonl": "^0.18.0",
|
|
541
|
+
"@effected/jwt": "^0.9.0",
|
|
542
|
+
"@effected/kit": "^0.12.0",
|
|
543
|
+
"@effected/lockfiles": "^0.22.0",
|
|
544
|
+
"@effected/lsp": "^0.8.0",
|
|
545
|
+
"@effected/markdown": "^0.26.0",
|
|
546
|
+
"@effected/mcp": "^0.13.0",
|
|
547
|
+
"@effected/mcp-kit": "^0.13.0",
|
|
548
|
+
"@effected/memfs": "^0.23.0",
|
|
549
|
+
"@effected/npm": "^0.30.0",
|
|
550
|
+
"@effected/oidc": "^0.4.0",
|
|
551
|
+
"@effected/package-json": "^0.29.0",
|
|
552
|
+
"@effected/plugin": "^0.1.0",
|
|
553
|
+
"@effected/runtimes": "^0.18.0",
|
|
554
|
+
"@effected/sbom": "^0.20.0",
|
|
555
|
+
"@effected/schema-org": "^0.14.0",
|
|
556
|
+
"@effected/schemastore": "^0.29.0",
|
|
557
|
+
"@effected/schemastore-cli": "^0.29.0",
|
|
558
|
+
"@effected/semver": "^0.21.0",
|
|
559
|
+
"@effected/source": "^0.3.0",
|
|
560
|
+
"@effected/spdx": "^0.19.0",
|
|
561
|
+
"@effected/store": "^0.23.0",
|
|
562
|
+
"@effected/templates": "^0.17.0",
|
|
563
|
+
"@effected/toml": "^0.19.0",
|
|
564
|
+
"@effected/tsconfig-json": "^0.20.0",
|
|
565
|
+
"@effected/walker": "^0.25.0",
|
|
566
|
+
"@effected/webhooks": "^0.4.0",
|
|
567
|
+
"@effected/workspaces": "^0.42.0",
|
|
568
|
+
"@effected/xdg": "^0.19.0",
|
|
569
|
+
"@effected/yaml": "^0.28.0",
|
|
570
|
+
"effect": "~4.1.0"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"minimumReleaseAgeExclude": [
|
|
574
|
+
"effect",
|
|
575
|
+
"@effect/*",
|
|
576
|
+
"@effect/tsgo-*"
|
|
577
|
+
],
|
|
578
|
+
"overrides": {
|
|
579
|
+
"@effect/ai-anthropic@^4.0.0": "4.1.2",
|
|
580
|
+
"@effect/ai-openai-compat@^4.0.0": "4.1.2",
|
|
581
|
+
"@effect/ai-openai@^4.0.0": "4.1.2",
|
|
582
|
+
"@effect/ai-openrouter@^4.0.0": "4.1.2",
|
|
583
|
+
"@effect/atom-react@^4.0.0": "4.1.2",
|
|
584
|
+
"@effect/atom-solid@^4.0.0": "4.1.2",
|
|
585
|
+
"@effect/atom-vue@^4.0.0": "4.1.2",
|
|
586
|
+
"@effect/openapi-generator@^4.0.0": "4.1.2",
|
|
587
|
+
"@effect/opentelemetry@^4.0.0": "4.1.2",
|
|
588
|
+
"@effect/platform-browser@^4.0.0": "4.1.2",
|
|
589
|
+
"@effect/platform-bun@^4.0.0": "4.1.2",
|
|
590
|
+
"@effect/platform-node-shared@^4.0.0": "4.1.2",
|
|
591
|
+
"@effect/platform-node@4.0.0-rc.117>@effect/platform-node-shared": "4.0.0-rc.117",
|
|
592
|
+
"@effect/platform-node@4.0.0-rc.118>@effect/platform-node-shared": "4.0.0-rc.118",
|
|
593
|
+
"@effect/platform-node@^4.0.0": "4.1.2",
|
|
594
|
+
"@effect/sql-clickhouse@^4.0.0": "4.1.2",
|
|
595
|
+
"@effect/sql-d1@^4.0.0": "4.1.2",
|
|
596
|
+
"@effect/sql-libsql@^4.0.0": "4.1.2",
|
|
597
|
+
"@effect/sql-mssql@^4.0.0": "4.1.2",
|
|
598
|
+
"@effect/sql-mysql2@^4.0.0": "4.1.2",
|
|
599
|
+
"@effect/sql-pg@^4.0.0": "4.1.2",
|
|
600
|
+
"@effect/sql-pglite@^4.0.0": "4.1.2",
|
|
601
|
+
"@effect/sql-sqlite-bun@^4.0.0": "4.1.2",
|
|
602
|
+
"@effect/sql-sqlite-do@^4.0.0": "4.1.2",
|
|
603
|
+
"@effect/sql-sqlite-node@^4.0.0": "4.1.2",
|
|
604
|
+
"@effect/sql-sqlite-react-native@^4.0.0": "4.1.2",
|
|
605
|
+
"@effect/sql-sqlite-wasm@^4.0.0": "4.1.2",
|
|
606
|
+
"@effect/tsgo@^0.63.0": "0.63.0",
|
|
607
|
+
"@effect/vitest@^4.0.0": "4.1.2",
|
|
608
|
+
"effect@^4.0.0": "4.1.2"
|
|
609
|
+
},
|
|
610
|
+
"peerDependencyRules": {},
|
|
611
|
+
"publicHoistPattern": ["@effected/plugin"]
|
|
612
|
+
}, {
|
|
613
|
+
"catalogs": {
|
|
614
|
+
"enforcement": "warn",
|
|
615
|
+
"strategy": "catalogs"
|
|
616
|
+
},
|
|
617
|
+
"minimumReleaseAgeExclude": {
|
|
618
|
+
"enforcement": "absent",
|
|
619
|
+
"strategy": "arrayUnion"
|
|
620
|
+
},
|
|
621
|
+
"overrides": {
|
|
622
|
+
"enforcement": "warn",
|
|
623
|
+
"strategy": "overrides"
|
|
624
|
+
},
|
|
625
|
+
"peerDependencyRules": {
|
|
626
|
+
"enforcement": "warn",
|
|
627
|
+
"strategy": "peerDependencyRules"
|
|
628
|
+
},
|
|
629
|
+
"publicHoistPattern": {
|
|
630
|
+
"enforcement": "absent",
|
|
631
|
+
"strategy": "arrayUnion"
|
|
632
|
+
}
|
|
633
|
+
}, "@effected/pnpm-plugin-effected");
|
|
634
|
+
|
|
635
|
+
// src/pnpmfile.ts
|
|
636
|
+
/**
|
|
637
|
+
* `savvy.build.ts` declares one catalog, `effected`, and its `:peers` twin. The
|
|
638
|
+
* twin serves this repo's own published peer floors, through the root
|
|
639
|
+
* `pnpm-workspace.yaml` that `pnpm:export` writes; a consumer never needs it,
|
|
640
|
+
* since its packed peer takes the `effected` range (`pnpm pack` runs no hook),
|
|
641
|
+
* so the hook hides it and a consumer sees exactly one catalog.
|
|
642
|
+
*/
|
|
643
|
+
const HIDDEN = ["effected:peers"];
|
|
644
|
+
function hide(config) {
|
|
645
|
+
const catalogs = config.catalogs;
|
|
646
|
+
if (catalogs === void 0) return config;
|
|
647
|
+
const out = { ...catalogs };
|
|
648
|
+
for (const name of HIDDEN) delete out[name];
|
|
649
|
+
return {
|
|
650
|
+
...config,
|
|
651
|
+
catalogs: out
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* The plugin's pnpm hooks: the generated `updateConfig`, then hiding the peers catalog.
|
|
656
|
+
*
|
|
657
|
+
* @public
|
|
658
|
+
*/
|
|
659
|
+
const hooks = { updateConfig(config) {
|
|
660
|
+
const result = hooks$1.updateConfig(config);
|
|
661
|
+
return result instanceof Promise ? result.then(hide) : hide(result);
|
|
662
|
+
} };
|
|
663
|
+
|
|
664
|
+
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.1"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|