Skip to content

Commit

Permalink
Upgrade babel from 7.12.3 -> 7.14.1
Browse files Browse the repository at this point in the history
Summary:
Changelog:

[General] [Changed] Upgrade Babel from 7.12.3 to 7.14.1

Reviewed By: motiz88

Differential Revision: D27851184

fbshipit-source-id: 59326332d1d188f163cdb034556eea7808824360
  • Loading branch information
Micha Reiser authored and facebook-github-bot committed May 13, 2021
1 parent 129180c commit 58a0f9b
Show file tree
Hide file tree
Showing 8 changed files with 594 additions and 632 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,32 +133,32 @@ export default 'Not a view config';"
exports[`Babel plugin inline view configs fails on inline config for CommandsExportedWithDifferentNameNativeComponent.js 1`] = `
"/CommandsExportedWithDifferentNameNativeComponent.js: Native commands must be exported with the name 'Commands'
17 | }
18 |
18 |
> 19 | export const Foo = codegenNativeCommands<NativeCommands>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |
20 |
21 | export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
22 | "
22 |"
`;
exports[`Babel plugin inline view configs fails on inline config for CommandsExportedWithShorthandNativeComponent.js 1`] = `
"/CommandsExportedWithShorthandNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
19 | const Commands = 4;
20 |
20 |
> 21 | export {Commands};
| ^^^^^^^^^^^^^^^^^^
22 |
22 |
23 | export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
24 | "
24 |"
`;
exports[`Babel plugin inline view configs fails on inline config for OtherCommandsExportNativeComponent.js 1`] = `
"/OtherCommandsExportNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
17 | }
18 |
18 |
> 19 | export const Commands = 4;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |
20 |
21 | export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
22 | "
22 |"
`;
1 change: 1 addition & 0 deletions packages/babel-plugin-codegen/__tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const failures = require('../__test_fixtures__/failures.js');
const transform = (fixture, filename) =>
babelTransform(fixture, {
babelrc: false,
browserslistConfigFile: false,
cwd: '/',
filename: filename,
highlightCode: false,
Expand Down
5 changes: 4 additions & 1 deletion packages/babel-plugin-codegen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ module.exports = function({parse, types: t}) {
if (this.defaultExport) {
const viewConfig = generateViewConfig(this.filename, this.code);
this.defaultExport.replaceWithMultiple(
parse(viewConfig).program.body,
parse(viewConfig, {
babelrc: false,
browserslistConfigFile: false,
}).program.body,
);
if (this.commandsExport != null) {
this.commandsExport.remove();
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"react-native-codegen": "*"
},
"devDependencies": {
"@babel/core": "^7.0.0"
"@babel/core": "^7.14.0"
},
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/eslint-plugin-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"directory": "packages/eslint-plugin-codegen"
},
"dependencies": {
"@babel/core": "^7.0.0",
"@babel/core": "^7.14.0",
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
"flow-parser": "^0.121.0",
"make-dir": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"nullthrows": "^1.1.1"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/core": "^7.14.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
Expand Down
4 changes: 2 additions & 2 deletions repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"url": "git@github.com:facebook/react-native.git"
},
"dependencies": {
"@babel/core": "^7.0.0",
"@babel/generator": "^7.5.0",
"@babel/core": "^7.14.0",
"@babel/generator": "^7.14.0",
"@react-native-community/eslint-plugin": "*",
"@reactions/component": "^2.0.2",
"async": "^2.4.0",
Expand Down
1,192 changes: 575 additions & 617 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 58a0f9b

Please sign in to comment.