@effected/walker 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.d.ts +6 -6
- package/package.json +3 -3
- package/tsdoc-metadata.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
Path traversal as Effect primitives. `Walker.ascend` gives you the directory chain from a starting path to the filesystem root; `Walker.findUpward` returns the nearest existing file among per-directory candidates; `Walker.findRoot` returns the nearest directory a marker predicate accepts. Every probe absorbs its own failure, so a single unreadable ancestor cannot hide a valid `.git` or `pnpm-workspace.yaml` above it. Going the other way, `descend` expands a compiled [`@effected/glob`](https://www.npmjs.com/package/@effected/glob) pattern under a directory into the matching file paths — sorted, symlink-safe, and typed about unreadable subtrees instead of silently swallowing them. `FileSystem` and `Path` arrive from `effect` core, so no platform package is pulled in — not even in tests.
|
|
9
9
|
|
|
10
10
|
> **Pre-release.** This package is part of the `@effected/*` kit, in pre-`1.0.0`
|
|
11
|
-
> development against a single pinned Effect v4
|
|
11
|
+
> development against a single pinned Effect v4 prerelease. Packages graduate to
|
|
12
12
|
> `1.0.0` once Effect `4.0.0` ships. To hold your own `effect` versions at
|
|
13
13
|
> exactly the ones the kit is built and tested against, install
|
|
14
14
|
> [`@effected/pnpm-plugin-effect`](https://www.npmjs.com/package/@effected/pnpm-plugin-effect).
|
package/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ declare const DescendError_base: Schema.Class<DescendError, Schema.TaggedStruct<
|
|
|
38
38
|
*
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
|
-
declare class DescendError extends DescendError_base {
|
|
41
|
+
export declare class DescendError extends DescendError_base {
|
|
42
42
|
get message(): string;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -73,7 +73,7 @@ declare class DescendError extends DescendError_base {
|
|
|
73
73
|
*
|
|
74
74
|
* @public
|
|
75
75
|
*/
|
|
76
|
-
declare const descend: (pattern: GlobPattern, options: DescendOptions) => Effect.Effect<ReadonlyArray<string>, DescendError, FileSystem.FileSystem | Path.Path>;
|
|
76
|
+
export declare const descend: (pattern: GlobPattern, options: DescendOptions) => Effect.Effect<ReadonlyArray<string>, DescendError, FileSystem.FileSystem | Path.Path>;
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region src/Expand.d.ts
|
|
79
79
|
/**
|
|
@@ -122,7 +122,7 @@ declare const GlobExpansionError_base: Schema.Class<GlobExpansionError, Schema.T
|
|
|
122
122
|
*
|
|
123
123
|
* @public
|
|
124
124
|
*/
|
|
125
|
-
declare class GlobExpansionError extends GlobExpansionError_base {
|
|
125
|
+
export declare class GlobExpansionError extends GlobExpansionError_base {
|
|
126
126
|
/**
|
|
127
127
|
* Which phase failed — `"compile"` when the pattern itself was rejected,
|
|
128
128
|
* `"descend"` when the filesystem walk failed. A convenience over
|
|
@@ -171,7 +171,7 @@ declare class GlobExpansionError extends GlobExpansionError_base {
|
|
|
171
171
|
*
|
|
172
172
|
* @public
|
|
173
173
|
*/
|
|
174
|
-
declare const compileAndExpand: (pattern: string, options: CompileAndExpandOptions) => Effect.Effect<ReadonlyArray<string>, GlobExpansionError, FileSystem.FileSystem | Path.Path>;
|
|
174
|
+
export declare const compileAndExpand: (pattern: string, options: CompileAndExpandOptions) => Effect.Effect<ReadonlyArray<string>, GlobExpansionError, FileSystem.FileSystem | Path.Path>;
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region src/Walker.d.ts
|
|
177
177
|
/**
|
|
@@ -229,7 +229,7 @@ interface AscendOptions {
|
|
|
229
229
|
*
|
|
230
230
|
* @public
|
|
231
231
|
*/
|
|
232
|
-
declare class Walker {
|
|
232
|
+
export declare class Walker {
|
|
233
233
|
private constructor();
|
|
234
234
|
/**
|
|
235
235
|
* Ascend from `start` toward the filesystem root, yielding each directory,
|
|
@@ -289,5 +289,5 @@ declare class Walker {
|
|
|
289
289
|
static readonly findRoot: <E, R>(dirs: ReadonlyArray<string>, isRoot: (dir: string) => Effect.Effect<boolean, E, R>) => Effect.Effect<Option.Option<string>, never, R>;
|
|
290
290
|
}
|
|
291
291
|
//#endregion
|
|
292
|
-
export {
|
|
292
|
+
export type { AscendOptions, CompileAndExpandOptions, DescendOptions };
|
|
293
293
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/walker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Path traversal as Effect primitives: ascend a directory chain to the first matching candidate, or descend a tree expanding a glob against the filesystem.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@effected/glob": "^0.
|
|
41
|
-
"effect": "4.0.0-
|
|
40
|
+
"@effected/glob": "^0.5.0",
|
|
41
|
+
"effect": "4.0.0-rc.112"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=24.11.0"
|