Skip to content

Releases: wessberg/cjstoesm

v3.0.0

31 Oct 00:19
Compare
Choose a tag to compare

BREAKING CHANGES

  • cjstoesm is now an ESM-only package.
  • Dropped support for Node versions older than v18.20.0.

New Features

  • Added support for TypeScript v5.6.
  • Added support for Import Attributes, instead of the now obsolete Import Assertions.

v2.1.2...v3.0.0

v2.1.2

31 May 19:44
Compare
Choose a tag to compare

fix: use ansi-colors instead of Chalk for better CJS fallback support

v2.1.1...v2.1.2

v2.1.1

30 May 14:56
Compare
Choose a tag to compare
  • fix: handle .cts and .mts extensions c772152
  • chore: bump dependencies 3ca4377
  • docs: typo 132e14d
  • docs: add Import Assertions example 2a544dc

v2.1.0...v2.1.1

v2.1.0

29 May 21:33
Compare
Choose a tag to compare
  • feat: add support for adding and customizing Import Assertions 6bf8056

v2.0.0...v2.1.0

v2.0.0

29 May 20:50
Compare
Choose a tag to compare

New Features

The cjstoesm package is now based on ESM and requires Node v14.19.0 (BREAKING CHANGE)

Despite being a tool for converting CommonJS to ESM, and a bit ironically, cjstoesm has been published as an NPM package with a CommonJS entrypoint (dist/cjs/index.js), and an ESM entrypoint (dist/esm/index.js), while the CLI itself was CommonJS based.

Now, the cjstoesm package is fully based on ESM. There are still API entrypoints for CommonJS using the package exports feature, as well as pointed to from the main field in the package.json.

From this new major version of cjstoesm, you must be using Node.js v14.19.0 or newer.

Improve emit behavior

No more replication of source folder structure (BREAKING CHANGE)

In the past, cjstoesm would replicate the source folder structure inside the destination folder.
For example, if you called to CLI with something like:

cjstoesm foo/bar/baz/** target

You would get files following a pattern like this: target/foo/bar/baz/<filename>.
This was a bit counterintuitive.

In the new version, this behavior changes and aligns with general user expectations. In the example above, from the new version files will follow a pattern like this: target/<filename>.

Allow overwriting in-place and make outDir an optional argument (BREAKING CHANGE)

In the old version of cjstoesm, passing in an output directory was strictly required. From the new version, the default behavior is to simply overwrite the files in-place. You can still pass in a separate output directory as the second argument if you want, but from the new version this is completely optional.

This means that the following is now possible:

cjstoesm **/*.*

Easier globbing

In the old version of cjstoesm, the following wouldn't work:

cjstoesm src

Since src doesn't match anything as a glob. However, to align with user expectations, in the new version, any direct descendent of the src folder will now be matched by the above command.

  • feat: migrate to publishing ES-modules with a CommonJS fallback. Improve emit-behavior. Fix bugs related to inclusion of module specifiers 78592d0

v1.1.5...v2.0.0

v1.1.5

25 May 18:05
Compare
Choose a tag to compare
  • feat: Add support for TypeScript 4.6. Add new sponsor b73eb9e

v1.1.4...v1.1.5

v1.1.4

29 May 22:12
Compare
Choose a tag to compare
  • chore(build): bump dependencies ed627ca

v1.1.3...v1.1.4

v1.1.3

29 May 21:21
Compare
Choose a tag to compare
  • chore(build): bump dependencies 0d5d528
  • Update README.md 49cc90c
  • chore(build): add TypeScript@4.2.4 to test versions of TypeScript 50f5c5b

v1.1.2...v1.1.3

v1.1.2

28 May 19:55
Compare
Choose a tag to compare
  • refactor: use compatfactory 92e184e

v1.1.1...v1.1.2

v1.1.1

26 May 23:17
Compare
Choose a tag to compare
  • refactor: move shared path helpers into dependency on crosspath 6a703f5
  • refactor: use helper types instead of duplications ba8fef4
  • fix: remove deprecated call to program.help() e47e45d

v1.1.0...v1.1.1