@modern-js/utils 1.17.0 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +17 -0
- package/dist/chainId.d.ts +4 -0
- package/dist/chainId.js +4 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/path.d.ts +1 -0
- package/dist/path.js +6 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
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
|
+
|
3
20
|
## 1.17.0
|
4
21
|
|
5
22
|
### 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: {
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
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
|
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.
|
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.
|
129
|
-
"@scripts/build": "1.
|
130
|
-
"@scripts/jest-config": "1.
|
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",
|