# @effected/workspaces ## 0.48.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/glob | dependency | updated | 0.22.0 | 0.23.0 | | @effected/lockfiles | dependency | updated | 0.26.0 | 0.27.0 | | @effected/npm | dependency | updated | 0.35.0 | 0.35.1 | | @effected/pnpm | dependency | updated | 0.1.0 | 0.1.1 | | @effected/walker | dependency | updated | 0.29.0 | 0.30.0 | ## 0.48.0 ### Breaking Changes - `PnpmSettings` moved to `@effected/pnpm`. - The `PeerDependencyRules` type and `NoPeerDependencyRules` are removed. Use `PeerDependencyRules` from `@effected/pnpm`, which has a `.empty` value and optional axes. An object literal no longer satisfies `PeerCheckOptions.peerDependencyRules`; pass a `PeerDependencyRules`. - `"yarn"` is no longer a `PackageManagerName`. - A yarn root is refused when the package acts on it. `UnsupportedPackageManagerError` reports it, and `LocalExec` and `localExecContextSync` fail with it. Discovery still works on yarn repos through `package.json#workspaces`. - A root whose only package-manager evidence is an undeclared `yarn.lock` now reports unsupported. It used to fall back to npm. - The package is now a boundary-tier library. - Catalog resolution follows pnpm 12: a `link:` or `file:` catalog entry resolves as written. The `@pnpm/catalogs.*` dependencies are dropped. ### Features - The `PublishConfig` projection gains `name`. ### Bug Fixes - Catalog and importer lookups no longer match inherited object keys. ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/bun | dependency | updated | 0.0.0 | 0.1.0 | | @effected/commands | dependency | updated | 0.21.0 | 0.22.0 | | @effected/lockfiles | dependency | updated | 0.25.0 | 0.26.0 | | @effected/npm | dependency | updated | 0.34.1 | 0.35.0 | | @effected/package-json | dependency | updated | 0.32.1 | 0.32.2 | | @effected/pnpm | dependency | updated | 0.0.0 | 0.1.0 | ## 0.47.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/glob | dependency | updated | 0.21.0 | 0.22.0 | | @effected/lockfiles | dependency | updated | 0.24.1 | 0.25.0 | | @effected/npm | dependency | updated | 0.34.0 | 0.34.1 | | @effected/walker | dependency | updated | 0.28.0 | 0.29.0 | ## 0.47.0 ### Breaking Changes - On an npm root, `WorkspaceDiscovery`, `getWorkspacePackagesSync` and `WorkspaceSnapshots` now read `package.json#workspaces` the way npm does, through `@effected/npm`'s `NpmWorkspacePatterns`. Before, they read it as a `GlobSet`. A root is npm's when package-manager detection says so. pnpm, yarn and bun roots keep `GlobSet`. The two readings differ in four ways, and npm's answer is what npm installs: - Negations are ordered. In `["packages/*", "!packages/a", "packages/a"]` the later positive puts `packages/a` back. - A trailing `/` is ignored, on a positive (`packages/*/`) and on a negation (`!packages/a/`). - An even run of `!` is a positive, so `!!packages/a` declares `packages/a`. - A backslash is a separator, so `packages\a` declares `packages/a`. - On an npm root, a `workspaces` field past one of `NpmWorkspacePatterns`' ceilings now fails, where the `GlobSet` reading used to accept it. The ceilings are 1,000 patterns, 32 wildcard patterns, 256 brace alternatives and 256 characters for a matched pattern. Discovery and the sync facade fail with `WorkspacePatternError` (kind `uncompilable`) and `WorkspaceSnapshots.at` with `CatalogAssemblyError`, as an uncompilable pattern set already did. The error unions are unchanged. ### Features - `WorkspacePatternError` has an optional `cause`. When the kind is `uncompilable`, it carries the typed error that stopped the read: glob's `GlobPatternError`, or `NpmWorkspacePatternsError` on an npm root. ## 0.46.0 ### Breaking Changes #### `getWorkspacePackagesSync` throws instead of answering no packages - The sync facade used to return an empty or fallback list when discovery failed. It now throws the Effect surface's typed errors, so a broken workspace no longer reads as a workspace with no packages: - `WorkspaceDiscoveryError` with reason `read`, when `pnpm-workspace.yaml` exists but cannot be read, or the root `package.json` pattern source cannot be read - `WorkspaceDiscoveryError` with reason `invalidYaml` or `invalidJson`, when either fails to parse - `WorkspacePatternError` with reason `uncompilable`, when the patterns do not compile as one `GlobSet` ```ts try { const packages = getWorkspacePackagesSync(root); } catch (error) { // WorkspaceDiscoveryError | WorkspacePatternError } ``` ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.24.0 | 0.24.1 | | @effected/npm | dependency | updated | 0.33.0 | 0.34.0 | | @effected/package-json | dependency | updated | 0.32.0 | 0.32.1 | | @effected/walker | dependency | updated | 0.27.0 | 0.28.0 | ## 0.45.0 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.20.1 | 0.21.0 | | @effected/git | dependency | updated | 0.31.0 | 0.32.0 | | @effected/glob | dependency | updated | 0.20.0 | 0.21.0 | | @effected/jsonc | dependency | updated | 0.24.0 | 0.25.0 | | @effected/lockfiles | dependency | updated | 0.23.2 | 0.24.0 | | @effected/npm | dependency | updated | 0.32.1 | 0.33.0 | | @effected/package-json | dependency | updated | 0.31.2 | 0.32.0 | | @effected/semver | dependency | updated | 0.23.0 | 0.24.0 | | @effected/walker | dependency | updated | 0.26.0 | 0.27.0 | | @effected/yaml | dependency | updated | 0.29.0 | 0.30.0 | ### Maintenance - Force release all packages to pin new effect versions. ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! ## 0.44.2 ### Documentation - Examples import `@effect/platform-node` by subpath, such as `import * as NodeServices from "@effect/platform-node/NodeServices"`, instead of from the package root. The root re-exports `NodeRedis`, so copying a root import fails wherever the `redis` peer is not installed. [#1318][#1318] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.20.0 | 0.20.1 | | @effected/git | dependency | updated | 0.30.0 | 0.31.0 | | @effected/lockfiles | dependency | updated | 0.23.1 | 0.23.2 | | @effected/npm | dependency | updated | 0.32.0 | 0.32.1 | | @effected/package-json | dependency | updated | 0.31.1 | 0.31.2 | | @effected/semver | dependency | updated | 0.22.0 | 0.23.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1318]: https://github.com/spencerbeggs/effected/pull/1318 ## 0.44.1 ### Bug Fixes - `PackedInstall` strips `NODE_OPTIONS` from the install, probe and bin environments, so a workspace `nodeOptions` such as `--import=tsx` no longer crashes a scratch consumer. A bin that needs it passes it in its own `env`, which still wins [#1310][#1310] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.23.0 | 0.23.1 | | @effected/npm | dependency | updated | 0.31.0 | 0.32.0 | | @effected/package-json | dependency | updated | 0.31.0 | 0.31.1 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1310]: https://github.com/spencerbeggs/effected/pull/1310 ## 0.44.0 ### Breaking Changes - `PnpmSettingsError.reason` gains `"membership"`. An exhaustive switch on `reason` needs the new case. [#1295][#1295] ### Features #### `PnpmSettings` - Reads pnpm's effective settings, the values `pnpm config get ` reports, without spawning pnpm. `PnpmSettings.load` reads through `FileSystem` and `Path` and fails with `PnpmSettingsError`, and `PnpmSettings.fromSourcesResult` is the pure form over text. ```ts import { NodeServices } from "@effect/platform-node"; import { PnpmSettings } from "@effected/workspaces"; import { Effect, Option } from "effect"; const program = Effect.gen(function* () { const settings = yield* PnpmSettings.load({ cwd: process.cwd(), env: process.env, platform: process.platform }); return { cutoffMinutes: Option.getOrUndefined(settings.minimumReleaseAge), // number | undefined exclude: settings.minimumReleaseAgeExclude, // ReadonlyArray, [] when unset strict: settings.getBoolean("minimumReleaseAgeStrict"), // Option }; }).pipe(Effect.provide(NodeServices.layer)); ``` - Typed reads are `get`, `getString`, `getNumber`, `getBoolean` and `getStringArray`, each answering an `Option`, and `origin` says where a value came from. Keys may be camelCase or kebab-case - The precedence, highest first, is the `pnpm_config_*` or `PNPM_CONFIG_*` environment variables, the workspace root's `pnpm-workspace.yaml`, then pnpm's global `config.yaml`. A higher source replaces a whole list - It follows pnpm 11 and 12, where `.npmrc`, `npm_config_*` and the global `rc` file hold no pnpm setting. Registries and credentials stay in `@effected/npm`'s `NpmConfig` - An unset `minimumReleaseAge` reads as `None`, as `pnpm config get` reports it undefined, so keep any fallback the caller applies [#1250][#1250] ### Bug Fixes - `PnpmSettings.load` fails with `PnpmSettingsError` reason `"membership"` when the `packages:` patterns each compile but not together as a set * The packed-install gate message now says to run `pnpm build --filter ` before the packed-install tests, instead of pointing at the retired `build:prod` script [#1249][#1249] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/glob | dependency | updated | 0.19.0 | 0.20.0 | | @effected/lockfiles | dependency | updated | 0.22.1 | 0.23.0 | | @effected/npm | dependency | updated | 0.30.1 | 0.31.0 | | @effected/package-json | dependency | updated | 0.30.0 | 0.31.0 | | @effected/walker | dependency | updated | 0.25.1 | 0.26.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1249]: https://github.com/spencerbeggs/effected/pull/1249 [#1250]: https://github.com/spencerbeggs/effected/pull/1250 [#1295]: https://github.com/spencerbeggs/effected/pull/1295 ## 0.43.0 ### Features - `SourceBoundary.platformFree(builtins)` (#1196) builds the boundary rule for platform-free code: every Node built-in, bare or `node:`-prefixed, and `@effect/platform*`. Pass `builtinModules` from `node:module` as `builtins`. [#1239][#1239] * `SourceBoundary` has a new `{ promiseInExclusive }` rule that flags `Effect.promise(`, `Effect.runPromise(` and `Effect.runPromiseExit(` inside a `.run(` call, where the lane is bound from `Exclusive.make` in the same file or named in `lanes` (#1184). Core's `Effect.promise` abandons the promise when the lane's timeout interrupts the body, so the permit is released while the work still runs; `Exclusive.promise` aborts and waits. Offences report the rule as `"promiseInExclusive"`. * The check is lexical: a helper called from the body, an aliased `Effect` import or a member receiver such as `this.lane.run(` passes. [#1237][#1237] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/glob | dependency | updated | 0.18.0 | 0.19.0 | | @effected/jsonc | dependency | updated | 0.23.0 | 0.24.0 | | @effected/lockfiles | dependency | updated | 0.22.0 | 0.22.1 | | @effected/npm | dependency | updated | 0.30.0 | 0.30.1 | | @effected/package-json | dependency | updated | 0.29.0 | 0.30.0 | | @effected/semver | dependency | updated | 0.21.0 | 0.22.0 | | @effected/walker | dependency | updated | 0.25.0 | 0.25.1 | | @effected/yaml | dependency | updated | 0.28.0 | 0.29.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1237]: https://github.com/spencerbeggs/effected/pull/1237 [#1239]: https://github.com/spencerbeggs/effected/pull/1239 ## 0.42.0 ### Breaking Changes - The three carrier libraries are renamed so the `@effected/cli`, `@effected/mcp` and `@effected/engine` names are free for the `effected` tool's own packages. Rename every import and dependency; there is no compatibility shim, and every subpath (`./ui`, `./testing`, `./guard`, `./node`) carries over unchanged. | Old name | New name | | :-- | :-- | | `@effected/engine` | `@effected/kit` | | `@effected/cli` | `@effected/cli-kit` | | `@effected/mcp` | `@effected/mcp-kit` | ### Refactoring - Dependents rename their imports and dependency declarations to the new package names. The `effected` catalog lists the renamed packages under their new names. [#1229][#1229] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.19.0 | 0.20.0 | | @effected/git | dependency | updated | 0.29.0 | 0.30.0 | | @effected/glob | dependency | updated | 0.17.0 | 0.18.0 | | @effected/jsonc | dependency | updated | 0.22.0 | 0.23.0 | | @effected/lockfiles | dependency | updated | 0.21.0 | 0.22.0 | | @effected/npm | dependency | updated | 0.29.0 | 0.30.0 | | @effected/package-json | dependency | updated | 0.28.0 | 0.29.0 | | @effected/semver | dependency | updated | 0.20.0 | 0.21.0 | | @effected/walker | dependency | updated | 0.24.0 | 0.25.0 | | @effected/yaml | dependency | updated | 0.27.0 | 0.28.0 | ### Maintenance - Upgrades core Effect library dependencies to v4.1.2 [#1229][#1229] ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1229]: https://github.com/spencerbeggs/effected/pull/1229 ## 0.41.0 ### Breaking Changes - Rebuilt on Effect 4.1.1. The `effect` peer dependency (and any `@effect/*` peer) is now `~4.1.0`, so an Effect 4.0.x install no longer satisfies it. Upgrade `effect` to 4.1 alongside this release; mixing this package with a copy built on 4.0.x is unsupported. [#1168][#1168] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.18.0 | 0.19.0 | | @effected/git | dependency | updated | 0.28.0 | 0.29.0 | | @effected/glob | dependency | updated | 0.16.0 | 0.17.0 | | @effected/jsonc | dependency | updated | 0.21.0 | 0.22.0 | | @effected/lockfiles | dependency | updated | 0.20.0 | 0.21.0 | | @effected/npm | dependency | updated | 0.28.0 | 0.29.0 | | @effected/package-json | dependency | updated | 0.27.0 | 0.28.0 | | @effected/semver | dependency | updated | 0.19.0 | 0.20.0 | | @effected/walker | dependency | updated | 0.23.0 | 0.24.0 | | @effected/yaml | dependency | updated | 0.26.0 | 0.27.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1168]: https://github.com/spencerbeggs/effected/pull/1168 ## 0.40.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.27.0 | 0.28.0 | | @effected/walker | dependency | updated | 0.22.0 | 0.23.0 | ## 0.40.0 ### Breaking Changes - `WORKSPACE_MARKERS` is typed `ReadonlyArray` instead of `ReadonlyArray`, so `WORKSPACE_MARKERS.includes(someString)` no longer compiles. Narrow the string first, or widen the array at the call site (`(WORKSPACE_MARKERS as ReadonlyArray).includes(name)`). ### Features - `WorkspaceRoot.locate(cwd, options)` answers a `WorkspaceRootMatch` as an Effect, from `FileSystem` and `Path` in `R`. It shares one ascent with `find`, so the two cannot disagree on a root. `WorkspaceRootShape` is unchanged, so hand-written `find` doubles keep compiling. - Root lookups filter by `markers` and report the matched file, so a pnpm-only tool is not stopped by a member that keeps `package.json` `workspaces`. - `SourceBoundary` gains `forbidImportedNames`: forbid the named exports of one module while leaving its other exports free. It reads named, type-only and default bindings, named re-exports, `export *`, namespace member access, string-literal names and `import m = require("m")`. Dynamic import, `require` and computed members are documented misses (#1124). ### Bug Fixes - `WorkspaceDiscovery`, `LockfileReader`, `WorkspaceCatalogs`, `WorkspaceSnapshots`, the `Workspaces` composites and `localExecLayer` forward `markers` wherever they forwarded `stopAt`, so a layer-bound lookup no longer picks a different root than the sync helpers (#1130). - `@effected/source` now has its own bottom layer in the workspace layering. [#1151][#1151] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.17.0 | 0.18.0 | | @effected/git | dependency | updated | 0.26.0 | 0.27.0 | | @effected/glob | dependency | updated | 0.15.0 | 0.16.0 | | @effected/jsonc | dependency | updated | 0.20.1 | 0.21.0 | | @effected/lockfiles | dependency | updated | 0.19.5 | 0.20.0 | | @effected/npm | dependency | updated | 0.27.1 | 0.28.0 | | @effected/package-json | dependency | updated | 0.26.1 | 0.27.0 | | @effected/semver | dependency | updated | 0.18.0 | 0.19.0 | | @effected/walker | dependency | updated | 0.21.0 | 0.22.0 | | @effected/yaml | dependency | updated | 0.25.1 | 0.26.0 | ### Maintenance - Upgrades core Effect library dependencies to v4.0.7 [#1145][#1145] ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1145]: https://github.com/spencerbeggs/effected/pull/1145 [#1151]: https://github.com/spencerbeggs/effected/pull/1151 ## 0.39.1 ### Bug Fixes - The internal cause-message helper no longer throws when an error's `message` or `cause` getter (or a proxy trap) throws; that node is read as having no message. [#1111][#1111] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.16.0 | 0.17.0 | | @effected/git | dependency | updated | 0.25.1 | 0.26.0 | | @effected/glob | dependency | updated | 0.14.0 | 0.15.0 | | @effected/jsonc | dependency | updated | 0.20.0 | 0.20.1 | | @effected/npm | dependency | updated | 0.27.0 | 0.27.1 | | @effected/package-json | dependency | updated | 0.26.0 | 0.26.1 | | @effected/walker | dependency | updated | 0.20.1 | 0.21.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1111]: https://github.com/spencerbeggs/effected/pull/1111 ## 0.39.0 ### Features - `detectPackageManagerSync(root, ops)` returns a `Result` carrying exactly the decision `PackageManagerDetector` would make, for callers without an Effect runtime. - `localExecContextSync(cwd, ops)` returns a `Result, LocalExecError>`. It builds on the new `LocalExec.contextFor()` in `@effected/commands`. ### Refactoring - The `Workspaces` layer factories are now static methods with real declared signatures. Call shapes are unchanged. [#1101][#1101] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.15.1 | 0.16.0 | | @effected/git | dependency | updated | 0.25.0 | 0.25.1 | | @effected/lockfiles | dependency | updated | 0.19.4 | 0.19.5 | | @effected/npm | dependency | updated | 0.26.2 | 0.27.0 | | @effected/package-json | dependency | updated | 0.25.2 | 0.26.0 | | @effected/walker | dependency | updated | 0.20.0 | 0.20.1 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1101]: https://github.com/spencerbeggs/effected/pull/1101 ## 0.38.1 ### Documentation - The `allowSharedBins` TSDoc now describes bun's current rule for which package owns a shared bin. Closes #1090. [#1098][#1098] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.19.3 | 0.19.4 | | @effected/npm | dependency | updated | 0.26.1 | 0.26.2 | | @effected/package-json | dependency | updated | 0.25.1 | 0.25.2 | | @effected/semver | dependency | updated | 0.17.0 | 0.18.0 | | @effected/walker | dependency | updated | 0.19.0 | 0.20.0 | | @effected/yaml | dependency | updated | 0.25.0 | 0.25.1 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1098]: https://github.com/spencerbeggs/effected/pull/1098 ## 0.38.0 ### Breaking Changes - `PackedInstallError.message` for `PackFailed` and `InstallFailed` on a non-zero exit is no longer a single line: it ends with `; output tail:` followed by the last 8 non-blank lines (at most 600 characters, prefixed with `…` when cut) of stdout and stderr. The `output` field is unchanged. Code that matched or displayed the message as one line should read `output` instead. ### Bug Fixes - `LayerPolicyError` shape-mismatch messages and hooks-source `CatalogAssemblyError` messages now include the nested cause chain. - Lazy memoised readers (`LockfileReader`, `WorkspaceCatalogs`, `WorkspaceDiscovery`, `WorkspaceSnapshots.at`, pnpmfile resolution) cache only successes and let concurrent callers share one in-flight run. [#1091][#1091] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.19.2 | 0.19.3 | | @effected/npm | dependency | updated | 0.26.0 | 0.26.1 | | @effected/package-json | dependency | updated | 0.25.0 | 0.25.1 | | @effected/semver | dependency | updated | 0.16.0 | 0.17.0 | | @effected/yaml | dependency | updated | 0.24.0 | 0.25.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1091]: https://github.com/spencerbeggs/effected/pull/1091 ## 0.37.0 ### Breaking Changes #### Omitted `cwd` is `"."` - When `cwd` is omitted, `findLayerRoot` and `Workspaces.localExecLayer` pass `"."` to `WorkspaceRoot.find`, resolved through the injected `Path`, instead of `process.cwd()`. Hand-written `WorkspaceRoot` test doubles now receive `"."`, and `WorkspaceRoot.layerTest` reports a resolved `searchPath`. - The `"/"` fallback for hosts without `process` is gone. On such a host an omitted `cwd` is now a defect rather than a typed failure, so pass `cwd` explicitly there. #### Error causes - A package.json syntax failure in `WorkspaceDiscoveryError`, `WorkspaceManifestError`, `CatalogAssemblyError` and the sync `onSkip` report now carries a `PackageJsonSyntaxError` cause. The sync skip message for a manifest that is not an object is now `package.json text is not a JSON object`. #### Environment is read through `Config` - Config-dependency store discovery reads `PNPM_HOME`, `XDG_DATA_HOME` and `LOCALAPPDATA` through `Config`. Effect's default `ConfigProvider` takes one snapshot of `process.env`, so a change to `process.env` while the process runs is no longer seen. Provide a different `ConfigProvider` instead. #### `PeerCheck` judges more rows - Peer ranges written with whitespace after the operator (such as `>= 18`) now parse, so `PeerCheck` judges rows it used to skip and can report new unsatisfied peers. ### Bug Fixes - A root package.json whose content is `null`, a number or a string is now treated as "not a root" instead of failing with a `TypeError` defect. [#1066][#1066] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.15.0 | 0.15.1 | | @effected/git | dependency | updated | 0.24.0 | 0.25.0 | | @effected/jsonc | dependency | updated | 0.19.0 | 0.20.0 | | @effected/lockfiles | dependency | updated | 0.19.1 | 0.19.2 | | @effected/npm | dependency | updated | 0.25.0 | 0.26.0 | | @effected/package-json | dependency | updated | 0.24.1 | 0.25.0 | | @effected/semver | dependency | updated | 0.15.0 | 0.16.0 | | @effected/yaml | dependency | updated | 0.23.0 | 0.24.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1066]: https://github.com/spencerbeggs/effected/pull/1066 ## 0.36.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.19.0 | 0.19.1 | | @effected/npm | dependency | updated | 0.24.0 | 0.25.0 | | @effected/package-json | dependency | updated | 0.24.0 | 0.24.1 | ## 0.36.0 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.14.0 | 0.15.0 | | @effected/git | dependency | updated | 0.23.0 | 0.24.0 | | @effected/glob | dependency | updated | 0.13.0 | 0.14.0 | | @effected/jsonc | dependency | updated | 0.18.0 | 0.19.0 | | @effected/lockfiles | dependency | updated | 0.18.0 | 0.19.0 | | @effected/npm | dependency | updated | 0.23.0 | 0.24.0 | | @effected/package-json | dependency | updated | 0.23.0 | 0.24.0 | | @effected/semver | dependency | updated | 0.14.0 | 0.15.0 | | @effected/walker | dependency | updated | 0.18.0 | 0.19.0 | | @effected/yaml | dependency | updated | 0.22.0 | 0.23.0 | ### Maintenance - Upgrades core Effect library dependencies to v4.0.6 [#1039][#1039] ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1039]: https://github.com/spencerbeggs/effected/pull/1039 ## 0.35.0 ### Bug Fixes #### `ImportGraph.undeclared` gives a nested file to its innermost package in every order - `ownerOf` decides which package owns a file. It asked whether the file sits under a package directory, and it answered with a `..${sep}` prefix test on `path.relative`. The direct parent case answers exactly `..`, and that test read it as inside. A parent package listed after a package nested in it therefore took that package's files. A root-wide `include` then checked a nested package's files against the root manifest. The test now rejects `..` as well. Fixes a review finding on #995. [#1017][#1017] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.13.0 | 0.14.0 | | @effected/git | dependency | updated | 0.22.0 | 0.23.0 | | @effected/glob | dependency | updated | 0.12.0 | 0.13.0 | | @effected/jsonc | dependency | updated | 0.17.0 | 0.18.0 | | @effected/lockfiles | dependency | updated | 0.17.0 | 0.18.0 | | @effected/npm | dependency | updated | 0.22.0 | 0.23.0 | | @effected/package-json | dependency | updated | 0.22.0 | 0.23.0 | | @effected/semver | dependency | updated | 0.13.0 | 0.14.0 | | @effected/walker | dependency | updated | 0.17.0 | 0.18.0 | | @effected/yaml | dependency | updated | 0.21.0 | 0.22.0 | ### Maintenance - Upgrades core Effect library dependencies to v4.0.5 [#1019][#1019] ### Thanks Thanks to [@fuleinist](https://github.com/fuleinist) and [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1017]: https://github.com/spencerbeggs/effected/pull/1017 [#1019]: https://github.com/spencerbeggs/effected/pull/1019 ## 0.34.0 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.12.0 | 0.13.0 | | @effected/git | dependency | updated | 0.21.0 | 0.22.0 | | @effected/glob | dependency | updated | 0.11.0 | 0.12.0 | | @effected/jsonc | dependency | updated | 0.16.0 | 0.17.0 | | @effected/lockfiles | dependency | updated | 0.16.0 | 0.17.0 | | @effected/npm | dependency | updated | 0.21.0 | 0.22.0 | | @effected/package-json | dependency | updated | 0.21.0 | 0.22.0 | | @effected/semver | dependency | updated | 0.12.0 | 0.13.0 | | @effected/walker | dependency | updated | 0.16.0 | 0.17.0 | | @effected/yaml | dependency | updated | 0.20.0 | 0.21.0 | ### Maintenance - Upgrades core Effect library dependencies to v4.0.4 [#1008][#1008] ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#1008]: https://github.com/spencerbeggs/effected/pull/1008 ## 0.33.0 ### Features #### `ImportGraph.reachability` - `@effected/workspaces/testing` gains the import-graph checks a one-file rule cannot express. `ImportGraph.reachability` walks from entry files through relative imports and reports every forbidden specifier a reached file imports, with the chain of files that reaches it. A directory rule approximates reachability, but a refactor that adds a new static path from the root entry into an allowed directory still passes it; the walk follows the real edges. Specifier matching is `forbidImports`' own: exact, subpath, or a trailing `*` prefix. Each file is visited once through its realpath, so a symlink loop terminates and a diamond reports one shortest chain, and a relative import no candidate resolves lands in `unresolved` rather than dropping the graph behind it silently. An entry that resolves to no file fails `EntryNotFoundError`, and an empty entry list fails `NoEntriesError`: the walk never proves nothing silently. `followPackage` is the extension point for walking into workspace packages. Closes #966. #### `ImportGraph.undeclared` - `ImportGraph.undeclared` checks each workspace package's runtime sources against its own manifest: every literal specifier whose package is not in `dependencies`, `peerDependencies` or `optionalDependencies` is reported with the package, the file and the specifier. Workspace hoisting resolves such an import at edit time, and only a packed install caught it before, far too slow for the edit loop. A `node:` specifier is always a built-in, and a caller spreads `builtinModules` from `node:module` for the bare spellings, since no built-in list ships here. Relative specifiers, `#` subpath imports and a package's self-reference are never flagged. Type-only imports are erased by the compiler and never flagged: `import type { X } from`, `export type` re-exports, and an `import()` in a type position (`typeof import("x")`, an annotation, a type alias right-hand side, a generic argument), judged by the construct enclosing the call so that a runtime `import("x")` in a typed initializer, an object literal, a ternary branch or a call argument is still reported. One `import type from "x"` is not type-only — TypeScript reads it as a runtime default import of a binding named `type`. A file under two discovered packages belongs to its innermost one, so a root-wide `include` checks a nested package's files only against that package's manifest. `include` globs (default `src/**`, walked from each glob's static prefix) name the runtime sources, so test files importing devDependencies stay out of scope by design. - Both checks are static analysis of literal specifiers, with no dynamic-import guarantee: a computed specifier is invisible to them, and `PackedInstall` remains the proof of what actually resolves at runtime. Both reuse `SourceBoundary`'s lexer, and its scan now shares one source-tree walker with them, so the three cannot drift on symlink loops, `node_modules` or what counts as a source file. [#995][#995] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.11.1 | 0.12.0 | | @effected/git | dependency | updated | 0.20.1 | 0.21.0 | | @effected/glob | dependency | updated | 0.10.1 | 0.11.0 | | @effected/jsonc | dependency | updated | 0.15.2 | 0.16.0 | | @effected/lockfiles | dependency | updated | 0.15.1 | 0.16.0 | | @effected/npm | dependency | updated | 0.20.1 | 0.21.0 | | @effected/package-json | dependency | updated | 0.20.2 | 0.21.0 | | @effected/semver | dependency | updated | 0.11.1 | 0.12.0 | | @effected/walker | dependency | updated | 0.15.1 | 0.16.0 | | @effected/yaml | dependency | updated | 0.19.2 | 0.20.0 | | effect | peerDependency | updated | 4.0.2 | ^4.0.3 | - Effect 4.0.3 advance: the `effect` peer and catalog move from the exact `4.0.2` hold back to `^4.0.3`. No API change. [#1000][#1000] ### Thanks Thanks to [@fuleinist](https://github.com/fuleinist) and [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#995]: https://github.com/spencerbeggs/effected/pull/995 [#1000]: https://github.com/spencerbeggs/effected/pull/1000 ## 0.32.1 ### Bug Fixes - Republished with every `effect` and `@effect/*` version pinned exactly to `4.0.2`, both peer and dependency ranges. - On 2026-10-10, every `@effect/*` package published at `4.0.3`, but `effect@4.0.3` itself never reached npm (Effect-TS/effect#8994). The 4.0.3 packages require `effect ^4.0.3`. A caret range on any of them therefore resolves a 4.0.3 package next to `effect@4.0.2`, and the program crashes when it imports them. Exact pins keep a fresh install of any kit package on a matched set until `effect@4.0.3` is available. [#997][#997] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.11.0 | 0.11.1 | | @effected/git | dependency | updated | 0.20.0 | 0.20.1 | | @effected/glob | dependency | updated | 0.10.0 | 0.10.1 | | @effected/jsonc | dependency | updated | 0.15.1 | 0.15.2 | | @effected/lockfiles | dependency | updated | 0.15.0 | 0.15.1 | | @effected/npm | dependency | updated | 0.20.0 | 0.20.1 | | @effected/package-json | dependency | updated | 0.20.1 | 0.20.2 | | @effected/semver | dependency | updated | 0.11.0 | 0.11.1 | | @effected/walker | dependency | updated | 0.15.0 | 0.15.1 | | @effected/yaml | dependency | updated | 0.19.1 | 0.19.2 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#997]: https://github.com/spencerbeggs/effected/pull/997 ## 0.32.0 ### Features #### Standard input for `runBin` and `runCarrierBin` - `RunBinOptions.stdin` accepts a string, bytes or a byte stream and feeds it to the child process. When omitted, the child sees end of input. #### `PackedInstall` preflight and gate - `PackedInstall.preflight(options)` reports `{ ready, missing }` for the build output a packed-install check needs. - `PackedInstall.gate(preflight)` turns that report into an effect yielding `{ action, message }`, where `action` is `run`, `skip` or `fail`. It reads CI through `Config` and fails under CI, so a missing production build never silently skips the check. [#944][#944] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/jsonc | dependency | updated | 0.15.0 | 0.15.1 | | @effected/yaml | dependency | updated | 0.19.0 | 0.19.1 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#944]: https://github.com/spencerbeggs/effected/pull/944 ## 0.31.0 ### Breaking Changes - The kit now builds on and peers stable `effect` `^4.0.0`, in place of an exact release-candidate pin. Move `effect` and every `@effect/*` package to the same `4.x` version in one install: Effect releases them together at one version. A package from this release cannot share an install with an `effect` release candidate. The peer is a caret range, so later `4.x` releases of Effect satisfy the kit without a kit release. - Kit exports are unchanged. A consumer moving to stable `effect` meets these changes in its own code: - `Array`, `Chunk`, `Effect` and `Record` `partition`, their `separate` helpers and `Option.partitionMap` return `[successes, failures]`. Where both sides share a type, the reversed destructuring still compiles, so search for every call. - `Schema.brand` takes one identifier and is type-only: the identifier is not stored on the AST and does not survive `SchemaRepresentation`. Compose distinct brands by applying `brand` more than once. - `TestSchema`'s round-trip assertion is `verifyRoundTrip`, with Effect forms `succeedEffect`, `failEffect` and `verifyRoundTripEffect`. - Effect marks some APIs `@stability unstable`: those may change in a minor Effect release. Untagged APIs follow semver. ### Documentation - Every exported construct's TSDoc was reviewed against the current API. Summaries open with what the construct does, error channels and requirements are stated, examples use real imports and compile, and links resolve. Comments that described options, errors or defaults the code does not have were corrected. [#910][#910] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.10.0 | 0.11.0 | | @effected/git | dependency | updated | 0.19.0 | 0.20.0 | | @effected/glob | dependency | updated | 0.9.0 | 0.10.0 | | @effected/jsonc | dependency | updated | 0.14.0 | 0.15.0 | | @effected/lockfiles | dependency | updated | 0.14.0 | 0.15.0 | | @effected/npm | dependency | updated | 0.19.1 | 0.20.0 | | @effected/package-json | dependency | updated | 0.19.1 | 0.20.0 | | @effected/semver | dependency | updated | 0.10.1 | 0.11.0 | | @effected/walker | dependency | updated | 0.14.1 | 0.15.0 | | @effected/yaml | dependency | updated | 0.18.0 | 0.19.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#910]: https://github.com/spencerbeggs/effected/pull/910 ## 0.30.4 ### Documentation - The `Workspaces` documentation now tells tests to provide an `@effected/memfs` volume. [#902][#902] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/npm | dependency | updated | 0.19.0 | 0.19.1 | | @effected/walker | dependency | updated | 0.14.0 | 0.14.1 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#902]: https://github.com/spencerbeggs/effected/pull/902 ## 0.30.3 ### Bug Fixes - `PackedInstall` consumers no longer fail on freshly published packages: Yarn Berry 4.10+ consumers get `npmMinimalAgeGate: 0`, which stops `YN0016` quarantine of versions under a day old - pnpm consumers' `pnpm-workspace.yaml` sets `minimumReleaseAge: 0`, so pnpm 11 and 12 no longer append `minimumReleaseAgeExclude:` entries or resolve a range to an older, mature match - Berry 2.x through 4.9 consumers are unchanged, since those versions reject an unknown `.yarnrc.yml` setting [#896][#896] ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#896]: https://github.com/spencerbeggs/effected/pull/896 ## 0.30.2 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.18.1 | 0.19.0 | | @effected/walker | dependency | updated | 0.13.0 | 0.14.0 | ## 0.30.1 ### Bug Fixes - JSON Schemas derived from this package's schemas carry their string `pattern` again. Effect's JSON Schema export emits a `Schema.isPattern` check as `pattern` only when its regular expression has the `u` flag, and without it the pattern was dropped silently, leaving a bare `{ "type": "string" }`. Decoding was never affected. Every pattern in the package now has the `u` flag, which does not change what it accepts. [#866][#866] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.18.0 | 0.18.1 | | @effected/package-json | dependency | updated | 0.19.0 | 0.19.1 | | @effected/semver | dependency | updated | 0.10.0 | 0.10.1 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#866]: https://github.com/spencerbeggs/effected/pull/866 ## 0.30.0 ### Breaking Changes - The kit now builds on and peers `effect` `4.0.0-rc.118`, pinned exactly. Consumers must move `effect` and every `@effect/*` package to `4.0.0-rc.118` in the same install. Effect removed the `effect/unstable/*` export paths in this release, so an `@effected` package built on rc.118 cannot share an install with `effect` rc.117. - Moving the pin also closes a fresh-install failure on rc.117. `@effect/platform-node@4.0.0-rc.117` depends on `@effect/platform-node-shared` with a caret, so an install without a lockfile paired the rc.118 shared package with `effect` rc.117 and failed at startup with `ERR_MODULE_NOT_FOUND`. - Consumers moving to this release: effect removed the `effect/unstable/*` export paths (imports become `effect/`), moved `Arbitrary` to `effect`, split `effect/Encoding` into `effect/encoding/Base64`, `Base64Url` and `Hex`, and renamed the `Schema` range and string checks (`isLengthBetween` → `isBetweenLength`, `isStartsWith` → `isStartingWith`, and so on). Kit exports are otherwise unchanged; the kit's own imports moved onto the new paths. [#864][#864] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.9.0 | 0.10.0 | | @effected/git | dependency | updated | 0.17.0 | 0.18.0 | | @effected/glob | dependency | updated | 0.8.0 | 0.9.0 | | @effected/jsonc | dependency | updated | 0.13.0 | 0.14.0 | | @effected/lockfiles | dependency | updated | 0.13.0 | 0.14.0 | | @effected/npm | dependency | updated | 0.18.0 | 0.19.0 | | @effected/package-json | dependency | updated | 0.18.1 | 0.19.0 | | @effected/semver | dependency | updated | 0.9.0 | 0.10.0 | | @effected/walker | dependency | updated | 0.12.0 | 0.13.0 | | @effected/yaml | dependency | updated | 0.17.0 | 0.18.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#864]: https://github.com/spencerbeggs/effected/pull/864 ## 0.29.0 ### Breaking Changes - `PackageStateSnapshot.version` is now optional and is never the empty string. Both capture paths omit `version` for a workspace member with no declared version instead of recording `""`, `PackageStateSnapshot.make` rejects an explicit `""`, and a snapshot serialized under the old `""` sentinel decodes to the field being absent. As a consequence, `WorkspaceStateSnapshot.versions` now lists only members that declared a version — use `package(name)` to check membership instead, since a version-less member no longer appears there. Closes #613. [#859][#859] ### Features - `PeerCheck.run` accepts two new options that close the `link:` blind spot in peer verification (effected#800): under pnpm, every `workspace:` dependency resolves through `link:`, and pnpm records no peer declarations for a workspace project, so a linked parent's peers were invisible to the report even though `pnpm peers check` reads them from the manifest on disk. Without these options, a pnpm monorepo with internal dependencies now reports `unverified` where it previously reported clean — pass both to restore a "proven clean" answer: ```ts const report = PeerCheck.run(lockfile, { peerDependencyRules: yield* catalogs.peerDependencyRules(), workspacePackages: yield* discovery.listPackages(), catalogs: yield* catalogs.set(), }); ``` - `workspacePackages` — the packages `WorkspaceDiscovery` already returns. Joins a `link:`-resolved parent's manifest peers into the walk (the root importer's linked targets included), naming the parent from its manifest (`probe-a@1.0.0`, not the lockfile row's `packages/a@0.0.0`) and judging its peers against the *importer's own* dependency set, which is where pnpm resolves them from. Presence of the key is the assertion: `"unresolvedEdge"` still fires for any `link:` target the supplied set does not cover, and for every target when the key is omitted, so the option answers only for what it covers. - A `link:` target matches a supplied package at its own directory or, when `publishConfig.directory` is set and `linkDirectory` is not `false` (pnpm's default), at that publish directory — the layout a workspace that links built output uses. A linked package's peers are judged for its direct consumer only, and a workspace package's own dependencies belong to its own importer, matching where `pnpm peers check` reports them. - `catalogs` — the workspace's `CatalogSet`, from `WorkspaceCatalogs.set()`. A joined manifest may declare a peer as `catalog:` or `catalog:` rather than a plain range; with this key supplied, the specifier resolves through the set and the resolved range is judged and reported as `wanted` — the same value `pnpm peers check` reports as `wantedRange`. - A new `UnverifiedReason`, `"peerRangeUnresolved"`, fires when a joined peer's range is a protocol specifier (a `catalog:` entry the supplied set names nothing for, `catalogs` omitted, or any other protocol such as `workspace:*`) while something resolved for that peer, so the comparison was never performed. A peer with no provider at all is unaffected and is still reported as usual. - A new `UnverifiedReason`, `"peerVersionUnresolved"`, fires when a peer resolved to a non-workspace provider whose version is a protocol specifier: a `file:` directory or tarball, directly or through a `file:` override, and a git or remote-tarball provider, which pnpm keys by its URL. Such a peer was previously skipped as unparseable and passed as satisfied, while `pnpm peers check` reports it `bad`; it is now declined without a fabricated row, for lockfile-row and joined-manifest peers alike. #### `findWorkspaceRootSync` stop boundary - `findWorkspaceRootSync(cwd, options)` accepts an optional `stopAt` via the new exported `FindWorkspaceRootSyncOptions`, closing #846. The bound is inclusive, a relative path resolves against `process.cwd()` at lookup time, and the ascent returns `null` once it passes `stopAt` without finding a workspace root. Omitting `stopAt` keeps the ascent unbounded, matching prior behavior. ```ts import { findWorkspaceRootSync } from "@effected/workspaces"; import { nodeSyncOps } from "@effected/workspaces/node-sync"; const root = findWorkspaceRootSync(process.cwd(), { ...nodeSyncOps, stopAt: process.cwd() }); ``` #### `reason: "no-version"` on version-less resolution failures - Part of #612: a `versionOf` failure caused by a workspace member declaring no `version` — from both `WorkspaceDiscovery` and the snapshot resolvers — now carries `reason: "no-version"` and no `cause`, matching `@effected/npm`'s `DependencyResolutionError` shape. ### Bug Fixes - `LockfileReader` passes `configOnly` to `Lockfile.parse` only when the workspace root has no `package.json`, so a config-dependency-only pnpm workspace reads as an empty lockfile while the same bytes left by an interrupted first install fail with `LockfileFramingError` instead of reading as a clean, empty workspace. ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.12.0 | 0.13.0 | | @effected/npm | dependency | updated | 0.17.0 | 0.18.0 | | @effected/package-json | dependency | updated | 0.18.0 | 0.18.1 | ### Other - New committed oracle fixtures under `__test__/fixtures/peers/` (the `linkdeep*` and `linkchain*` sets) recording real pnpm 12.5.1/12.6.0 `peers check --json` output alongside the lockfile, covering the root importer's own linked dependencies, publish-directory links, and chains of linked workspace packages, plus a `filedep*` set recording pnpm 12.6.0 and 12.7.0 verdicts for `file:` directory, tarball, override and joined providers. [#811][#811] ### Thanks Thanks to [@fuleinist](https://github.com/fuleinist) and [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#811]: https://github.com/spencerbeggs/effected/pull/811 [#859]: https://github.com/spencerbeggs/effected/pull/859 ## 0.28.0 ### Features #### Parse a pnpm configDependencies spec - `ConfigDependencySpec` models one `configDependencies` value from `pnpm-workspace.yaml`. It reads the bare form pnpm 11 and 12 write (`0.11.1`) and the deprecated inline-integrity form (`0.11.1+sha512-`). The version is an exact SemVer version. The integrity is an SRI hash, validated by `@effected/npm`'s `SriIntegrityHash` and present only on the inline form. - `ConfigDependencySpec.parse(spec)` and `parseResult(spec)` fail with `InvalidConfigDependencySpecError`. Its `reason` is `"version"` for a range, dist-tag or partial version, and `"integrity"` for a tail that is not an SRI hash. A corepack `sha512.` tail counts as `"integrity"`. - `bare` renders ``, the form to write when normalizing the field. - `toString()` renders the form that was parsed, so a spec you only read round-trips byte for byte. - `ConfigDependencySpec.FromString` is the matching string codec. - Only the first `+` separates version from integrity, because an SRI's base64 can itself contain `+`. Hook replay splits specs the same way. It still validates neither half, so it resolves every spec it resolved before. [#843][#843] #### Cap the workspace root ascent with `stopAt` - `WorkspaceDiscoveryOptions`, `LockfileReaderOptions`, `WorkspaceCatalogsOptions`, `WorkspaceSnapshotsOptions` and `WorkspacesOptions` gain `stopAt`, a ceiling for the root ascent from `cwd`. It is passed through to `WorkspaceRoot.find`, so it is inclusive and resolved to an absolute path. A checkout nested under another directory's workspace used to adopt that outer workspace. With `stopAt: cwd` it now fails with `WorkspaceRootNotFoundError`, carrying the ceiling. A checkout that is itself a workspace root still resolves. - Every `Workspaces.*` composite forwards one `stopAt` to every service it builds, so discovery, lockfile, catalog and snapshot reads all refuse the enclosing workspace together. - `WorkspacesOptions` now extends the per-service option shapes it forwards, so an option a service grows reaches the composites too. - `Workspaces.localExecLayer` takes `stopAt` as well. A ceiling with no root below it gives the same `Option.none()` as no root at all. - The ceiling applies to layer-bound lookups only. `WorkspaceDiscovery`'s `infoIn`, `listPackagesIn` and `refreshIn` take a directory per call and still ascend unbounded. - The default is no ceiling, so existing callers see no change. #### Replay a config dependency version nobody installed - A snapshot diff across a config-dependency bump no longer fails on a fresh checkout (#842). The base side declares the old version, which neither `node_modules/.pnpm-config` nor the store holds. `ConfigDependencyHooks.layerSubprocess`, and so `Workspaces.layerWithGitAndConfigDependenciesSubprocess`, now fetches that version into the pnpm store. - The fetch is verified, fail-closed: - pnpm 11 or 12 runs `install --frozen-lockfile` in a scratch workspace, which is removed afterwards. Its lockfile pins the integrity the declaring side recorded, so pnpm itself refuses a tarball that does not match. - The integrity comes from the inline `+` spec when present, else from that side's `pnpm-lock.yaml` env preamble. `WorkspaceSnapshots.at(ref)` reads the lockfile at the ref, so the base side is checked against the base side's record. - Two sources that disagree fail with `reason: "integrityMismatch"`. No source fails with `reason: "integrityUnavailable"`. Nothing is fetched in either case. - A failed fetch fails with `reason: "fetchFailed"`, keeping the `pnpm add --config` remediation. - The scratch workspace fetches through the workspace's own registry config. The root `.npmrc` (scoped registries, mirrors, auth) is copied in as-is, with `${NPM_TOKEN}`-style references left for pnpm to expand, and removed with the scratch. The root `pnpm-workspace.yaml`'s `registry` and `registries` keys are carried over too. Both come from the current checkout for either side of a diff; a base ref's `.npmrc` is not read through git. - The fetch writes to the first store the ladder searched, so the next replay finds the version there. `HookReplaySource` gains `"fetched"`, recorded in `replays[name].source` when the fetch rung answered. - The other replaying layers still do not fetch. A version they find nowhere now fails with `reason: "notInstalled"`, and the message names the ref that declared it and explains the base-side cause. - `ConfigDependencyHooksShape.inject` takes an optional fifth argument, `HookReplayContext`, carrying the declaring side's `lockfile` text and `ref`. `WorkspaceCatalogs` and `WorkspaceSnapshots` supply it. A custom implementation may ignore it. #### The not-installed message no longer depends on a magic empty version - The replay ladder no longer uses an empty-string version to mean "this `package.json` carries no version". It now tracks that state as its own case, so no caller has to know the convention (part of #613). The error still reads "a package with no version". A manifest whose `version` is the empty string now counts as having no version too, so an empty declared version can no longer match it. [#843][#843] ### Bug Fixes #### The not-found message names the `workspaces` field - The replay ladder no longer uses an empty-string version to mean "this `package.json` carries no version". It now tracks that state as its own case, so no caller has to know the convention (part of #613). The error still reads "a package with no version". A manifest whose `version` is the empty string now counts as having no version too, so an empty declared version can no longer match it. [#843][#843] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.11.0 | 0.12.0 | | @effected/npm | dependency | updated | 0.16.0 | 0.17.0 | | @effected/package-json | dependency | updated | 0.17.0 | 0.18.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#843]: https://github.com/spencerbeggs/effected/pull/843 ## 0.27.0 ### Breaking Changes - `PackedInstallResult.scratch` is a new **required** field. A hand-built `PackedInstallResult` — a test double standing in for a run — must now supply it. - `InstalledConsumer.runBin` applies `options.env` **after** the install's scrubbed environment, not before, so an explicit entry there always wins over the scrub. - `BinConflict` is checked by default. A closure member or `overrides` package that declares one of the carrier's own bin names now fails the run unless `allowSharedBins: true` is set. [#840][#840] ### Features - `SourceBoundary` gains a `{ forbidTokens }` rule: forbid an exact piece of text wherever it appears in code (comments, strings, template text and regex bodies are blanked first), and confine it to named files with the matching `allowRules.forbidTokens` glob — the house pattern for something like `process.env.__PACKAGE_VERSION__`, which is forbidden everywhere except `version.ts`. - `PackedInstall` gains a set of primitives for exercising an installed consumer's own bins and dependency closure: - `InstalledConsumer.runBin` runs an installed bin to completion and collects its output; `InstalledConsumer.command` builds the same command for a caller that wants to drive the child itself (an `McpProbe`, say). - `InstalledConsumer.carrierCommand` / `runCarrierBin` resolve and run the carrier's own bin script directly through `node`, whichever package won the `node_modules/.bin` slot — the tool for proving the carrier's own shim works when bins are shared. - `InstalledConsumer.binProvenance` reports which installed package a `node_modules/.bin` symlink actually resolves into. - `PackedInstallResult.scratch` is the scratch root holding the tarballs and every consumer, removed when the run's scope closes. - `PackedInstall.closure(carrier, options)` returns the packages a run would pack, in order, without packing anything, and `PackedInstall.timeoutBudget` / `timeoutBudgetFor` size a test's timeout from a run's managers, packages and per-consumer work (one bin run's minute unless the test says otherwise). - `overrides` and `workspaceOverrides` steer a scratch consumer's dependency resolution to a local directory or tarball outside the workspace — the dogfood case, where a closure member needs a sibling checkout's unreleased build. - `packTimeout` bounds each package's `npm pack`, alongside the existing `installTimeout`. - `PackedInstallOptions.bins` now fails the run before any install with a new `BinConflict` error when a packed package other than the carrier declares one of the carrier's own bin names — under a flat layout (npm, bun, Yarn's `node-modules` linker) either package can take the `.bin` slot, so an unflagged conflict lets a check or a bin run silently pass on the wrong package. Set `allowSharedBins: true` to allow it explicitly, for a carrier whose front ends declare the carrier's bin names on purpose. ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#840]: https://github.com/spencerbeggs/effected/pull/840 ## 0.26.0 ### Features #### `@effected/workspaces/testing` - A new subpath of repo-shape checks for a monorepo's own test suite. It catches the drift unit tests miss: a platform-free package starting to read `process`, a low-level package growing an edge up into an application, or a bin that resolves inside the workspace but is missing once installed from its tarball. The main entry never re-exports it, and every check refuses to pass vacuously. - `SourceBoundary.scan({ root, rules, allow?, allowRules? })` lexes every module in a source tree and reports reads of the global `process`, forbidden imports, stdout writes and console writes. A `process` in a comment, string or regex is never a read. The rules are `"process"`, `"node:process"`, `"stdout-write"` (`stdout.write`, or `stdout.end` with a final chunk), `"console"`, `"console-stdout"` (spares the stderr-writing methods, for a stdio server) and `{ forbidImports: [...] }`. - `allow` exempts a file from every rule. `allowRules` waives a single rule per file, and each waived offence lands in `scan.waived` instead of disappearing, so a stale waiver fails an assertion. `SourceBoundary.verifyFixtures()` proves the scanner still flags and spares what its shipped fixtures say. - `LayerPolicy.load(path)` and `WorkspaceLayering.checkWorkspace(policy)` hold the discovered package graph to a committed `layers.json`: top-down `layers`, `tooling`, `unconstrained` globs, the dependency `fields` that count, and `requiredEdges` that must exist. Decoding is strict, so an unknown key such as a `requiredEdge` typo fails `LayerPolicyError` naming it. - `PackedInstall.run(options)` packs a carrier and the workspace packages it needs. It installs the carrier into a fresh project outside the workspace under each requested package manager that is available (npm, pnpm, Yarn, Bun), then checks every expected bin is linked and executable. `PackedInstall.scrubEnv` gives the bins the same scrubbed environment the installs ran under. POSIX-only. [#821][#821] ```ts import { SourceBoundary } from "@effected/workspaces/testing"; const scan = yield* SourceBoundary.scan({ root: SRC, rules: ["process", "stdout-write", { forbidImports: ["node:*", "@effect/platform*"] }], // main.ts hands process.stdout to a transport, but must never write to it itself. allowRules: { process: ["main.ts"] }, }); assert.deepStrictEqual(scan.violations, []); ``` ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#821]: https://github.com/spencerbeggs/effected/pull/821 ## 0.25.0 ### Features - Upgrades core Effect to `rc-117` [#812][#812] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.8.0 | 0.9.0 | | @effected/git | dependency | updated | 0.16.0 | 0.17.0 | | @effected/glob | dependency | updated | 0.7.0 | 0.8.0 | | @effected/jsonc | dependency | updated | 0.12.0 | 0.13.0 | | @effected/lockfiles | dependency | updated | 0.10.0 | 0.11.0 | | @effected/npm | dependency | updated | 0.15.0 | 0.16.0 | | @effected/package-json | dependency | updated | 0.16.0 | 0.17.0 | | @effected/semver | dependency | updated | 0.8.0 | 0.9.0 | | @effected/walker | dependency | updated | 0.11.0 | 0.12.0 | | @effected/yaml | dependency | updated | 0.16.0 | 0.17.0 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#812]: https://github.com/spencerbeggs/effected/pull/812 ## 0.24.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/walker | dependency | updated | 0.10.0 | 0.11.0 | ## 0.24.0 ### Features - `WorkspaceSnapshots.at(ref)` now replays that ref's `pnpm-workspace.yaml` `configDependencies` hooks at the version the ref itself declares, instead of always reading the live worktree's config. A hook-only catalog — one contributed entirely by a config-dependency's `pnpmfile.cjs`, such as `effect:peers` — now diffs correctly across a config-dependency bump between two refs; previously it could not change at all because `at(ref)` never re-ran hook replay for older refs. - Resolution walks a fail-closed ladder — `node_modules/.pnpm-config/` when it holds the ref's declared version, else the pnpm store's `links/` tree — and a version installed nowhere now fails typed with a `CatalogAssemblyError` (`source: "hooks"`) naming the package, the declared version, and the remediation (`pnpm add --config @` in a throwaway workspace) instead of silently answering from whatever happens to be on disk. `WorkspaceSnapshots.layer` and `WorkspaceSnapshots.make`'s `R` gains `ConfigDependencyHooks` as a result. - New public surface supporting this: ```ts import { ConfigDependencyHooks, Workspaces } from "@effected/workspaces"; // Hermetic seam: replay caller-supplied pnpmfiles with no resolution at all. const hooks = ConfigDependencyHooks.layerFrom({ "@scope/plugin@1.0.0": "/fixtures/plugin-1/pnpmfile.mjs", "@scope/plugin@2.0.0": "/fixtures/plugin-2/pnpmfile.mjs", }); // Hand the SAME hooks reference to both WorkspaceCatalogs and WorkspaceSnapshots. const KitLayer = Workspaces.layerWithGitAndHooks(hooks); ``` - `ConfigDependencyHooks.layerFrom(entries)` — the hermetic test seam above. - `WorkspaceCatalogs.layerWithHooks(hooks, options)` and `Workspaces.layerWithGitAndHooks(hooks, options)` — build the catalogs/snapshots graph over a caller-chosen `ConfigDependencyHooks` layer instead of one of the fixed `layerNoop` / `layerLive` / `layerSubprocess` policies. - `WorkspaceCatalogs.hookReplays()` — which version each declared config dependency was actually replayed from, off the same memoized assemble pass as `set()`. - An optional `hookReplays` field (`name → declared version`) on `WorkspaceStateSnapshot`, set on every fresh read (`{}` under the no-op layer) and absent only when decoding a snapshot serialized before the field existed. - `HookReplay` and `HookReplaySource` (`"installed" | "store" | "supplied"`) — the types recording which resolution rung answered, exported alongside the new `HookInjection.replays` field. `replays` is a **required** field of `HookInjection`, so a consumer implementing the `ConfigDependencyHooks` contract itself (a hand-rolled `Layer.succeed`) must now return it — `{}` when nothing was replayed. ### Bug Fixes - `PeerCheck` now applies both `ignoreMissing` and `allowAny` from `peerDependencyRules` — pnpm `@pnpm/matcher` peer-name patterns, not `parent>peer` keys — replicating pnpm's post-hoc suppression for a required peer that resolved to nothing (`ignoreMissing`) and a peer that resolved outside its wanted range (`allowAny`). Previously only `allowedVersions` was applied, so a workspace relying on either axis saw `unverified: ["peerRulesNotApplied"]` findings that `pnpm peers check` considers clean. [#797][#797] ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#797]: https://github.com/spencerbeggs/effected/pull/797 ## 0.23.0 ### Breaking Changes #### The whole kit tracks Effect `4.0.0-rc.116` - Every package's `effect` peer moves from `4.0.0-rc.115` to `4.0.0-rc.116`. The kit uses exact prerelease pins rather than a caret, so a consumer must move with it. No `@effected` API changes shape on this advance; the kit itself needed one edit (`Stream.scan` now takes a lazy initial state, met once in `@effected/jsonl`'s `Journal.projection`). A consumer that upgrades meets the rc.116 renames on its own code: - `SchemaTransformation.make` is `makeTransformation`, and `Transformation#compose` is the dual standalone `SchemaTransformation.composeTransformation`. - `SchemaGetter.Getter` is a tagged union exposing only `pipe`: `new SchemaGetter.Getter`, `onSome` and `onNone` are gone in favour of `SchemaGetter.map` / `compose` / `run` and `transformEffect` / `transformOptionalEffect`. - `Stream.scan` and `Stream.scanEffect` take `() => initial`; `Stream.partition` returns `[passes, fails]`; `Stream.mapBoth` takes `onElement` / `onError`. - `Effect.orElseSucceed` passes the error to its fallback and `Effect.isEffect` narrows to `Effect`. - `ByteSize.Input` string literals are checked at compile time; parse external strings with `ByteSize.fromString`. - Arbitrary shrinking changed, so property-test replay tokens recorded at rc.115 no longer reproduce. ### Documentation #### The Claude Code and Copilot plugins teach the rc.116 surface - The `effect-v4-schema` transformation reference composes transformations with `SchemaTransformation.composeTransformation` and describes the `Getter` surface rc.116 left behind; the source-lookup and testing skills report rc.116 as the kit's pin and the two-copy lockfile shape the bridge now produces (`rc.115` for the toolchain, `rc.116` for the kit); the session-start briefing reports rc.116. ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.7.2 | 0.8.0 | | @effected/git | dependency | updated | 0.15.2 | 0.16.0 | | @effected/glob | dependency | updated | 0.6.1 | 0.7.0 | | @effected/jsonc | dependency | updated | 0.11.1 | 0.12.0 | | @effected/lockfiles | dependency | updated | 0.9.1 | 0.10.0 | | @effected/npm | dependency | updated | 0.14.2 | 0.15.0 | | @effected/package-json | dependency | updated | 0.15.1 | 0.16.0 | | @effected/semver | dependency | updated | 0.7.1 | 0.8.0 | | @effected/walker | dependency | updated | 0.9.1 | 0.10.0 | | @effected/yaml | dependency | updated | 0.15.2 | 0.16.0 | | @effect/platform-node | devDependency | updated | 4.0.0-rc.115 | 4.0.0-rc.116 | | @effect/vitest | devDependency | updated | 4.0.0-rc.115 | 4.0.0-rc.116 | | effect | devDependency | updated | 4.0.0-rc.115 | 4.0.0-rc.116 | | effect | peerDependency | updated | 4.0.0-rc.115 | 4.0.0-rc.116 | ### Maintenance #### The rc.115 `packageExtensions` bridge is retired - The toolchain (`@savvy-web/tsdown-plugins`, `rolldown-pnpm-config`, `@vitest-agent/*`) has republished declaring `effect` and its `@effected/*` inputs as regular dependencies, so the workspace no longer needs the `packageExtensions` block that pinned them by hand. Its ten keys named versions no longer installed and the lockfile diff on removal was the checksum line alone. Nothing published changes; this is the workspace's own install shape. [#792][#792] ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#792]: https://github.com/spencerbeggs/effected/pull/792 ## 0.22.1 ### Bug Fixes - Fixes closure issues in all packages. ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.7.1 | 0.7.2 | | @effected/git | dependency | updated | 0.15.1 | 0.15.2 | | @effected/glob | dependency | updated | 0.6.0 | 0.6.1 | | @effected/jsonc | dependency | updated | 0.11.0 | 0.11.1 | | @effected/lockfiles | dependency | updated | 0.9.0 | 0.9.1 | | @effected/npm | dependency | updated | 0.14.0 | 0.14.1 | | @effected/package-json | dependency | updated | 0.15.0 | 0.15.1 | | @effected/semver | dependency | updated | 0.7.0 | 0.7.1 | | @effected/walker | dependency | updated | 0.9.0 | 0.9.1 | | @effected/yaml | dependency | updated | 0.15.1 | 0.15.2 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! ## 0.22.0 ### Features - New `DuplicateCheck` value class: `DuplicateCheck.run(lockfile, { names? })` walks a parsed `@effected/lockfiles` `Lockfile` and reports every package name resolved at two or more distinct versions, each `DuplicatedVersion` naming every `DuplicateInstance` and the importers/packages that pull it (`Dependent`). `DuplicateCheck.kit` is the predicate for `effect` plus every `@effected/*` name — the check issue #298 and #603 asked for, now a report instead of a `pnpm why` transcript: ```ts import { DuplicateCheck } from "@effected/workspaces"; import { Lockfile } from "@effected/lockfiles"; const lockfile = yield* Lockfile.parse(text, { format: "pnpm" }); const report = DuplicateCheck.run(lockfile, { names: DuplicateCheck.kit }); report.isClean; // false when any reported name resolved at >1 version ``` - `PeerCheck` and `DuplicateCheck` now share one join between importers and resolved instances, so both report the same `unresolvedImporters` (the npm/bun root-importer limitation) from the same code. [#708][#708] ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#708]: https://github.com/spencerbeggs/effected/pull/708 ## 0.21.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.15.0 | 0.15.1 | | @effected/walker | dependency | updated | 0.8.0 | 0.9.0 | | @effected/yaml | dependency | updated | 0.15.0 | 0.15.1 | ## 0.21.0 ### Breaking Changes #### The whole kit tracks Effect `4.0.0-rc.115` - Every package's `effect` peer moves from `4.0.0-rc.112` to `4.0.0-rc.115`. The kit uses exact prerelease pins rather than a caret, so a consumer must move with it. This advance is the first whose Effect changes are not source-compatible with the previous pin, so a consumer that upgrades meets the same renames the kit did: - `SchemaTransformation.transformOrFail` and `SchemaGetter.transformOrFail` are `transformEffect`. - The `Config` constructors are PascalCase (`Config.String`, `Config.Redacted`, `Config.Int`, `Config.Boolean`, …) and `Config.mapOrFail` is `Config.mapEffect`. - `FileSystem.Size` and `FileSystem.SizeInput` are gone in favour of the `ByteSize` module: `File.Info.size` is a `ByteSize`, `File.seek` takes a `bigint`, `read`/`write` return a `number`. - The fast-check bridge (`effect/testing/FastCheck`, `Schema.toArbitrary`, the `fastCheck` property-test option) is removed in favour of `effect/unstable/arbitrary/Arbitrary`; `it.effect.prop` takes `arbitrary: { runs, size, seed, … }`. #### `@effected/schemastore` documents are open unless told otherwise - `Schema.ToJsonSchemaOptions.additionalProperties` became `onExcessProperty: "ignore" | "error"` upstream, and its default now mirrors the decoder's: generated object schemas carry `additionalProperties: true` unless `jsonSchema: { onExcessProperty: "error" }` is passed. `StoreDocument.fromSchema` passes the option through unchanged, so a document that was closed by default at rc.112 is open by default now. Pass `onExcessProperty: "error"` to keep a closed document; a generator that silently disagreed with the decoder it is paired with would be the worse default. #### `@effected/memfs` seeks before the start of a file fail - `File.seek` gained a `PlatformError` channel upstream, and memfs now matches Node: a seek whose resulting position would be negative fails with `BadArgument` ("Cannot seek before the start of the file") and leaves the cursor unchanged, where it previously stored the negative position and failed on the next read. No memfs-declared type changes; the `File`/`File.Info` shape changes are Effect's own, reaching consumers through the peer. ### Documentation #### A `Schema.Class` root is annotated on the `Struct` it wraps - [Effect-TS/effect#8084](https://github.com/Effect-TS/effect/issues/8084), which the rc.112 notes carried as an open limitation, was closed upstream as by design: annotations passed as `Schema.Class`'s second argument sit on the class node, while the `$defs` entry is generated from the encoded fields `Struct`. Annotate that `Struct` — `Schema.Class("X")(Schema.Struct({ … }).annotate({ title, description, "x-taplo": … }))` — and every key reaches the document. `@effected/schemastore`'s design doc and context files now state the rule instead of the limitation. #### The Claude Code and Copilot plugins teach the rc.115 surface - The `effect-v4-schema`, `effect-v4-testing` and `effect-v4-module-index` skills describe the native `Arbitrary` module in place of the fast-check bridge, including the migration traps met on this advance: the `size` clamp (default 10) that silently shrinks a property's string and array domains, the `-0` the generator's near-zero bias emits for an unbounded `Schema.Int` or any `Schema.Number`, which JSON and YAML cannot round-trip, and the absence of `oneof`/`constantFrom`/`array` combinators. `ByteSize` has a module-index row, the `Config` and CLI constructors are shown in their PascalCase spellings, and the session-start briefing reports rc.115 as the kit's pin. [#686][#686] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.6.1 | 0.7.0 | | @effected/git | dependency | updated | 0.14.0 | 0.15.0 | | @effected/glob | dependency | updated | 0.5.0 | 0.6.0 | | @effected/lockfiles | dependency | updated | 0.8.2 | 0.9.0 | | @effected/npm | dependency | updated | 0.13.0 | 0.14.0 | | @effected/package-json | dependency | updated | 0.14.1 | 0.15.0 | | @effected/semver | dependency | updated | 0.6.0 | 0.7.0 | | @effected/walker | dependency | updated | 0.7.0 | 0.8.0 | | @effected/yaml | dependency | updated | 0.14.0 | 0.15.0 | | @effect/platform-node | devDependency | updated | 4.0.0-rc.112 | 4.0.0-rc.115 | | @effect/tsgo | devDependency | updated | 0.41.0 | 0.45.0 | | @effect/vitest | devDependency | updated | 4.0.0-rc.112 | 4.0.0-rc.115 | | effect | devDependency | updated | 4.0.0-rc.112 | 4.0.0-rc.115 | | effect | peerDependency | updated | 4.0.0-rc.112 | 4.0.0-rc.115 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#686]: https://github.com/spencerbeggs/effected/pull/686 ## 0.20.3 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.13.0 | 0.14.0 | ## 0.20.2 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.12.0 | 0.13.0 | ## 0.20.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.6.0 | 0.6.1 | | @effected/git | dependency | updated | 0.11.0 | 0.12.0 | | @effected/lockfiles | dependency | updated | 0.8.0 | 0.8.1 | | @effected/walker | dependency | updated | 0.6.0 | 0.7.0 | | @effected/yaml | dependency | updated | 0.13.0 | 0.14.0 | ## 0.20.0 ### Breaking Changes #### `@effected/schemastore` no longer ships `AnnotationCarriers` - `AnnotationCarriers` and `CarrierDepthExceededError` are removed, and the module is deleted. - Effect `4.0.0-rc.112` ("Make JSON Schema dialect conversions preserve custom keywords") changed the Draft-07 lowering to carry unknown and custom keywords through as opaque values, in place — including across the tuple coordinate moves (`prefixItems[i]` to `items[i]`, and a trailing `items` to `additionalItems`). The post-lowering re-graft those symbols performed is therefore redundant, and **emitted documents are unchanged**. - If you imported either symbol, delete the call: annotate a schema node and the key now reaches the document on its own. #### `StoreDocument` and `SchemaPipeline` error channels are wider - `StoreDocument.fromSchema`, `StoreDocument.fromSchemaResult`, and `SchemaPipeline.run` / `check` / `runOne` / `checkOne` can now fail with `UndeclaredAnnotationKeyError`. Callers matching exhaustively on the error channel need one new branch. ### Features #### `@effected/schemastore` refuses undeclared annotation keys instead of dropping them - `StoreDocument.fromSchema` now fails with the new `@public` `UndeclaredAnnotationKeyError` — carrying the document's `$id` and every offending key — when a caller-supplied `includeAnnotationKey` admits a key outside the declared keyword families (the vscode set, `x-taplo`, `x-tombi-*`, `x-intellij-*`, `x-ai-*`). - Previously such keys were admitted into the Draft 2020-12 document and silently discarded by the Draft-07 lowering, so the package's compatibility guarantee was really a side effect of a dependency's behavior. Since rc.112 no longer discards them, that guarantee is now enforced by the package itself — and enforced loudly, because a caller who asks for a key and silently does not get it has no way to notice. - Declared families are still admitted unconditionally, regardless of the caller's predicate. ```ts // Fails: UndeclaredAnnotationKeyError, keys: ["x-custom"] yield* StoreDocument.fromSchema(schema, { $id: "https://example.com/schemas/tool.json", jsonSchema: { includeAnnotationKey: (key) => key === "x-custom" }, }); ``` #### The whole kit tracks Effect `4.0.0-rc.112` - Every package's `effect` peer moves to the new pin. The kit uses exact prerelease pins rather than a caret, so a consumer must move with it. ### Bug Fixes - `@effected/schemastore`: the `#/definitions` to `#/$defs` `$ref` rewrite no longer descends into declared-family annotation values. A `$ref`-shaped string inside an `x-taplo` or `x-ai-*` payload is opaque advice addressed to a language server, and was being rewritten in transit. - A known limitation, still open upstream as [Effect-TS/effect#8084](https://github.com/Effect-TS/effect/issues/8084): a `Schema.Class`'s class-level annotations — `title` and `description` as well as the declared families — never reach the emitted document, because core generates the definition from the class's encoded AST. A hoisted `Schema.Struct` keeps its annotations. Annotate a `Schema.Struct` root instead. ### Documentation #### The Claude Code and Copilot plugins are Effect v4 only - The v3-to-v4 migration material is retired: the `effect-migrator` agent and the `effect-v4-construct-map` skill are removed, along with the migration framing that ran through the remaining skills. The facts underneath it are kept, restated as statements of what v4 is rather than what changed. - The SessionStart briefing now states plainly that an agent's recall of Effect is out of date by construction, and routes it to the specialist agents or the skills rather than to a guess. It also reports whether the repo vendors Effect source at `.repos/effect` and whether that pin matches the kit's — a stale vendored tree is worse than none, because it answers confidently and wrongly. - Several skill claims were re-measured against rc.112 and corrected, including one whose stated mitigation pointed at the wrong signal: for a zero-collection vitest run it is the `Tests: 0/0 passed` line that lies, while the exit code is honest. [#623][#623] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.5.0 | 0.6.0 | | @effected/git | dependency | updated | 0.10.0 | 0.11.0 | | @effected/glob | dependency | updated | 0.4.0 | 0.5.0 | | @effected/lockfiles | dependency | updated | 0.7.1 | 0.8.0 | | @effected/npm | dependency | updated | 0.12.1 | 0.13.0 | | @effected/package-json | dependency | updated | 0.13.0 | 0.14.0 | | @effected/semver | dependency | updated | 0.5.1 | 0.6.0 | | @effected/walker | dependency | updated | 0.5.0 | 0.6.0 | | @effected/yaml | dependency | updated | 0.12.0 | 0.13.0 | | @effect/tsgo | devDependency | updated | 0.36.5 | 0.41.0 | | @effect/vitest | devDependency | updated | 4.0.0-rc.109 | 4.0.0-rc.112 | | effect | devDependency | updated | 4.0.0-rc.109 | 4.0.0-rc.112 | | effect | peerDependency | updated | 4.0.0-rc.109 | 4.0.0-rc.112 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#623]: https://github.com/spencerbeggs/effected/pull/623 ## 0.19.0 ### Breaking Changes - `WorkspacePackage.version` is `string | undefined`; a read site that assumed a string is a compile error. - An exhaustive match over `WorkspaceDiscoveryError.kind` must drop the `"missingVersion"` arm. - A `"version": ""` manifest, previously a `missingVersion` failure or a silent skip, is now rejected as `"invalidShape"` on both surfaces. - Listings can grow: version-less roots and members now appear in `listPackages()` and `getWorkspacePackagesSync` results. [#614][#614] ### Features #### `WorkspacePackage.version` is optional - A workspace member whose `package.json` declares no `version` is now discovered, with `version` absent, matching what pnpm accepts for a private package. Previously the async surface failed the whole listing with `missingVersion` and the sync facade silently dropped the member, so a version-less monorepo root read as "no workspace at all". - `WorkspaceDiscoveryError.kind` no longer includes `"missingVersion"`. A manifest whose `version` is present but not a string, or present but empty, reports `"invalidShape"`; only absence is tolerated. - `WorkspaceResolver.versionOf` fails typed with `DependencyResolutionError` for a member that declares no version; `Option.none()` still means "not a workspace member". - `getWorkspacePackagesSync` accepts an `onSkip` callback receiving a `WorkspaceDiscoverySkip` (`root`, `path`, `kind`, `cause`) for every manifest it cannot use, using the same kind vocabulary the async surface fails with, so a skip is never silent. ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/semver | dependency | updated | 0.5.0 | 0.5.1 | ### Thanks Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#614]: https://github.com/spencerbeggs/effected/pull/614 ## 0.18.3 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/package-json | dependency | updated | 0.12.0 | 0.13.0 | ## 0.18.2 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.7.0 | 0.7.1 | | @effected/package-json | dependency | updated | 0.11.0 | 0.12.0 | | @effected/yaml | dependency | updated | 0.11.0 | 0.12.0 | ## 0.18.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.9.0 | 0.10.0 | | @effected/lockfiles | dependency | updated | 0.6.3 | 0.7.0 | | @effected/npm | dependency | updated | 0.11.1 | 0.12.0 | | @effected/package-json | dependency | updated | 0.10.2 | 0.11.0 | ## 0.18.0 ### Breaking Changes - `WorkspaceDiscovery.makeTest` and `layerTest` die with an instructive defect when `listPackagesIn` or `infoIn` is called without an override. Deriving them from `listPackages` would model every root as holding the same members, which is the confusion these methods exist to remove. A double that never calls them is unaffected. A test that does needs an explicit override: ```ts const double = WorkspaceDiscovery.layerTest({ listPackagesIn: () => Effect.succeed([]), }); ``` `WorkspaceDiscovery.refresh()` now also drops the per-root memos, not only the layer-bound one. [#487][#487] ### Features - ### Composites that pair the git tier with config-dependency catalog replay `Workspaces.layerWithGitAndConfigDependencies` and `Workspaces.layerWithGitAndConfigDependenciesSubprocess` provide snapshots, change detection and `Git` over catalog assembly that replays config-dependency `pnpmfile` hooks. `Workspaces.layerWithGit` wires the no-op catalogs layer, so getting both halves previously meant rebuilding the whole service graph by hand. On these composites the subprocess variant costs nothing extra — `ChildProcessSpawner` is already required for `Git` — so a bundled consumer, where the in-process computed `import()` cannot survive a bundler, should prefer it. Both take the new `WorkspacesGitOptions` (`WorkspacesOptions` plus `WorkspaceSnapshotsOptions`), which is how `seedCatalogs` reaches `at(ref)` through a composite. ### Seeded catalogs on `WorkspaceStateSnapshot` A catalog injected by a config-dependency hook is declared in no committed source, so `WorkspaceSnapshots.at(ref)` — which never replays hooks — cannot see it, and a `catalog:` specifier against it resolves to nothing on both sides of a diff. `WorkspaceStateSnapshot.seededCatalogs` holds catalogs supplied by the caller and is consulted only where the snapshot's own catalogs cannot answer: ```ts const live = yield* catalogs.set(); const before = (yield* snapshots.at("origin/main")).withSeededCatalogs(live); before.resolve("hooked-dep", "catalog:"); // Option.some("^9.9.9") ``` - `withSeededCatalogs(seed)` returns a new snapshot; it replaces any existing seed rather than merging - `WorkspaceStateSnapshot.crossSeed(before, after)` seeds each side of a two-ref diff with the other's catalogs, keeping any seed already present (a layer-level `seedCatalogs`, for instance) beneath them - `WorkspaceSnapshotsOptions.seedCatalogs` is the layer-level form, applied to `at(ref)` and `worktree()` alike Resolution order in `resolve`, `resolveIn` and the snapshot-scoped `catalogResolver` is the snapshot's own catalogs, then the seed, then the existing `importerVersions` fallback. The first two answer with a declared range and the third with a concrete version, so a seeded snapshot reports a range change where an unseeded one can only report a version. `catalogs` is unchanged and still means the set assembled at that moment; the seed is a separate field so a stored snapshot keeps the two distinguishable. ### Per-call-root discovery `WorkspaceDiscovery.listPackagesIn(directory)` and `infoIn(directory)` discover the workspace containing `directory` rather than the root the layer was bound to — for a long-lived host that resolves one root at startup and then serves calls scoped to a git worktree, a nested repository, or another project. They re-read: patterns, member manifests, names and versions all come from beneath the named root, so a worktree branch that adds, removes or renames a package is visible. `directory` may be the root or anything inside it, and results memoize per resolved root. `WorkspaceDiscovery.refreshIn(directory)` drops the memo for one root, leaving the layer-bound memo and every other root's intact — for a host refreshing the worktree that changed without discarding the siblings that did not. ### Minor Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#487]: https://github.com/spencerbeggs/effected/pull/487 ## 0.17.2 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.6.2 | 0.6.3 | | @effected/yaml | dependency | updated | 0.10.0 | 0.11.0 | ## 0.17.1 ### Performance - Workspace pattern enumeration now probes literal package directories with bounded concurrency (`10`) instead of serial `exists` checks, reducing latency in workspaces that declare many literal entries. - Output ordering, pattern semantics, and public APIs are unchanged; this only reduces time spent on independent filesystem probes. [#448][#448] ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#448]: https://github.com/spencerbeggs/effected/pull/448 ## 0.17.0 ### Features - ### `WorkspaceCatalogs.refresh()` An explicit memoization boundary on the catalog assembly. The service's single assembly pass — one root discovery, one inline read, one config-dependency hook replay — is memoized indefinitely, so every reader (`set`, `resolveSpecifier`, `releaseAgeGate`, `peerDependencyRules`, `importerVersions`) answers from the workspace as it stood at the first read. A tool that **mutates the workspace mid-run** — installs, bumps a config dependency, regenerates the lockfile — needs both states: release-age gating wants the before-state, a post-install peer check the after-state, and one infinite memo cannot serve both. `refresh()` discards the memoized assembly so the **next** read re-assembles (the same single read and hook replay) over the post-mutation workspace: ```ts const catalogs = yield* WorkspaceCatalogs; const gate = yield* catalogs.releaseAgeGate(); // pre-install state, memoized // ... install, bump a config dependency, regenerate the lockfile ... yield* catalogs.refresh(); const rules = yield* catalogs.peerDependencyRules(); // post-install state ``` Without the boundary, a post-install peer check judges the new lockfile against the pre-bump `peerDependencyRules` and reports rows the bumped plugin's `allowedVersions` suppress. `refresh` is unconditional and infallible — the memo was already success-only (a failed or interrupted assembly retries by itself), so it exists solely to discard a successful assembly that mutation has made stale; calling it before any read is harmless. On the `makeTest` double, `refresh` defaults to `Effect.void` honestly — the double holds no memo, so "drop the memoized assembly" is genuinely a no-op (the stubs answer fresh on every call already), mirroring `WorkspaceDiscovery.makeTest`'s `refresh`. [#453][#453] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.6.1 | 0.6.2 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#453]: https://github.com/spencerbeggs/effected/pull/453 ## 0.16.0 ### Features - ### Faster package enumeration via an optional fast path `SyncFileSystem` gains an optional member, `readDirectoryWithTypes?: (path) => ReadonlyArray`, and a new exported type `SyncDirectoryEntry` (`{ name, isDirectory, isSymbolicLink }`). It's optional, so every existing `SyncFileSystem` implementation keeps satisfying the type untouched. `nodeFileSystem` implements it via `readdirSync(path, { withFileTypes: true })`. Previously, enumerating a directory's packages cost a `readDirectory` call plus one `isDirectory` (`statSync`) call per entry; supplying the fast path collapses that to a single syscall. Omitting it falls back to the original four-operation path with identical results — this is purely a cost optimization, never a behavior change. A subtlety worth knowing: a `Dirent` describes the entry itself, not its target, so a symbolic link pointing at a directory reports `isDirectory: false` even though the slower `stat`-based path calls it a directory. Enumeration re-resolves links through `isDirectory` and only trusts the fast path's `isDirectory` for non-links, so a symlinked package directory is never silently dropped. [#445][#445] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/npm | dependency | updated | 0.11.0 | 0.11.1 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#445]: https://github.com/spencerbeggs/effected/pull/445 ## 0.15.1 ### Documentation - Records how pnpm matches a `peerDependencyRules.allowedVersions` key, measured against pnpm 11.22.0: the version qualifier on the parent is ignored and matching is by parent name, scoped to the package that declares the peer rather than to any ancestor of it. `PeerCheck` already behaved this way; the behaviour is now stated where a reader will find it [#438][#438] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.6.0 | 0.6.1 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#438]: https://github.com/spencerbeggs/effected/pull/438 ## 0.15.0 ### Features - ### `PeerCheck` A new pure value class detects unsatisfied peer dependencies over a parsed `@effected/lockfiles` `Lockfile`, without shelling out to any package manager's own peer command: ```ts import { PeerCheck } from "@effected/workspaces"; import { Lockfile } from "@effected/lockfiles"; import { Effect } from "effect"; const program = Effect.gen(function* () { const lockfile = yield* Lockfile.parse(text, { format: "pnpm" }); const report = PeerCheck.run(lockfile); return report.supported ? report.required : []; }); ``` `PeerCheck.run(lockfile, options?)` returns `{ supported, unsatisfied, unresolvedImporters, unverified }` plus a `required` getter (the non-optional unsatisfied rows). It **fails closed**: an empty `unsatisfied` array is not by itself a clean bill of health. - `supported` is `false` for yarn, which resolves peers virtually and does not record which instance satisfied which peer. - `unresolvedImporters` names importers (typically the root, under npm and bun) whose dependencies could not be resolved to instances, so no verdict was reached for them. - `unverified` lists why the report may be incomplete — `"unresolvedEdge"` when some instance records an edge the lockfile model could not name, and `"peerRulesNotApplied"` (see below). A caller must check `supported`, `unresolvedImporters` and `unverified` alongside `unsatisfied` before treating a report as clean. ### `WorkspaceCatalogs.peerDependencyRules()` Returns the workspace's effective `peerDependencyRules` — the merged pnpm suppression rules, obtained by replaying config-dependency pnpmfile hooks the same way pnpm itself would. Pass the result to `PeerCheck.run` to replicate pnpm's suppression: ```ts const rules = yield* workspaceCatalogs.peerDependencyRules(); const report = PeerCheck.run(lockfile, { peerDependencyRules: rules }); ``` **Presence of the `peerDependencyRules` option key is the assertion, not its contents.** Omitting the option means "nobody looked" and always yields `"peerRulesNotApplied"` in `unverified`; passing the new `NoPeerDependencyRules` export asserts "I looked, there are none" and yields a verified report. Only `allowedVersions` is applied — a supplied `PeerDependencyRules` whose `ignoreMissing` or `allowAny` is non-empty also yields `"peerRulesNotApplied"`, since those suppression axes are not implemented and degrading to fail-closed beats silently ignoring them. Also exported: `UnsatisfiedPeer`, `PeerParent` and `UnverifiedReason`. [#432][#432] ### Performance - Workspace enumeration now applies `packages:` exclusions as directories are accepted, rather than filtering the accumulated set afterwards. An excluded directory no longer costs a `package.json` existence probe or a map insert. - Applies to both the async enumerator and the `getWorkspacePackagesSync` escape hatch, which stay in lockstep. - Membership, ordering, and public API are unchanged; only when the exclusion is evaluated changed. * `VersioningStrategy.detect` now runs independent publishability checks with bounded concurrency (`10`) instead of serially probing one package at a time. - Classification output, tag semantics, and public API are unchanged; only probe scheduling changed. [#416][#416] ### Tests - Pins that an excluded directory is still descended, so a package nested beneath it stays discovered — `!packages/private-*` rejects that one directory, never the subtree below it. [#410][#410] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.5.1 | 0.6.0 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#410]: https://github.com/spencerbeggs/effected/pull/410 [#416]: https://github.com/spencerbeggs/effected/pull/416 [#432]: https://github.com/spencerbeggs/effected/pull/432 ## 0.14.2 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.5.0 | 0.5.1 | | @effected/npm | dependency | updated | 0.10.0 | 0.11.0 | | @effected/package-json | dependency | updated | 0.10.1 | 0.10.2 | ## 0.14.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/package-json | dependency | updated | 0.10.0 | 0.10.1 | - | Dependency | Type | Action | From | To | | | --- | --- | --- | --- | --- | --- | | @pnpm/catalogs.config | dependency | updated | ^1100.0.0 | ^1100.0.5 | [#400][#400] Thanks [@spencerbeggs](https://github.com/spencerbeggs)! | [#400]: https://github.com/spencerbeggs/effected/pull/400 ## 0.14.0 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.4.0 | 0.5.0 | | @effected/git | dependency | updated | 0.8.0 | 0.9.0 | | @effected/glob | dependency | updated | 0.3.0 | 0.4.0 | | @effected/lockfiles | dependency | updated | 0.4.2 | 0.5.0 | | @effected/npm | dependency | updated | 0.9.0 | 0.10.0 | | @effected/package-json | dependency | updated | 0.9.0 | 0.10.0 | | @effected/semver | dependency | updated | 0.4.0 | 0.5.0 | | @effected/walker | dependency | updated | 0.4.0 | 0.5.0 | | @effected/yaml | dependency | updated | 0.9.0 | 0.10.0 | - | Dependency | Type | Action | From | To | | | :-- | :-- | :-- | :-- | :-- | --- | | effect | peerDependency | updated | 4.0.0-beta.107 | 4.0.0-rc.109 | [#389][#389] Thanks [@spencerbeggs](https://github.com/spencerbeggs)! | [#389]: https://github.com/spencerbeggs/effected/pull/389 ## 0.13.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.4.1 | 0.4.2 | | @effected/yaml | dependency | updated | 0.8.0 | 0.9.0 | ## 0.13.0 ### Breaking Changes - `DetectedPackageManager` gains a required `evidence` field — the `PackageManagerEvidence` literal naming which detection rung decided the manager (`"pnpm-workspace.yaml"`, `"package.json#packageManager"`, etc.), mirroring the vocabulary `PackageManagerDetectionError.checked` already reported on the failure path. A hand-constructed `DetectedPackageManager` (a test double, a fixture) must now supply it: ```ts import { DetectedPackageManager } from "@effected/workspaces"; import { Option } from "effect"; DetectedPackageManager.make({ name: "pnpm", version: Option.none(), runtime: "node", evidence: "pnpm-workspace.yaml", }); ``` ### Bug Fixes - `ConfigDependencyHooks`' dynamic import of the pnpm plugin now carries an inline `webpackIgnore` comment, so a webpack-family bundler no longer emits an unsilenceable Critical-dependency warning for a consumer that composes `layerSubprocess` — the target module stays droppable by tree-shaking regardless. [#366][#366] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.7.0 | 0.8.0 | | @effected/package-json | dependency | updated | 0.8.0 | 0.9.0 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#366]: https://github.com/spencerbeggs/effected/pull/366 ## 0.12.0 ### Features - ### `DependencyGraph.toMermaid()` Renders a `DependencyGraph` as a Mermaid `flowchart TD` — drop it into a job summary, an issue, or a design doc. It's total (never fails), and both nodes and edges are emitted in sorted order, so the output is deterministic regardless of manifest key order. Scoped package names (`@acme/app`) appear only inside quoted labels, so they never break Mermaid syntax. ```ts console.log(graph.toMermaid()); // flowchart TD // 0["@acme/app"] // 1["@acme/utils"] // 0 --> 1 ``` ### Bug Fixes - `CyclicDependencyError.cycle` now names the packages actually in the cycle — the strongly-connected components — instead of every package Kahn's algorithm had left unprocessed when it stalled, which also included packages merely downstream of the cycle. Applies to both `levels()`/`sort()` and `sortSubset()`. The field's shape (`ReadonlyArray`) is unchanged; only which packages appear in it is corrected. [#361][#361] ### Minor Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#361]: https://github.com/spencerbeggs/effected/pull/361 ## 0.11.2 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.4.0 | 0.4.1 | | @effected/yaml | dependency | updated | 0.7.0 | 0.8.0 | ## 0.11.1 ### Bug Fixes - Added the missing `@effected/semver` dependency. `@effected/lockfiles@0.4.0` added `@effected/semver` to its non-optional peerDependencies, but the 0.11.0 release did not add it to this package's own dependencies (it added `@effected/npm` and `@effected/yaml` but missed this one), so the peer bubbled up unmet to every consumer and `pnpm peers check` failed downstream. [#329][#329] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/semver | dependency | added | — | workspace:^ | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#329]: https://github.com/spencerbeggs/effected/pull/329 ## 0.11.0 ### Refactoring - Migrated error classes to Effect's renamed `Schema.TaggedError` (was `Schema.TaggedErrorClass`); the call shape is unchanged and no consumer action is required. [#322][#322] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.3.1 | 0.4.0 | | @effected/git | dependency | updated | 0.6.0 | 0.7.0 | | @effected/glob | dependency | updated | 0.2.2 | 0.3.0 | | @effected/lockfiles | dependency | updated | 0.3.2 | 0.4.0 | | @effected/npm | dependency | updated | 0.8.3 | 0.9.0 | | @effected/package-json | dependency | updated | 0.7.3 | 0.8.0 | | @effected/walker | dependency | updated | 0.3.4 | 0.4.0 | | @effected/yaml | dependency | updated | 0.6.1 | 0.7.0 | | effect | peerDependency | updated | 4.0.0-beta.101 | 4.0.0-beta.107 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#322]: https://github.com/spencerbeggs/effected/pull/322 ## 0.10.2 ### Bug Fixes - Removed the unused `@effected/semver` dependency from the published manifest. Nothing in the package imports it — the tracking-tag grammar deliberately parses version segments itself, as its own documentation states — so consumers no longer install `@effected/semver` through this package. [#299][#299] ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#299]: https://github.com/spencerbeggs/effected/pull/299 ## 0.10.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.5.2 | 0.6.0 | ## 0.10.0 ### Features - Added `ConfigDependencyHooks.layerSubprocess`, a drop-in alternative to `layerLive` that replays `configDependencies` `updateConfig` pnpmfile hooks in a `node` child process instead of an in-process dynamic `import()`. `layerLive` computes its `import()` path at runtime, and bundlers that compile a computed dynamic import into a context module (rspack, notably) can't resolve it at runtime — so in a bundled consumer such as a GitHub Action, the in-process replay is unreachable. `layerSubprocess` keeps every computed load out of the bundle graph by running the replay in a child process, with typed semantics identical to `layerLive`: the same hook-locator shapes, the same tolerant threading of a hook's returned config, and the same fail-open/fail-typed split between a legitimate missing pnpmfile and a real load or replay failure. ```ts import { ConfigDependencyHooks } from "@effected/workspaces"; import { NodeServices } from "@effect/platform-node"; const program = Effect.gen(function* () { const hooks = yield* ConfigDependencyHooks; return yield* hooks.inject(root, configDependencies, seed); }).pipe(Effect.provide(ConfigDependencyHooks.layerSubprocess), Effect.provide(NodeServices.layer)); ``` Two new composites wire it through the higher-level layers, each requiring core's `ChildProcessSpawner` in `R`: - `WorkspaceCatalogs.layerWithConfigDependenciesSubprocess(options?)` - `Workspaces.layerWithConfigDependenciesSubprocess(options?)` No existing surface changed or removed. [#288][#288] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.2.1 | 0.3.0 | | @effected/npm | dependency | updated | 0.8.2 | 0.8.3 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#288]: https://github.com/spencerbeggs/effected/pull/288 ## 0.9.6 ### Performance - `WorkspaceDiscovery.getPackage` and the `workspaceResolver` layer's `versionOf` now look names up through a name index cached against the memoized package list, instead of scanning the list on every call. - Duplicate package names still resolve to the first matching package, unchanged from the previous linear scan [#277][#277] ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#277]: https://github.com/spencerbeggs/effected/pull/277 ## 0.9.5 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.3.1 | 0.3.2 | | @effected/npm | dependency | updated | 0.8.1 | 0.8.2 | | @effected/package-json | dependency | updated | 0.7.2 | 0.7.3 | | @effected/semver | dependency | updated | 0.3.1 | 0.3.2 | - | Dependency | Type | Action | From | To | | | --- | --- | --- | --- | --- | --- | | @effected/package-json | dependency | updated | 0.7.2 | 0.7.3 | | | @effected/semver | dependency | updated | 0.3.1 | 0.3.2 | Thanks [@spencerbeggs](https://github.com/spencerbeggs)! | ## 0.9.4 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.2.0 | 0.2.1 | | @effected/git | dependency | updated | 0.5.1 | 0.5.2 | | @effected/glob | dependency | updated | 0.2.1 | 0.2.2 | | @effected/lockfiles | dependency | updated | 0.3.0 | 0.3.1 | | @effected/npm | dependency | updated | 0.8.0 | 0.8.1 | | @effected/package-json | dependency | updated | 0.7.1 | 0.7.2 | | @effected/semver | dependency | updated | 0.3.0 | 0.3.1 | | @effected/walker | dependency | updated | 0.3.3 | 0.3.4 | | @effected/yaml | dependency | updated | 0.6.0 | 0.6.1 | ### Maintenance - Switching internal dependency versioning from `~` to `^` ranges. ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! ## 0.9.3 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.2.3 | 0.3.0 | | @effected/npm | dependency | updated | 0.7.0 | 0.8.0 | | @effected/package-json | dependency | updated | 0.7.0 | 0.7.1 | ## 0.9.2 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.2.2 | 0.2.3 | | @effected/npm | dependency | updated | 0.6.0 | 0.7.0 | | @effected/package-json | dependency | updated | 0.6.1 | 0.7.0 | | @effected/semver | dependency | updated | 0.2.1 | 0.3.0 | ## 0.9.1 ### Bug Fixes - `WorkspaceSnapshots`' internal cache key now separates the workspace root and ref with a `\0` escape instead of a literal NUL byte. The literal byte made `file` classify the source as binary, so `grep`/`ripgrep` silently skipped it. ### Documentation - Corrects two defects in the changelog published with `0.9.0`: - **The `PublishabilityDetector` requirement claim was wrong.** `Workspaces.layer`, `layerWithGit` and `layerWithConfigDependencies` neither provide nor require a `PublishabilityDetector` — nothing inside any of them asks a publishability question, so their `R` stays `FileSystem | Path`. The requirement surfaces in the `R` of the consuming *operation* that asks (`VersioningStrategy.detect`, for example), which can be well past the layer-wiring site. - **The recommended wiring was backwards.** The published note suggested `Workspaces.layer().pipe(Layer.provide(PublishabilityDetector.layerNpm))`. Since the composite doesn't require a detector, `Layer.provide` discards it — it never reaches the program's `R`. Wire it with `Layer.mergeAll` instead: ```ts // Wrong — discards the detector, since the composite doesn't require one const layer = Workspaces.layer().pipe(Layer.provide(PublishabilityDetector.layerNpm)); // Correct const layer = Layer.mergeAll(Workspaces.layer(), PublishabilityDetector.layerNpm); ``` Also: `Workspaces.layer`'s internal `localExecLayer` now passes `scriptPrefix` through when building an `ExecContext`, keeping pace with `@effected/commands`' new script-runner prefixes. [#191][#191] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.1.0 | 0.2.0 | | @effected/lockfiles | dependency | updated | 0.2.1 | 0.2.2 | | @effected/npm | dependency | updated | 0.5.0 | 0.6.0 | | @effected/package-json | dependency | updated | 0.6.0 | 0.6.1 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#191]: https://github.com/spencerbeggs/effected/pull/191 ## 0.9.0 ### Breaking Changes - ### `PublishabilityDetector` no longer has an ambient default The bare `PublishabilityDetector.layer` is **removed**. `Workspaces.layer`, `layerWithGit` and `layerWithConfigDependencies` now all **require** `PublishabilityDetector` in `R` instead of silently supplying npm semantics — the old default made `Layer.mergeAll(myDetector, Workspaces.layer())` resolve to the default rather than the override, because `mergeAll` is last-wins, with no type error to catch it. Provide a policy explicitly: ```ts import { PublishabilityDetector, Workspaces } from "@effected/workspaces"; import { Layer } from "effect"; const WorkspacesLayer = Workspaces.layer().pipe(Layer.provide(PublishabilityDetector.layerNpm)); ``` `PublishabilityDetector.layerNpm` replaces the old `.layer` (standard npm semantics); `PublishabilityDetector.layerNone` is a workspace where nothing publishes. Each is also exposed as a plain value — `PublishabilityDetector.npm` / `.none` — for composing a policy that defers to one of them. ### `ReleaseTag`'s default version prefix is now `""` `ReleaseTag.single` / `ReleaseTag.scoped` default `versionPrefix` to `""` (strict SemVer) uniformly, rather than defaulting unscoped package names to a `"v"` prefix. A consumer relying on the old `v`-prefixed tags for an unscoped package must now pass `versionPrefix: "v"` explicitly. ### Features - ### `ReleaseTag` and `TrackingTag` `ReleaseTag.single` / `.scoped` format a release's git tag name. `TrackingTag.forVersion` derives the floating-alias tags a version should carry (`v1`, `v1.2`) and never floats onto a prerelease; `TrackingTag.classifyTag` tells a version tag from an alias tag by segment count. ### `VersioningStrategy` `VersioningStrategy.classify` / `.detect` / `.tagsFor` — classify a package's versioning shape and compute the tags a release should push. ### `PackageManagerDetector` gains a standalone and declaration tier Detection now runs three tiers: workspace markers, then a standalone tier (lockfile presence with no workspace config), then a declaration tier (`packageManager` / `devEngines.packageManager` with no lockfile at all — a fresh clone before its first install). `PackageManagerDetector.makeTest` / `layerTest` are the sanctioned test doubles; an unstubbed `detect` dies rather than guessing. ### `localExecLayer` implements `@effected/commands`' `LocalExec` `Workspaces.localExecLayer` teaches `@effected/commands`' `ToolDiscovery` how to run a workspace's own package-manager binaries, resolving against the workspace root rather than the caller's `cwd`. `Workspaces` is now a static class rather than an `as const` namespace object; call syntax (`Workspaces.layer(...)`) is unchanged. [#180][#180] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/commands | dependency | updated | 0.0.0 | 0.1.0 | | @effected/git | dependency | updated | 0.5.0 | 0.5.1 | | @effected/lockfiles | dependency | updated | 0.2.0 | 0.2.1 | | @effected/npm | dependency | updated | 0.4.0 | 0.5.0 | | @effected/package-json | dependency | updated | 0.5.2 | 0.6.0 | | @effected/walker | dependency | updated | 0.3.2 | 0.3.3 | - | Dependency | Type | Action | From | To | | | --- | --- | --- | --- | --- | --- | | @effected/commands | dependency | added | — | 0.0.0 | [#180][#180] Thanks [@spencerbeggs](https://github.com/spencerbeggs)! | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#180]: https://github.com/spencerbeggs/effected/pull/180 ## 0.8.0 ### Features - ### Test doubles for the three remaining services `WorkspaceCatalogs`, `WorkspaceSnapshots` and `LockfileReader` gain `makeTest` and `layerTest`, matching `WorkspaceRoot` and `WorkspaceDiscovery`. Every service in the package now ships one, so a consumer extends the double instead of implementing the shape by hand. ```ts const layer = WorkspaceCatalogs.layerTest({ set: () => Effect.succeed(catalogSet), }); ``` An unstubbed method dies with a named message rather than returning an empty value — an empty catalog set reads as a legitimate answer and makes every dependency look newly added. Where a method is honestly derivable from a supplied override it derives using the live logic, so a stubbed `set` answers `resolveSpecifier` and a stubbed `read` answers `resolvedVersion`. ### Documentation - The README covers the `@effected/workspaces/node-sync` subpath and its `nodeSyncOps` preset, so the synchronous escape hatch no longer reads as though the operations must be hand-written [#175][#175] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.4.2 | 0.5.0 | | @effected/lockfiles | dependency | updated | 0.1.10 | 0.2.0 | | @effected/npm | dependency | updated | 0.3.1 | 0.4.0 | | @effected/package-json | dependency | updated | 0.5.1 | 0.5.2 | | @effected/yaml | dependency | updated | 0.5.1 | 0.6.0 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#175]: https://github.com/spencerbeggs/effected/pull/175 ## 0.7.0 ### Features - ### Per-importer specifier resolution `WorkspaceStateSnapshot.resolveIn(importerPath, dependency, specifier)` resolves a specifier scoped to one importer, where `importerPath` is the value `PackageStateSnapshot.relativePath` carries (`"."` for the root package). `resolve` answers workspace-wide and must abstain when two importers record different versions of the same dependency, because no single answer is correct. `resolveIn` has the importer in hand and answers exactly. Prefer it whenever the caller knows which package is asking. ```ts // Two packages holding different versions of the same dependency: snapshot.resolve("effect", "catalog:effect:peers"); // Option.none() snapshot.resolveIn(".", "effect", "catalog:effect:peers"); // Option.some("1.0.0") snapshot.resolveIn("packages/a", "effect", "catalog:effect:peers"); // Option.some("2.0.0") ``` ### Recorded importer versions on the snapshot and the catalog service - `WorkspaceStateSnapshot.importerVersions` — a new optional field carrying importer path to dependency name to resolved version. It is optional so a snapshot serialized before this release still decodes; an absent index makes the fallback inert, which is the behavior those values were captured under. - `WorkspaceCatalogs.importerVersions()` — the same index for the live workspace, assembled from the same single lockfile read as `set()` and memoized with it. No second read is performed. - `ImporterVersions` is exported as a new public type. `WorkspaceCatalogsShape` gains a required `importerVersions` member. Consuming the service is unaffected; a hand-written implementation of that interface would need the new member. [#167][#167] ### Bug Fixes - A `catalog:` specifier that no committed catalog source declares now resolves to the concrete version the lockfile recorded, instead of resolving to nothing on both sides of a diff and hiding a real dependency bump. This is the shape a pnpm config-dependency pnpmfile hook produces. A workspace declaring `"effect": "catalog:effect:peers"` has that catalog injected at install time, so it appears in neither `pnpm-workspace.yaml` nor the lockfile's `catalogs:` block — pnpm does not record a peer-only catalog. A consumer diffing two snapshots saw the same unresolvable string on both sides, so a genuine `4.0.0-beta.99` to `4.0.0-beta.101` move produced no row and no changeset. `WorkspaceStateSnapshot.resolve` now falls back to the snapshot's recorded importer versions when the catalog set cannot answer a `catalog:` specifier, and only then. A plain range is unaffected — it is already its own answer. The fallback reads only committed data, so `WorkspaceSnapshots.at(ref)` and `worktree()` answer identically. Resolving the injected catalog on the worktree side alone would report every run as a change from the raw specifier string to a version. - Versions are normalized: pnpm's peer-disambiguation suffix (`1.2.3(effect@4.0.0)`) is stripped, so a dependency table shows `1.2.3` rather than the whole parenthesized chain - `link:` and `file:` importer entries are skipped — a filesystem edge is not a version - Only pnpm records importer versions; bun and npm workspaces are unaffected ### Minor Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#167]: https://github.com/spencerbeggs/effected/pull/167 ## 0.6.2 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.4.1 | 0.4.2 | | @effected/glob | dependency | updated | 0.2.0 | 0.2.1 | | @effected/lockfiles | dependency | updated | 0.1.9 | 0.1.10 | | @effected/npm | dependency | updated | 0.3.0 | 0.3.1 | | @effected/package-json | dependency | updated | 0.5.0 | 0.5.1 | | @effected/semver | dependency | updated | 0.2.0 | 0.2.1 | | @effected/walker | dependency | updated | 0.3.1 | 0.3.2 | | @effected/yaml | dependency | updated | 0.5.0 | 0.5.1 | - | Dependency | Type | Action | From | To | | | --- | --- | --- | --- | --- | --- | | effect | peerDependency | updated | 4.0.0-beta.99 | 4.0.0-beta.101 | [#162][#162] Thanks [@spencerbeggs](https://github.com/spencerbeggs)! | [#162]: https://github.com/spencerbeggs/effected/pull/162 ## 0.6.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/package-json | dependency | updated | 0.4.2 | 0.5.0 | ## 0.6.0 ### Breaking Changes - ### `ConfigDependencyHooks.inject` returns `HookInjection`, not a bare catalogs record `inject` previously resolved to the catalogs a replayed `updateConfig` hook produced. It now resolves to a `HookInjection`: ```ts interface HookInjection { readonly catalogs: Readonly>>>; readonly releaseAge: PartialReleaseAgeGate; } ``` One hook replay now yields both the catalogs and the release-age keys (`minimumReleaseAge` / `minimumReleaseAgeExclude`) the hooks leave on the config, so the config-dependency code — which executes arbitrary `pnpmfile.cjs` logic — still runs exactly once. When two hooks both set a release-age key, the later hook wins. `ConfigDependencyHooks.layerNoop` now returns `{ catalogs: seed, releaseAge: {} }` instead of the bare seed. A caller that awaited `inject` directly and read the catalogs off the resolved value needs to read `.catalogs` instead. ### Features - ### `WorkspaceCatalogs.releaseAgeGate()` Assembles the workspace's effective pnpm release-age gate from inline `pnpm-workspace.yaml` keys and the replayed config-dependency hooks, strictest-wins via `ReleaseAgeGate.combine`, in the same single memoized assembly pass as `set()`: ```ts import { WorkspaceCatalogs } from "@effected/workspaces"; const program = Effect.gen(function* () { const catalogs = yield* WorkspaceCatalogs; const gate = yield* catalogs.releaseAgeGate(); // gate.ageMinutes, gate.exclude }); ``` A present-but-malformed inline `minimumReleaseAge` or `minimumReleaseAgeExclude` now fails typed as `CatalogAssemblyError` (`source: "manifest"`) instead of being silently ignored — a silently-dropped gate is exactly the "install refuses a version the resolver already picked" bug this vocabulary exists to prevent. A workspace with no `pnpm-workspace.yaml` (a bun/npm workspace) has no release-age keys, so the gate is the inert zero gate. `HookInjection` is exported from the package. [#139][#139] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.1.8 | 0.1.9 | | @effected/npm | dependency | updated | 0.2.3 | 0.3.0 | | @effected/package-json | dependency | updated | 0.4.1 | 0.4.2 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#139]: https://github.com/spencerbeggs/effected/pull/139 ## 0.5.2 ### Bug Fixes - ### Internal @effected edges float patches instead of pinning exact versions The kit's internal `@effected/*` dependency edges were declared as `workspace:*`, which the publish transform projects to an exact version pin. That coupled every kit release — a single sibling patch forced a coordinated re-release of every dependent, just to move the pin — and two paths pinning adjacent exact versions could not dedupe in a consumer's tree. Every internal `@effected/*` edge, both peer and regular dependency, is now declared `workspace:~`, which projects to a patch-floating `~0.x.y` range. A sibling patch flows into existing releases without a re-release, while a minor bump — the kit's breaking channel on the `0.x` line — still requires the intended coordinated release because `~` holds the minor. Floating the regular-dependency edges as well lets a consumer's paths dedupe onto one sibling copy, which matters where an integrated package surfaces a sibling's types across its API. The `effect` peer, the catalog specifiers, and the `devDependencies` mirrors are unchanged. [#134][#134] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.1.7 | 0.1.8 | | @effected/npm | dependency | updated | 0.2.2 | 0.2.3 | | @effected/package-json | dependency | updated | 0.4.0 | 0.4.1 | | @effected/walker | dependency | updated | 0.3.0 | 0.3.1 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#134]: https://github.com/spencerbeggs/effected/pull/134 ## 0.5.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.1.6 | 0.1.7 | ## 0.5.0 ### Breaking Changes - ### `WorkspacePackage.workspaceRoot` is now a required field `WorkspacePackage` gains `workspaceRoot: Schema.NonEmptyString`, populated by both minting sites (`WorkspaceDiscovery`'s enumerator and `WorkspacesSync`'s sync entry point). Every construction site of `WorkspacePackage` breaks. Because `WorkspacePackage` is a `Schema.Class`, code that still builds the old shape does not fail to type-check — it fails to **decode, at runtime**. A `WorkspacePackage` value serialized before this change (persisted to disk, sent over a wire, cached) will fail to decode against the new schema. The motivation is that discovery already resolves the root before enumerating, and the sync entry point is handed it, so leaving it off `WorkspacePackage` was pure information loss: consumers were reconstructing the root themselves by counting `relativePath` segments and re-ascending that many `..`, which only stays correct while `path` and `relativePath` agree. **Migration:** pass `workspaceRoot` alongside the package's other fields at every hand-built `WorkspacePackage.make(...)` call site. For values obtained through `WorkspaceDiscovery` or `getWorkspacePackagesSync`, no change is needed — both minting sites already populate the field. Any previously serialized `WorkspacePackage` value must be re-derived by re-running discovery; there is no honest default root to substitute, so decoding fails loudly rather than resolving config against a silently wrong path. ### Features - ### Bounded upward ascent: `stopAt` and `maxDepth` on `WorkspaceRoot.find` `WorkspaceRoot.find` accepts a new `FindWorkspaceRootOptions` second argument, `{ stopAt?: string; maxDepth?: number }`, passed straight through to `@effected/walker`'s `Walker.ascend`. `stopAt` is inclusive — the ceiling directory is itself probed — and is resolved to an absolute path before comparison. An unmarked ceiling now fails typed with `stopAt` recorded on the new optional field on `WorkspaceRootNotFoundError`, distinguishing "no workspace root anywhere above me" from "none below the ceiling I set". ### `WorkspaceRoot.makeTest` / `WorkspaceRoot.layerTest` — a sanctioned test double ```ts import { WorkspaceRoot } from "@effected/workspaces"; const TestRoot = WorkspaceRoot.layerTest("/repo"); ``` Consumers were hand-writing the same four-line `Layer.succeed(WorkspaceRoot, { find: () => Effect.succeed("/repo") })` mock across nine call sites, plus three whole-module `vi.mock`s. `layerTest` honors `stopAt`: a hand-rolled `find` that ignores the ceiling would make a bounded call pass under test and fail live, which is exactly the failure `stopAt` exists to catch. The service contract is also now exported as `WorkspaceRootShape`, so a consumer can type a bespoke double against it instead of re-deriving the shape. [#125][#125] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/glob | dependency | updated | 0.1.2 | 0.2.0 | | @effected/lockfiles | dependency | updated | 0.1.5 | 0.1.6 | | @effected/npm | dependency | updated | 0.2.1 | 0.2.2 | | @effected/package-json | dependency | updated | 0.3.1 | 0.4.0 | | @effected/semver | dependency | updated | 0.1.1 | 0.2.0 | | @effected/walker | dependency | updated | 0.2.2 | 0.3.0 | | @effected/yaml | dependency | updated | 0.4.0 | 0.5.0 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#125]: https://github.com/spencerbeggs/effected/pull/125 ## 0.4.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.4.0 | 0.4.1 | | @effected/glob | dependency | updated | 0.1.1 | 0.1.2 | | @effected/lockfiles | dependency | updated | 0.1.4 | 0.1.5 | | @effected/npm | dependency | updated | 0.2.0 | 0.2.1 | | @effected/package-json | dependency | updated | 0.3.0 | 0.3.1 | | @effected/semver | dependency | updated | 0.1.0 | 0.1.1 | | @effected/walker | dependency | updated | 0.2.1 | 0.2.2 | | @effected/yaml | dependency | updated | 0.3.1 | 0.4.0 | - | Dependency | Type | Action | From | To | | | --- | --- | --- | --- | --- | --- | | effect | peerDependency | updated | 4.0.0-beta.98 | 4.0.0-beta.99 | [#122][#122] Thanks [@spencerbeggs](https://github.com/spencerbeggs)! | [#122]: https://github.com/spencerbeggs/effected/pull/122 ## 0.4.0 ### Breaking Changes - ### `findWorkspaceRootSync` takes `cwd` positionally `findWorkspaceRootSync` changed from a single options bag carrying an optional `cwd` to a path-first signature, matching the rest of the kit's sync facades: ```ts // Before const root = findWorkspaceRootSync({ ...nodeSyncOps, cwd: process.cwd() }); // After const root = findWorkspaceRootSync(process.cwd(), nodeSyncOps); ``` `cwd` is now required — the function no longer reads `process.cwd()` ambiently when it is omitted — and the `FindWorkspaceRootSyncOptions` type has been removed; pass `WorkspacesSyncOptions` directly. This is a pre-`0.1.0` change; nothing built on the old signature has been published. ### Features - ### `WorkspaceDiscovery.makeTest` / `layerTest` test doubles Added an in-memory test double of `WorkspaceDiscovery`, with every method defaulted so a test stubs only what it exercises. Defaults model an empty workspace; `getPackage`, `importerMap`, and `resolveFile`/`resolveFiles` are all derived from the effective `listPackages` (the override when one is supplied), so stubbing just `listPackages` yields a consistent double. `getPackage` fails with the service's own typed `PackageNotFoundError` on a miss, exactly as the live implementation does; an unstubbed `info()` call dies with an explanatory defect rather than fabricating a root path. ```ts import { WorkspaceDiscovery, WorkspacePackage } from "@effected/workspaces"; import { Effect } from "effect"; const TestDiscovery = WorkspaceDiscovery.layerTest({ listPackages: () => Effect.succeed([ WorkspacePackage.make({ name: "@my-org/utils", version: "1.0.0", path: "/repo/packages/utils", packageJsonPath: "/repo/packages/utils/package.json", relativePath: "packages/utils", }), ]), }); // program.pipe(Effect.provide(TestDiscovery)) ``` Bind the result of `layerTest(...)` to a `const` and reuse it — each call mints a fresh reference, and layers memoize by reference. [#112][#112] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.1.3 | 0.1.4 | | @effected/yaml | dependency | updated | 0.3.0 | 0.3.1 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#112]: https://github.com/spencerbeggs/effected/pull/112 ## 0.3.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.3.0 | 0.4.0 | | @effected/glob | dependency | updated | 0.1.0 | 0.1.1 | | @effected/lockfiles | dependency | updated | 0.1.2 | 0.1.3 | | @effected/walker | dependency | updated | 0.2.0 | 0.2.1 | | @effected/yaml | dependency | updated | 0.2.0 | 0.3.0 | - | Dependency | Type | Action | From | To | | | --- | --- | --- | --- | --- | --- | | @effected/semver | dependency | added | — | 0.1.0 | [#106][#106] Thanks [@spencerbeggs](https://github.com/spencerbeggs)! | [#106]: https://github.com/spencerbeggs/effected/pull/106 ## 0.3.0 ### Features - ### `@effected/workspaces/node-sync` — Node-bound sync entry preset A new subpath entry ships ready-made `SyncFileSystem` and `SyncPath` operations over `node:fs` / `node:path`, so adopting `findWorkspaceRootSync` / `getWorkspacePackagesSync` is one import instead of four hand-wired one-liners: ```ts import { findWorkspaceRootSync, getWorkspacePackagesSync } from "@effected/workspaces"; import { nodeSyncOps } from "@effected/workspaces/node-sync"; const root = findWorkspaceRootSync(nodeSyncOps); const packages = root === null ? [] : getWorkspacePackagesSync(root, nodeSyncOps); ``` It's a separate subpath deliberately: the main entry imports nothing platform-shaped, so consumers supplying their own operations (a win32-explicit `path`, a Bun or Deno binding, a test fake) never pull in `node:*` imports. ### Typed `PublishabilityDetectorShape` The `PublishabilityDetector` service's interface is now exported as `PublishabilityDetectorShape`, for typing a variable, field, or an overriding layer without re-declaring the surface. Its `detect` method's error channel is deliberately `never` — an override backed by something fallible must degrade to a safe answer or die, never silently swallow a failure into a wrong "publishes to npm" answer. ### `PublishConfig.linkDirectory` `PublishConfig` gains an optional `linkDirectory: boolean` field, meaningful alongside `directory`: it signals whether workspace links should point into the publish subdirectory during local development, so siblings resolve the built artifact they'd install from the registry rather than the package root. [#91][#91] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.2.0 | 0.3.0 | | @effected/lockfiles | dependency | updated | 0.1.1 | 0.1.2 | | @effected/package-json | dependency | updated | 0.2.0 | 0.3.0 | | @effected/walker | dependency | updated | 0.1.0 | 0.2.0 | | @effected/yaml | dependency | updated | 0.1.0 | 0.2.0 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#91]: https://github.com/spencerbeggs/effected/pull/91 ## 0.2.1 ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.1.0 | 0.2.0 | ## 0.2.0 ### Breaking Changes - ### `CatalogAssemblyError` moved to `@effected/npm` `CatalogAssemblyError` is no longer exported from `@effected/workspaces`. Import it from `@effected/npm` instead, alongside the `CatalogResolver` contract that names it in its error channel: ```ts // before import { CatalogAssemblyError } from "@effected/workspaces"; // after import { CatalogAssemblyError } from "@effected/npm"; ``` `WorkspaceCatalogs.catalogResolver` now passes a failed catalog assembly through **typed** as `CatalogAssemblyError`, rather than folding it into a `DependencyResolutionError` defect `cause`. Code that previously `_tag`-sniffed the defect to tell an assembly failure from a resolution failure should catch `CatalogAssemblyError` directly instead. ### `WorkspacesSync` retrofitted to consumer-supplied operations `findWorkspaceRootSync` and `getWorkspacePackagesSync` no longer import `node:fs` / `node:path` internally. Each now takes a single options object carrying `fileSystem` and `path` operations the caller supplies — Node's built-ins satisfy them with one-liners: ```ts import { existsSync, readdirSync, readFileSync, statSync } from "node:fs"; import * as path from "node:path"; import { findWorkspaceRootSync, getWorkspacePackagesSync } from "@effected/workspaces"; const ops = { fileSystem: { exists: existsSync, readFile: (p: string) => readFileSync(p, "utf8"), readDirectory: (p: string) => readdirSync(p), isDirectory: (p: string) => statSync(p).isDirectory(), }, path, // node:path IS a SyncPath }; const root = findWorkspaceRootSync(ops); const packages = root === null ? [] : getWorkspacePackagesSync(root, ops); ``` `findWorkspaceRootSync`'s optional `cwd` now rides on the options bag rather than a positional argument. This lets the sync entry points run in any host without assuming Node or posix — pass a win32-appropriate `path` (`node:path` on Windows, or `node:path/win32` explicitly) for Windows correctness. ### Features - ### One-call resolver factory and manifest resolution `Workspaces.resolverLayer(options?)` wires both `@effected/npm` contracts (`CatalogResolver`, `WorkspaceResolver`) over a real workspace from just a platform (`FileSystem` + `Path`). `Workspaces.resolveManifest(manifest, options?)` runs `@effected/npm`'s `Manifest#resolve()` over a fresh `resolverLayer` in one call: ```ts import { Manifest } from "@effected/npm"; import { Workspaces } from "@effected/workspaces"; import { Effect } from "effect"; const program = Effect.gen(function* () { const manifest = yield* Manifest.decode({ dependencies: { effect: "catalog:" } }); const resolved = manifest.needsResolution ? yield* Workspaces.resolveManifest(manifest) : manifest; return resolved.toRecord(); }); ``` Each call mints a fresh, unmemoized layer — root discovery (including `process.cwd()`) re-runs every time, which matters for a build tool that changes directory between manifests. ### `WorkspacePackage.manifestRecord` `WorkspacePackage` gains `manifestRecord`: the package's `package.json` as read, values `unknown`, for tolerant access to fields outside the typed discovery slice (`scripts`, `exports`, …) without a second file read. Defaults to `{}` for construction sites and previously-serialized values that predate the field. [#83][#83] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/lockfiles | dependency | updated | 0.1.0 | 0.1.1 | | @effected/npm | dependency | updated | 0.1.0 | 0.2.0 | | @effected/package-json | dependency | updated | 0.1.0 | 0.2.0 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#83]: https://github.com/spencerbeggs/effected/pull/83 ## 0.1.0 ### Features - Initial release: monorepo workspace tooling as Effect services — find the workspace root, enumerate its packages, walk the dependency graph, detect the package manager, resolve pnpm catalogs, read the lockfile, and work out which packages a git range touches. Works with npm, pnpm, yarn Berry and bun; every capability is a service you provide at the edge and swap in tests. ### Discovery and the dependency graph `WorkspaceDiscovery` enumerates packages with a bounded descent that honours segment-crossing `packages/**` patterns. `DependencyGraph` is a value class over discovered packages — `levels()` gives parallel build tiers and fails with `CyclicDependencyError` when there is no ordering. ```ts import { NodeFileSystem, NodePath } from "@effect/platform-node"; import { DependencyGraph, WorkspaceDiscovery, Workspaces } from "@effected/workspaces"; import { Effect, Layer } from "effect"; const Platform = Layer.mergeAll(NodeFileSystem.layer, NodePath.layer); const WorkspacesLayer = Workspaces.layer().pipe(Layer.provide(Platform)); const program = Effect.gen(function* () { const discovery = yield* WorkspaceDiscovery; const packages = yield* discovery.listPackages(); const graph = DependencyGraph.make({ packages }); return yield* graph.levels(); }); Effect.runPromise(program.pipe(Effect.provide(WorkspacesLayer))).then(console.log); ``` ### Change detection `ChangeDetector` offers three depths on one service — `changedFiles`, `changedPackages` and `affectedPackages` (the transitive blast radius). Git is a separate layer (`Workspaces.layerWithGit`) rather than a flag, so a consumer that never detects changes never needs to spawn a subprocess. ```ts import { ChangeDetectionOptions, ChangeDetector, Workspaces } from "@effected/workspaces"; import { Effect } from "effect"; const program = Effect.gen(function* () { const detector = yield* ChangeDetector; const affected = yield* detector.affectedPackages(ChangeDetectionOptions.make({ base: "origin/main" })); return affected.map((pkg) => pkg.name); }); ``` ### Catalogs, detection and the sync escape hatch `WorkspaceCatalogs` assembles pnpm catalogs with pnpm's precedence and supplies the real `CatalogResolver` / `WorkspaceResolver` implementations for `@effected/npm` via `Workspaces.resolvers`. `PackageManagerDetector`, `LockfileReader` and `PublishabilityDetector` round out the services, and `findWorkspaceRootSync` / `getWorkspacePackagesSync` are a Node-only synchronous escape hatch for config-time callers that cannot await. [#81][#81] ### Dependencies | Dependency | Type | Action | From | To | | --- | --- | --- | --- | --- | | @effected/git | dependency | updated | 0.0.0 | 0.1.0 | | @effected/glob | dependency | updated | 0.0.0 | 0.1.0 | | @effected/lockfiles | dependency | updated | 0.0.0 | 0.1.0 | | @effected/npm | dependency | updated | 0.0.0 | 0.1.0 | | @effected/package-json | dependency | updated | 0.0.0 | 0.1.0 | | @effected/walker | dependency | updated | 0.0.0 | 0.1.0 | | @effected/yaml | dependency | updated | 0.0.0 | 0.1.0 | ### Patch Changes Thanks to [@spencerbeggs](https://github.com/spencerbeggs) for their contributions! [#81]: https://github.com/spencerbeggs/effected/pull/81