@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 +9 -0
- package/lib/HMRServer.js +2 -2
- package/lib/ServerReporter.js +0 -1
- package/package.json +6 -6
- package/src/HMRServer.ts +3 -3
- package/src/ServerReporter.ts +0 -1
package/CHANGELOG.md
CHANGED
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) {
|
package/lib/ServerReporter.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/reporter-dev-server",
|
|
3
|
-
"version": "2.14.
|
|
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.
|
|
30
|
-
"@atlaspack/types": "2.15.
|
|
31
|
-
"@atlaspack/utils": "2.17.
|
|
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-
|
|
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": "
|
|
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 {
|