diff --git a/tests/fixtures/call-signature/known-diff.patch b/tests/fixtures/call-signature/known-diff.patch index c1f5600..5e504f2 100644 --- a/tests/fixtures/call-signature/known-diff.patch +++ b/tests/fixtures/call-signature/known-diff.patch @@ -9,6 +9,4 @@ Index: diff.patch }; -export { fn }; -export { I }; -\ No newline at end of file +export { I, fn }; -\ No newline at end of file diff --git a/tests/fixtures/circular-to-entry/known-diff.patch b/tests/fixtures/circular-to-entry/known-diff.patch index f67dc33..5502e76 100644 --- a/tests/fixtures/circular-to-entry/known-diff.patch +++ b/tests/fixtures/circular-to-entry/known-diff.patch @@ -17,7 +17,5 @@ Index: diff.patch constructor(); } -export { FooManager as default }; -\ No newline at end of file +type index_d_default = FooManager +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/custom-tsconfig/diff.patch b/tests/fixtures/custom-tsconfig/diff.patch index 35869fa..f0cab26 100644 --- a/tests/fixtures/custom-tsconfig/diff.patch +++ b/tests/fixtures/custom-tsconfig/diff.patch @@ -5,6 +5,4 @@ Index: diff.patch @@ -1,2 +1,2 @@ // index.d.ts -export { Foo } from '@/foo'; -\ No newline at end of file +export {} -\ No newline at end of file diff --git a/tests/fixtures/export-all-external/known-diff.patch b/tests/fixtures/export-all-external/known-diff.patch index bdf9160..e8aa303 100644 --- a/tests/fixtures/export-all-external/known-diff.patch +++ b/tests/fixtures/export-all-external/known-diff.patch @@ -5,6 +5,4 @@ Index: diff.patch @@ -1,2 +1,2 @@ // index.d.ts -export * from 'rollup'; -\ No newline at end of file +export * from 'rollup' -\ No newline at end of file diff --git a/tests/fixtures/export-default-abstract/known-diff.patch b/tests/fixtures/export-default-abstract/known-diff.patch index f685ba6..837af92 100644 --- a/tests/fixtures/export-default-abstract/known-diff.patch +++ b/tests/fixtures/export-default-abstract/known-diff.patch @@ -16,7 +16,5 @@ Index: diff.patch + abstract readonly memberType: memberTypes_d_default; } -export { MemberInfo as default }; -\ No newline at end of file +type index_d_default = MemberInfo +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/export-default-class/known-diff.patch b/tests/fixtures/export-default-class/known-diff.patch index d2a0119..afe8b13 100644 --- a/tests/fixtures/export-default-class/known-diff.patch +++ b/tests/fixtures/export-default-class/known-diff.patch @@ -6,7 +6,5 @@ Index: diff.patch // index.d.ts declare class Foo {} -export { Foo as default }; -\ No newline at end of file +type index_d_default = Foo +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/export-default-function/known-diff.patch b/tests/fixtures/export-default-function/known-diff.patch index f305ccc..62fc98c 100644 --- a/tests/fixtures/export-default-function/known-diff.patch +++ b/tests/fixtures/export-default-function/known-diff.patch @@ -6,7 +6,5 @@ Index: diff.patch // index.d.ts declare function foo(): void; -export { foo as default }; -\ No newline at end of file +type index_d_default = foo +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/export-default-interface/known-diff.patch b/tests/fixtures/export-default-interface/known-diff.patch index 80905a4..64c2d3f 100644 --- a/tests/fixtures/export-default-interface/known-diff.patch +++ b/tests/fixtures/export-default-interface/known-diff.patch @@ -6,7 +6,5 @@ Index: diff.patch // index.d.ts interface Foo {} -export { Foo as default }; -\ No newline at end of file +type index_d_default = Foo +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/export-default-overrides/diff.patch b/tests/fixtures/export-default-overrides/diff.patch index 854b28e..6454059 100644 --- a/tests/fixtures/export-default-overrides/diff.patch +++ b/tests/fixtures/export-default-overrides/diff.patch @@ -10,7 +10,5 @@ Index: diff.patch +type index_d_default = autobind declare function autobind(prototype: Object, name: string, descriptor: PropertyDescriptor): PropertyDescriptor; -export { autobind as default }; -\ No newline at end of file +type index_d_default = autobind +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/export-empty-object/known-diff.patch b/tests/fixtures/export-empty-object/known-diff.patch index 1ea4881..ca8cf85 100644 --- a/tests/fixtures/export-empty-object/known-diff.patch +++ b/tests/fixtures/export-empty-object/known-diff.patch @@ -5,6 +5,4 @@ Index: diff.patch @@ -1,2 +1,2 @@ // index.d.ts -export { }; -\ No newline at end of file +export {} -\ No newline at end of file diff --git a/tests/fixtures/export-multiple-vars/diff.patch b/tests/fixtures/export-multiple-vars/diff.patch index 83bc3be..bc803d3 100644 --- a/tests/fixtures/export-multiple-vars/diff.patch +++ b/tests/fixtures/export-multiple-vars/diff.patch @@ -20,6 +20,4 @@ Index: diff.patch }; -export { config, options, params }; -export { In, Out }; -\ No newline at end of file +export { In, Out, config, options, params }; -\ No newline at end of file diff --git a/tests/fixtures/export-star-as/diff.patch b/tests/fixtures/export-star-as/diff.patch index c50205a..6707590 100644 --- a/tests/fixtures/export-star-as/diff.patch +++ b/tests/fixtures/export-star-as/diff.patch @@ -16,9 +16,7 @@ Index: diff.patch + }); } -export { foo_d as foo }; -\ No newline at end of file +type foo_d_exports = {} +__export(foo_d_exports, { A: () => A }); +interface A {} +export { foo_d_exports as foo }; -\ No newline at end of file diff --git a/tests/fixtures/export-star/diff.patch b/tests/fixtures/export-star/known-diff.patch similarity index 80% rename from tests/fixtures/export-star/diff.patch rename to tests/fixtures/export-star/known-diff.patch index ab7bb69..2054b9b 100644 --- a/tests/fixtures/export-star/diff.patch +++ b/tests/fixtures/export-star/known-diff.patch @@ -8,6 +8,4 @@ Index: diff.patch declare class A {} -export { A }; -export { B }; -\ No newline at end of file +export { A, B }; -\ No newline at end of file diff --git a/tests/fixtures/externals-link/known-diff.patch b/tests/fixtures/externals-link/known-diff.patch index c5daacb..bf414d8 100644 --- a/tests/fixtures/externals-link/known-diff.patch +++ b/tests/fixtures/externals-link/known-diff.patch @@ -5,7 +5,5 @@ Index: diff.patch @@ -1,2 +1,3 @@ // index.d.ts -export { DragContainerElement } from 'd3-drag-local'; -\ No newline at end of file +import { DragContainerElement } from 'd3-drag-local'; +export { DragContainerElement }; -\ No newline at end of file diff --git a/tests/fixtures/externals/known-diff.patch b/tests/fixtures/externals/known-diff.patch index 37ad33e..c15d200 100644 --- a/tests/fixtures/externals/known-diff.patch +++ b/tests/fixtures/externals/known-diff.patch @@ -6,8 +6,6 @@ Index: diff.patch // index.d.ts -export { ReactFragment } from 'react'; -export { DragContainerElement } from 'd3-drag'; -\ No newline at end of file +import { ReactFragment } from 'react'; +import { DragContainerElement } from 'd3-drag'; +export { DragContainerElement, ReactFragment }; -\ No newline at end of file diff --git a/tests/fixtures/generics/known-diff.patch b/tests/fixtures/generics/known-diff.patch index c55e99e..51cfd80 100644 --- a/tests/fixtures/generics/known-diff.patch +++ b/tests/fixtures/generics/known-diff.patch @@ -9,6 +9,4 @@ Index: diff.patch interface I2 extends Gen

