File tree Expand file tree Collapse file tree
babel-core/src/config/files Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,8 +90,7 @@ function* readConfigCode(
9090
9191 // @ts -expect-error todo(flow->ts)
9292 if ( typeof options . then === "function" ) {
93- // @ts -expect-error We use ?. in case options is a thenable
94- // but not a promise
93+ // @ts -expect-error We use ?. in case options is a thenable but not a promise
9594 options . catch ?.( ( ) => { } ) ;
9695
9796 throw new ConfigError (
Original file line number Diff line number Diff line change 1+ import "./path/context.ts" ; // We have some cycles, this ensures correct order to avoid TDZ
12import * as visitors from "./visitors.ts" ;
23import {
34 VISITOR_KEYS ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type { NodePath, Visitor } from "../../index.ts";
44import { traverseNode } from "../../traverse-node.ts" ;
55import { explode } from "../../visitors.ts" ;
66import type { Identifier } from "@babel/types" ;
7+ import { requeueComputedKeyAndDecorators } from "../../path/context.ts" ;
78
89const renameVisitor : Visitor < Renamer > = {
910 ReferencedIdentifier ( { node } , state ) {
@@ -21,7 +22,15 @@ const renameVisitor: Visitor<Renamer> = {
2122 ) {
2223 path . skip ( ) ;
2324 if ( path . isMethod ( ) ) {
24- path . requeueComputedKeyAndDecorators ( ) ;
25+ if (
26+ ! process . env . BABEL_8_BREAKING &&
27+ ! path . requeueComputedKeyAndDecorators
28+ ) {
29+ // See https://github.com/babel/babel/issues/16694
30+ requeueComputedKeyAndDecorators . call ( path ) ;
31+ } else {
32+ path . requeueComputedKeyAndDecorators ( ) ;
33+ }
2534 }
2635 }
2736 } ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010} from "@babel/types" ;
1111import type { ExplodedVisitor , NodePath , Visitor } from "./index.ts" ;
1212import type { ExplVisitNode , VisitNodeFunction , VisitPhase } from "./types.ts" ;
13+ import { requeueComputedKeyAndDecorators } from "./path/context.ts" ;
1314
1415type VIRTUAL_TYPES = keyof typeof virtualTypes ;
1516function isVirtualType ( type : string ) : type is VIRTUAL_TYPES {
@@ -406,13 +407,29 @@ const _environmentVisitor: Visitor = {
406407
407408 path . skip ( ) ;
408409 if ( path . isMethod ( ) ) {
409- path . requeueComputedKeyAndDecorators ( ) ;
410+ if (
411+ ! process . env . BABEL_8_BREAKING &&
412+ ! path . requeueComputedKeyAndDecorators
413+ ) {
414+ // See https://github.com/babel/babel/issues/16694
415+ requeueComputedKeyAndDecorators . call ( path ) ;
416+ } else {
417+ path . requeueComputedKeyAndDecorators ( ) ;
418+ }
410419 }
411420 } ,
412421 Property ( path ) {
413422 if ( path . isObjectProperty ( ) ) return ;
414423 path . skip ( ) ;
415- path . requeueComputedKeyAndDecorators ( ) ;
424+ if (
425+ ! process . env . BABEL_8_BREAKING &&
426+ ! path . requeueComputedKeyAndDecorators
427+ ) {
428+ // See https://github.com/babel/babel/issues/16694
429+ requeueComputedKeyAndDecorators . call ( path ) ;
430+ } else {
431+ path . requeueComputedKeyAndDecorators ( ) ;
432+ }
416433 } ,
417434} ;
418435
You can’t perform that action at this time.
0 commit comments