copymitter 8.0.0 → 8.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 +14 -0
- package/README.md +3 -7
- package/lib/copymitter.js +4 -3
- package/package.json +6 -6
package/ChangeLog
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
2023.08.09, v8.1.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 20671e7 package: rimraf v5.0.1
|
|
5
|
+
- 643c877 package: c8 v8.0.1
|
|
6
|
+
- c2a65a3 package: eslint-plugin-putout v19.0.3
|
|
7
|
+
- e038810 package: putout v31.0.4
|
|
8
|
+
- fa90ae3 package: redzip v3.0.0
|
|
9
|
+
|
|
10
|
+
2023.03.21, v8.0.1
|
|
11
|
+
|
|
12
|
+
fix:
|
|
13
|
+
- 1dfcd9c readme: badge
|
|
14
|
+
|
|
1
15
|
2023.03.21, v8.0.0
|
|
2
16
|
|
|
3
17
|
feature:
|
package/README.md
CHANGED
|
@@ -18,11 +18,7 @@ const from = `${cwd}/pipe-io`;
|
|
|
18
18
|
const to = `${cwd}/example`;
|
|
19
19
|
const abortOnError = false;
|
|
20
20
|
|
|
21
|
-
const cp = copymitter(from, to, [
|
|
22
|
-
'LICENSE',
|
|
23
|
-
'README.md',
|
|
24
|
-
'package.json',
|
|
25
|
-
]);
|
|
21
|
+
const cp = copymitter(from, to, ['LICENSE', 'README.md', 'package.json']);
|
|
26
22
|
|
|
27
23
|
cp.on('file', (from, to) => {
|
|
28
24
|
console.log(`${from} -> ${to}`);
|
|
@@ -78,8 +74,8 @@ cp.pause();
|
|
|
78
74
|
MIT
|
|
79
75
|
|
|
80
76
|
[NPMIMGURL]: https://img.shields.io/npm/v/copymitter.svg?style=flat
|
|
81
|
-
[BuildStatusURL]: https://github.com/coderaiser/copymitter/actions?query=workflow%3A%22Node+CI%22 "Build Status"
|
|
82
|
-
[BuildStatusIMGURL]: https://github.com/coderaiser/copymitter/workflows/Node%20CI/badge.svg
|
|
77
|
+
[BuildStatusURL]: https://github.com/coderaiser/node-copymitter/actions?query=workflow%3A%22Node+CI%22 "Build Status"
|
|
78
|
+
[BuildStatusIMGURL]: https://github.com/coderaiser/node-copymitter/workflows/Node%20CI/badge.svg
|
|
83
79
|
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
|
|
84
80
|
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/node-copymitter/badge.svg?branch=master&service=github
|
|
85
81
|
[NPMURL]: https://npmjs.org/package/copymitter "npm"
|
package/lib/copymitter.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const isString = (a) => typeof a === 'string';
|
|
3
4
|
const path = require('path');
|
|
4
5
|
const {readlink} = require('fs/promises');
|
|
5
6
|
const {inherits} = require('util');
|
|
@@ -124,6 +125,7 @@ Copymitter.prototype._cpAll = function() {
|
|
|
124
125
|
|
|
125
126
|
const copyDir = async (from, to) => {
|
|
126
127
|
const {mode} = await readStat(from);
|
|
128
|
+
|
|
127
129
|
await write(to, null, {
|
|
128
130
|
mode,
|
|
129
131
|
});
|
|
@@ -241,13 +243,12 @@ Copymitter.prototype._progress = function() {
|
|
|
241
243
|
};
|
|
242
244
|
|
|
243
245
|
function check(from, to, files) {
|
|
244
|
-
if (
|
|
246
|
+
if (!isString(from))
|
|
245
247
|
throw Error('from should be a string!');
|
|
246
248
|
|
|
247
|
-
if (
|
|
249
|
+
if (!isString(to))
|
|
248
250
|
throw Error('to should be a string!');
|
|
249
251
|
|
|
250
252
|
if (!Array.isArray(files))
|
|
251
253
|
throw Error('files should be an array!');
|
|
252
254
|
}
|
|
253
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copymitter",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "copy files with emitter",
|
|
6
6
|
"main": "lib/copymitter.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"findit2": "^2.2.3",
|
|
22
22
|
"fullstore": "^3.0.0",
|
|
23
23
|
"mkdirp": "^2.1.5",
|
|
24
|
-
"redzip": "^
|
|
24
|
+
"redzip": "^3.0.0",
|
|
25
25
|
"squad": "^3.0.0",
|
|
26
26
|
"through2": "^4.0.2",
|
|
27
27
|
"try-to-catch": "^3.0.0",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@iocmd/wait": "^2.1.0",
|
|
32
|
-
"c8": "^
|
|
32
|
+
"c8": "^8.0.1",
|
|
33
33
|
"eslint": "^8.25.0",
|
|
34
34
|
"eslint-plugin-node": "^11.0.0",
|
|
35
|
-
"eslint-plugin-putout": "^
|
|
35
|
+
"eslint-plugin-putout": "^19.0.3",
|
|
36
36
|
"madrun": "^9.0.6",
|
|
37
37
|
"mock-require": "^3.0.3",
|
|
38
38
|
"nodemon": "^2.0.2",
|
|
39
39
|
"pullout": "^4.0.0",
|
|
40
|
-
"putout": "^
|
|
41
|
-
"rimraf": "^
|
|
40
|
+
"putout": "^31.0.4",
|
|
41
|
+
"rimraf": "^5.0.1",
|
|
42
42
|
"supertape": "^8.1.0",
|
|
43
43
|
"try-catch": "^3.0.0"
|
|
44
44
|
},
|