Skip to content

v1.22.2

Compare
Choose a tag to compare
@onigoetz onigoetz released this 24 Apr 18:57
· 524 commits to master since this release

Highlights

  • Improvements in Crafty's internals for ESM
  • Improvements in crafty-preset-jest for ESM

Improvements in Crafty's internals for ESM

  • Rename crafty's binary to bin.cjs to force node to start it as CommonJS, allows to install it within an ESM module
  • new crafty.runAllSync(method: string, ...args) method to run all implementations of an extension within presets.
  • loaded presets are wrapped in a CraftyPreset class with the following methods:
    • implements(method: string)
    • run(method: string, ...args)
    • get(property: string)
  • load presets with import(). This allows future presets to be created as ESM modules

Improvements in crafty-preset-jest for ESM

  • Automatically detect when package.json contains type: "module"
    • run Jest with Vmodules enabled
    • don't transpile node dependencies that are using ESM
    • transpile .ts, .tsx files to modules instead of commonjs
  • Use enhanced-resolve to resolve modules in Jest, allows to set .mjs and .cjs to be aliases of .mts and .cts

What's Changed

  • @swc/core from 1.3.51 to 1.3.53
  • postcss from 8.4.22 to 8.4.23
  • eslint from 8.38.0 to 8.39.0
  • stylelint from 15.5.0 to 15.6.0
  • rollup from 30.20.6 to 3.21.0
  • webpack from 5.79.0 to 5.80.0

Full Changelog: v1.22.1...v1.22.2