babel-preset-react-app 9.1.0 → 9.1.1

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.
Files changed (3) hide show
  1. package/create.js +23 -41
  2. package/dependencies.js +27 -28
  3. package/package.json +14 -20
package/create.js CHANGED
@@ -117,29 +117,29 @@ module.exports = function(api, opts, env) {
117
117
  // Experimental macros support. Will be documented after it's had some time
118
118
  // in the wild.
119
119
  require('babel-plugin-macros'),
120
- // Necessary to include regardless of the environment because
121
- // in practice some other transforms (such as object-rest-spread)
122
- // don't work without it: https://github.com/babel/babel/issues/7215
123
- [
124
- require('@babel/plugin-transform-destructuring').default,
125
- {
126
- // Use loose mode for performance:
127
- // https://github.com/facebook/create-react-app/issues/5602
128
- loose: false,
129
- selectiveLoose: [
130
- 'useState',
131
- 'useEffect',
132
- 'useContext',
133
- 'useReducer',
134
- 'useCallback',
135
- 'useMemo',
136
- 'useRef',
137
- 'useImperativeHandle',
138
- 'useLayoutEffect',
139
- 'useDebugValue',
140
- ],
141
- },
142
- ],
120
+ // Disabled as it's handled automatically by preset-env, and `selectiveLoose` isn't
121
+ // yet merged into babel: https://github.com/babel/babel/pull/9486
122
+ // Related: https://github.com/facebook/create-react-app/pull/8215
123
+ // [
124
+ // require('@babel/plugin-transform-destructuring').default,
125
+ // {
126
+ // // Use loose mode for performance:
127
+ // // https://github.com/facebook/create-react-app/issues/5602
128
+ // loose: false,
129
+ // selectiveLoose: [
130
+ // 'useState',
131
+ // 'useEffect',
132
+ // 'useContext',
133
+ // 'useReducer',
134
+ // 'useCallback',
135
+ // 'useMemo',
136
+ // 'useRef',
137
+ // 'useImperativeHandle',
138
+ // 'useLayoutEffect',
139
+ // 'useDebugValue',
140
+ // ],
141
+ // },
142
+ // ],
143
143
  // Turn on legacy decorators for TypeScript files
144
144
  isTypeScriptEnabled && [
145
145
  require('@babel/plugin-proposal-decorators').default,
@@ -156,15 +156,6 @@ module.exports = function(api, opts, env) {
156
156
  ],
157
157
  // Adds Numeric Separators
158
158
  require('@babel/plugin-proposal-numeric-separator').default,
159
- // The following two plugins use Object.assign directly, instead of Babel's
160
- // extends helper. Note that this assumes `Object.assign` is available.
161
- // { ...todo, completed: true }
162
- [
163
- require('@babel/plugin-proposal-object-rest-spread').default,
164
- {
165
- useBuiltIns: true,
166
- },
167
- ],
168
159
  // Polyfills the runtime needed for async/await, generators, and friends
169
160
  // https://babeljs.io/docs/en/babel-plugin-transform-runtime
170
161
  [
@@ -194,15 +185,6 @@ module.exports = function(api, opts, env) {
194
185
  removeImport: true,
195
186
  },
196
187
  ],
197
- // Adds syntax support for import()
198
- require('@babel/plugin-syntax-dynamic-import').default,
199
- // Adds syntax support for optional chaining (.?)
200
- require('@babel/plugin-proposal-optional-chaining').default,
201
- // Adds syntax support for default value using ?? operator
202
- require('@babel/plugin-proposal-nullish-coalescing-operator').default,
203
- isEnvTest &&
204
- // Transform dynamic import to require
205
- require('babel-plugin-dynamic-import-node'),
206
188
  ].filter(Boolean),
207
189
  overrides: [
208
190
  isFlowEnabled && {
package/dependencies.js CHANGED
@@ -97,29 +97,29 @@ module.exports = function(api, opts) {
97
97
  ],
98
98
  ].filter(Boolean),
99
99
  plugins: [
100
- // Necessary to include regardless of the environment because
101
- // in practice some other transforms (such as object-rest-spread)
102
- // don't work without it: https://github.com/babel/babel/issues/7215
103
- [
104
- require('@babel/plugin-transform-destructuring').default,
105
- {
106
- // Use loose mode for performance:
107
- // https://github.com/facebook/create-react-app/issues/5602
108
- loose: false,
109
- selectiveLoose: [
110
- 'useState',
111
- 'useEffect',
112
- 'useContext',
113
- 'useReducer',
114
- 'useCallback',
115
- 'useMemo',
116
- 'useRef',
117
- 'useImperativeHandle',
118
- 'useLayoutEffect',
119
- 'useDebugValue',
120
- ],
121
- },
122
- ],
100
+ // Disabled as it's handled automatically by preset-env, and `selectiveLoose` isn't
101
+ // yet merged into babel: https://github.com/babel/babel/pull/9486
102
+ // Related: https://github.com/facebook/create-react-app/pull/8215
103
+ // [
104
+ // require('@babel/plugin-transform-destructuring').default,
105
+ // {
106
+ // // Use loose mode for performance:
107
+ // // https://github.com/facebook/create-react-app/issues/5602
108
+ // loose: false,
109
+ // selectiveLoose: [
110
+ // 'useState',
111
+ // 'useEffect',
112
+ // 'useContext',
113
+ // 'useReducer',
114
+ // 'useCallback',
115
+ // 'useMemo',
116
+ // 'useRef',
117
+ // 'useImperativeHandle',
118
+ // 'useLayoutEffect',
119
+ // 'useDebugValue',
120
+ // ],
121
+ // },
122
+ // ],
123
123
  // Polyfills the runtime needed for async/await, generators, and friends
124
124
  // https://babeljs.io/docs/en/babel-plugin-transform-runtime
125
125
  [
@@ -127,6 +127,10 @@ module.exports = function(api, opts) {
127
127
  {
128
128
  corejs: false,
129
129
  helpers: areHelpersEnabled,
130
+ // By default, babel assumes babel/runtime version 7.0.0-beta.0,
131
+ // explicitly resolving to match the provided helper functions.
132
+ // https://github.com/babel/babel/issues/10261
133
+ version: require('@babel/runtime/package.json').version,
130
134
  regenerator: true,
131
135
  // https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules
132
136
  // We should turn this on once the lowest version of Node LTS
@@ -138,11 +142,6 @@ module.exports = function(api, opts) {
138
142
  absoluteRuntime: absoluteRuntimePath,
139
143
  },
140
144
  ],
141
- // Adds syntax support for import()
142
- require('@babel/plugin-syntax-dynamic-import').default,
143
- isEnvTest &&
144
- // Transform dynamic import to require
145
- require('babel-plugin-dynamic-import-node'),
146
145
  ].filter(Boolean),
147
146
  };
148
147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-preset-react-app",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "Babel preset used by Create React App",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,25 +21,19 @@
21
21
  "test.js"
22
22
  ],
23
23
  "dependencies": {
24
- "@babel/core": "7.7.4",
25
- "@babel/plugin-proposal-class-properties": "7.7.4",
26
- "@babel/plugin-proposal-decorators": "7.7.4",
27
- "@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
28
- "@babel/plugin-proposal-numeric-separator": "7.7.4",
29
- "@babel/plugin-proposal-object-rest-spread": "7.7.4",
30
- "@babel/plugin-proposal-optional-chaining": "7.7.4",
31
- "@babel/plugin-syntax-dynamic-import": "7.7.4",
32
- "@babel/plugin-transform-destructuring": "7.7.4",
33
- "@babel/plugin-transform-flow-strip-types": "7.7.4",
34
- "@babel/plugin-transform-react-display-name": "7.7.4",
35
- "@babel/plugin-transform-runtime": "7.7.4",
36
- "@babel/preset-env": "7.7.4",
37
- "@babel/preset-react": "7.7.4",
38
- "@babel/preset-typescript": "7.7.4",
39
- "@babel/runtime": "7.7.4",
40
- "babel-plugin-dynamic-import-node": "2.3.0",
41
- "babel-plugin-macros": "2.7.1",
24
+ "@babel/core": "7.8.4",
25
+ "@babel/plugin-proposal-class-properties": "7.8.3",
26
+ "@babel/plugin-proposal-decorators": "7.8.3",
27
+ "@babel/plugin-proposal-numeric-separator": "7.8.3",
28
+ "@babel/plugin-transform-flow-strip-types": "7.8.3",
29
+ "@babel/plugin-transform-react-display-name": "7.8.3",
30
+ "@babel/plugin-transform-runtime": "7.8.3",
31
+ "@babel/preset-env": "7.8.4",
32
+ "@babel/preset-react": "7.8.3",
33
+ "@babel/preset-typescript": "7.8.3",
34
+ "@babel/runtime": "7.8.4",
35
+ "babel-plugin-macros": "2.8.0",
42
36
  "babel-plugin-transform-react-remove-prop-types": "0.4.24"
43
37
  },
44
- "gitHead": "9a817dd0d780ec401afb1f99dbc0f3bdbcd51683"
38
+ "gitHead": "d7c68420f7ca1c03b50a2c6b9ecd9c7bf94a10f6"
45
39
  }