@reliverse/relifso 1.2.2 → 1.2.4

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 CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  > @reliverse/relifso is a modern filesystem toolkit for builders. drop-in replacement for `node:fs` and `fs-extra` — powered by native promises, built with es modules, and packed with dx-focused utilities.
4
4
 
5
- [sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/Pb8uKbwpsJ) — [npm](https://npmjs.com/package/@reliverse/relifso) — [repo](https://github.com/reliverse/relifso)
5
+ [sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/Pb8uKbwpsJ) — [npm](https://npmjs.com/package/@reliverse/relifso) — [github](https://github.com/reliverse/relifso)
6
+
7
+ ## Features
6
8
 
7
9
  - 🪄 Everything you love from `fs-extra` — now simpler, cleaner, and more beginner-friendly
8
10
  - ⚙️ Drop-in replacement for `node:fs` — with native `Promise`, `async/await`, and sync variants
@@ -285,7 +287,7 @@ All async methods return a `Promise` if no callback is passed.
285
287
 
286
288
  Relifso wouldn’t be so cool without these gems:
287
289
 
288
- - [node:fs](https://nodejs.org/api/fs.html)+[node:path](https://nodejs.org/api/path.html) — origins
290
+ - [`node:fs`](https://nodejs.org/api/fs.html)+[`node:path`](https://nodejs.org/api/path.html) — origins
289
291
  - [`fs-extra`](https://github.com/jprichardson/node-fs-extra) — classic, reliable
290
292
  - [`fsxt`](https://github.com/uwx-node-modules/fsxt) — full fs-extra overhaul
291
293
 
package/bin/mod.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Stats } from "node:fs";
2
- import { readdir, stat } from "node:fs/promises";
2
+ import { accessSync, constants, readdirSync, statSync } from "node:fs";
3
+ import { readdir as nodeReaddirInternal, stat as nodeStatInternal, readdir, stat, access } from "node:fs/promises";
3
4
  import type { DiveOptions } from "./impl/dive.js";
4
5
  import { copy, copySync } from "./impl/copy.js";
5
6
  import { createFile, createFileSync } from "./impl/create-file.js";
@@ -27,10 +28,70 @@ declare const ensureDirSync: typeof mkdirsSync;
27
28
  declare const ensureFileSync: typeof createFileSync;
28
29
  declare const rimrafSync: typeof removeSync;
29
30
  declare const ncpSync: typeof copySync;
30
- export { readJson, writeJson, createFile, writeFile, readFile, mkdirs, emptyDir, pathExists, copy, move, remove, readdir, stat, readJsonSync, writeJsonSync, createFileSync, writeFileSync, readFileSync, mkdirsSync, emptyDirSync, pathExistsSync, copySync, moveSync, removeSync, mkdirp, mkdirpSync, rimraf, rimrafSync, ncp, ncpSync, ensureDir, ensureDirSync, ensureFile, ensureFileSync, outputJson, outputJsonSync, outputFile, outputFileSync, diveSync, };
31
+ declare const mkdir: typeof mkdirs;
32
+ declare const mkdirSync: typeof mkdirsSync;
33
+ declare const unlink: typeof remove;
34
+ declare const unlinkSync: typeof removeSync;
35
+ declare const rename: typeof move;
36
+ declare const renameSync: typeof moveSync;
31
37
  export type { CopyOptions } from "./impl/copy.js";
32
38
  export type { MoveOptions } from "./impl/move.js";
33
39
  export type { ReadFileOptions } from "./impl/read-file.js";
34
40
  export type { ReadJsonOptions } from "./impl/read-json.js";
35
41
  export type { JsonStringifyOptions } from "./impl/write-json.js";
36
42
  export type { WriteJsonOptions } from "./impl/write-json.js";
43
+ export { readJson, writeJson, createFile, writeFile, readFile, mkdirs, emptyDir, pathExists, copy, move, remove, readdir, stat, access, readJsonSync, writeJsonSync, createFileSync, writeFileSync, readFileSync, mkdirsSync, emptyDirSync, pathExistsSync, copySync, moveSync, removeSync, readdirSync, statSync, accessSync, constants, mkdirp, mkdirpSync, rimraf, rimrafSync, ncp, ncpSync, ensureDir, ensureDirSync, ensureFile, ensureFileSync, outputJson, outputJsonSync, outputFile, outputFileSync, diveSync, mkdir, mkdirSync, unlink, unlinkSync, rename, renameSync, };
44
+ declare const fs: {
45
+ readJson: typeof readJson;
46
+ writeJson: typeof writeJson;
47
+ createFile: typeof createFile;
48
+ writeFile: typeof writeFile;
49
+ readFile: typeof readFile;
50
+ mkdirs: typeof mkdirs;
51
+ emptyDir: typeof emptyDir;
52
+ pathExists: typeof pathExists;
53
+ copy: typeof copy;
54
+ move: typeof move;
55
+ remove: typeof remove;
56
+ readdir: typeof nodeReaddirInternal;
57
+ stat: typeof nodeStatInternal;
58
+ access: typeof access;
59
+ readJsonSync: typeof readJsonSync;
60
+ writeJsonSync: typeof writeJsonSync;
61
+ createFileSync: typeof createFileSync;
62
+ writeFileSync: typeof writeFileSync;
63
+ readFileSync: typeof readFileSync;
64
+ mkdirsSync: typeof mkdirsSync;
65
+ emptyDirSync: typeof emptyDirSync;
66
+ pathExistsSync: typeof pathExistsSync;
67
+ copySync: typeof copySync;
68
+ moveSync: typeof moveSync;
69
+ removeSync: typeof removeSync;
70
+ readdirSync: typeof readdirSync;
71
+ statSync: import("fs").StatSyncFn;
72
+ accessSync: typeof accessSync;
73
+ constants: typeof constants;
74
+ mkdirp: typeof mkdirs;
75
+ mkdirpSync: typeof mkdirsSync;
76
+ rimraf: typeof remove;
77
+ rimrafSync: typeof removeSync;
78
+ ncp: typeof copy;
79
+ ncpSync: typeof copySync;
80
+ ensureDir: typeof mkdirs;
81
+ ensureDirSync: typeof mkdirsSync;
82
+ ensureFile: typeof createFile;
83
+ ensureFileSync: typeof createFileSync;
84
+ outputJson: typeof outputJson;
85
+ outputJsonSync: typeof outputJsonSync;
86
+ outputFile: typeof outputFile;
87
+ outputFileSync: typeof outputFileSync;
88
+ dive: typeof dive;
89
+ diveSync: typeof diveSync;
90
+ mkdir: typeof mkdirs;
91
+ mkdirSync: typeof mkdirsSync;
92
+ unlink: typeof remove;
93
+ unlinkSync: typeof removeSync;
94
+ rename: typeof move;
95
+ renameSync: typeof moveSync;
96
+ };
97
+ export default fs;
package/bin/mod.js CHANGED
@@ -1,4 +1,5 @@
1
- import { readdir as nodeReaddirInternal, stat as nodeStatInternal, readdir, stat } from "node:fs/promises";
1
+ import { accessSync, constants, readdirSync, statSync } from "node:fs";
2
+ import { readdir as nodeReaddirInternal, stat as nodeStatInternal, readdir, stat, access } from "node:fs/promises";
2
3
  import { join as pathJoin } from "node:path";
3
4
  import { copy, copySync } from "./impl/copy.js";
4
5
  import { createFile, createFileSync } from "./impl/create-file.js";
@@ -101,6 +102,12 @@ const ensureDirSync = mkdirsSync;
101
102
  const ensureFileSync = createFileSync;
102
103
  const rimrafSync = removeSync;
103
104
  const ncpSync = copySync;
105
+ const mkdir = mkdirs;
106
+ const mkdirSync = mkdirsSync;
107
+ const unlink = remove;
108
+ const unlinkSync = removeSync;
109
+ const rename = move;
110
+ const renameSync = moveSync;
104
111
  export {
105
112
  readJson,
106
113
  writeJson,
@@ -115,6 +122,7 @@ export {
115
122
  remove,
116
123
  readdir,
117
124
  stat,
125
+ access,
118
126
  readJsonSync,
119
127
  writeJsonSync,
120
128
  createFileSync,
@@ -126,6 +134,10 @@ export {
126
134
  copySync,
127
135
  moveSync,
128
136
  removeSync,
137
+ readdirSync,
138
+ statSync,
139
+ accessSync,
140
+ constants,
129
141
  mkdirp,
130
142
  mkdirpSync,
131
143
  rimraf,
@@ -140,5 +152,68 @@ export {
140
152
  outputJsonSync,
141
153
  outputFile,
142
154
  outputFileSync,
143
- diveSync
155
+ diveSync,
156
+ mkdir,
157
+ mkdirSync,
158
+ unlink,
159
+ unlinkSync,
160
+ rename,
161
+ renameSync
144
162
  };
163
+ const fs = {
164
+ // async methods
165
+ readJson,
166
+ writeJson,
167
+ createFile,
168
+ writeFile,
169
+ readFile,
170
+ mkdirs,
171
+ emptyDir,
172
+ pathExists,
173
+ copy,
174
+ move,
175
+ remove,
176
+ readdir,
177
+ stat,
178
+ access,
179
+ // sync methods
180
+ readJsonSync,
181
+ writeJsonSync,
182
+ createFileSync,
183
+ writeFileSync,
184
+ readFileSync,
185
+ mkdirsSync,
186
+ emptyDirSync,
187
+ pathExistsSync,
188
+ copySync,
189
+ moveSync,
190
+ removeSync,
191
+ readdirSync,
192
+ statSync,
193
+ accessSync,
194
+ constants,
195
+ // alias
196
+ mkdirp,
197
+ mkdirpSync,
198
+ rimraf,
199
+ rimrafSync,
200
+ ncp,
201
+ ncpSync,
202
+ ensureDir,
203
+ ensureDirSync,
204
+ ensureFile,
205
+ ensureFileSync,
206
+ outputJson,
207
+ outputJsonSync,
208
+ outputFile,
209
+ outputFileSync,
210
+ dive,
211
+ diveSync,
212
+ mkdir,
213
+ mkdirSync,
214
+ unlink,
215
+ unlinkSync,
216
+ rename,
217
+ renameSync
218
+ };
219
+ export default fs;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "license": "MIT",
6
6
  "name": "@reliverse/relifso",
7
7
  "type": "module",
8
- "version": "1.2.2",
8
+ "version": "1.2.4",
9
9
  "keywords": [
10
10
  "fs",
11
11
  "file",