@modern-js/core 1.18.1-alpha.0 → 1.19.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,15 +1,29 @@
1
1
  # @modern-js/core
2
2
 
3
- ## 1.18.1-alpha.0
3
+ ## 1.19.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - d2cfa69: feat: add production env for release command
8
+ feat: 为 release 命令增加 production 环境变量
9
+ - @modern-js/node-bundle-require@1.19.0
10
+ - @modern-js/plugin@1.19.0
11
+ - @modern-js/utils@1.19.0
12
+
13
+ ## 1.18.1
14
+
15
+ ### Patch Changes
16
+
17
+ - 318e149: fix: tools.devServer type missing some properties
18
+
19
+ fix: 修复 tools.devServer 类型定义不完整的问题
20
+
7
21
  - Updated dependencies [c1a4d9b]
8
22
  - Updated dependencies [9fcfbd4]
9
23
  - Updated dependencies [6c2c745]
10
- - @modern-js/plugin@1.18.1-alpha.0
11
- - @modern-js/utils@1.18.1-alpha.0
12
- - @modern-js/node-bundle-require@1.18.1-alpha.0
24
+ - @modern-js/plugin@1.18.1
25
+ - @modern-js/utils@1.18.1
26
+ - @modern-js/node-bundle-require@1.18.1
13
27
 
14
28
  ## 1.18.0
15
29
 
package/dist/bin.js CHANGED
@@ -8,7 +8,7 @@ const utils_1 = require("@modern-js/utils");
8
8
  const _1 = require(".");
9
9
  const command = process.argv[2];
10
10
  if (!process.env.NODE_ENV) {
11
- if (['build', 'start', 'deploy'].includes(command)) {
11
+ if (['build', 'start', 'deploy', 'release'].includes(command)) {
12
12
  process.env.NODE_ENV = 'production';
13
13
  }
14
14
  else if (command === 'test') {
@@ -1,6 +1,4 @@
1
- /// <reference types="node" />
2
- import type { IncomingMessage, ServerResponse } from 'http';
3
- import type { NextFunction, BffProxyOptions } from '@modern-js/types';
1
+ import type { DevServerOptions } from '@modern-js/types';
4
2
  import type { MetaOptions, ChainIdentifier, WatchOptions } from '@modern-js/utils';
5
3
  import type { BabelConfig } from '@modern-js/babel-preset-app';
6
4
  import type webpack from 'webpack';
@@ -150,16 +148,6 @@ export interface DeployConfig {
150
148
  domainByEntries?: Record<string, string | Array<string>>;
151
149
  }
152
150
  declare type ConfigFunction = Record<string, unknown> | ((config: Record<string, unknown>, utils?: any) => Record<string, unknown> | void);
153
- export declare type RequestHandler = (req: IncomingMessage, res: ServerResponse, next: NextFunction) => void;
154
- export declare type DevServerConfig = {
155
- hot?: boolean;
156
- liveReload?: boolean;
157
- proxy?: BffProxyOptions;
158
- headers?: Record<string, string>;
159
- before?: RequestHandler[];
160
- after?: RequestHandler[];
161
- [propsName: string]: any;
162
- };
163
151
  export declare type PostCSSConfigUtils = {
164
152
  addPlugins: (plugins: PostCSSPlugin | PostCSSPlugin[]) => void;
165
153
  };
@@ -200,7 +188,7 @@ export interface ToolsConfig {
200
188
  postcss?: PostCSSConfig;
201
189
  styledComponents?: ConfigFunction;
202
190
  lodash?: ConfigFunction;
203
- devServer?: DevServerConfig;
191
+ devServer?: DevServerOptions;
204
192
  tsLoader?: TsLoaderConfig;
205
193
  terser?: TerserConfig;
206
194
  minifyCss?: ConfigFunction;
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "modern",
11
11
  "modern.js"
12
12
  ],
13
- "version": "1.18.1-alpha.0",
13
+ "version": "1.19.0",
14
14
  "jsnext:source": "./src/index.ts",
15
15
  "types": "./dist/index.d.ts",
16
16
  "main": "./dist/index.js",
@@ -38,16 +38,16 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@modern-js/node-bundle-require": "1.18.1-alpha.0",
42
- "@modern-js/plugin": "1.18.1-alpha.0",
43
- "@modern-js/utils": "1.18.1-alpha.0"
41
+ "@modern-js/node-bundle-require": "1.19.0",
42
+ "@modern-js/plugin": "1.19.0",
43
+ "@modern-js/utils": "1.19.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@jest/types": "^27.0.6",
47
- "@modern-js/babel-preset-app": "1.18.1-alpha.0",
48
- "@modern-js/types": "1.18.1-alpha.0",
49
- "@scripts/build": "1.18.1-alpha.0",
50
- "@scripts/jest-config": "1.18.1-alpha.0",
47
+ "@modern-js/babel-preset-app": "1.19.0",
48
+ "@modern-js/types": "1.19.0",
49
+ "@scripts/build": "1.19.0",
50
+ "@scripts/jest-config": "1.19.0",
51
51
  "@types/babel__code-frame": "^7.0.3",
52
52
  "@types/babel__core": "^7.1.16",
53
53
  "@types/jest": "^27",
@@ -96,6 +96,5 @@
96
96
  "build": "wireit",
97
97
  "dev": "tsc --watch",
98
98
  "test": "wireit"
99
- },
100
- "readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
99
+ }
101
100
  }