diff --git a/README.md b/README.md index 3b4dfaa..4ab9e5c 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ console.log(await readFile("my/file")); // -> My file content ``` +Methods: + | Method | Deno | Node | Bun | Base implementation | | ---------- | ---- | ---- | --- | ------------------- | | appendFile | X | X | X | node:fs/promises | @@ -87,6 +89,8 @@ console.log(await dirpath("config")); // -> /home/user/.config ``` +Methods: + | Method | Deno | Node | Bun | Base implementation | | --------- | ---- | ---- | --- | ------------------- | | unlink | X | X | X | node:fs/promises | @@ -112,3 +116,9 @@ console.log(await dirpath("config")); | open | X | X | X | node:fs/promises | | access | X | X | X | node:fs/promises | | constants | X | X | X | node:fs/promises | + +Types: + +| Method | Deno | Node | Bun | Base implementation | +| --------- | ---- | ---- | --- | ------------------- | +| FSWatcher | X | X | X | node:fs/promises | diff --git a/deno.json b/deno.json index 6fb272a..c536dc0 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@cross/fs", - "version": "0.0.9", + "version": "0.0.10", "exports": { ".": "./mod.ts", "./stat": "./src/stat/mod.ts", @@ -12,9 +12,9 @@ "@cross/env": "jsr:@cross/env@^1.0.0", "@cross/runtime": "jsr:@cross/runtime@^1.0.0", "@cross/test": "jsr:@cross/test@^0.0.9", - "@cross/utils": "jsr:@cross/utils@^0.10.0", - "@std/assert": "jsr:@std/assert@^0.221.0", - "@std/path": "jsr:@std/path@^0.221.0" + "@cross/utils": "jsr:@cross/utils@^0.11.0", + "@std/assert": "jsr:@std/assert@^0.223.0", + "@std/path": "jsr:@std/path@^0.223.0" }, "publish": { "exclude": [".github", "*.test.ts"] diff --git a/src/ops/mod.ts b/src/ops/mod.ts index 3f71eaf..1630b8d 100644 --- a/src/ops/mod.ts +++ b/src/ops/mod.ts @@ -11,8 +11,11 @@ export { rmdir, truncate, unlink, + watch, } from "node:fs/promises"; +export type { FSWatcher } from "node:fs"; + export * from "./mktempdir.ts"; export * from "./tempfile.ts"; export * from "./chdir.ts"; diff --git a/src/stat/find.ts b/src/stat/find.ts index 9696b28..2b74471 100644 --- a/src/stat/find.ts +++ b/src/stat/find.ts @@ -2,7 +2,7 @@ import { readdir } from "node:fs/promises"; import { stat } from "./mod.ts"; import type { StatResult } from "./mod.ts"; import { isAbsolute, join, resolve } from "@std/path"; -import { cwd } from "@cross/utils/cwd"; +import { cwd } from "../ops/cwd.ts"; /** * Recursively finds files and directories within a specified path, optionally applying advanced filtering.