redzip 4.3.0 → 4.4.0

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,8 @@
1
+ 2026.02.26, v4.4.0
2
+
3
+ feature:
4
+ - 47b3069 redzip: local: write: keep mtime of parent directory when creating directory (coderaiser/cloudcmd#457)
5
+
1
6
  2026.02.25, v4.3.0
2
7
 
3
8
  feature:
@@ -41,18 +41,21 @@ export const write = async (outerPath, innerPath, readStream, options = {}) => {
41
41
  date,
42
42
  } = options;
43
43
 
44
+ const dirPath = dirname(outerPath);
45
+ const {date: dirDate} = await readStat(dirPath);
46
+
44
47
  if (!readStream) {
45
48
  await mkdir(outerPath, {
46
49
  recursive: true,
47
50
  mode,
48
51
  });
52
+
49
53
  await maybeSetDate(outerPath, date);
54
+ await maybeSetDate(dirPath, dirDate);
50
55
 
51
56
  return;
52
57
  }
53
58
 
54
- const dirPath = dirname(outerPath);
55
-
56
59
  await mkdir(dirPath, {
57
60
  recursive: true,
58
61
  });
@@ -64,8 +67,6 @@ export const write = async (outerPath, innerPath, readStream, options = {}) => {
64
67
  if (unzip)
65
68
  return await pipe([readStream, createGunzip(), writeStream]);
66
69
 
67
- const {date: dirDate} = await readStat(dirPath);
68
-
69
70
  await pipe([readStream, writeStream]);
70
71
 
71
72
  await maybeSetDate(outerPath, date);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redzip",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "type": "module",
5
5
  "main": "lib/redzip.js",
6
6
  "description": "work with files inside archives like with regular files",