@zenfs/core 0.7.8 → 0.7.11
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.
|
@@ -416,7 +416,7 @@ readFile;
|
|
|
416
416
|
* @option options flag Defaults to `'w'`.
|
|
417
417
|
*/
|
|
418
418
|
export async function writeFile(filename, data, _options) {
|
|
419
|
-
const options = normalizeOptions(_options, 'utf8', 'w', 0o644);
|
|
419
|
+
const options = normalizeOptions(_options, 'utf8', 'w+', 0o644);
|
|
420
420
|
const handle = await open(filename, options.flag, options.mode);
|
|
421
421
|
try {
|
|
422
422
|
await handle.writeFile(data, options);
|
package/dist/emulation/sync.js
CHANGED
|
@@ -199,7 +199,7 @@ function _writeFileSync(fname, data, flag, mode, resolveSymlinks) {
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
export function writeFileSync(filename, data, _options) {
|
|
202
|
-
const options = normalizeOptions(_options, 'utf8', 'w', 0o644);
|
|
202
|
+
const options = normalizeOptions(_options, 'utf8', 'w+', 0o644);
|
|
203
203
|
const flag = parseFlag(options.flag);
|
|
204
204
|
if (!isWriteable(flag)) {
|
|
205
205
|
throw new ApiError(ErrorCode.EINVAL, 'Flag passed to writeFile must allow for writing.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenfs/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"description": "A filesystem in your browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
|
64
64
|
"@jest/globals": "^29.5.0",
|
|
65
65
|
"@types/jest": "^29.5.1",
|
|
66
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
67
|
-
"@typescript-eslint/parser": "^
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
67
|
+
"@typescript-eslint/parser": "^7.7.0",
|
|
68
68
|
"cross-env": "^7.0.3",
|
|
69
69
|
"esbuild": "^0.17.18",
|
|
70
70
|
"eslint": "^8.36.0",
|