Skip to content

Releases: timocov/dts-bundle-generator

9.2.1

30 Dec 08:47
Compare
Choose a tag to compare

Fixed

  • Fixed handling globalThis and undefined (as a value) values (see #282 and 6a132dd)

9.2.0

29 Dec 11:33
Compare
Choose a tag to compare

Release notes

In this release I tried to adapt tests from api-extractor tool in order to compare results and apart from some passing tests I found a few issues that are fixed in this release.

Fixed

  • Prettified output when some "parts" aren't emitted (e.g. banner) (see af1736f)
  • Fixed incorrect import() statement if imported name is imported with renaming (see 9edab0d)
  • Fixed wrongly collision-resolved names when a name exists in a global scope (see 25703d7)
  • Fixed incorrect output while having re-export via import (see e324b37)
  • Fixed incomplete generated namespace while having export * from statements (see 0bd1a19)
  • Fixed incorrect generation while using export * from statements (see 0bdbf07 and b27daaa)
  • Fixed error while generating namespaced exports via import statements (see 06e531f)

9.1.0

27 Dec 11:40
Compare
Choose a tag to compare

Release notes

With this release all known bugs in the tool are fixed (especially long-lived ones!) 🎉

Fixed

  • Star re-exports (import * as NS / export * as NS) aren't wrapped with a NS name (see #134 and #281)
  • (Re-)Export from re-export from external library doesn't add import/export statements (see #251 and #279)

9.0.0

27 Nov 21:15
Compare
Choose a tag to compare

Release notes

This release is one of biggest and the most valuable releases in years.

It introduces a fix for a limitation that existed since very first release i.e. resolving of name collisions 🎉.

Now, if you have 2 nodes with the same name in the bundle, one of them will be renamed (by adding $NUM suffix) to avoid clashing and accidental declaration merging (but if you have 2 interfaces declared in the same module to have declaration merging it should work as expected too).

Because of this new mechanism it helped to address some of the issues that I wasn't aware of but it seems that it existed in some of the packages, i.e. using a wrong name because of renaming during import (import { name as newName } case) (see "Additional information" section in this PR).

One of known changes in the declaration generation with this release is that a function/class/etc that was originally exported with the default export will never be exported directly but via re-export export { name as default }. This should not affect the result of the bundle but I think it is worth to note it.

But there is more, please refer to the change log below.

Last but not least, I want to thank @Atrue for the contribution which was a motivation to make this release happen 🙏

Added

  • Use language service "rename" functionality to avoid name collisions (see #130 and #270)
  • Support for auto renaming nodes with the same name in the bundle (see #116 and #270)

Fixed

  • Inlining a library with namespaced imports/exports inlines export statements (see #271 and #278)
  • Incorrect handling re-export with namespace (see #274 and #277)
  • Double-underscored names aren't exported (see #275 and #276)
  • Invalid bundle while using import as statements in the code (see #184 and #270)
  • Incorrect handling namespaced imports/exports (see #266)

8.1.2

26 Oct 00:06
Compare
Choose a tag to compare

Fixed

  • Something went wrong - value cannot be null (see #265 and #267)

8.1.1

21 Oct 23:58
Compare
Choose a tag to compare

Fixed

  • Stack overflow while handling re-exports with circular dependencies (see #264 and 4429eac)

8.1.0

16 Oct 20:04
Compare
Choose a tag to compare

Added

  • Added support for .mts and .cts extensions (see #204)
  • Fixed handling re-exports in dependencies (see #259)

8.0.1

14 Apr 23:52
Compare
Choose a tag to compare

Fixed

  • declare module Module statements from dependencies are inlined despite if it should be imported (see #250 and a725512)

8.0.0

30 Mar 22:16
Compare
Choose a tag to compare

Breaking changes

  • Minimal typescript version changed from 4.0 to 5.0 (see #238 and #240)
  • Changed default behavior for module ModuleName statements (without quotes) (see #237 and #242)

Fixed

  • Fixed wrong export state of referenced namespaces/modules (see #241 and #242)
  • Some types are removed if they used in ambient context (see #243 and #244)
  • Imports are lost when importing esm-like modules without default export using commonjs import or esm import default (see #230 and #245)
  • Statements aren't inlined if they are used in declare global statements only (see #214 and #246)
  • Fixed incorrect output if rename while re-exporting the default export without a name (see #185 and #248)

7.2.0

28 Jan 16:24
Compare
Choose a tag to compare

Fixed

  • Incorrect handling inlining import() statements (see #234 and #235)