redzip 3.0.1 → 3.0.2

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 CHANGED
@@ -1,3 +1,16 @@
1
+ 2024.03.18, v3.0.2
2
+
3
+ feature:
4
+ - 356e6b6 redzip: trammel v6.0.0
5
+ - 71c82c0 redzip: madrun v10.0.1
6
+ - 3962b3a redzip: drop support of node < 18
7
+ - ce55ca2 redzip: supertape v10.4.0
8
+ - 5f558a7 redzip: putout v35.7.5
9
+ - 47b77d7 redzip: eslint-plugin-putout v22.4.1
10
+ - d37ab44 redzip: c8 v9.1.0
11
+ - 512855e redzip: pullout v5.0.1
12
+ - 3bd967e redzip: yauzl v3.1.2
13
+
1
14
  2023.08.10, v3.0.1
2
15
 
3
16
  feature:
package/README.md CHANGED
@@ -155,7 +155,7 @@ When you need to save `string`, or `Buffer` use [Readable.from](https://nodejs.o
155
155
  #### Example
156
156
 
157
157
  ```js
158
- import {Readable} from 'stream';
158
+ import {Readable} from 'node:stream';
159
159
  import {write} from 'redzip';
160
160
  import pullout from 'pullout';
161
161
 
@@ -175,7 +175,7 @@ await pullout(await read(path));
175
175
  // returns
176
176
  'hello';
177
177
 
178
- import {createGzip} from 'zlib';
178
+ import {createGzip} from 'node:zlib';
179
179
 
180
180
  const zipStream = Readable
181
181
  .from('hello')
@@ -67,9 +67,8 @@ module.exports.remove = async (outerPath) => {
67
67
  if (!error)
68
68
  return;
69
69
 
70
- if (notDir(error) || winNotDir(error)) {
70
+ if (notDir(error) || winNotDir(error))
71
71
  return await unlink(outerPath);
72
- }
73
72
 
74
73
  throw error;
75
74
  };
@@ -157,7 +156,8 @@ async function* walk(dir) {
157
156
  if (dirent.isDirectory()) {
158
157
  yield path;
159
158
  yield* await walk(path);
160
- } else
159
+ } else {
161
160
  yield path;
161
+ }
162
162
  }
163
163
  }
@@ -47,9 +47,8 @@ module.exports = async (outerPath, innerPath, options = {}) => {
47
47
  path.stop();
48
48
  }
49
49
 
50
- if (path.isDirectory(inner)) {
50
+ if (path.isDirectory(inner))
51
51
  found = true;
52
- }
53
52
 
54
53
  if (directory === inner) {
55
54
  const type = path.isDirectory() ? 'directory' : 'file';
@@ -65,9 +64,8 @@ module.exports = async (outerPath, innerPath, options = {}) => {
65
64
  }
66
65
  }
67
66
 
68
- if (!found) {
67
+ if (!found)
69
68
  throw createError(innerPath);
70
- }
71
69
 
72
70
  if (stream)
73
71
  return stream;
@@ -13,7 +13,7 @@ module.exports = async (outerPath, innerPath) => {
13
13
  mode,
14
14
  } = path;
15
15
 
16
- if (path.isFile(innerPath)) {
16
+ if (path.isFile(innerPath))
17
17
  return {
18
18
  type: 'file',
19
19
  name,
@@ -22,9 +22,8 @@ module.exports = async (outerPath, innerPath) => {
22
22
  owner: 0,
23
23
  mode,
24
24
  };
25
- }
26
25
 
27
- if (path.isDirectory(innerPath)) {
26
+ if (path.isDirectory(innerPath))
28
27
  return {
29
28
  type: 'dir',
30
29
  name,
@@ -33,7 +32,6 @@ module.exports = async (outerPath, innerPath) => {
33
32
  owner: 0,
34
33
  mode,
35
34
  };
36
- }
37
35
  }
38
36
 
39
37
  const error = Error(`ENOENT: no such file or directory, stat '${outerPath}${innerPath}'`);
@@ -72,9 +72,8 @@ async function update(outerPath, innerPath, stream, zipfile, {remove}) {
72
72
  const {entry} = path;
73
73
  ++count;
74
74
 
75
- if (path.isFile(innerPath) || path.isDirectory(innerPath)) {
75
+ if (path.isFile(innerPath) || path.isDirectory(innerPath))
76
76
  continue;
77
- }
78
77
 
79
78
  if (path.isFile()) {
80
79
  stream = await path.openReadStream();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redzip",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "type": "commonjs",
5
5
  "main": "lib/redzip.js",
6
6
  "description": "work with files inside archives like with regular files",
@@ -32,28 +32,28 @@
32
32
  "readify": "^9.0.0",
33
33
  "readzip": "^2.0.0",
34
34
  "totalist": "^3.0.1",
35
- "trammel": "^5.0.0",
35
+ "trammel": "^6.0.0",
36
36
  "try-to-catch": "^3.0.0",
37
37
  "wraptile": "^3.0.0",
38
- "yauzl": "^2.10.0",
38
+ "yauzl": "^3.1.2",
39
39
  "yazl": "^2.5.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@babel/core": "^7.12.10",
43
43
  "@babel/eslint-parser": "^7.12.1",
44
44
  "@iocmd/wait": "^2.1.0",
45
- "c8": "^8.0.1",
45
+ "c8": "^9.1.0",
46
46
  "eslint": "^8.4.1",
47
47
  "eslint-plugin-n": "^16.0.1",
48
- "eslint-plugin-putout": "^19.0.3",
49
- "madrun": "^9.3.1",
48
+ "eslint-plugin-putout": "^22.4.1",
49
+ "madrun": "^10.0.1",
50
50
  "memfs": "^4.2.1",
51
51
  "mock-fs": "^5.0.0",
52
52
  "mock-require": "^3.0.1",
53
53
  "nodemon": "^3.0.1",
54
- "pullout": "^4.0.0",
55
- "putout": "^31.0.4",
56
- "supertape": "^8.4.1"
54
+ "pullout": "^5.0.1",
55
+ "putout": "^35.7.5",
56
+ "supertape": "^10.4.0"
57
57
  },
58
58
  "keywords": [
59
59
  "directory",
@@ -65,7 +65,7 @@
65
65
  "zip"
66
66
  ],
67
67
  "engines": {
68
- "node": ">=16"
68
+ "node": ">=18"
69
69
  },
70
70
  "license": "MIT"
71
71
  }