File tree Expand file tree Collapse file tree
turbopack-tests/tests/execution/turbopack/scope-hoisting/renaming-2/input Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2062,7 +2062,7 @@ fn hygiene_rename_only(
20622062 }
20632063 // Copied from `hygiene_with_config`'s HygieneRenamer, but added an `preserved_exports`
20642064 impl swc_core:: ecma:: transforms:: base:: rename:: Renamer for HygieneRenamer < ' _ > {
2065- type Target = Atom ;
2065+ type Target = Id ;
20662066
20672067 const MANGLE : bool = false ;
20682068 const RESET_N : bool = true ;
@@ -2081,7 +2081,7 @@ fn hygiene_rename_only(
20812081 self . preserved_exports . contains ( orig) || orig. 1 . has_mark ( self . is_import_mark )
20822082 }
20832083 }
2084- swc_core:: ecma:: transforms:: base:: rename:: renamer (
2084+ swc_core:: ecma:: transforms:: base:: rename:: renamer_keep_contexts (
20852085 swc_core:: ecma:: transforms:: base:: hygiene:: Config {
20862086 top_level_mark : top_level_mark. unwrap_or_default ( ) ,
20872087 ..Default :: default ( )
Original file line number Diff line number Diff line change 1+ import { foo } from './internal/index.js'
2+
3+ it ( 'should correctly rename imports' , ( ) => {
4+ expect ( foo ( { } ) ) . toBe ( true )
5+ } )
Original file line number Diff line number Diff line change 1+ import './patch-other.js'
2+ import { patch as patch2 } from './patch.js'
3+
4+ export const bar = ( patch ) => patch + 1
5+ export const foo = ( patch ) => patch !== patch2
Original file line number Diff line number Diff line change 1+ export function patch ( ) {
2+ return 2
3+ }
Original file line number Diff line number Diff line change 1+ export function patch ( ) {
2+ return 1
3+ }
You can’t perform that action at this time.
0 commit comments