copymitter 7.0.0 → 8.0.1

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,17 @@
1
+ 2023.03.21, v8.0.1
2
+
3
+ fix:
4
+ - 1dfcd9c readme: badge
5
+
6
+ 2023.03.21, v8.0.0
7
+
8
+ feature:
9
+ - 339dce0 package: eslint-plugin-putout v17.1.0
10
+ - 9dee669 package: mkdirp v2.1.5
11
+ - 033b35c package: putout v29.1.5
12
+ - 20814e4 package: rimraf v4.4.0
13
+ - 6c97038 copymitter: add support of "abort" event
14
+
1
15
  2022.10.09, v7.0.0
2
16
 
3
17
  feature:
package/README.md CHANGED
@@ -14,8 +14,8 @@ npm i copymitter
14
14
  ```js
15
15
  const copymitter = require('copymitter');
16
16
  const cwd = process.cwd();
17
- const from = cwd + '/pipe-io';
18
- const to = cwd + '/example';
17
+ const from = `${cwd}/pipe-io`;
18
+ const to = `${cwd}/example`;
19
19
  const abortOnError = false;
20
20
 
21
21
  const cp = copymitter(from, to, [
@@ -55,6 +55,10 @@ cp.on('error', (error) => {
55
55
  cp.continue();
56
56
  });
57
57
 
58
+ cp.on('abort', () => {
59
+ console.log('Copying aborted');
60
+ });
61
+
58
62
  cp.on('end', ({errors}) => {
59
63
  console.log('Copying ended up');
60
64
  });
@@ -74,8 +78,8 @@ cp.pause();
74
78
  MIT
75
79
 
76
80
  [NPMIMGURL]: https://img.shields.io/npm/v/copymitter.svg?style=flat
77
- [BuildStatusURL]: https://github.com/coderaiser/copymitter/actions?query=workflow%3A%22Node+CI%22 "Build Status"
78
- [BuildStatusIMGURL]: https://github.com/coderaiser/copymitter/workflows/Node%20CI/badge.svg
81
+ [BuildStatusURL]: https://github.com/coderaiser/node-copymitter/actions?query=workflow%3A%22Node+CI%22 "Build Status"
82
+ [BuildStatusIMGURL]: https://github.com/coderaiser/node-copymitter/workflows/Node%20CI/badge.svg
79
83
  [LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
80
84
  [CoverageIMGURL]: https://coveralls.io/repos/coderaiser/node-copymitter/badge.svg?branch=master&service=github
81
85
  [NPMURL]: https://npmjs.org/package/copymitter "npm"
package/lib/copymitter.js CHANGED
@@ -87,7 +87,7 @@ Copymitter.prototype.pause = function() {
87
87
 
88
88
  Copymitter.prototype.abort = function() {
89
89
  this._files = [];
90
- this._cpAll();
90
+ this.emit('abort');
91
91
  };
92
92
 
93
93
  Copymitter.prototype._cpAll = function() {
@@ -105,7 +105,7 @@ Copymitter.prototype._cpAll = function() {
105
105
  const cpEmitter = this.cpOneFile(fromFull, toFull);
106
106
 
107
107
  cpEmitter.on('error', (error) => {
108
- log('cpEmitter error: ' + error);
108
+ log(`cpEmitter error: ${error}`);
109
109
  this.emit('error', error);
110
110
 
111
111
  this._errors.push(error);
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "copymitter",
3
- "version": "7.0.0",
3
+ "version": "8.0.1",
4
4
  "type": "commonjs",
5
- "commitType": "colon",
6
5
  "description": "copy files with emitter",
7
6
  "main": "lib/copymitter.js",
8
7
  "scripts": {
@@ -21,7 +20,7 @@
21
20
  "debug": "^4.0.1",
22
21
  "findit2": "^2.2.3",
23
22
  "fullstore": "^3.0.0",
24
- "mkdirp": "^1.0.3",
23
+ "mkdirp": "^2.1.5",
25
24
  "redzip": "^2.0.0",
26
25
  "squad": "^3.0.0",
27
26
  "through2": "^4.0.2",
@@ -33,13 +32,13 @@
33
32
  "c8": "^7.5.0",
34
33
  "eslint": "^8.25.0",
35
34
  "eslint-plugin-node": "^11.0.0",
36
- "eslint-plugin-putout": "^16.3.0",
35
+ "eslint-plugin-putout": "^17.1.0",
37
36
  "madrun": "^9.0.6",
38
37
  "mock-require": "^3.0.3",
39
38
  "nodemon": "^2.0.2",
40
39
  "pullout": "^4.0.0",
41
- "putout": "^27.13.0",
42
- "rimraf": "^3.0.0",
40
+ "putout": "^29.1.5",
41
+ "rimraf": "^4.4.0",
43
42
  "supertape": "^8.1.0",
44
43
  "try-catch": "^3.0.0"
45
44
  },