@modern-js/utils 1.16.0-alpha.underfin.1 → 1.18.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,60 @@
1
1
  # @modern-js/utils
2
2
 
3
+ ## 1.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5227370: feat: add webpack-builder plugin subresource-integrity
8
+ feat: 新增 webpack-builder 插件 subresource-integrity
9
+
10
+ ### Patch Changes
11
+
12
+ - 8280920: feat: change hmr sock path to /webpack-hmr
13
+
14
+ feat: 热更新 socket 请求的 path 修改为 /webpack-hmr
15
+
16
+ - 7928bae: chore: add inspector plugin
17
+
18
+ chore: 增加 Inspector 插件
19
+
20
+ ## 1.17.0
21
+
22
+ ### Minor Changes
23
+
24
+ - 1b9176f: feat(utils): add TOML to CHAIN_ID.RULE
25
+
26
+ feat(utils): 向 CHAIN_ID.RULE 中增加新常量 TOML
27
+
28
+ ### Patch Changes
29
+
30
+ - 77d3a38: feat: runtime export utils not write d.ts file
31
+
32
+ feat: runtime 生成 export 函数不再支持生成 d.ts 文件
33
+
34
+ - 151329d: chore(dev-server): no longer depend on @modern-js/webpack
35
+
36
+ chore(dev-server): 不再依赖 @modern-js/webpack
37
+
38
+ - 5af9472: feat(utils): add PUG to CHAIN_ID
39
+
40
+ feat(utils): CHAIN_ID 常量新增 PUG 值
41
+
42
+ - 6b6a534: chore: export getAddressUrls method
43
+
44
+ chore: 导出 getAddressUrls 方法
45
+
46
+ - 6b43a2b: feat(utils): add SVG_ASSET to CHAIN_ID
47
+
48
+ feat(utils): CHAIN_ID 常量新增 SVG_ASSET 值
49
+
50
+ - a7be124: feat(utils): add MODULE_DEPENDENCY_ERROR to CHAIN_ID
51
+
52
+ feat(utils): CHAIN_ID 常量新增 MODULE_DEPENDENCY_ERROR 值
53
+
54
+ - 31547b4: feat(utils): add YAML to CHAIN_ID.RULE
55
+
56
+ feat(utils): 向 CHAIN_ID.RULE 中增加新常量 YAML
57
+
3
58
  ## 1.16.0
4
59
 
5
60
  ### Minor Changes
package/dist/chainId.d.ts CHANGED
@@ -108,6 +108,8 @@ export declare const CHAIN_ID: {
108
108
  readonly BANNER: "banner";
109
109
  /** Webpackbar */
110
110
  readonly PROGRESS: "progress";
111
+ /** Inspector */
112
+ readonly INSPECTOR: "inspector";
111
113
  /** AppIconPlugin */
112
114
  readonly APP_ICON: "app-icon";
113
115
  /** LoadableWebpackPlugin */
@@ -132,6 +134,8 @@ export declare const CHAIN_ID: {
132
134
  readonly NODE_POLYFILL_PROVIDE: "node-polyfill-provide";
133
135
  /** ModuleDependencyErrorPlugin */
134
136
  readonly MODULE_DEPENDENCY_ERROR: "module-dependency-error";
137
+ /** WebpackSRIPlugin */
138
+ readonly SUBRESOURCE_INTEGRITY: "subresource-integrity";
135
139
  };
136
140
  /** Predefined minimizers */
137
141
  readonly MINIMIZER: {
package/dist/chainId.js CHANGED
@@ -111,6 +111,8 @@ exports.CHAIN_ID = {
111
111
  BANNER: 'banner',
112
112
  /** Webpackbar */
113
113
  PROGRESS: 'progress',
114
+ /** Inspector */
115
+ INSPECTOR: 'inspector',
114
116
  /** AppIconPlugin */
115
117
  APP_ICON: 'app-icon',
116
118
  /** LoadableWebpackPlugin */
@@ -135,6 +137,8 @@ exports.CHAIN_ID = {
135
137
  NODE_POLYFILL_PROVIDE: 'node-polyfill-provide',
136
138
  /** ModuleDependencyErrorPlugin */
137
139
  MODULE_DEPENDENCY_ERROR: 'module-dependency-error',
140
+ /** WebpackSRIPlugin */
141
+ SUBRESOURCE_INTEGRITY: 'subresource-integrity',
138
142
  },
139
143
  /** Predefined minimizers */
140
144
  MINIMIZER: {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * hmr socket connect path
3
3
  */
4
- export declare const HMR_SOCK_PATH = "/_modern_js_hmr_ws";
4
+ export declare const HMR_SOCK_PATH = "/webpack-hmr";
5
5
  /**
6
6
  * route specification file
7
7
  */
package/dist/constants.js CHANGED
@@ -4,7 +4,7 @@ exports.PLUGIN_SCHEMAS = exports.INTERNAL_PLUGINS = exports.DEFAULT_SERVER_CONFI
4
4
  /**
5
5
  * hmr socket connect path
6
6
  */
7
- exports.HMR_SOCK_PATH = '/_modern_js_hmr_ws';
7
+ exports.HMR_SOCK_PATH = '/webpack-hmr';
8
8
  /**
9
9
  * route specification file
10
10
  */
package/dist/path.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export declare const isPathString: (test: string) => boolean;
1
2
  export declare const isRelativePath: (test: string) => boolean;
2
3
  export declare const normalizeOutputPath: (s: string) => string;
3
4
  export declare const normalizeToPosixPath: (p: string | undefined) => string;
package/dist/path.js CHANGED
@@ -3,12 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.normalizeToPosixPath = exports.normalizeOutputPath = exports.isRelativePath = void 0;
6
+ exports.normalizeToPosixPath = exports.normalizeOutputPath = exports.isRelativePath = exports.isPathString = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const compiled_1 = require("./compiled");
9
+ const isPathString = (test) => path_1.default.posix.basename(test) !== test || path_1.default.win32.basename(test) !== test;
10
+ exports.isPathString = isPathString;
9
11
  const isRelativePath = (test) => /^\.\.?($|[\\/])/.test(test);
10
12
  exports.isRelativePath = isRelativePath;
11
13
  const normalizeOutputPath = (s) => s.replace(/\\/g, '\\\\');
12
14
  exports.normalizeOutputPath = normalizeOutputPath;
13
- const normalizeToPosixPath = (p) => compiled_1.upath.normalizeSafe(path_1.default.normalize(p || ''));
15
+ const normalizeToPosixPath = (p) => compiled_1.upath
16
+ .normalizeSafe(path_1.default.normalize(p || ''))
17
+ .replace(/^([a-zA-Z]+):/, (_, m) => `/${m.toLowerCase()}`);
14
18
  exports.normalizeToPosixPath = normalizeToPosixPath;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.16.0-alpha.underfin.001",
14
+ "version": "1.18.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/index.d.ts",
17
17
  "main": "./dist/index.js",
@@ -125,9 +125,9 @@
125
125
  "lodash": "^4.17.21"
126
126
  },
127
127
  "devDependencies": {
128
- "@modern-js/types": "1.16.0",
129
- "@scripts/build": "1.15.0",
130
- "@scripts/jest-config": "1.15.0",
128
+ "@modern-js/types": "1.18.0",
129
+ "@scripts/build": "1.18.0",
130
+ "@scripts/jest-config": "1.18.0",
131
131
  "@types/jest": "^27",
132
132
  "@types/node": "^14",
133
133
  "typescript": "^4",