babel-preset-react-app-new 1.0.3 → 2.0.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/create.js +5 -14
- package/package.json +9 -12
package/create.js
CHANGED
|
@@ -30,7 +30,6 @@ module.exports = function (api, opts, env) {
|
|
|
30
30
|
var isEnvTest = env === 'test';
|
|
31
31
|
|
|
32
32
|
var useESModules = validateBoolOption('useESModules', opts.useESModules, isEnvDevelopment || isEnvProduction);
|
|
33
|
-
var isFlowEnabled = validateBoolOption('flow', opts.flow, true);
|
|
34
33
|
var isTypeScriptEnabled = validateBoolOption('typescript', opts.typescript, true);
|
|
35
34
|
var areHelpersEnabled = validateBoolOption('helpers', opts.helpers, true);
|
|
36
35
|
var useAbsoluteRuntime = validateBoolOption('absoluteRuntime', opts.absoluteRuntime, true);
|
|
@@ -57,6 +56,11 @@ module.exports = function (api, opts, env) {
|
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
return {
|
|
59
|
+
assumptions: {
|
|
60
|
+
setPublicClassFields: true,
|
|
61
|
+
privateFieldsAsProperties: true,
|
|
62
|
+
setPublicClassFields: true
|
|
63
|
+
},
|
|
60
64
|
presets: [
|
|
61
65
|
isEnvTest && [
|
|
62
66
|
// ES features necessary for user's Node version
|
|
@@ -98,19 +102,6 @@ module.exports = function (api, opts, env) {
|
|
|
98
102
|
].filter(Boolean),
|
|
99
103
|
plugins: [
|
|
100
104
|
[require('@babel/plugin-proposal-decorators').default, { legacy: true }],
|
|
101
|
-
[
|
|
102
|
-
require('@babel/plugin-transform-class-properties').default,
|
|
103
|
-
{
|
|
104
|
-
loose: true
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
[require('@babel/plugin-transform-private-methods').default, { loose: true }],
|
|
108
|
-
[
|
|
109
|
-
require('@babel/plugin-proposal-private-property-in-object').default,
|
|
110
|
-
{
|
|
111
|
-
loose: true
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
105
|
// Polyfills the runtime needed for async/await, generators, and friends
|
|
115
106
|
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
|
|
116
107
|
[
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-react-app-new",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Babel preset used by Create React App",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/facebook/create-react-app.git",
|
|
7
|
+
"url": "git+https://github.com/facebook/create-react-app.git",
|
|
8
8
|
"directory": "packages/babel-preset-react-app"
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
@@ -21,15 +21,12 @@
|
|
|
21
21
|
"test.js"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/core": "^7.
|
|
25
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
26
|
-
"@babel/plugin-
|
|
27
|
-
"@babel/
|
|
28
|
-
"@babel/
|
|
29
|
-
"@babel/
|
|
30
|
-
"@babel/
|
|
31
|
-
"@babel/preset-react": "^7.24.1",
|
|
32
|
-
"@babel/preset-typescript": "^7.24.1",
|
|
33
|
-
"@babel/runtime": "^7.24.5"
|
|
24
|
+
"@babel/core": "^7.28.5",
|
|
25
|
+
"@babel/plugin-proposal-decorators": "^7.28.0",
|
|
26
|
+
"@babel/plugin-transform-runtime": "^7.28.5",
|
|
27
|
+
"@babel/preset-env": "^7.28.5",
|
|
28
|
+
"@babel/preset-react": "^7.28.5",
|
|
29
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
30
|
+
"@babel/runtime": "^7.28.4"
|
|
34
31
|
}
|
|
35
32
|
}
|