@modern-js/server-utils 1.2.9 → 1.2.12-alpha.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 +34 -0
- package/dist/js/modern/babel.js +2 -6
- package/dist/js/node/babel.js +1 -5
- package/dist/js/treeshaking/babel.js +2 -6
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @modern-js/server-utils
|
|
2
2
|
|
|
3
|
+
## 1.2.12-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [9cd364e06]
|
|
8
|
+
- Updated dependencies [f29e9bacf]
|
|
9
|
+
- Updated dependencies [a90bc96bd]
|
|
10
|
+
- @modern-js/utils@1.7.9-alpha.0
|
|
11
|
+
- @modern-js/plugin@1.4.0-alpha.0
|
|
12
|
+
- @modern-js/babel-preset-lib@1.3.2-alpha.0
|
|
13
|
+
|
|
14
|
+
## 1.2.11
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- b7a1cea52: feat: support utils in tools.babel
|
|
19
|
+
- Updated dependencies [9377d2d9d]
|
|
20
|
+
- Updated dependencies [8c9ad1749]
|
|
21
|
+
- Updated dependencies [b7a1cea52]
|
|
22
|
+
- Updated dependencies [1ac68424f]
|
|
23
|
+
- @modern-js/utils@1.7.7
|
|
24
|
+
- @modern-js/babel-preset-lib@1.3.1
|
|
25
|
+
- @modern-js/plugin@1.3.7
|
|
26
|
+
|
|
27
|
+
## 1.2.10
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- a1198d509: feat: bump babel 7.18.0
|
|
32
|
+
- Updated dependencies [a1198d509]
|
|
33
|
+
- Updated dependencies [a1198d509]
|
|
34
|
+
- @modern-js/babel-preset-lib@1.3.0
|
|
35
|
+
- @modern-js/plugin@1.3.6
|
|
36
|
+
|
|
3
37
|
## 1.2.9
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/dist/js/modern/babel.js
CHANGED
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
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
|
-
import { getBabelChain } from '@modern-js/babel-preset-lib';
|
|
7
|
+
import { getBabelChain, applyUserBabelConfig } from '@modern-js/babel-preset-lib';
|
|
8
8
|
import { fs, json5, getAlias, applyOptionsChain } from '@modern-js/utils';
|
|
9
9
|
export * from '@babel/core';
|
|
10
10
|
export const readTsConfig = (tsconfigPath, noExistReturn = null) => {
|
|
@@ -79,9 +79,5 @@ export const resolveBabelConfig = (appDirectory, modernConfig, option // FIXME:
|
|
|
79
79
|
const internalBabelConfig = _objectSpread({}, babelChain.toJSON());
|
|
80
80
|
|
|
81
81
|
const userBabelConfig = modernConfig.tools.babel;
|
|
82
|
-
|
|
83
|
-
userBabelConfig, {
|
|
84
|
-
chain: babelChain
|
|
85
|
-
});
|
|
86
|
-
return internalBabelConfig;
|
|
82
|
+
return applyUserBabelConfig(internalBabelConfig, userBabelConfig);
|
|
87
83
|
};
|
package/dist/js/node/babel.js
CHANGED
|
@@ -117,11 +117,7 @@ const resolveBabelConfig = (appDirectory, modernConfig, option // FIXME: babel t
|
|
|
117
117
|
const internalBabelConfig = _objectSpread({}, babelChain.toJSON());
|
|
118
118
|
|
|
119
119
|
const userBabelConfig = modernConfig.tools.babel;
|
|
120
|
-
(0,
|
|
121
|
-
userBabelConfig, {
|
|
122
|
-
chain: babelChain
|
|
123
|
-
});
|
|
124
|
-
return internalBabelConfig;
|
|
120
|
+
return (0, _babelPresetLib.applyUserBabelConfig)(internalBabelConfig, userBabelConfig);
|
|
125
121
|
};
|
|
126
122
|
|
|
127
123
|
exports.resolveBabelConfig = resolveBabelConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import { getBabelChain } from '@modern-js/babel-preset-lib';
|
|
2
|
+
import { getBabelChain, applyUserBabelConfig } from '@modern-js/babel-preset-lib';
|
|
3
3
|
import { fs, json5, getAlias, applyOptionsChain } from '@modern-js/utils';
|
|
4
4
|
export * from '@babel/core';
|
|
5
5
|
export var readTsConfig = function readTsConfig(tsconfigPath) {
|
|
@@ -70,9 +70,5 @@ export var resolveBabelConfig = function resolveBabelConfig(appDirectory, modern
|
|
|
70
70
|
var internalBabelConfig = _objectSpread({}, babelChain.toJSON());
|
|
71
71
|
|
|
72
72
|
var userBabelConfig = modernConfig.tools.babel;
|
|
73
|
-
|
|
74
|
-
userBabelConfig, {
|
|
75
|
-
chain: babelChain
|
|
76
|
-
});
|
|
77
|
-
return internalBabelConfig;
|
|
73
|
+
return applyUserBabelConfig(internalBabelConfig, userBabelConfig);
|
|
78
74
|
};
|
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.12-alpha.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@babel/compat-data": "^7.
|
|
32
|
-
"@babel/core": "^7.
|
|
33
|
-
"@babel/plugin-proposal-class-properties": "^7.12
|
|
34
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
35
|
-
"@babel/preset-env": "^7.
|
|
36
|
-
"@babel/preset-typescript": "^7.
|
|
37
|
-
"@babel/runtime": "^7",
|
|
38
|
-
"@modern-js/babel-preset-lib": "^1.2.
|
|
39
|
-
"@modern-js/plugin": "^1.
|
|
40
|
-
"@modern-js/utils": "^1.7.
|
|
31
|
+
"@babel/compat-data": "^7.17.10",
|
|
32
|
+
"@babel/core": "^7.18.0",
|
|
33
|
+
"@babel/plugin-proposal-class-properties": "^7.17.12",
|
|
34
|
+
"@babel/plugin-proposal-decorators": "^7.18.0",
|
|
35
|
+
"@babel/preset-env": "^7.18.0",
|
|
36
|
+
"@babel/preset-typescript": "^7.17.12",
|
|
37
|
+
"@babel/runtime": "^7.18.0",
|
|
38
|
+
"@modern-js/babel-preset-lib": "^1.3.2-alpha.0",
|
|
39
|
+
"@modern-js/plugin": "^1.4.0-alpha.0",
|
|
40
|
+
"@modern-js/utils": "^1.7.9-alpha.0",
|
|
41
41
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
42
42
|
"babel-plugin-transform-typescript-metadata": "^0.3.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@modern-js/core": "1.
|
|
45
|
+
"@modern-js/core": "1.12.2-alpha.0",
|
|
46
46
|
"@scripts/build": "0.0.0",
|
|
47
47
|
"@scripts/jest-config": "0.0.0",
|
|
48
48
|
"@types/babel__core": "^7.1.15",
|