copymitter 10.0.2 → 10.1.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,12 @@
1
+ 2026.02.21, v10.1.0
2
+
3
+ feature:
4
+ - c225dda copymitter: date (coderaiser/cloudcmd#457)
5
+ - bb305c3 copymitter: redlint v6.1.1
6
+ - 155a9d2 copymitter: putout v42.0.12
7
+ - cc901ad copymitter: madrun v13.0.0
8
+ - 0ffe11d copymitter: eslint-plugin-putout v31.0.1
9
+
1
10
  2026.02.16, v10.0.2
2
11
 
3
12
  feature:
package/lib/copymitter.js CHANGED
@@ -211,8 +211,12 @@ async function copy(from, to, {emitError, emitFile, emitDirectory, countStream,
211
211
  return emitDirectory();
212
212
  }
213
213
 
214
+ const {date, mode} = info;
215
+
214
216
  const [error] = await tryToCatch(superCopy, from, to, [countStream], {
215
217
  write,
218
+ date,
219
+ mode,
216
220
  });
217
221
 
218
222
  if (error)
@@ -222,7 +226,11 @@ async function copy(from, to, {emitError, emitFile, emitDirectory, countStream,
222
226
  }
223
227
 
224
228
  async function superCopy(from, to, [countStream], overrides) {
225
- const {write} = overrides;
229
+ const {
230
+ write,
231
+ date,
232
+ mode,
233
+ } = overrides;
226
234
  const [, link] = await tryToCatch(readlink, from);
227
235
 
228
236
  if (link) {
@@ -230,13 +238,11 @@ async function superCopy(from, to, [countStream], overrides) {
230
238
  return;
231
239
  }
232
240
 
233
- const [readStream, {mode}] = await Promise.all([
234
- read(from),
235
- readStat(from),
236
- ]);
241
+ const readStream = await read(from);
237
242
 
238
243
  await write(to, readStream.pipe(countStream), {
239
244
  mode,
245
+ date,
240
246
  });
241
247
  }
242
248
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copymitter",
3
- "version": "10.0.2",
3
+ "version": "10.1.0",
4
4
  "type": "module",
5
5
  "description": "copy files with emitter",
6
6
  "main": "lib/copymitter.js",
@@ -31,12 +31,12 @@
31
31
  "@iocmd/wait": "^2.1.0",
32
32
  "c8": "^10.1.3",
33
33
  "eslint": "^10.0.0",
34
- "eslint-plugin-putout": "^30.0.5",
35
- "madrun": "^12.1.3",
34
+ "eslint-plugin-putout": "^31.0.1",
35
+ "madrun": "^13.0.0",
36
36
  "nodemon": "^3.1.0",
37
37
  "pullout": "^5.0.1",
38
- "putout": "^41.25.1",
39
- "redlint": "^5.7.0",
38
+ "putout": "^42.0.12",
39
+ "redlint": "^6.1.1",
40
40
  "rimraf": "^6.1.2",
41
41
  "supertape": "^12.5.0",
42
42
  "try-catch": "^4.0.9"