babel-preset-react-app 10.0.0-next.77 → 10.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/create.js +20 -1
  3. package/package.json +18 -17
package/README.md CHANGED
@@ -30,7 +30,7 @@ Then create a file named `.babelrc` with following contents in the root folder o
30
30
  }
31
31
  ```
32
32
 
33
- This preset uses the `useBuiltIns` option with [transform-object-rest-spread](http://babeljs.io/docs/plugins/transform-object-rest-spread/) and [transform-react-jsx](http://babeljs.io/docs/plugins/transform-react-jsx/), which assumes that `Object.assign` is available or polyfilled.
33
+ This preset uses the `useBuiltIns` option with [transform-object-rest-spread](https://babeljs.io/docs/plugins/transform-object-rest-spread/) and [transform-react-jsx](https://babeljs.io/docs/plugins/transform-react-jsx/), which assumes that `Object.assign` is available or polyfilled.
34
34
 
35
35
  ## Usage with Flow
36
36
 
package/create.js CHANGED
@@ -95,7 +95,8 @@ module.exports = function (api, opts, env) {
95
95
  development: isEnvDevelopment || isEnvTest,
96
96
  // Will use the native built-in instead of trying to polyfill
97
97
  // behavior for any plugins that require one.
98
- useBuiltIns: true,
98
+ ...(opts.runtime !== 'automatic' ? { useBuiltIns: true } : {}),
99
+ runtime: opts.runtime || 'classic',
99
100
  },
100
101
  ],
101
102
  isTypeScriptEnabled && [require('@babel/preset-typescript').default],
@@ -145,12 +146,30 @@ module.exports = function (api, opts, env) {
145
146
  // class { handleClick = () => { } }
146
147
  // Enable loose mode to use assignment instead of defineProperty
147
148
  // See discussion in https://github.com/facebook/create-react-app/issues/4263
149
+ // Note:
150
+ // 'loose' mode configuration must be the same for
151
+ // * @babel/plugin-proposal-class-properties
152
+ // * @babel/plugin-proposal-private-methods
153
+ // * @babel/plugin-proposal-private-property-in-object
154
+ // (when they are enabled)
148
155
  [
149
156
  require('@babel/plugin-proposal-class-properties').default,
150
157
  {
151
158
  loose: true,
152
159
  },
153
160
  ],
161
+ [
162
+ require('@babel/plugin-proposal-private-methods').default,
163
+ {
164
+ loose: true,
165
+ },
166
+ ],
167
+ [
168
+ require('@babel/plugin-proposal-private-property-in-object').default,
169
+ {
170
+ loose: true,
171
+ },
172
+ ],
154
173
  // Adds Numeric Separators
155
174
  require('@babel/plugin-proposal-numeric-separator').default,
156
175
  // Polyfills the runtime needed for async/await, generators, and friends
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-preset-react-app",
3
- "version": "10.0.0-next.77+3d74b79d",
3
+ "version": "10.0.1",
4
4
  "description": "Babel preset used by Create React App",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,21 +21,22 @@
21
21
  "test.js"
22
22
  ],
23
23
  "dependencies": {
24
- "@babel/core": "7.10.5",
25
- "@babel/plugin-proposal-class-properties": "7.10.4",
26
- "@babel/plugin-proposal-decorators": "7.10.5",
27
- "@babel/plugin-proposal-nullish-coalescing-operator": "7.10.4",
28
- "@babel/plugin-proposal-numeric-separator": "7.10.4",
29
- "@babel/plugin-proposal-optional-chaining": "7.10.4",
30
- "@babel/plugin-transform-flow-strip-types": "7.10.4",
31
- "@babel/plugin-transform-react-display-name": "7.10.4",
32
- "@babel/plugin-transform-runtime": "7.10.5",
33
- "@babel/preset-env": "7.10.4",
34
- "@babel/preset-react": "7.10.4",
35
- "@babel/preset-typescript": "7.10.4",
36
- "@babel/runtime": "7.10.5",
37
- "babel-plugin-macros": "2.8.0",
38
- "babel-plugin-transform-react-remove-prop-types": "0.4.24"
24
+ "@babel/core": "^7.16.0",
25
+ "@babel/plugin-proposal-class-properties": "^7.16.0",
26
+ "@babel/plugin-proposal-decorators": "^7.16.4",
27
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
28
+ "@babel/plugin-proposal-numeric-separator": "^7.16.0",
29
+ "@babel/plugin-proposal-optional-chaining": "^7.16.0",
30
+ "@babel/plugin-proposal-private-methods": "^7.16.0",
31
+ "@babel/plugin-transform-flow-strip-types": "^7.16.0",
32
+ "@babel/plugin-transform-react-display-name": "^7.16.0",
33
+ "@babel/plugin-transform-runtime": "^7.16.4",
34
+ "@babel/preset-env": "^7.16.4",
35
+ "@babel/preset-react": "^7.16.0",
36
+ "@babel/preset-typescript": "^7.16.0",
37
+ "@babel/runtime": "^7.16.3",
38
+ "babel-plugin-macros": "^3.1.0",
39
+ "babel-plugin-transform-react-remove-prop-types": "^0.4.24"
39
40
  },
40
- "gitHead": "3d74b79de0ca40d3e89531207f8064a17207bfb8"
41
+ "gitHead": "221e511730ca51c036c6954a9d2ee7659ff860f9"
41
42
  }