Skip to content

Releases: wessberg/cjstoesm

v1.1.0

26 May 07:44
Compare
Choose a tag to compare
  • fix: ensure POSIX-formatted file names before passing on to glob d2d9acd
  • fix(api): fix issue where API would always return an empty file array 4a26823

v1.0.1...v1.1.0

v1.0.1

18 Mar 12:46
Compare
Choose a tag to compare
  • chore(build): fix API entry points 18e4cd5

v1.0.0...v1.0.1

v1.0.0

17 Mar 15:58
Compare
Choose a tag to compare

New Features

Automatic and configurable addition of file extensions to module specifiers

Support for EcmaScript modules is now stable in both node.js and supported browsers. In both of these environments, file extensions must be provided to module specifiers when using ES modules. Additionally, directory indexes must also be fully specified.
Until now, cjstoesm always preserved module specifiers as they were. While this might work fine for a lot of use cases, ideally cjstoesm
generates standards compliant modules.

Going forward, this behavior is now configurable and defaults to adding file extensions to relative module specifiers, while leaving alone module specifiers for built-in modules and external libraries. The preserveModuleSpecifiers option (or --preserve-module-specifiers via the CLI).

Here's all the supported options:

  • external (default): CommonJS module specifiers identifying libraries or built-in modules are preserved
  • internal: CommonJS module specifiers identifying anything else than libraries or built-in modules are preserved
  • always: CommonJS module specifiers are never transformed.
  • never: CommonJS module specifiers are always transformed

It can also take a function that is invoked with a module specifier and returns a boolean determining whether or not it should be preserved.

Full changelog

  • docs(README): update README 02213db
  • feat: add new option, 'preserveModuleSpecifiers' 1bad5b7

v0.1.3...v1.0.0

v0.1.3

21 Oct 19:23
Compare
Choose a tag to compare
  • feat: run tests for all TypeScript versions 0b0261c
  • fix: fix issue where function name could be lost 6de7830

v0.1.2...v0.1.3

v0.1.2

21 Oct 14:37
Compare
Choose a tag to compare
  • fix: ensure no local bindings may conflict 7dafcd6

v0.1.1...v0.1.2

v0.1.1

12 Aug 08:53
Compare
Choose a tag to compare

Features

  • feat(api): add API support ea42c39

Breaking Changes

  • BREAKING CHANGE: rename to cjstoesm, to align with the executable and make CLI usage easier 4eb039e

v0.0.22

01 Jul 12:38
Compare
Choose a tag to compare
  • fix: add support for 'export const foo = require(...)'. Closes #5 31d0141

v0.0.21...v0.0.22

v0.0.21

01 Jul 11:45
Compare
Choose a tag to compare
  • fix: add support for CommonJS-based barrel exports e6e33c0

v0.0.20...v0.0.21

v0.0.20

24 Jun 19:37
Compare
Choose a tag to compare
  • BREAKING CHANGE: Drop Node 8 support cadc608
  • fix: use a proper TransformationContext at all times. Adds TypeScript v3.9.5 support 1a14d64
  • fix: moving require calls up from a block scope will remove the surrounding block a66d7b5
  • chore(build): remove core-js dependency aa05321

v0.0.19...v0.0.20

v0.0.19

27 Feb 15:32
Compare
Choose a tag to compare
  • chore: update with TypeScript v3.8 support 4cc4a09
  • Merge pull request #4 from FDiskas/patch-1 db11215
  • Update package.json 47c62e1