@modern-js/server 2.0.0-beta.1 → 2.0.0-beta.2

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,53 @@
1
1
  # @modern-js/server
2
2
 
3
+ ## 2.0.0-beta.2
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ### Patch Changes
10
+
11
+ - 15bf09d9c8: feat: support completely custom server, export render() api for render single page
12
+ feat: 支持完全自定义 Server,导出 render() 方法用来渲染单个页面
13
+ - 61f21d1e77: fix: ignore the entire distPath for pia ssr bundle
14
+ fix: dist 目录的产物不应该被 ts-node 编译
15
+ - ebbeed1: chore: dev server default cross origin
16
+ chore: 开发环境 Server 默认跨域
17
+ - 14b712da84: fix: use consistent alias type and default value across packages
18
+
19
+ fix: 在各个包中使用一致的 alias 类型定义和默认值
20
+
21
+ - Updated dependencies [9b915e0c10]
22
+ - Updated dependencies [c9e800d39a]
23
+ - Updated dependencies [d032d49]
24
+ - Updated dependencies [15bf09d9c8]
25
+ - Updated dependencies [92f0ead]
26
+ - Updated dependencies [edd1cfb1af]
27
+ - Updated dependencies [cc971eabfc]
28
+ - Updated dependencies [5b9049f2e9]
29
+ - Updated dependencies [6bda14ed71]
30
+ - Updated dependencies [a8642da58f]
31
+ - Updated dependencies [92004d1]
32
+ - Updated dependencies [b8bbe036c7]
33
+ - Updated dependencies [40ed587]
34
+ - Updated dependencies [87c1ff8]
35
+ - Updated dependencies [c2bb0f1]
36
+ - Updated dependencies [d5a31df781]
37
+ - Updated dependencies [dda38c9c3e]
38
+ - Updated dependencies [102d32e4ba]
39
+ - Updated dependencies [8b8e1bb571]
40
+ - Updated dependencies [3bbea92b2a]
41
+ - Updated dependencies [73cd29dd9f]
42
+ - Updated dependencies [18aaf42]
43
+ - Updated dependencies [abf3421a75]
44
+ - Updated dependencies [543be9558e]
45
+ - Updated dependencies [14b712da84]
46
+ - @modern-js/server-utils@2.0.0-beta.2
47
+ - @modern-js/prod-server@2.0.0-beta.2
48
+ - @modern-js/utils@2.0.0-beta.2
49
+ - @modern-js/types@2.0.0-beta.2
50
+
3
51
  ## 2.0.0-beta.1
4
52
 
5
53
  ### Major Changes
