@modern-js/server-utils 1.2.3 → 1.2.6
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 +45 -0
- package/dist/js/modern/babel.js +1 -5
- package/dist/js/node/babel.js +1 -8
- package/dist/js/treeshaking/babel.js +2 -11
- package/package.json +33 -13
- package/.eslintrc.js +0 -8
- package/jest.config.js +0 -7
- package/modern.config.js +0 -2
- package/tsconfig.json +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @modern-js/server-utils
|
|
2
2
|
|
|
3
|
+
## 1.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
|
|
8
|
+
- 1a30be07b: fix: remove some babel plugins that provided by @babel/preset-env
|
|
9
|
+
- Updated dependencies [f1ca8eb83]
|
|
10
|
+
- Updated dependencies [d5913bd96]
|
|
11
|
+
- Updated dependencies [d32f35134]
|
|
12
|
+
- Updated dependencies [6ae4a34ae]
|
|
13
|
+
- Updated dependencies [b80229c79]
|
|
14
|
+
- Updated dependencies [948cc4436]
|
|
15
|
+
- @modern-js/babel-preset-lib@1.2.5
|
|
16
|
+
- @modern-js/plugin@1.3.4
|
|
17
|
+
- @modern-js/utils@1.7.3
|
|
18
|
+
|
|
19
|
+
## 1.2.5
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 0e0537005: fix: unlock @babel/core version
|
|
24
|
+
- 69a728375: fix: remove exports.jsnext:source after publish
|
|
25
|
+
- Updated dependencies [cd7346b0d]
|
|
26
|
+
- Updated dependencies [0e0537005]
|
|
27
|
+
- Updated dependencies [69a728375]
|
|
28
|
+
- @modern-js/utils@1.7.2
|
|
29
|
+
- @modern-js/babel-preset-lib@1.2.4
|
|
30
|
+
|
|
31
|
+
## 1.2.4
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 592edabc: feat: prebundle url-join,mime-types,json5,fast-glob,globby,ora,inquirer
|
|
36
|
+
- Updated dependencies [2d155c4c]
|
|
37
|
+
- Updated dependencies [123e432d]
|
|
38
|
+
- Updated dependencies [e5a9b26d]
|
|
39
|
+
- Updated dependencies [0b26b93b]
|
|
40
|
+
- Updated dependencies [123e432d]
|
|
41
|
+
- Updated dependencies [f9f66ef9]
|
|
42
|
+
- Updated dependencies [592edabc]
|
|
43
|
+
- Updated dependencies [895fa0ff]
|
|
44
|
+
- Updated dependencies [3578913e]
|
|
45
|
+
- Updated dependencies [1c3beab3]
|
|
46
|
+
- @modern-js/utils@1.6.0
|
|
47
|
+
|
|
3
48
|
## 1.2.3
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
package/dist/js/modern/babel.js
CHANGED
|
@@ -5,8 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
7
|
import { getBabelChain } from '@modern-js/babel-preset-lib';
|
|
8
|
-
import {
|
|
9
|
-
import json5 from 'json5';
|
|
8
|
+
import { fs, json5, getAlias, applyOptionsChain } from '@modern-js/utils';
|
|
10
9
|
export * from '@babel/core';
|
|
11
10
|
export const readTsConfig = (tsconfigPath, noExistReturn = null) => {
|
|
12
11
|
// 如果不存在,则返回 noExistReturn
|
|
@@ -72,9 +71,6 @@ export const resolveBabelConfig = (appDirectory, modernConfig, option // FIXME:
|
|
|
72
71
|
babelChain.plugin('@babel/plugin-proposal-decorators').use(require.resolve('@babel/plugin-proposal-decorators'), [{
|
|
73
72
|
legacy: true
|
|
74
73
|
}]);
|
|
75
|
-
babelChain.plugin('@babel/plugin-proposal-class-properties').use(require.resolve('@babel/plugin-proposal-class-properties'), [{
|
|
76
|
-
loose: true
|
|
77
|
-
}]);
|
|
78
74
|
|
|
79
75
|
const internalBabelConfig = _objectSpread({}, babelChain.toJSON());
|
|
80
76
|
|
package/dist/js/node/babel.js
CHANGED
|
@@ -15,8 +15,6 @@ var _babelPresetLib = require("@modern-js/babel-preset-lib");
|
|
|
15
15
|
|
|
16
16
|
var _utils = require("@modern-js/utils");
|
|
17
17
|
|
|
18
|
-
var _json = _interopRequireDefault(require("json5"));
|
|
19
|
-
|
|
20
18
|
var _core = require("@babel/core");
|
|
21
19
|
|
|
22
20
|
Object.keys(_core).forEach(function (key) {
|
|
@@ -31,8 +29,6 @@ Object.keys(_core).forEach(function (key) {
|
|
|
31
29
|
});
|
|
32
30
|
});
|
|
33
31
|
|
|
34
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
|
-
|
|
36
32
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
33
|
|
|
38
34
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -47,7 +43,7 @@ const readTsConfig = (tsconfigPath, noExistReturn = null) => {
|
|
|
47
43
|
|
|
48
44
|
const content = _utils.fs.readFileSync(tsconfigPath, 'utf-8');
|
|
49
45
|
|
|
50
|
-
return
|
|
46
|
+
return _utils.json5.parse(content);
|
|
51
47
|
};
|
|
52
48
|
|
|
53
49
|
exports.readTsConfig = readTsConfig;
|
|
@@ -113,9 +109,6 @@ const resolveBabelConfig = (appDirectory, modernConfig, option // FIXME: babel t
|
|
|
113
109
|
babelChain.plugin('@babel/plugin-proposal-decorators').use(require.resolve('@babel/plugin-proposal-decorators'), [{
|
|
114
110
|
legacy: true
|
|
115
111
|
}]);
|
|
116
|
-
babelChain.plugin('@babel/plugin-proposal-class-properties').use(require.resolve('@babel/plugin-proposal-class-properties'), [{
|
|
117
|
-
loose: true
|
|
118
|
-
}]);
|
|
119
112
|
|
|
120
113
|
const internalBabelConfig = _objectSpread({}, babelChain.toJSON());
|
|
121
114
|
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
2
|
import { getBabelChain } from '@modern-js/babel-preset-lib';
|
|
8
|
-
import {
|
|
9
|
-
import json5 from 'json5';
|
|
3
|
+
import { fs, json5, getAlias, applyOptionsChain } from '@modern-js/utils';
|
|
10
4
|
export * from '@babel/core';
|
|
11
5
|
export var readTsConfig = function readTsConfig(tsconfigPath) {
|
|
12
6
|
var noExistReturn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
@@ -68,9 +62,6 @@ export var resolveBabelConfig = function resolveBabelConfig(appDirectory, modern
|
|
|
68
62
|
babelChain.plugin('@babel/plugin-proposal-decorators').use(require.resolve('@babel/plugin-proposal-decorators'), [{
|
|
69
63
|
legacy: true
|
|
70
64
|
}]);
|
|
71
|
-
babelChain.plugin('@babel/plugin-proposal-class-properties').use(require.resolve('@babel/plugin-proposal-class-properties'), [{
|
|
72
|
-
loose: true
|
|
73
|
-
}]);
|
|
74
65
|
|
|
75
66
|
var internalBabelConfig = _objectSpread({}, babelChain.toJSON());
|
|
76
67
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.2.
|
|
14
|
+
"version": "1.2.6",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -29,23 +29,21 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/compat-data": "^7.15.0",
|
|
32
|
-
"@babel/core": "7.
|
|
33
|
-
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
|
32
|
+
"@babel/core": "^7.17.0",
|
|
34
33
|
"@babel/plugin-proposal-decorators": "^7.15.4",
|
|
35
|
-
"@babel/preset-env": "^7.
|
|
34
|
+
"@babel/preset-env": "^7.17.0",
|
|
36
35
|
"@babel/preset-typescript": "^7.15.0",
|
|
37
36
|
"@babel/runtime": "^7",
|
|
38
|
-
"@modern-js/babel-preset-lib": "^1.2.
|
|
39
|
-
"@modern-js/plugin": "^1.3.
|
|
40
|
-
"@modern-js/utils": "^1.
|
|
37
|
+
"@modern-js/babel-preset-lib": "^1.2.5",
|
|
38
|
+
"@modern-js/plugin": "^1.3.4",
|
|
39
|
+
"@modern-js/utils": "^1.7.3",
|
|
41
40
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
42
|
-
"babel-plugin-transform-typescript-metadata": "^0.3.2"
|
|
43
|
-
"json5": "^2.2.0"
|
|
41
|
+
"babel-plugin-transform-typescript-metadata": "^0.3.2"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
46
|
-
"@modern-js/core": "1.
|
|
44
|
+
"@modern-js/core": "1.10.2",
|
|
47
45
|
"@types/babel__core": "^7.1.15",
|
|
48
|
-
"@types/jest": "^
|
|
46
|
+
"@types/jest": "^27",
|
|
49
47
|
"@types/node": "^14",
|
|
50
48
|
"@types/react": "^17",
|
|
51
49
|
"@types/react-dom": "^17",
|
|
@@ -60,10 +58,32 @@
|
|
|
60
58
|
"registry": "https://registry.npmjs.org/",
|
|
61
59
|
"access": "public"
|
|
62
60
|
},
|
|
61
|
+
"wireit": {
|
|
62
|
+
"build": {
|
|
63
|
+
"command": "modern build",
|
|
64
|
+
"files": [
|
|
65
|
+
"src/**/*",
|
|
66
|
+
"tsconfig.json",
|
|
67
|
+
"package.json"
|
|
68
|
+
],
|
|
69
|
+
"output": [
|
|
70
|
+
"dist/**/*"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"test": {
|
|
74
|
+
"command": "jest --passWithNoTests",
|
|
75
|
+
"files": [
|
|
76
|
+
"src/**/*",
|
|
77
|
+
"tsconfig.json",
|
|
78
|
+
"package.json"
|
|
79
|
+
],
|
|
80
|
+
"output": []
|
|
81
|
+
}
|
|
82
|
+
},
|
|
63
83
|
"scripts": {
|
|
64
84
|
"new": "modern new",
|
|
65
|
-
"build": "
|
|
66
|
-
"test": "
|
|
85
|
+
"build": "wireit",
|
|
86
|
+
"test": "wireit"
|
|
67
87
|
},
|
|
68
88
|
"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"
|
|
69
89
|
}
|
package/.eslintrc.js
DELETED
package/jest.config.js
DELETED
package/modern.config.js
DELETED
package/tsconfig.json
DELETED