Skip to content

Releases: wessberg/rollup-plugin-ts

v2.0.1

17 Nov 00:30
Compare
Choose a tag to compare
  • fix: fix a problem with resolving swc configs 677c928
  • docs: documented how to opt out of @babel-preset-env c791d88

v2.0.0...v2.0.1

v2.0.0

17 Nov 00:00
Compare
Choose a tag to compare

Breaking Changes

Babel packages are now optional peer dependencies

Ever since rollup-plugin-ts was initially released, it has declared hard dependencies on several babel packages such as @babel/core, @babel/runtime, @babel/preset-env, and @babel/plugin-transform-runtime. This is useful when configuring the plugin to use Babel as the transpiler. However, it also meant that a ton of Babel-related packages was installed for everyone who wanted to use rollup-plugin-ts, but not necessarily Babel, at least not on every project. It also took away control from library consumers in terms of deciding which specific versions of Babel and its related packages to depend on. And, it also meant that if the plugin should support additional transpilers in the future, the related packages to those would most likely also have to be declared as hard dependencies, to align with the behavior with Babel.

With v2.0.0, all Babel dependencies are now optional peer dependencies. That means that if you use the transpiler: "babel" option with rollup-plugin-ts, you'll have to make sure that @babel/core, @babel/runtime, @babel/plugin-transform-runtime, and @babel/preset-env are declared as dependencies within your package.json file. If you don't, you'll get an error describing exactly which packages are missing such that you can easily include these in your package.json file.

New Features

Support for using swc as a transpiler

It was always the intention that rollup-plugin-ts could be extended to support more transpilers than just typescript and babel. Now that we support optional peer dependencies, it was finally possible to bring swc support to the plugin.

Swc is a much faster alternative to Babel, built in Rust, that attempts to be as close to a drop-in replacement for Babel as possible. It is not nearly as mature and doesn't have as big a plugin ecosystem yet, but can often be much faster than Babel. And like Babel, it also has first-class support for Browserslists which will be used to decide which syntax transformations to apply depending on language support in the target environments.

Full Changelog

  • docs: improve README 80b7d1c
  • docs: fix incorrect formatting in README ee9ab26
  • docs: Document interoperability with swc in README 68474f4
  • fix: when emiting declarations, always use define for class fields to work around limitations introduced in TypeScript 4.3 for when bundling declarations when a subclass overrides a property from the parent class but doesn't provide an initializer b25a494
  • fix: add support for shimming regenerator-runtime when using swc as a transpiler 1513fc5
  • feat: add support for swc as a transpiler as an alternative to babel. #155 e84d21c
  • feat: no longer depend on @babel/core types in npm package d91ec74
  • BREAKING CHANGE: Move babel related dependencies to peer dependencies and make them optional cfe3913
  • fix: ensure that the drive letter is prefixed to absolute paths on Windows when getSourceFile is called internally from TypeScript f368af3
  • test: make more tests run in serial 12a3e15

v1.4.7...v2.0.0

v1.4.7

24 Sep 08:28
Compare
Choose a tag to compare
  • chore: bump dependencies 3d40f71
  • feat: avoid duplicating inlined module-/namespace declarations and hoist nested ones. #149 b21b20c

v1.4.6...v1.4.7

v1.4.6

21 Sep 13:13
Compare
Choose a tag to compare

v1.4.5...v1.4.6

v1.4.5

21 Sep 12:52
Compare
Choose a tag to compare

v1.4.4...v1.4.5

v1.4.4

21 Sep 12:22
Compare
Choose a tag to compare

v1.4.3...v1.4.4

v1.4.3

21 Sep 07:48
Compare
Choose a tag to compare
  • fix: fix an issue where exporting ArrayTypeNodes from other files could lead to corruption of declaration files. Closes #151 27537be

v1.4.2...v1.4.3

v1.4.2

16 Sep 12:23
Compare
Choose a tag to compare
  • docs: update README 11e3cd4
  • chore: bump dependencies 87a86e6
  • fix: work around incorrect imports in some @babel/runtime/helpers/esm files that may break when using babel as a transpiler without the commonjs plugin or something similar d3daf35

v1.4.1...v1.4.2

v1.4.1

31 Aug 20:17
Compare
Choose a tag to compare

v1.4.0...v1.4.1

v1.4.0

03 Jun 12:25
Compare
Choose a tag to compare
  • test: rewrite test runner to always work with virtual files.
  • fix(declarations): when reexporting a namespace under a separate binding, default exports can trigger syntax errors.
  • refactor: build rollup-plugin-ts with itself. Cool stuff. 3e64a92
  • refactor: unify Compiler API factory function calls with compatfactory instead of maintaining different logic for different TypeScript versions 3cc8fac
  • BREAKING CHANGE: rename package to rollup-plugin-ts 0337d7a

v1.3.14...v1.4.0