@modern-js/utils 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +39 -1
- package/compiled/better-ajv-errors/index.js +1 -1
- package/compiled/browserslist/index.js +1 -1
- package/compiled/execa/index.js +1 -1
- package/compiled/fast-glob/index.js +2 -2
- package/compiled/glob/index.js +1 -1
- package/compiled/inquirer/index.js +1 -1
- package/compiled/ora/index.js +2 -2
- package/compiled/schema-utils3/index.d.ts +1 -0
- package/compiled/schema-utils3/index.js +3 -0
- package/compiled/schema-utils3/license +20 -0
- package/compiled/schema-utils3/package.json +1 -0
- package/compiled/webpack-dev-middleware/index.js +7 -0
- package/compiled/webpack-dev-middleware/license +20 -0
- package/compiled/webpack-dev-middleware/package.json +1 -0
- package/compiled/webpack-dev-middleware/types/index.d.ts +257 -0
- package/dist/chainId.d.ts +13 -2
- package/dist/chainId.js +13 -2
- package/dist/prettyInstructions.d.ts +4 -0
- package/dist/prettyInstructions.js +3 -2
- package/dist/runtimeExports.d.ts +1 -1
- package/dist/runtimeExports.js +2 -6
- package/package.json +8 -4
package/dist/runtimeExports.d.ts
CHANGED
package/dist/runtimeExports.js
CHANGED
@@ -20,9 +20,8 @@ const memo = (fn) => {
|
|
20
20
|
return res;
|
21
21
|
};
|
22
22
|
};
|
23
|
-
exports.createRuntimeExportsUtils = memo((pwd = '', namespace
|
24
|
-
const entryExportFile = path_1.default.join(pwd, `.runtime-exports/${namespace
|
25
|
-
const entryExportTsFile = path_1.default.join(pwd, `.runtime-exports/${namespace ? `${namespace}.d.ts` : 'index.d.ts'}`);
|
23
|
+
exports.createRuntimeExportsUtils = memo((pwd = '', namespace = 'index') => {
|
24
|
+
const entryExportFile = path_1.default.join(pwd, `.runtime-exports/${namespace}.js`);
|
26
25
|
// const ensure = () => {
|
27
26
|
// if (!fs.existsSync(entryExportFile)) {
|
28
27
|
// fs.outputFileSync(entryExportFile, '');
|
@@ -34,11 +33,8 @@ exports.createRuntimeExportsUtils = memo((pwd = '', namespace, ts = false) => {
|
|
34
33
|
statement = (0, path_2.normalizeOutputPath)(statement);
|
35
34
|
try {
|
36
35
|
compiled_1.fs.ensureFileSync(entryExportFile);
|
37
|
-
compiled_1.fs.ensureFileSync(entryExportTsFile);
|
38
36
|
if (!compiled_1.fs.readFileSync(entryExportFile, 'utf8').includes(statement)) {
|
39
37
|
compiled_1.fs.appendFileSync(entryExportFile, `${statement}\n`);
|
40
|
-
ts &&
|
41
|
-
compiled_1.fs.appendFileSync(entryExportTsFile, `${statement.replace('.js', '.d')}\n`);
|
42
38
|
}
|
43
39
|
}
|
44
40
|
catch {
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.
|
14
|
+
"version": "1.17.0",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/index.d.ts",
|
17
17
|
"main": "./dist/index.js",
|
@@ -40,6 +40,7 @@
|
|
40
40
|
"./webpack-chain": "./compiled/webpack-chain/index.js",
|
41
41
|
"./tsconfig-paths": "./compiled/tsconfig-paths/index.js",
|
42
42
|
"./better-ajv-errors": "./compiled/better-ajv-errors/index.js",
|
43
|
+
"./webpack-dev-middleware": "./compiled/webpack-dev-middleware/index.js",
|
43
44
|
"./chain-id": "./dist/chainId.js"
|
44
45
|
},
|
45
46
|
"publishConfig": {
|
@@ -111,6 +112,9 @@
|
|
111
112
|
"better-ajv-errors": [
|
112
113
|
"./compiled/better-ajv-errors/index.d.ts"
|
113
114
|
],
|
115
|
+
"webpack-dev-middleware": [
|
116
|
+
"./compiled/webpack-dev-middleware/types/index.d.ts"
|
117
|
+
],
|
114
118
|
"chain-id": [
|
115
119
|
"./dist/chainId.d.ts"
|
116
120
|
]
|
@@ -121,9 +125,9 @@
|
|
121
125
|
"lodash": "^4.17.21"
|
122
126
|
},
|
123
127
|
"devDependencies": {
|
124
|
-
"@modern-js/types": "1.
|
125
|
-
"@scripts/build": "1.
|
126
|
-
"@scripts/jest-config": "1.
|
128
|
+
"@modern-js/types": "1.17.0",
|
129
|
+
"@scripts/build": "1.17.0",
|
130
|
+
"@scripts/jest-config": "1.17.0",
|
127
131
|
"@types/jest": "^27",
|
128
132
|
"@types/node": "^14",
|
129
133
|
"typescript": "^4",
|