Skip to content

Commit

Permalink
update babel and fix tests accordingly
Browse files Browse the repository at this point in the history
Differential Revision: D61543660
  • Loading branch information
vzaidman authored and facebook-github-bot committed Sep 2, 2024
1 parent e9b7d66 commit 95c5a4b
Show file tree
Hide file tree
Showing 17 changed files with 2,867 additions and 2,852 deletions.
9 changes: 9 additions & 0 deletions flow-typed/npm/babel-traverse_v7.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,9 @@ declare module '@babel/traverse' {
isImportAttribute(opts?: Opts): boolean;
isImportDeclaration(opts?: Opts): boolean;
isImportDefaultSpecifier(opts?: Opts): boolean;
isImportExpression(opts?: Opts): boolean;
isImportNamespaceSpecifier(opts?: Opts): boolean;
isImportOrExportDeclaration(opts?: Opts): boolean;
isImportSpecifier(opts?: Opts): boolean;
isIndexedAccessType(opts?: Opts): boolean;
isInferredPredicate(opts?: Opts): boolean;
Expand Down Expand Up @@ -1215,7 +1217,9 @@ declare module '@babel/traverse' {
assertImportAttribute(opts?: Opts): void;
assertImportDeclaration(opts?: Opts): void;
assertImportDefaultSpecifier(opts?: Opts): void;
assertImportExpression(opts?: Opts): void;
assertImportNamespaceSpecifier(opts?: Opts): void;
assertImportOrExportDeclaration(opts?: Opts): void;
assertImportSpecifier(opts?: Opts): void;
assertIndexedAccessType(opts?: Opts): void;
assertInferredPredicate(opts?: Opts): void;
Expand Down Expand Up @@ -1571,10 +1575,15 @@ declare module '@babel/traverse' {
ImportAttribute?: VisitNode<BabelNodeImportAttribute, TState>,
ImportDeclaration?: VisitNode<BabelNodeImportDeclaration, TState>,
ImportDefaultSpecifier?: VisitNode<BabelNodeImportDefaultSpecifier, TState>,
ImportExpression?: VisitNode<BabelNodeImportExpression, TState>,
ImportNamespaceSpecifier?: VisitNode<
BabelNodeImportNamespaceSpecifier,
TState,
>,
ImportOrExportDeclaration?: VisitNode<
BabelNodeImportOrExportDeclaration,
TState,
>,
ImportSpecifier?: VisitNode<BabelNodeImportSpecifier, TState>,
IndexedAccessType?: VisitNode<BabelNodeIndexedAccessType, TState>,
InferredPredicate?: VisitNode<BabelNodeInferredPredicate, TState>,
Expand Down
95 changes: 58 additions & 37 deletions flow-typed/npm/babel-types_v7.x.x.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"private": true,
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/plugin-syntax-class-properties": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
"@babel/plugin-transform-modules-commonjs": "^7.0.0",
"@babel/plugin-transform-react-jsx": "^7.0.0",
"@babel/core": "^7.25.2",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
"@babel/plugin-transform-react-jsx": "^7.25.2",
"@tsconfig/node18": "1.0.1",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/metro-babel-register/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"url": "[email protected]:facebook/metro.git"
},
"dependencies": {
"@babel/core": "^7.20.0",
"@babel/core": "^7.25.2",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
"@babel/plugin-transform-modules-commonjs": "^7.0.0",
"@babel/preset-typescript": "^7.18.0",
"@babel/register": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
"@babel/preset-typescript": "^7.24.7",
"@babel/register": "^7.24.6",
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
"babel-plugin-syntax-hermes-parser": "0.23.1",
"babel-plugin-transform-flow-enums": "^0.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/metro-babel-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"license": "MIT",
"dependencies": {
"@babel/core": "^7.20.0",
"@babel/core": "^7.25.2",
"flow-enums-runtime": "^0.0.6",
"hermes-parser": "0.23.1",
"nullthrows": "^1.1.1"
Expand Down
10 changes: 5 additions & 5 deletions packages/metro-source-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"cleanup-release": "test ! -e build && mv src build && mv src.real src"
},
"dependencies": {
"@babel/traverse": "^7.20.0",
"@babel/traverse--for-generate-function-map": "npm:@babel/traverse@^7.20.0",
"@babel/types": "^7.20.0",
"@babel/traverse": "^7.25.3",
"@babel/traverse--for-generate-function-map": "npm:@babel/traverse@^7.25.3",
"@babel/types": "^7.25.2",
"flow-enums-runtime": "^0.0.6",
"invariant": "^2.2.4",
"metro-symbolicate": "0.80.10",
Expand All @@ -25,8 +25,8 @@
},
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/parser": "^7.20.0",
"@babel/core": "^7.25.2",
"@babel/parser": "^7.25.3",
"terser": "^5.15.0"
},
"engines": {
Expand Down
18 changes: 9 additions & 9 deletions packages/metro-transform-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
},
"license": "MIT",
"dependencies": {
"@babel/core": "^7.20.0",
"@babel/generator": "^7.20.0",
"@babel/template": "^7.0.0",
"@babel/traverse": "^7.20.0",
"@babel/core": "^7.25.2",
"@babel/generator": "^7.25.0",
"@babel/template": "^7.25.0",
"@babel/traverse": "^7.25.3",
"flow-enums-runtime": "^0.0.6",
"nullthrows": "^1.1.1"
},
"devDependencies": {
"@babel/code-frame": "^7.0.0",
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
"@babel/plugin-transform-modules-commonjs": "^7.0.0",
"@babel/types": "^7.20.0",
"@babel/code-frame": "^7.24.7",
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
"@babel/types": "^7.25.2",
"babel-plugin-tester": "^6.0.1",
"metro": "0.80.10"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ describe('inline-requires', () => {
['import Imported from "foo";', 'console.log(Imported);'],
[
'var _foo = _interopRequireDefault(require("foo"));',
'function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }',
'function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }',
'console.log(_foo.default);',
],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ function createInlinePlatformChecks(
args: Array<
| BabelNodeExpression
| BabelNodeSpreadElement
| BabelNodeJSXNamespacedName
| BabelNodeArgumentPlaceholder,
>,
dependencyId: string,
Expand Down
8 changes: 4 additions & 4 deletions packages/metro-transform-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
},
"license": "MIT",
"dependencies": {
"@babel/core": "^7.20.0",
"@babel/generator": "^7.20.0",
"@babel/parser": "^7.20.0",
"@babel/types": "^7.20.0",
"@babel/core": "^7.25.2",
"@babel/generator": "^7.25.0",
"@babel/parser": "^7.25.3",
"@babel/types": "^7.25.2",
"flow-enums-runtime": "^0.0.6",
"metro": "0.80.10",
"metro-babel-transformer": "0.80.10",
Expand Down
Loading

0 comments on commit 95c5a4b

Please sign in to comment.