Skip to content

9.0.0

Compare
Choose a tag to compare
@timocov timocov released this 27 Nov 21:15
· 75 commits to master since this release

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)