Skip to main content

4.0 migration

This is a rather simple release, as the APIs themselves are relatively stable. The biggest changes are migrating to .cjs and utilizing Node.js package exports, both in preparation for migrating to ECMAScript modules (.mjs).

All packages

  • Requires TypeScript v4.7 or greater.
  • Dropped Node.js v12 support. Now requires v14.15 and above.
  • Updated many dependencies to their latest major version.

Migrated to CommonJS (.cjs)

With the help of Packemon, all packages are now shipped as CommonJS (.cjs). This change is an initial step before migrating entirely to ECMAScript modules (which may be the next major version), as it unlocked the ability to also ship .mjs wrappers for our package entry points. Without this wrapper, named/default imports would not work correctly within .mjs files.

We don't expect this change to cause issues, but we wanted to document it incase you happen to run into weird module problems!

Migrated to Node.js exports

All packages now utilize the new package.json exports feature. For the most part, if you're importing from Boost modules using the package index, then this shouldn't affect you. However, if you're importing subpaths from Boost modules, like @boost/common/test or @boost/cli/react, then these may no longer work depending on the tooling you're using. The following minimum versions of popular tools must now be used:

  • Jest v28
  • TypeScript v4.7
  • Webpack v5

Another side effect of this change is that our internal files (those in lib/ or cjs/) can no longer be directly imported!

@boost/module

Updated ESM loader paths

Because of our move to exports, the paths to our ESM loader files have changed to the following:

  • @boost/module/loader.mjs -> @boost/module/loader
  • @boost/module/loader/typescript.mjs -> @boost/module/loader-typescript