@@ -24,9 +24,9 @@ export const enableRegister = (projectRoot, config
24
24
  const existTsNode = checkDep('ts-node', [projectRoot]);
25
25
  const existTsConfigPaths = checkDep('tsconfig-paths', [projectRoot]);
26
26
  if (isTsProject && existTsNode && existTsConfigPaths) {
27
- var _config$output;
27
+ var _config$output$distPa;
28
28
  debug('use ts-node');
29
- const distPath = (config === null || config === void 0 ? void 0 : (_config$output = config.output) === null || _config$output === void 0 ? void 0 : _config$output.path) || 'dist';
29
+ const distPath = ((_config$output$distPa = config.output.distPath) === null || _config$output$distPa === void 0 ? void 0 : _config$output$distPa.root) || 'dist';
30
30
  const tsNode = require('ts-node');
31
31
  const tsConfigPaths = require('tsconfig-paths');
32
32
  const {
@@ -69,6 +69,7 @@ export const enableRegister = (projectRoot, config
69
69
  const babelConfig = resolveBabelConfig(projectRoot, _objectSpread(_objectSpread({}, config.source), {}, {
70
70
  babelConfig: (_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.babel,
71
71
  server: {
72
+ // FIXME: the compiler config from ??
72
73
  compiler: (_config$server = config.server) === null || _config$server === void 0 ? void 0 : _config$server.compiler
73
74
  }
74
75
  }), {
@@ -295,6 +295,8 @@ export class ModernDevServer extends ModernServer {
295
295
  mock
296
296
  } = AGGRED_DIR;
297
297
  const defaultWatched = [`${mock}/**/*`, `${SERVER_DIR}/**/*`, `${API_DIR}/**`, `${SHARED_DIR}/**/*`];
298
+
299
+ // FIXME: the server config.watchOptions;
298
300
  const watchOptions = mergeWatchOptions((_this$conf$server = this.conf.server) === null || _this$conf$server === void 0 ? void 0 : _this$conf$server.watchOptions);
299
301
  const defaultWatchedPaths = defaultWatched.map(p => path.normalize(path.join(pwd, p)));
300
302
  const watcher = new Watcher();
@@ -31,9 +31,9 @@ const enableRegister = (projectRoot, config
31
31
  const existTsNode = checkDep('ts-node', [projectRoot]);
32
32
  const existTsConfigPaths = checkDep('tsconfig-paths', [projectRoot]);
33
33
  if (isTsProject && existTsNode && existTsConfigPaths) {
34
- var _config$output;
34
+ var _config$output$distPa;
35
35
  debug('use ts-node');
36
- const distPath = (config === null || config === void 0 ? void 0 : (_config$output = config.output) === null || _config$output === void 0 ? void 0 : _config$output.path) || 'dist';
36
+ const distPath = ((_config$output$distPa = config.output.distPath) === null || _config$output$distPa === void 0 ? void 0 : _config$output$distPa.root) || 'dist';
37
37
  const tsNode = require('ts-node');
38
38
  const tsConfigPaths = require('tsconfig-paths');
39
39
  const {
@@ -76,6 +76,7 @@ const enableRegister = (projectRoot, config
76
76
  const babelConfig = (0, _serverUtils.resolveBabelConfig)(projectRoot, _objectSpread(_objectSpread({}, config.source), {}, {
77
77
  babelConfig: (_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.babel,
78
78
  server: {
79
+ // FIXME: the compiler config from ??
79
80
  compiler: (_config$server = config.server) === null || _config$server === void 0 ? void 0 : _config$server.compiler
80
81
  }
81
82
  }), {
@@ -304,6 +304,8 @@ class ModernDevServer extends _prodServer.ModernServer {
304
304
  mock
305
305
  } = _prodServer.AGGRED_DIR;
306
306
  const defaultWatched = [`${mock}/**/*`, `${_utils.SERVER_DIR}/**/*`, `${_utils.API_DIR}/**`, `${_utils.SHARED_DIR}/**/*`];
307
+
308
+ // FIXME: the server config.watchOptions;
307
309
  const watchOptions = (0, _watcher.mergeWatchOptions)((_this$conf$server = this.conf.server) === null || _this$conf$server === void 0 ? void 0 : _this$conf$server.watchOptions);
308
310
  const defaultWatchedPaths = defaultWatched.map(p => _path.default.normalize(_path.default.join(pwd, p)));
309
311
  const watcher = new _watcher.default();
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.1",
14
+ "version": "2.0.0-beta.2",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -35,10 +35,10 @@
35
35
  "minimatch": "^3.0.4",
36
36
  "path-to-regexp": "^6.2.0",
37
37
  "ws": "^8.2.0",
38
- "@modern-js/prod-server": "2.0.0-beta.1",
39
- "@modern-js/server-utils": "2.0.0-beta.1",
40
- "@modern-js/types": "2.0.0-beta.1",
41
- "@modern-js/utils": "2.0.0-beta.1"
38
+ "@modern-js/prod-server": "2.0.0-beta.2",
39
+ "@modern-js/server-utils": "2.0.0-beta.2",
40
+ "@modern-js/types": "2.0.0-beta.2",
41
+ "@modern-js/utils": "2.0.0-beta.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/connect-history-api-fallback": "^1.3.5",
@@ -53,10 +53,9 @@
53
53
  "typescript": "^4",
54
54
  "webpack": "^5.74.0",
55
55
  "websocket": "^1",
56
- "@modern-js/core": "2.0.0-beta.1",
57
- "@modern-js/server-core": "2.0.0-beta.1",
58
- "@scripts/build": "2.0.0-beta.1",
59
- "@scripts/jest-config": "2.0.0-beta.1"
56
+ "@modern-js/server-core": "2.0.0-beta.2",
57
+ "@scripts/build": "2.0.0-beta.2",
58
+ "@scripts/jest-config": "2.0.0-beta.2"
60
59
  },
61
60
  "peerDependencies": {
62
61
  "ts-node": "^10.1.0",
@@ -73,9 +72,9 @@
73
72
  "access": "public"
74
73
  },
75
74
  "scripts": {
76
- "new": "modern new",
77
- "build": "modern build",
78
- "dev": "modern build --watch",
75
+ "new": "modern-lib new",
76
+ "build": "modern-lib build",
77
+ "dev": "modern-lib build --watch",
79
78
  "test": "jest"
80
79
  }
81
80
  }