@modern-js/server 2.0.3-alpha.0 → 2.2.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,35 @@
1
1
  # @modern-js/server
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 9fc6de9: chore(devServer): make hmr client protocol configurable
8
+
9
+ chore(devServer): 支持配置 hmr client protocol
10
+
11
+ - Updated dependencies [cb12ee7]
12
+ - Updated dependencies [49eff0c]
13
+ - Updated dependencies [2d3e3df]
14
+ - Updated dependencies [19bb384]
15
+ - @modern-js/server-utils@2.2.0
16
+ - @modern-js/utils@2.2.0
17
+ - @modern-js/prod-server@2.2.0
18
+ - @modern-js/types@2.2.0
19
+
20
+ ## 2.1.0
21
+
22
+ ### Patch Changes
23
+
24
+ - 3d0fb38: fix: remove the prebundle for data loader
25
+ fix: 移除 data loader 的预打包
26
+ - Updated dependencies [837620c]
27
+ - Updated dependencies [8a9482c]
28
+ - @modern-js/utils@2.1.0
29
+ - @modern-js/prod-server@2.1.0
30
+ - @modern-js/server-utils@2.1.0
31
+ - @modern-js/types@2.1.0
32
+
3
33
  ## 2.0.2
4
34
 
5
35
  ### Patch Changes
@@ -39,10 +39,11 @@ import SocketServer from "./socket-server";
39
39
  const noop = () => {
40
40
  };
41
41
  function getHMRClientPath(client) {
42
+ const protocol = (client == null ? void 0 : client.protocol) ? `&protocol=${client.protocol}` : "";
42
43
  const host = (client == null ? void 0 : client.host) ? `&host=${client.host}` : "";
43
44
  const path = (client == null ? void 0 : client.path) ? `&path=${client.path}` : "";
44
45
  const port = (client == null ? void 0 : client.port) ? `&port=${client.port}` : "";
45
- const clientEntry = `${require.resolve("./hmr-client")}?${host}${path}${port}`;
46
+ const clientEntry = `${require.resolve("./hmr-client")}?${host}${path}${port}${protocol}`;
46
47
  return clientEntry;
47
48
  }
48
49
  class DevMiddleware extends EventEmitter {
@@ -65,10 +65,11 @@ var import_socket_server = __toESM(require("./socket-server"));
65
65
  const noop = () => {
66
66
  };
67
67
  function getHMRClientPath(client) {
68
+ const protocol = (client == null ? void 0 : client.protocol) ? `&protocol=${client.protocol}` : "";
68
69
  const host = (client == null ? void 0 : client.host) ? `&host=${client.host}` : "";
69
70
  const path = (client == null ? void 0 : client.path) ? `&path=${client.path}` : "";
70
71
  const port = (client == null ? void 0 : client.port) ? `&port=${client.port}` : "";
71
- const clientEntry = `${require.resolve("./hmr-client")}?${host}${path}${port}`;
72
+ const clientEntry = `${require.resolve("./hmr-client")}?${host}${path}${port}${protocol}`;
72
73
  return clientEntry;
73
74
  }
74
75
  class DevMiddleware extends import_events.EventEmitter {
@@ -239,10 +239,11 @@ import { EventEmitter } from "events";
239
239
  import SocketServer from "./socket-server";
240
240
  var noop = function() {};
241
241
  function getHMRClientPath(client) {
242
+ var protocol = (client === null || client === void 0 ? void 0 : client.protocol) ? "&protocol=".concat(client.protocol) : "";
242
243
  var host = (client === null || client === void 0 ? void 0 : client.host) ? "&host=".concat(client.host) : "";
243
244
  var path = (client === null || client === void 0 ? void 0 : client.path) ? "&path=".concat(client.path) : "";
244
245
  var port = (client === null || client === void 0 ? void 0 : client.port) ? "&port=".concat(client.port) : "";
245
- var clientEntry = "".concat(require.resolve("./hmr-client"), "?").concat(host).concat(path).concat(port);
246
+ var clientEntry = "".concat(require.resolve("./hmr-client"), "?").concat(host).concat(path).concat(port).concat(protocol);
246
247
  return clientEntry;
247
248
  }
248
249
  var DevMiddleware = /*#__PURE__*/ function(EventEmitter) {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.3-alpha.0",
14
+ "version": "2.2.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -30,19 +30,16 @@
30
30
  "dependencies": {
31
31
  "@babel/core": "^7.18.0",
32
32
  "@babel/register": "^7.17.7",
33
- "@modern-js/prod-server": "2.0.2",
34
- "@modern-js/server-utils": "2.0.2",
35
- "@modern-js/types": "2.0.2",
36
- "@modern-js/utils": "2.0.2",
37
33
  "connect-history-api-fallback": "^2.0.0",
38
34
  "minimatch": "^3.0.4",
39
35
  "path-to-regexp": "^6.2.0",
40
- "ws": "^8.2.0"
36
+ "ws": "^8.2.0",
37
+ "@modern-js/prod-server": "2.2.0",
38
+ "@modern-js/server-utils": "2.2.0",
39
+ "@modern-js/types": "2.2.0",
40
+ "@modern-js/utils": "2.2.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@modern-js/server-core": "2.0.2",
44
- "@scripts/build": "2.0.2",
45
- "@scripts/jest-config": "2.0.2",
46
43
  "@types/connect-history-api-fallback": "^1.3.5",
47
44
  "@types/jest": "^27",
48
45
  "@types/minimatch": "^3.0.5",
@@ -54,7 +51,10 @@
54
51
  "tsconfig-paths": "4.1.1",
55
52
  "typescript": "^4",
56
53
  "webpack": "^5.75.0",
57
- "websocket": "^1"
54
+ "websocket": "^1",
55
+ "@modern-js/server-core": "2.2.0",
56
+ "@scripts/jest-config": "2.2.0",
57
+ "@scripts/build": "2.2.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "devcert": "^1.0.0",