@atlaspack/reporter-dev-server 2.14.21-typescript-bc4459c37.0 → 2.14.22-typescript-5ad950d33.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.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaspack/reporter-dev-server
2
2
 
3
+ ## 2.14.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/types@2.15.11
9
+ - @atlaspack/utils@2.17.3
10
+ - @atlaspack/plugin@2.14.21
11
+
3
12
  ## 2.14.20
4
13
 
5
14
  ### Patch Changes
package/lib/HMRServer.js CHANGED
@@ -50,6 +50,8 @@ function _utils() {
50
50
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
51
51
  // @ts-expect-error TS7016
52
52
 
53
+ // @ts-expect-error TS7016
54
+
53
55
  // flow-to-ts helpers
54
56
 
55
57
  // /flow-to-ts helpers
@@ -58,8 +60,6 @@ const FS_CONCURRENCY = 64;
58
60
  const HMR_ENDPOINT = '/__parcel_hmr';
59
61
  const BROADCAST_MAX_ASSETS = 10000;
60
62
  class HMRServer {
61
- // @ts-expect-error TS2564
62
-
63
63
  unresolvedError = null;
64
64
  bundleGraph = null;
65
65
  constructor(options) {
@@ -107,7 +107,6 @@ var _default = exports.default = new (_plugin().Reporter)({
107
107
  }
108
108
  if (hmrOptions && hmrServer) {
109
109
  await hmrServer.stop();
110
- // @ts-expect-error TS2345
111
110
  hmrServers.delete(hmrServer.wss.options.port);
112
111
  }
113
112
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/reporter-dev-server",
3
- "version": "2.14.21-typescript-bc4459c37.0",
3
+ "version": "2.14.22-typescript-5ad950d33.0",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "type": "commonjs",
@@ -26,9 +26,9 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@atlaspack/plugin": "2.14.21-typescript-bc4459c37.0",
30
- "@atlaspack/types": "2.15.11-typescript-bc4459c37.0",
31
- "@atlaspack/utils": "2.17.3-typescript-bc4459c37.0",
29
+ "@atlaspack/plugin": "2.14.22-typescript-5ad950d33.0",
30
+ "@atlaspack/types": "2.15.12-typescript-5ad950d33.0",
31
+ "@atlaspack/utils": "2.17.4-typescript-5ad950d33.0",
32
32
  "connect": "^3.7.0",
33
33
  "ejs": "^3.1.6",
34
34
  "fresh": "^0.5.2",
@@ -40,10 +40,10 @@
40
40
  "ws": "^7.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@atlaspack/babel-preset": "2.14.2-typescript-bc4459c37.0"
43
+ "@atlaspack/babel-preset": "2.14.2-typescript-5ad950d33.0"
44
44
  },
45
45
  "scripts": {
46
46
  "check-ts": "tsc --emitDeclarationOnly --rootDir src"
47
47
  },
48
- "gitHead": "bc4459c37a38ef1f74772126637e1d8841d1fcb0"
48
+ "gitHead": "5ad950d33a5f2255ebeb10c04a2e84c346e2de85"
49
49
  }
package/src/HMRServer.ts CHANGED
@@ -21,6 +21,7 @@ import nullthrows from 'nullthrows';
21
21
  import url from 'url';
22
22
  // @ts-expect-error TS7016
23
23
  import mime from 'mime-types';
24
+ // @ts-expect-error TS7016
24
25
  import WebSocket from 'ws';
25
26
  import invariant from 'assert';
26
27
  import {
@@ -82,7 +83,6 @@ const HMR_ENDPOINT = '/__parcel_hmr';
82
83
  const BROADCAST_MAX_ASSETS = 10000;
83
84
 
84
85
  export default class HMRServer {
85
- // @ts-expect-error TS2564
86
86
  wss: WebSocket.Server;
87
87
  unresolvedError: HMRMessage | null = null;
88
88
  options: HMRServerOptions;
@@ -120,13 +120,13 @@ export default class HMRServer {
120
120
  }
121
121
  this.wss = new WebSocket.Server({server});
122
122
 
123
- this.wss.on('connection', (ws) => {
123
+ this.wss.on('connection', (ws: any) => {
124
124
  if (this.unresolvedError) {
125
125
  ws.send(JSON.stringify(this.unresolvedError));
126
126
  }
127
127
  });
128
128
 
129
- this.wss.on('error', (err) => this.handleSocketError(err));
129
+ this.wss.on('error', (err: any) => this.handleSocketError(err));
130
130
  }
131
131
 
132
132
  handle(req: Request, res: Response): boolean {
@@ -92,7 +92,6 @@ export default new Reporter({
92
92
  }
93
93
  if (hmrOptions && hmrServer) {
94
94
  await hmrServer.stop();
95
- // @ts-expect-error TS2345
96
95
  hmrServers.delete(hmrServer.wss.options.port);
97
96
  }
98
97
  break;