@e-mc/watch 0.8.6 → 0.8.7

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.
Files changed (3) hide show
  1. package/README.md +6 -6
  2. package/index.js +1 -10
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/index.d.ts
12
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/index.d.ts
13
13
 
14
14
  ```typescript
15
15
  import type { IFileManager, ModuleConstructor } from "./index";
@@ -57,11 +57,11 @@ interface WatchConstructor extends ModuleConstructor {
57
57
 
58
58
  ## References
59
59
 
60
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/asset.d.ts
61
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/core.d.ts
62
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/filemanager.d.ts
63
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/settings.d.ts
64
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/watch.d.ts
60
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/asset.d.ts
61
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/core.d.ts
62
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/filemanager.d.ts
63
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/settings.d.ts
64
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/watch.d.ts
65
65
 
66
66
  ## LICENSE
67
67
 
package/index.js CHANGED
@@ -26,15 +26,6 @@ const DISK_MAP = new Map();
26
26
  const PORT_MAP = new Map();
27
27
  const SECURE_MAP = new Map();
28
28
  let STATE_MAP = new WeakSet();
29
- function isConnectionTimeout(err) {
30
- switch (err instanceof Error && err.code) {
31
- case 'ETIMEDOUT':
32
- case 'ECONNRESET':
33
- return true;
34
- default:
35
- return false;
36
- }
37
- }
38
29
  function abortTimeout(group) {
39
30
  group.timeout.aborted = true;
40
31
  const watcher = group.watcher;
@@ -509,7 +500,7 @@ class Watch extends core_1.Client {
509
500
  resolve();
510
501
  })
511
502
  .on('error', err => {
512
- if (!timeout.aborted && !(isConnectionTimeout(err) && ++timeout.retries <= 10)) {
503
+ if (!timeout.aborted && !(core_1.Client.isErrorCode(err, 'ETIMEDOUT', 'ECONNRESET') && ++timeout.retries <= 10)) {
513
504
  reject(err);
514
505
  return;
515
506
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/watch",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "description": "Watch constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,9 +20,9 @@
20
20
  "license": "BSD 3-Clause",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/core": "0.8.6",
24
- "@e-mc/request": "0.8.6",
25
- "@e-mc/types": "0.8.6",
23
+ "@e-mc/core": "0.8.7",
24
+ "@e-mc/request": "0.8.7",
25
+ "@e-mc/types": "0.8.7",
26
26
  "picomatch": "^3.0.1",
27
27
  "ws": "^8.16.0"
28
28
  }