redzip 3.0.3 → 3.0.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/ChangeLog +7 -0
- package/README.md +1 -2
- package/lib/local/index.js +5 -9
- package/lib/redfs.js +1 -1
- package/lib/vfs/read/index.js +2 -2
- package/lib/vfs/read-size/index.js +1 -1
- package/lib/vfs/write/index.js +2 -2
- package/lib/zip/list/index.js +1 -1
- package/lib/zip/read/index.js +1 -1
- package/lib/zip/write/index.js +6 -6
- package/package.json +4 -5
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -156,6 +156,7 @@ When you need to save `string`, or `Buffer` use [Readable.from](https://nodejs.o
|
|
|
156
156
|
|
|
157
157
|
```js
|
|
158
158
|
import {Readable} from 'node:stream';
|
|
159
|
+
import {createGzip} from 'node:zlib';
|
|
159
160
|
import {write} from 'redzip';
|
|
160
161
|
import pullout from 'pullout';
|
|
161
162
|
|
|
@@ -175,8 +176,6 @@ await pullout(await read(path));
|
|
|
175
176
|
// returns
|
|
176
177
|
'hello';
|
|
177
178
|
|
|
178
|
-
import {createGzip} from 'node:zlib';
|
|
179
|
-
|
|
180
179
|
const zipStream = Readable
|
|
181
180
|
.from('hello')
|
|
182
181
|
.pipe(createGzip());
|
package/lib/local/index.js
CHANGED
|
@@ -4,14 +4,14 @@ const {
|
|
|
4
4
|
join,
|
|
5
5
|
basename,
|
|
6
6
|
dirname,
|
|
7
|
-
} = require('path');
|
|
7
|
+
} = require('node:path');
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
createReadStream,
|
|
11
11
|
createWriteStream,
|
|
12
|
-
} = require('fs');
|
|
12
|
+
} = require('node:fs');
|
|
13
13
|
|
|
14
|
-
const {createGunzip} = require('zlib');
|
|
14
|
+
const {createGunzip} = require('node:zlib');
|
|
15
15
|
|
|
16
16
|
const {
|
|
17
17
|
realpath,
|
|
@@ -20,7 +20,7 @@ const {
|
|
|
20
20
|
unlink,
|
|
21
21
|
lstat,
|
|
22
22
|
opendir,
|
|
23
|
-
} = require('fs/promises');
|
|
23
|
+
} = require('node:fs/promises');
|
|
24
24
|
|
|
25
25
|
const readify = require('readify');
|
|
26
26
|
const trammel = require('trammel');
|
|
@@ -73,11 +73,7 @@ module.exports.remove = async (outerPath) => {
|
|
|
73
73
|
throw error;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
module.exports.read = async (path, innerPath, {
|
|
77
|
-
type,
|
|
78
|
-
sort,
|
|
79
|
-
order,
|
|
80
|
-
} = {}) => {
|
|
76
|
+
module.exports.read = async (path, innerPath, {type, sort, order} = {}) => {
|
|
81
77
|
const [error, result] = await tryToCatch(readify, path, {
|
|
82
78
|
type,
|
|
83
79
|
sort,
|
package/lib/redfs.js
CHANGED
package/lib/vfs/read/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {normalize} = require('path');
|
|
4
|
-
const {Readable} = require('stream');
|
|
3
|
+
const {normalize} = require('node:path');
|
|
4
|
+
const {Readable} = require('node:stream');
|
|
5
5
|
const {addSlashToEnd} = require('format-io');
|
|
6
6
|
|
|
7
7
|
const redfs = require('../../redfs');
|
package/lib/vfs/write/index.js
CHANGED
package/lib/zip/list/index.js
CHANGED
package/lib/zip/read/index.js
CHANGED
package/lib/zip/write/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {once} = require('events');
|
|
4
|
-
const {promisify} = require('util');
|
|
5
|
-
const {join, dirname} = require('path').posix;
|
|
6
|
-
const {createWriteStream} = require('fs');
|
|
7
|
-
const {createGunzip} = require('zlib');
|
|
3
|
+
const {once} = require('node:events');
|
|
4
|
+
const {promisify} = require('node:util');
|
|
5
|
+
const {join, dirname} = require('node:path').posix;
|
|
6
|
+
const {createWriteStream} = require('node:fs');
|
|
7
|
+
const {createGunzip} = require('node:zlib');
|
|
8
8
|
|
|
9
|
-
const {rename, unlink} = require('fs/promises');
|
|
9
|
+
const {rename, unlink} = require('node:fs/promises');
|
|
10
10
|
|
|
11
11
|
const yazl = require('yazl');
|
|
12
12
|
const pipe = require('pipe-io');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redzip",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "lib/redzip.js",
|
|
6
6
|
"description": "work with files inside archives like with regular files",
|
|
@@ -42,9 +42,8 @@
|
|
|
42
42
|
"@babel/core": "^7.12.10",
|
|
43
43
|
"@babel/eslint-parser": "^7.12.1",
|
|
44
44
|
"@iocmd/wait": "^2.1.0",
|
|
45
|
-
"c8": "^
|
|
46
|
-
"eslint": "^
|
|
47
|
-
"eslint-plugin-n": "^16.0.1",
|
|
45
|
+
"c8": "^10.1.2",
|
|
46
|
+
"eslint": "^9.9.0",
|
|
48
47
|
"eslint-plugin-putout": "^22.4.1",
|
|
49
48
|
"madrun": "^10.0.1",
|
|
50
49
|
"memfs": "^4.2.1",
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
"mock-require": "^3.0.1",
|
|
53
52
|
"nodemon": "^3.0.1",
|
|
54
53
|
"pullout": "^5.0.1",
|
|
55
|
-
"putout": "^
|
|
54
|
+
"putout": "^36.0.4",
|
|
56
55
|
"supertape": "^10.4.0"
|
|
57
56
|
},
|
|
58
57
|
"keywords": [
|