5.0 migration
Because boost is relatively stable (there has been no changes in months), this release is all about migrating to ESM, and updating dependencies.
All packages
- Requires TypeScript v5 or greater.
- Dropped Node.js v16 support. Now requires v18.12 and above.
- Updated many dependencies to their latest major version.
- Migrated all test utilities from Jest to Vitest.
Migrated to ECMAScript modules (.mjs)
We have finished our migration to modules, and all packages are now purely ESM, as we ship .mjs
files and utilize module-based exports. The only exception to this is @boost/module, which still
ships some .cjs files to support require() augmentation.
With the migration to ESM, we also see the following benefits:
- Increased performance and reduced memory usage.
- Packages are now easily tree-shakeable.
- They utilize more modern features and syntax.
Package test utilities are now async
Some test utilities in the /test entry point for individual packages have been updated to be
async. This includes functions like mockDebugger and mockLogger. This change was made to support
the new Vitest testing framework.
@boost/common
- Migrated from
resolvetoenhanced-resolveforPathResolver. This is to supportpackage.jsonexports. We currently support theimport,require, andnodeconditions.
@boost/config
- Loading of
.js,.cjs, and.mjsfiles now utilizes dynamicimport()instead ofrequire(). The configuration must also be the default export.
@boost/cli
- Upgraded to and now requires React v18.
- Upgraded to and now requires Ink v4. Now uses a WASM based Yoga engine.
@boost/module
- Migrate to the new Node.js hooks API, from the old loader API. Because of this, imports were
changed:
@boost/module/loader.mjs->@boost/module/register(registers all hooks)@boost/module/loader/typescript.mjs->@boost/module/hook-typescript(the TypeScript hook itself)
@boost/plugin
- Updated the
Loaderto use dynamicimport()for loading modules, instead of ourrequireModulefunction from@boost/module. This is to support both CJS and ESM files.
@boost/test-utils
- Migrated from Jest to Vitest.
- Removed the
copyFixtureToMockfunction.
@boost/translate
- Updated
createTranslatorto be async. - Added support for
.cjsand.mjsfiles for translation resources.