Skip to content

Commit 58a0f9b

Browse files
Micha Reiserfacebook-github-bot
Micha Reiser
authored andcommitted
Upgrade babel from 7.12.3 -> 7.14.1
Summary: Changelog: [General] [Changed] Upgrade Babel from 7.12.3 to 7.14.1 Reviewed By: motiz88 Differential Revision: D27851184 fbshipit-source-id: 59326332d1d188f163cdb034556eea7808824360
1 parent 129180c commit 58a0f9b

File tree

8 files changed

+594
-632
lines changed

8 files changed

+594
-632
lines changed

packages/babel-plugin-codegen/__tests__/__snapshots__/index-test.js.snap

+9-9
Original file line numberDiff line numberDiff line change
@@ -133,32 +133,32 @@ export default 'Not a view config';"
133133
exports[`Babel plugin inline view configs fails on inline config for CommandsExportedWithDifferentNameNativeComponent.js 1`] = `
134134
"/CommandsExportedWithDifferentNameNativeComponent.js: Native commands must be exported with the name 'Commands'
135135
17 | }
136-
18 |
136+
18 |
137137
> 19 | export const Foo = codegenNativeCommands<NativeCommands>();
138138
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
139-
20 |
139+
20 |
140140
21 | export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
141-
22 | "
141+
22 |"
142142
`;
143143
144144
exports[`Babel plugin inline view configs fails on inline config for CommandsExportedWithShorthandNativeComponent.js 1`] = `
145145
"/CommandsExportedWithShorthandNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
146146
19 | const Commands = 4;
147-
20 |
147+
20 |
148148
> 21 | export {Commands};
149149
| ^^^^^^^^^^^^^^^^^^
150-
22 |
150+
22 |
151151
23 | export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
152-
24 | "
152+
24 |"
153153
`;
154154
155155
exports[`Babel plugin inline view configs fails on inline config for OtherCommandsExportNativeComponent.js 1`] = `
156156
"/OtherCommandsExportNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
157157
17 | }
158-
18 |
158+
18 |
159159
> 19 | export const Commands = 4;
160160
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
161-
20 |
161+
20 |
162162
21 | export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
163-
22 | "
163+
22 |"
164164
`;

packages/babel-plugin-codegen/__tests__/index-test.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const failures = require('../__test_fixtures__/failures.js');
1717
const transform = (fixture, filename) =>
1818
babelTransform(fixture, {
1919
babelrc: false,
20+
browserslistConfigFile: false,
2021
cwd: '/',
2122
filename: filename,
2223
highlightCode: false,

packages/babel-plugin-codegen/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ module.exports = function({parse, types: t}) {
124124
if (this.defaultExport) {
125125
const viewConfig = generateViewConfig(this.filename, this.code);
126126
this.defaultExport.replaceWithMultiple(
127-
parse(viewConfig).program.body,
127+
parse(viewConfig, {
128+
babelrc: false,
129+
browserslistConfigFile: false,
130+
}).program.body,
128131
);
129132
if (this.commandsExport != null) {
130133
this.commandsExport.remove();

packages/babel-plugin-codegen/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"react-native-codegen": "*"
1212
},
1313
"devDependencies": {
14-
"@babel/core": "^7.0.0"
14+
"@babel/core": "^7.14.0"
1515
},
1616
"license": "MIT"
1717
}

packages/eslint-plugin-codegen/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"directory": "packages/eslint-plugin-codegen"
1010
},
1111
"dependencies": {
12-
"@babel/core": "^7.0.0",
12+
"@babel/core": "^7.14.0",
1313
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
1414
"flow-parser": "^0.121.0",
1515
"make-dir": "^2.1.0",

packages/react-native-codegen/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"nullthrows": "^1.1.1"
2424
},
2525
"devDependencies": {
26-
"@babel/core": "^7.0.0",
26+
"@babel/core": "^7.14.0",
2727
"@babel/plugin-proposal-class-properties": "^7.0.0",
2828
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
2929
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",

repo-config/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"url": "[email protected]:facebook/react-native.git"
1010
},
1111
"dependencies": {
12-
"@babel/core": "^7.0.0",
13-
"@babel/generator": "^7.5.0",
12+
"@babel/core": "^7.14.0",
13+
"@babel/generator": "^7.14.0",
1414
"@react-native-community/eslint-plugin": "*",
1515
"@reactions/component": "^2.0.2",
1616
"async": "^2.4.0",

yarn.lock

+575-617
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)