@effected/workspaces 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ConfigDependencyHooks.js +6 -2
- package/Workspaces.js +9 -3
- package/index.d.ts +9 -3
- package/package.json +3 -4
package/ConfigDependencyHooks.js
CHANGED
|
@@ -208,8 +208,12 @@ process.stdout.write("\\n" + JSON.stringify(payload) + "\\n", () => process.exit
|
|
|
208
208
|
*/
|
|
209
209
|
const REPLAY_TIMEOUT = Duration.seconds(30);
|
|
210
210
|
/**
|
|
211
|
-
* The subprocess protocol payload —
|
|
212
|
-
* parsed by `Run.jsonLine
|
|
211
|
+
* The subprocess protocol payload — a single JSON line near the end of the
|
|
212
|
+
* child's stdout, framed and parsed by `Run.jsonLine`, which scans lines from
|
|
213
|
+
* the end for the first that decodes (so a hook logging after the payload —
|
|
214
|
+
* e.g. from `process.on("exit", ...)` — cannot displace it). The `ok`
|
|
215
|
+
* discriminant is what keeps an accidental log line from satisfying the
|
|
216
|
+
* envelope. The envelope is strict (a payload without a usable
|
|
213
217
|
* `ok` discriminant is a mechanism failure, typed); the `config` slice inside a
|
|
214
218
|
* success stays `Unknown` because a hook's returned *data* is tolerantly
|
|
215
219
|
* threaded (`configOf`), never fatal.
|
package/Workspaces.js
CHANGED
|
@@ -143,7 +143,8 @@ var Workspaces = class {
|
|
|
143
143
|
* never detects changes or reads at a ref should not have to be able to
|
|
144
144
|
* spawn a subprocess. The consumer provides `ChildProcessSpawner` once at
|
|
145
145
|
* the edge (`@effect/platform-node`'s `NodeServices.layer`); a test
|
|
146
|
-
* provides `
|
|
146
|
+
* provides `Git.layerTest({ … })` — git's own shipped double, whose
|
|
147
|
+
* unstubbed members die named — and needs no repository on disk.
|
|
147
148
|
*/
|
|
148
149
|
static layerWithGit = layerWithGit;
|
|
149
150
|
/**
|
|
@@ -192,9 +193,14 @@ var Workspaces = class {
|
|
|
192
193
|
* import { Workspaces } from "@effected/workspaces";
|
|
193
194
|
* import { Layer } from "effect";
|
|
194
195
|
*
|
|
196
|
+
* // Bound to consts per the warning above: each factory call mints a
|
|
197
|
+
* // fresh layer reference, and layers memoize by reference.
|
|
198
|
+
* const LocalExecLayer = Workspaces.localExecLayer();
|
|
199
|
+
* const WorkspacesLayer = Workspaces.layer();
|
|
200
|
+
*
|
|
195
201
|
* const AppLayer = ToolDiscovery.layer.pipe(
|
|
196
|
-
* Layer.provide(
|
|
197
|
-
* Layer.provide(
|
|
202
|
+
* Layer.provide(LocalExecLayer),
|
|
203
|
+
* Layer.provide(WorkspacesLayer),
|
|
198
204
|
* Layer.provide(NodeServices.layer),
|
|
199
205
|
* );
|
|
200
206
|
* ```
|
package/index.d.ts
CHANGED
|
@@ -2675,7 +2675,8 @@ declare class Workspaces {
|
|
|
2675
2675
|
* never detects changes or reads at a ref should not have to be able to
|
|
2676
2676
|
* spawn a subprocess. The consumer provides `ChildProcessSpawner` once at
|
|
2677
2677
|
* the edge (`@effect/platform-node`'s `NodeServices.layer`); a test
|
|
2678
|
-
* provides `
|
|
2678
|
+
* provides `Git.layerTest({ … })` — git's own shipped double, whose
|
|
2679
|
+
* unstubbed members die named — and needs no repository on disk.
|
|
2679
2680
|
*/
|
|
2680
2681
|
static readonly layerWithGit: (options?: WorkspacesOptions) => Layer.Layer<WorkspacesServices | ChangeDetector | WorkspaceSnapshots | Git, never, FileSystem.FileSystem | Path.Path | ChildProcessSpawner.ChildProcessSpawner>;
|
|
2681
2682
|
/**
|
|
@@ -2724,9 +2725,14 @@ declare class Workspaces {
|
|
|
2724
2725
|
* import { Workspaces } from "@effected/workspaces";
|
|
2725
2726
|
* import { Layer } from "effect";
|
|
2726
2727
|
*
|
|
2728
|
+
* // Bound to consts per the warning above: each factory call mints a
|
|
2729
|
+
* // fresh layer reference, and layers memoize by reference.
|
|
2730
|
+
* const LocalExecLayer = Workspaces.localExecLayer();
|
|
2731
|
+
* const WorkspacesLayer = Workspaces.layer();
|
|
2732
|
+
*
|
|
2727
2733
|
* const AppLayer = ToolDiscovery.layer.pipe(
|
|
2728
|
-
* Layer.provide(
|
|
2729
|
-
* Layer.provide(
|
|
2734
|
+
* Layer.provide(LocalExecLayer),
|
|
2735
|
+
* Layer.provide(WorkspacesLayer),
|
|
2730
2736
|
* Layer.provide(NodeServices.layer),
|
|
2731
2737
|
* );
|
|
2732
2738
|
* ```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/workspaces",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Monorepo workspace tooling as Effect services — root discovery, package enumeration, the dependency graph, package-manager detection, pnpm catalog resolution, lockfile IO and git-based change detection.",
|
|
6
6
|
"keywords": [
|
|
@@ -46,13 +46,12 @@
|
|
|
46
46
|
"./package.json": "./package.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@effected/commands": "^0.3.
|
|
50
|
-
"@effected/git": "^0.
|
|
49
|
+
"@effected/commands": "^0.3.1",
|
|
50
|
+
"@effected/git": "^0.6.0",
|
|
51
51
|
"@effected/glob": "^0.2.2",
|
|
52
52
|
"@effected/lockfiles": "^0.3.2",
|
|
53
53
|
"@effected/npm": "^0.8.3",
|
|
54
54
|
"@effected/package-json": "^0.7.3",
|
|
55
|
-
"@effected/semver": "^0.3.2",
|
|
56
55
|
"@effected/walker": "^0.3.4",
|
|
57
56
|
"@effected/yaml": "^0.6.1",
|
|
58
57
|
"@pnpm/catalogs.config": "^1100.0.0",
|