@modern-js/utils 1.7.1-alpha.1 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -0
- package/dist/readTsConfig.js +4 -6
- package/package.json +36 -8
- package/.eslintrc.js +0 -9
- package/jest.config.js +0 -11
- package/tsconfig.json +0 -11
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @modern-js/utils
|
2
2
|
|
3
|
+
## 1.7.3
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
|
8
|
+
- 6ae4a34ae: feat: prebundle all postcss plugins
|
9
|
+
- b80229c79: use json5 instead typescript
|
10
|
+
- 948cc4436: fix(utils): fix missing browserslist exports
|
11
|
+
|
12
|
+
## 1.7.2
|
13
|
+
|
14
|
+
### Patch Changes
|
15
|
+
|
16
|
+
- cd7346b0d: fix some peer dependencies problem & change shell log
|
17
|
+
- 69a728375: fix: remove exports.jsnext:source after publish
|
18
|
+
|
3
19
|
## 1.7.0
|
4
20
|
|
5
21
|
### Minor Changes
|
package/dist/readTsConfig.js
CHANGED
@@ -5,15 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.readTsConfigByFile = exports.readTsConfig = void 0;
|
7
7
|
const path_1 = __importDefault(require("path"));
|
8
|
+
const compiled_1 = require("./compiled");
|
8
9
|
const readTsConfig = (root) => {
|
9
|
-
|
10
|
-
const typescript = require('typescript');
|
11
|
-
return typescript.readConfigFile(path_1.default.resolve(root, './tsconfig.json'), typescript.sys.readFile).config;
|
10
|
+
return (0, exports.readTsConfigByFile)(path_1.default.resolve(root, './tsconfig.json'));
|
12
11
|
};
|
13
12
|
exports.readTsConfig = readTsConfig;
|
14
13
|
const readTsConfigByFile = (filename) => {
|
15
|
-
|
16
|
-
|
17
|
-
return typescript.readConfigFile(path_1.default.resolve(filename), typescript.sys.readFile).config;
|
14
|
+
const content = compiled_1.fs.readFileSync(path_1.default.resolve(filename), 'utf-8');
|
15
|
+
return compiled_1.json5.parse(content);
|
18
16
|
};
|
19
17
|
exports.readTsConfigByFile = readTsConfigByFile;
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.7.
|
14
|
+
"version": "1.7.3",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/index.d.ts",
|
17
17
|
"main": "./dist/index.js",
|
@@ -31,7 +31,8 @@
|
|
31
31
|
"./fast-glob": "./compiled/fast-glob/index.js",
|
32
32
|
"./gzip-size": "./compiled/gzip-size/index.js",
|
33
33
|
"./mime-types": "./compiled/mime-types/index.js",
|
34
|
-
"./strip-ansi": "./compiled/strip-ansi/index.js"
|
34
|
+
"./strip-ansi": "./compiled/strip-ansi/index.js",
|
35
|
+
"./browserslist": "./compiled/browserslist/index.js"
|
35
36
|
},
|
36
37
|
"publishConfig": {
|
37
38
|
"registry": "https://registry.npmjs.org/",
|
@@ -74,29 +75,56 @@
|
|
74
75
|
],
|
75
76
|
"strip-ansi": [
|
76
77
|
"./compiled/strip-ansi/index.d.ts"
|
78
|
+
],
|
79
|
+
"browserslist": [
|
80
|
+
"./compiled/browserslist/index.d.ts"
|
77
81
|
]
|
78
82
|
}
|
79
83
|
},
|
80
84
|
"dependencies": {
|
81
85
|
"caniuse-lite": "^1.0.30001332",
|
82
|
-
"lodash": "^4.17.21"
|
83
|
-
"typescript": "^4"
|
86
|
+
"lodash": "^4.17.21"
|
84
87
|
},
|
85
88
|
"devDependencies": {
|
86
|
-
"@modern-js/types": "1.5.
|
89
|
+
"@modern-js/types": "1.5.3",
|
87
90
|
"@scripts/build": "0.0.0",
|
88
91
|
"@scripts/jest-config": "0.0.0",
|
89
|
-
"@types/jest": "^
|
92
|
+
"@types/jest": "^27",
|
90
93
|
"@types/node": "^14",
|
94
|
+
"typescript": "^4",
|
91
95
|
"jest": "^27",
|
92
96
|
"webpack": "^5.71.0"
|
93
97
|
},
|
94
98
|
"sideEffects": false,
|
99
|
+
"wireit": {
|
100
|
+
"build": {
|
101
|
+
"command": "tsc",
|
102
|
+
"files": [
|
103
|
+
"src/**/*",
|
104
|
+
"compiled/**/*.js",
|
105
|
+
"tsconfig.json",
|
106
|
+
"package.json"
|
107
|
+
],
|
108
|
+
"output": [
|
109
|
+
"dist/**/*"
|
110
|
+
]
|
111
|
+
},
|
112
|
+
"test": {
|
113
|
+
"command": "jest --passWithNoTests",
|
114
|
+
"files": [
|
115
|
+
"src/**/*",
|
116
|
+
"compiled/**/*.js",
|
117
|
+
"tsconfig.json",
|
118
|
+
"package.json"
|
119
|
+
],
|
120
|
+
"output": []
|
121
|
+
}
|
122
|
+
},
|
95
123
|
"scripts": {
|
96
124
|
"new": "modern new",
|
97
125
|
"dev": "tsc --watch",
|
98
|
-
"build": "
|
99
|
-
"test": "
|
126
|
+
"build": "wireit",
|
127
|
+
"test": "wireit"
|
100
128
|
},
|
101
129
|
"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"
|
102
130
|
}
|
package/.eslintrc.js
DELETED
package/jest.config.js
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
const sharedConfig = require('@scripts/jest-config');
|
2
|
-
|
3
|
-
/** @type {import('@jest/types').Config.InitialOptions} */
|
4
|
-
module.exports = {
|
5
|
-
...sharedConfig,
|
6
|
-
rootDir: __dirname,
|
7
|
-
modulePathIgnorePatterns: [
|
8
|
-
// TODO: 很容易超时导致失败,暂时先绕过
|
9
|
-
'tests/index.test.ts',
|
10
|
-
],
|
11
|
-
};
|