Skip to content

Releases: wessberg/rollup-plugin-ts

v3.1.0

09 Jan 23:23
Compare
Choose a tag to compare
  • feat: add TypeScript v4.9 support 1bd7601

v3.0.2...v3.1.0

v3.0.2

07 Jun 21:58
Compare
Choose a tag to compare
  • chore: bump deps 6c96c17
  • feat: add support for ESM-based Babel configs. Closes #167 15e8edd
  • feat: add support for multiple swc configs. Closes #177. Don't enforce importHelpers: true to avoid a potential tslib error when babel or swc is used for all types of syntax 5ba4c9c
  • fix: don't call addWatchFile outside of allowed Rollup phase 8b3e7e8

v3.0.1...v3.0.2

v3.0.1

31 May 19:51
Compare
Choose a tag to compare
  • fix: use ansi-colors instead of Chalk for better CJS fallback support eac318e
  • docs: add note about different declaration formats 2b34a70

v3.0.0...v3.0.1

v3.0.0

30 May 23:32
Compare
Choose a tag to compare

New Features

rollup-plugin-ts is now based on ESM and requires Node v14.19.0 (BREAKING CHANGE)

Now that TypeScript v4.7 is out, it has finally received great support for ES modules in a Node.js environment that aligns with how it has been implemented across Node.js and browsers.

Because of this, now is a good time to make this plugin a type: "module" package. However, it still provides a CommonJS fallback. If your codebase is still based on CommonJS, you should be fine. Please know however, that rollup-plugin-ts requires an environment running Node v14.19.0 or newer going forward.

TypeScript v4.7 support

rollup-plugin-ts now fully supports TypeScript v4.7 and its new features.
This also means that you can now use .mjs, .mts, .cjs, and .mts files.
Additionally, the extension of your declaration files will depend on the extensions of your output files as controlled by your Rollup config:

  • .js output files will produce .d.ts and optionally .d.ts.map files
  • .mjs output files will produce .d.mts and optionally .d.mts.map files
  • .cjs output files will produce .d.cts and optionally .d.cts.map files

Transpilers are now used for the entire syntax transformation (BREAKING CHANGE)

Before, when you selected a transpiler such as babel or swc, these wouldn't actually be used for stripping away TypeScript-specific features such as types, enums, and decorators. Instead, the TypeScript compiler APIs would still be used for performing the initial syntax transformation, and then babel or swc would "take over from there". However, there are times when you may want to use babel or swc even for the initial transformation.

Going forward, a transpiler will be used for the entire syntax transformation. However, this can be easily customized by mixing transpilers, which is an easy way to get the old behavior back.

Transpilers can be mixed

Now, the transpiler plugin option also accepts an options object if you want to mix them:

ts({
    transpiler: {
        typescriptSyntax: "typescript",
        otherSyntax: "babel"
    }
})

This allows you to decide exactly which transpilers are responsible for which parts of the emit phase. If you want to, in principle you can decide to let swc strip away TypeScript syntax, and then let babel continue on from there. You're in full control.

Of course, it still supports simply accepting a string, like always.

v2.0.7...v3.0.0

v2.0.7

15 Apr 21:52
Compare
Choose a tag to compare
  • fix: fix a regression when a Rollup cache is being used where unsupported files would be attempted to be added to the CompilerHost and crash the compilation. Fixes #178 630d5ae

v2.0.6...v2.0.7

v2.0.6

15 Apr 20:38
Compare
Choose a tag to compare
  • feat: add support for target ES2022 6eec842
  • feat: add TypeScript v4.6 support c387ff7
  • feat: generate correct declarations, diagnostics, and .tsbuildinfo when a Rollup cache is being used. Fixes #140 afa76ed
  • fix: correctly add aliased re-exported bindings to lexical environment at all times. Fixes #109 16d24fa
  • fix: correctly alias re-exported bindings which themselves may be aliased from other source files from the same chunk. Closes #176 364b50b
  • chore: run tests on Node v14, 16, and 17 619f7c4

v2.0.5...v2.0.6

v2.0.5

03 Jan 14:08
Compare
Choose a tag to compare
  • chore: bump dependencies 6061f60
  • fix: don't break when another plugin declares an asset that only later receives a source. Fixes #162 3ec4c86
  • feat: when using swc and no browserslist could be resolved, pass the ecma version directly as a target instead of generating a browserslist based on it. Closes #163 a2e88e5
  • Merge pull request #159 from hewel/fix-swcConfig 724e204
  • fix: swc reject when set parser to typescript 3770470

v2.0.4...v2.0.5

v2.0.4

19 Nov 08:22
Compare
Choose a tag to compare
  • fix: regression in v2.0.3 on TypeScript <= 3.7 where ExportDeclarations could be dropped f56c91c

v2.0.3...v2.0.4

v2.0.3

18 Nov 23:34
Compare
Choose a tag to compare
  • fix: group ExportDeclarations by not just module specifiers but also whether or not they or their individual ExportSpecifiers are 'isTypeOnly'. Fixes #153 493014c

v2.0.2...v2.0.3

v2.0.2

17 Nov 22:39
Compare
Choose a tag to compare
  • feat: add TypeScript v4.5 support dffc8b7

v2.0.1...v2.0.2