crash-js 0.1.119 → 0.1.121
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/crash-js/fs-utils +21 -21
- package/package.json +4 -3
package/crash-js/fs-utils
CHANGED
|
@@ -38,6 +38,21 @@ const
|
|
|
38
38
|
_fs_module =
|
|
39
39
|
require(
|
|
40
40
|
"fs");
|
|
41
|
+
const
|
|
42
|
+
_fs_read_dir_sync =
|
|
43
|
+
_fs_module.readdirSync;
|
|
44
|
+
const
|
|
45
|
+
_fs_exists_sync =
|
|
46
|
+
_fs.existsSync;
|
|
47
|
+
const
|
|
48
|
+
_fs_append_file_sync =
|
|
49
|
+
_fs.appendFileSync;
|
|
50
|
+
const
|
|
51
|
+
_fs_read_file_sync =
|
|
52
|
+
_fs.readFileSync;
|
|
53
|
+
const
|
|
54
|
+
_fs_write_file_sync =
|
|
55
|
+
_fs.writeFileSync;
|
|
41
56
|
const
|
|
42
57
|
_fs_worker_new =
|
|
43
58
|
_fs_module.fsWorkerNew;
|
|
@@ -124,7 +139,7 @@ function
|
|
|
124
139
|
_return =
|
|
125
140
|
false;
|
|
126
141
|
_exists =
|
|
127
|
-
|
|
142
|
+
_fs_exists_sync(
|
|
128
143
|
_path);
|
|
129
144
|
if (_exists) {
|
|
130
145
|
_return =
|
|
@@ -145,7 +160,7 @@ function
|
|
|
145
160
|
"flag":
|
|
146
161
|
'r'};
|
|
147
162
|
_return =
|
|
148
|
-
|
|
163
|
+
_fs_read_file_sync(
|
|
149
164
|
_path,
|
|
150
165
|
_read_opts);
|
|
151
166
|
return _return;
|
|
@@ -156,7 +171,7 @@ function
|
|
|
156
171
|
_path,
|
|
157
172
|
_content,
|
|
158
173
|
_append) {
|
|
159
|
-
|
|
174
|
+
_fs_append_file_sync(
|
|
160
175
|
_path,
|
|
161
176
|
_content);
|
|
162
177
|
}
|
|
@@ -166,7 +181,7 @@ function
|
|
|
166
181
|
_path,
|
|
167
182
|
_content,
|
|
168
183
|
_append) {
|
|
169
|
-
|
|
184
|
+
_fs_write_file_sync(
|
|
170
185
|
_path,
|
|
171
186
|
_content);
|
|
172
187
|
}
|
|
@@ -189,26 +204,11 @@ function
|
|
|
189
204
|
function
|
|
190
205
|
_ls(
|
|
191
206
|
_args) {
|
|
192
|
-
|
|
193
|
-
_read_dir,
|
|
194
|
-
_return;
|
|
195
|
-
if ( typeof(
|
|
196
|
-
_fs.readdirSync) === 'undefined' ) {
|
|
197
|
-
_read_dir =
|
|
198
|
-
_fs.readDirSync;
|
|
199
|
-
_return =
|
|
200
|
-
_read_dir.apply(
|
|
201
|
-
null,
|
|
202
|
-
[_args]).unwrap()
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
_read_dir =
|
|
206
|
-
_fs.readdirSync;
|
|
207
|
+
const
|
|
207
208
|
_return =
|
|
208
|
-
|
|
209
|
+
_fs_read_dir_sync.apply(
|
|
209
210
|
null,
|
|
210
211
|
[_args]);
|
|
211
|
-
}
|
|
212
212
|
return _return;
|
|
213
213
|
}
|
|
214
214
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name":
|
|
3
3
|
"crash-js",
|
|
4
4
|
"version":
|
|
5
|
-
"0.1.
|
|
5
|
+
"0.1.121",
|
|
6
6
|
"description":
|
|
7
7
|
"Crash Javascript library.",
|
|
8
8
|
"funding":
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"hip",
|
|
34
34
|
"opfs",
|
|
35
35
|
"fs",
|
|
36
|
+
"node:fs",
|
|
36
37
|
"tmcfs",
|
|
37
38
|
"themartiancompany",
|
|
38
39
|
"ur"
|
|
@@ -61,9 +62,9 @@
|
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
64
|
"crash-js-webpack":
|
|
64
|
-
"^0.0.
|
|
65
|
+
"^0.0.17",
|
|
65
66
|
"eslint":
|
|
66
|
-
"^10.0
|
|
67
|
+
"^10.3.0",
|
|
67
68
|
"globals":
|
|
68
69
|
"^17.3.0",
|
|
69
70
|
"@eslint/js":
|