{} -export { Cl, fn }; -export { I1, I2, Ty, TyCtor, TyFn }; -\ No newline at end of file +export { Cl, I1, I2, Ty, TyCtor, TyFn, fn }; -\ No newline at end of file diff --git a/tests/fixtures/has-class/known-diff.patch b/tests/fixtures/has-class/known-diff.patch index e4223d7..ea78af6 100644 --- a/tests/fixtures/has-class/known-diff.patch +++ b/tests/fixtures/has-class/known-diff.patch @@ -8,7 +8,5 @@ Index: diff.patch method(d: D): E; } -export { Foo as default }; -\ No newline at end of file +type index_d_default = Foo +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/implements-expression/diff.patch b/tests/fixtures/implements-expression/diff.patch index 1316814..6832cae 100644 --- a/tests/fixtures/implements-expression/diff.patch +++ b/tests/fixtures/implements-expression/diff.patch @@ -16,7 +16,5 @@ Index: diff.patch -declare class MyComponent extends ns.Component {} -export { MyComponent }; -export { MyComponentProps }; -\ No newline at end of file +declare class MyComponent extends ns_d_default.Component {} +export { MyComponent, MyComponentProps }; -\ No newline at end of file diff --git a/tests/fixtures/import-default-interface/known-diff.patch b/tests/fixtures/import-default-interface/known-diff.patch index 438dd0e..13386d5 100644 --- a/tests/fixtures/import-default-interface/known-diff.patch +++ b/tests/fixtures/import-default-interface/known-diff.patch @@ -9,4 +9,3 @@ Index: diff.patch +type bar_d_default = Bar +interface Foo extends bar_d_default {} export { Foo }; -\ No newline at end of file diff --git a/tests/fixtures/inline-external-node-next-module/known-diff.patch b/tests/fixtures/inline-external-node-next-module/known-diff.patch index f054e41..d5a0018 100644 --- a/tests/fixtures/inline-external-node-next-module/known-diff.patch +++ b/tests/fixtures/inline-external-node-next-module/known-diff.patch @@ -5,6 +5,4 @@ Index: diff.patch @@ -1,2 +1,2 @@ // index.d.ts -export * from 'package-a/file.js'; -\ No newline at end of file +export * from 'package-a/file.js' -\ No newline at end of file diff --git a/tests/fixtures/inline-import-external-namespace/diff.patch b/tests/fixtures/inline-import-external-namespace/diff.patch index 86b4e51..36f1f4e 100644 --- a/tests/fixtures/inline-import-external-namespace/diff.patch +++ b/tests/fixtures/inline-import-external-namespace/diff.patch @@ -12,4 +12,3 @@ Index: diff.patch + ns2: typeof import("foo"); } export { Foo }; -\ No newline at end of file diff --git a/tests/fixtures/inline-import-generic/diff.patch b/tests/fixtures/inline-import-generic/diff.patch index 69ab918..19737e0 100644 --- a/tests/fixtures/inline-import-generic/diff.patch +++ b/tests/fixtures/inline-import-generic/diff.patch @@ -12,4 +12,3 @@ Index: diff.patch + bar: import("./bar").Bar; } export { Foo }; -\ No newline at end of file diff --git a/tests/fixtures/inline-import-namespace/diff.patch b/tests/fixtures/inline-import-namespace/diff.patch index 6b5e14f..8c04a0f 100644 --- a/tests/fixtures/inline-import-namespace/diff.patch +++ b/tests/fixtures/inline-import-namespace/diff.patch @@ -18,4 +18,3 @@ Index: diff.patch + ns: typeof import("./bar"); } export { Foo }; -\ No newline at end of file diff --git a/tests/fixtures/inline-import-typeof-members/diff.patch b/tests/fixtures/inline-import-typeof-members/diff.patch index 41160c6..638edcc 100644 --- a/tests/fixtures/inline-import-typeof-members/diff.patch +++ b/tests/fixtures/inline-import-typeof-members/diff.patch @@ -13,4 +13,3 @@ Index: diff.patch + rollup: import("rollup").RollupOptions; } export { Test, TypeScript }; -\ No newline at end of file diff --git a/tests/fixtures/inline-import/diff.patch b/tests/fixtures/inline-import/diff.patch index 71d6de7..92e41b9 100644 --- a/tests/fixtures/inline-import/diff.patch +++ b/tests/fixtures/inline-import/diff.patch @@ -13,4 +13,3 @@ Index: diff.patch + baz: typeof import("./bar").Baz; } export { Foo }; -\ No newline at end of file diff --git a/tests/fixtures/issue-100-unnamed-default-export/diff.patch b/tests/fixtures/issue-100-unnamed-default-export/diff.patch index ce7b1d2..5c36f23 100644 --- a/tests/fixtures/issue-100-unnamed-default-export/diff.patch +++ b/tests/fixtures/issue-100-unnamed-default-export/diff.patch @@ -15,7 +15,5 @@ Index: diff.patch }, ): Promise; -export { export_default as default }; -\ No newline at end of file +type index_d_default = export_default +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/issue-106-inline-import-generic/diff.patch b/tests/fixtures/issue-106-inline-import-generic/diff.patch index e43edcd..956cf93 100644 --- a/tests/fixtures/issue-106-inline-import-generic/diff.patch +++ b/tests/fixtures/issue-106-inline-import-generic/diff.patch @@ -13,4 +13,3 @@ Index: diff.patch + emitter: import("./options").ObjectWithParam; } export { CalendarDataManager }; -\ No newline at end of file diff --git a/tests/fixtures/issue-160-global-namespace/diff.patch b/tests/fixtures/issue-160-global-namespace/diff.patch index 6462dea..f3eef4f 100644 --- a/tests/fixtures/issue-160-global-namespace/diff.patch +++ b/tests/fixtures/issue-160-global-namespace/diff.patch @@ -15,4 +15,3 @@ Index: diff.patch - } -} export { A }; -\ No newline at end of file diff --git a/tests/fixtures/issue-166-namespace-rename/diff.patch b/tests/fixtures/issue-166-namespace-rename/diff.patch index 3be782e..ce6e049 100644 --- a/tests/fixtures/issue-166-namespace-rename/diff.patch +++ b/tests/fixtures/issue-166-namespace-rename/diff.patch @@ -14,4 +14,3 @@ Index: diff.patch export { Item }; } export { A, B }; -\ No newline at end of file diff --git a/tests/fixtures/issue-185-hoist-generic-extends/diff.patch b/tests/fixtures/issue-185-hoist-generic-extends/diff.patch index 61de55a..0aec3ba 100644 --- a/tests/fixtures/issue-185-hoist-generic-extends/diff.patch +++ b/tests/fixtures/issue-185-hoist-generic-extends/diff.patch @@ -29,6 +29,4 @@ Index: diff.patch - export { a_d_Props as Props }; -} -export { a_d as A }; -\ No newline at end of file +export { a_d_exports as A }; -\ No newline at end of file diff --git a/tests/fixtures/issue-217/diff.patch b/tests/fixtures/issue-217/diff.patch index 1165c8d..7929839 100644 --- a/tests/fixtures/issue-217/diff.patch +++ b/tests/fixtures/issue-217/diff.patch @@ -27,6 +27,4 @@ Index: diff.patch - export { example_d_Example as Example }; -} -export { example_d as types }; -\ No newline at end of file +export { example_d_exports as types }; -\ No newline at end of file diff --git a/tests/fixtures/issue-220/diff.patch b/tests/fixtures/issue-220/diff.patch index 37d314a..5b2064c 100644 --- a/tests/fixtures/issue-220/diff.patch +++ b/tests/fixtures/issue-220/diff.patch @@ -12,4 +12,3 @@ Index: diff.patch readonly letter = Alphabet.a; } export { Test }; -\ No newline at end of file diff --git a/tests/fixtures/issue-24-export-const/diff.patch b/tests/fixtures/issue-24-export-const/diff.patch index 257e26f..f10e051 100644 --- a/tests/fixtures/issue-24-export-const/diff.patch +++ b/tests/fixtures/issue-24-export-const/diff.patch @@ -11,4 +11,3 @@ Index: diff.patch +declare let L; +declare var V; export { C, L, V }; -\ No newline at end of file diff --git a/tests/fixtures/issue-254/known-diff.patch b/tests/fixtures/issue-254/known-diff.patch index 8b4a045..82b8a56 100644 --- a/tests/fixtures/issue-254/known-diff.patch +++ b/tests/fixtures/issue-254/known-diff.patch @@ -9,6 +9,4 @@ Index: diff.patch } -export { Bar }; -export { Foo }; -\ No newline at end of file +export { Bar, Foo }; -\ No newline at end of file diff --git a/tests/fixtures/issue-87/diff.patch b/tests/fixtures/issue-87/diff.patch index a2014a2..fb3583b 100644 --- a/tests/fixtures/issue-87/diff.patch +++ b/tests/fixtures/issue-87/diff.patch @@ -23,6 +23,4 @@ Index: diff.patch declare const Cache2: () => Cache2; -export { Cache, Cache2, uniqueId }; -export { CacheInfo }; -\ No newline at end of file +export { Cache, Cache2, CacheInfo, uniqueId }; -\ No newline at end of file diff --git a/tests/fixtures/issue-89-import-equals/diff.patch b/tests/fixtures/issue-89-import-equals/diff.patch index 39d9891..5eadf85 100644 --- a/tests/fixtures/issue-89-import-equals/diff.patch +++ b/tests/fixtures/issue-89-import-equals/diff.patch @@ -7,4 +7,3 @@ Index: diff.patch -interface Foo {} +import Foo = require("./bar"); export { Foo }; -\ No newline at end of file diff --git a/tests/fixtures/namespace-definition-rename/diff.patch b/tests/fixtures/namespace-definition-rename/diff.patch index 56f3c2d..f349448 100644 --- a/tests/fixtures/namespace-definition-rename/diff.patch +++ b/tests/fixtures/namespace-definition-rename/diff.patch @@ -13,10 +13,8 @@ Index: diff.patch var staticProp: string; } -export { fn$1 as a, fn as b }; -\ No newline at end of file +declare function fn$1(arg: string): string; +declare namespace fn$1 { + var staticProp: string; +} +export { fn as a, fn$1 as b }; -\ No newline at end of file diff --git a/tests/fixtures/namespace-keyword-exports/diff.patch b/tests/fixtures/namespace-keyword-exports/diff.patch index 0f025ba..a4bac9c 100644 --- a/tests/fixtures/namespace-keyword-exports/diff.patch +++ b/tests/fixtures/namespace-keyword-exports/diff.patch @@ -17,9 +17,7 @@ Index: diff.patch + }); } -export { foo_d as foo }; -\ No newline at end of file +type foo_d_exports = {} +__export(foo_d_exports, { in: () => _in }); +declare const _in = "foo"; +export { foo_d_exports as foo }; -\ No newline at end of file diff --git a/tests/fixtures/overrides/known-diff.patch b/tests/fixtures/overrides/known-diff.patch index a10ffcd..77aafda 100644 --- a/tests/fixtures/overrides/known-diff.patch +++ b/tests/fixtures/overrides/known-diff.patch @@ -8,7 +8,5 @@ Index: diff.patch method(e: E): F; } -export { Foo as default }; -\ No newline at end of file +type index_d_default = Foo +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/path-mapping/known-diff.patch b/tests/fixtures/path-mapping/known-diff.patch index 13604e5..48cf608 100644 --- a/tests/fixtures/path-mapping/known-diff.patch +++ b/tests/fixtures/path-mapping/known-diff.patch @@ -5,7 +5,5 @@ Index: diff.patch @@ -1,2 +1,3 @@ // index.d.ts -export { Foo } from 'components/Foo'; -\ No newline at end of file +import { Foo } from 'components/Foo'; +export { Foo }; -\ No newline at end of file diff --git a/tests/fixtures/preserve-comments/diff.patch b/tests/fixtures/preserve-comments/diff.patch index dfcb2a1..08fccc4 100644 --- a/tests/fixtures/preserve-comments/diff.patch +++ b/tests/fixtures/preserve-comments/diff.patch @@ -17,4 +17,3 @@ Index: diff.patch - */ declare function main(): void; export { first, main, second }; -\ No newline at end of file diff --git a/tests/fixtures/re-export-default/diff.patch b/tests/fixtures/re-export-default/diff.patch index c840c5c..9621624 100644 --- a/tests/fixtures/re-export-default/diff.patch +++ b/tests/fixtures/re-export-default/diff.patch @@ -8,7 +8,5 @@ Index: diff.patch +type default1_d_default = Foo$1 declare class Foo {} -export { Foo$1 as default, Foo as default2 }; -\ No newline at end of file +type default2_d_default = Foo +export { default1_d_default as default, default2_d_default as default2 }; -\ No newline at end of file diff --git a/tests/fixtures/re-export-namespace-inner/diff.patch b/tests/fixtures/re-export-namespace-inner/diff.patch index 671e801..88bd45e 100644 --- a/tests/fixtures/re-export-namespace-inner/diff.patch +++ b/tests/fixtures/re-export-namespace-inner/diff.patch @@ -24,6 +24,4 @@ Index: diff.patch - }; -} -export { mod_d as outer }; -\ No newline at end of file +export { mod_d_exports as outer }; -\ No newline at end of file diff --git a/tests/fixtures/re-export-namespace-multiple/diff.patch b/tests/fixtures/re-export-namespace-multiple/diff.patch index 1faa402..5fd3bf6 100644 --- a/tests/fixtures/re-export-namespace-multiple/diff.patch +++ b/tests/fixtures/re-export-namespace-multiple/diff.patch @@ -59,6 +59,4 @@ Index: diff.patch } -export { deep_d as deep, defs_d as ns, onlyOne_d as onlyOne }; -export { WithA }; -\ No newline at end of file +export { WithA, deep_d_exports as deep, defs_d_exports as ns, only_one_d_exports as onlyOne }; -\ No newline at end of file diff --git a/tests/fixtures/re-export-namespace/diff.patch b/tests/fixtures/re-export-namespace/diff.patch index b53b733..6a17f56 100644 --- a/tests/fixtures/re-export-namespace/diff.patch +++ b/tests/fixtures/re-export-namespace/diff.patch @@ -51,6 +51,4 @@ Index: diff.patch - export { namespace_d_A as A, namespace_d_F as F, namespace_d_GenericI as GenericI, namespace_d_GenericT as GenericT }; -} -export { namespace_d as ns1, namespace_d as ns2 }; -\ No newline at end of file +export { namespace_d_exports as ns1, namespace_d_exports as ns2 }; -\ No newline at end of file diff --git a/tests/fixtures/react-components/known-diff.patch b/tests/fixtures/react-components/known-diff.patch index bedc589..3a5afcc 100644 --- a/tests/fixtures/react-components/known-diff.patch +++ b/tests/fixtures/react-components/known-diff.patch @@ -9,6 +9,4 @@ Index: diff.patch declare class MyComponent extends React.Component {} -export { MyComponent }; -export { MyComponentProps }; -\ No newline at end of file +export { MyComponent, MyComponentProps }; -\ No newline at end of file diff --git a/tests/fixtures/reference-path-remapping-should-not-touch-absolute-path/diff.patch b/tests/fixtures/reference-path-remapping-should-not-touch-absolute-path/diff.patch index d2f3d39..b50c827 100644 --- a/tests/fixtures/reference-path-remapping-should-not-touch-absolute-path/diff.patch +++ b/tests/fixtures/reference-path-remapping-should-not-touch-absolute-path/diff.patch @@ -7,4 +7,3 @@ Index: diff.patch -/// interface Hello {} export { Hello }; -\ No newline at end of file diff --git a/tests/fixtures/renaming/diff.patch b/tests/fixtures/renaming/diff.patch index a38b13a..643e78d 100644 --- a/tests/fixtures/renaming/diff.patch +++ b/tests/fixtures/renaming/diff.patch @@ -44,6 +44,4 @@ Index: diff.patch }; -export { Func$1 as AFunc, Klass$1 as AKlass, Func as BFunc, Klass as BKlass }; -export { Interface$1 as AInterface, Type$1 as AType, Interface as BInterface, Type as BType }; -\ No newline at end of file +export { Func as AFunc, Interface as AInterface, Klass as AKlass, Type as AType, Func$1 as BFunc, Interface$1 as BInterface, Klass$1 as BKlass, Type$1 as BType }; -\ No newline at end of file diff --git a/tests/fixtures/shadowing/diff.patch b/tests/fixtures/shadowing/diff.patch index 3bb108c..ecc02d1 100644 --- a/tests/fixtures/shadowing/diff.patch +++ b/tests/fixtures/shadowing/diff.patch @@ -29,6 +29,4 @@ Index: diff.patch interface GenericExtends extends GenericInterface {} -export { GenericKlass, genericFunction }; -export { ConditionalInfer, GenericExtends, GenericInterface, GenericType, Mapped }; -\ No newline at end of file +export { ConditionalInfer, GenericExtends, GenericInterface, GenericKlass, GenericType, Mapped, genericFunction }; -\ No newline at end of file diff --git a/tests/fixtures/type-only-import-export/diff.patch b/tests/fixtures/type-only-import-export/diff.patch index a5d2f65..f4b4424 100644 --- a/tests/fixtures/type-only-import-export/diff.patch +++ b/tests/fixtures/type-only-import-export/diff.patch @@ -50,6 +50,4 @@ Index: diff.patch -} -export { BarType, BarValue, X }; -export { Foo$1 as Foo, Foo as FooInlne, O as O1 }; -\ No newline at end of file +export { A, BarType, BarValue, C, C as C1, E3, E4, F, G, G1, H1, I, O as O1, index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/type-simple/diff.patch b/tests/fixtures/type-simple/diff.patch index d1db7f9..9629a75 100644 --- a/tests/fixtures/type-simple/diff.patch +++ b/tests/fixtures/type-simple/diff.patch @@ -9,6 +9,4 @@ Index: diff.patch declare const O: bigint; -export { A, B, C, D, E, F, G, H, I, J, K, L, M, O }; -export { N }; -\ No newline at end of file +export { A, B, C, D, E, F, G, H, I, J, K, L, M, N, O }; -\ No newline at end of file diff --git a/tests/fixtures/type-template-literals/diff.patch b/tests/fixtures/type-template-literals/diff.patch index e445c06..60a2a27 100644 --- a/tests/fixtures/type-template-literals/diff.patch +++ b/tests/fixtures/type-template-literals/diff.patch @@ -9,6 +9,4 @@ Index: diff.patch declare function setAlignment(value: `${VerticalAlignment}-${HorizontalAlignment}`): void; -export { setAlignment }; -export { SeussFish }; -\ No newline at end of file +export { SeussFish, setAlignment }; -\ No newline at end of file diff --git a/tests/fixtures/type-typeof-this/diff.patch b/tests/fixtures/type-typeof-this/diff.patch index 630bac8..30428ed 100644 --- a/tests/fixtures/type-typeof-this/diff.patch +++ b/tests/fixtures/type-typeof-this/diff.patch @@ -9,4 +9,3 @@ Index: diff.patch + min: () => typeof void 0; } export { NumberSchema }; -\ No newline at end of file diff --git a/tests/fixtures/unnamed-default-export-without-space/diff.patch b/tests/fixtures/unnamed-default-export-without-space/diff.patch index a24beab..17578cd 100644 --- a/tests/fixtures/unnamed-default-export-without-space/diff.patch +++ b/tests/fixtures/unnamed-default-export-without-space/diff.patch @@ -8,7 +8,5 @@ Index: diff.patch }, ): Promise; -export { export_default as default }; -\ No newline at end of file +type index_d_default = export_default +export { index_d_default as default }; -\ No newline at end of file diff --git a/tests/fixtures/variadic-tuple-types/diff.patch b/tests/fixtures/variadic-tuple-types/diff.patch index efb0dc0..5117524 100644 --- a/tests/fixtures/variadic-tuple-types/diff.patch +++ b/tests/fixtures/variadic-tuple-types/diff.patch @@ -9,6 +9,4 @@ Index: diff.patch declare function concat(arr1: T, arr2: U): [...T, ...U]; -export { concat }; -export { StrStrNumNumBool }; -\ No newline at end of file +export { StrStrNumNumBool, concat }; -\ No newline at end of file diff --git a/tests/index.test.ts b/tests/index.test.ts index e838e59..d64db71 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -45,7 +45,6 @@ await testFixtures( undefined, { ignoreWhitespace: true, - ignoreNewlineAtEof: true, stripTrailingCr: true, }, ) @@ -70,7 +69,7 @@ await testFixtures( ) function cleanupCode(text: string) { - return text + return `${text .replaceAll(/\/\/#region .*\n/g, '') .replaceAll('//#endregion\n', '') .replaceAll(/from "(.*)"/g, "from '$1'") @@ -78,4 +77,5 @@ function cleanupCode(text: string) { .split('\n') .filter((line) => line.trim() !== '') .join('\n') + .trim()}\n` }