@modern-js/types 2.20.0 → 2.21.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,19 @@
1
1
  # @modern-js/types
2
2
 
3
+ ## 2.21.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ef03dc: feat(dev-server): enable gzip compression, add devServer.compress config
8
+
9
+ feat(dev-server): 默认启用 gzip 压缩,新增 devServer.compress 配置项
10
+
11
+ - 43b4e83: feat: support security.nonce for add nonce attribute on script tag
12
+ feat: 支持 security.nonce 配置,为 script 标签添加 nonce 属性
13
+ - ad78387: chore(deps): bump babel-related dependencies to latest version
14
+
15
+ chore(deps): 升级 babel 相关依赖到最新版本
16
+
3
17
  ## 2.20.0
4
18
 
5
19
  ### Minor Changes
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.20.0",
18
+ "version": "2.21.0",
19
19
  "types": "./index.d.ts",
20
20
  "exports": {
21
21
  ".": {
@@ -39,14 +39,14 @@
39
39
  }
40
40
  },
41
41
  "devDependencies": {
42
- "@types/babel__core": "^7.1.19",
42
+ "@types/babel__core": "^7.20.0",
43
43
  "@types/jest": "^29",
44
44
  "@types/node": "^14",
45
45
  "http-proxy-middleware": "^2.0.4",
46
46
  "jest": "^29",
47
47
  "type-fest": "2.15.0",
48
- "@scripts/build": "2.20.0",
49
- "@scripts/jest-config": "2.20.0"
48
+ "@scripts/build": "2.21.0",
49
+ "@scripts/jest-config": "2.21.0"
50
50
  },
51
51
  "sideEffects": false,
52
52
  "publishConfig": {
@@ -89,6 +89,8 @@ export type BaseSSRServerContext = {
89
89
 
90
90
  enableUnsafeCtx?: boolean;
91
91
 
92
+ nonce?: string;
93
+
92
94
  req: ModernServerContext['req'];
93
95
 
94
96
  res: ModernServerContext['res'];
@@ -24,6 +24,8 @@ export type DevServerOptions = {
24
24
  host?: string;
25
25
  protocol?: string;
26
26
  };
27
+ /** Whether to enable gzip compression */
28
+ compress?: boolean;
27
29
  devMiddleware?: {
28
30
  writeToDisk?: boolean | ((filename: string) => boolean);
29
31
  outputFileSystem?: Record<string, any>;