Modular 4.0.0
New Features
- Node 18 Support
- Added support for TypeScript 4.5.3 and above
- Updated Jest to 29.3
- Support for a dedicated Modular configuration file
- Overhauled
modular build
command to now support--decendant
and--ancestor
flags that can be combined with existing flags for selective building, such as building only changed packages and their dependants (see also “Breaking Changes”) - Updated
modular test
command interface to align withmodular build
behaviour (see also “Breaking Changes”) - App type modular packages are no longer required to be private
- Modular
source
package type has been introduced for packages that are never built - LICENSE files are now copied over when building packages
modular test
testing pattern now includes.jsx
- Fixed
modular build
crashing when selected workspace(s) are not inpackages
directory - Changed default TypeScript version of newly created Modular repos with
create modular-react-app
to ^4.8.3
Breaking Changes
Upgraded to Jest 29
Jest has been bumped up three major versions from Jest 26, and it comes with a number of breaking changes.
We suggest reading through the following migration guides:
- Jest 26 to 27 Change Log
- Jest 27 to 28 Migration Guide | Change log
- Jest 28 to 29 Migration Guide | Change log
Some noteworthy breaking changes:
- Changed default snapshot formatting options to {escapeString: false, printBasicPrototype: false} as outlined by this blogpost - Any snapshots tests will have to be updated with the new format, or you can override the snapshotFormat option to the old defaults.
- As of Jest 28 jest-environment-jsdom is no longer shipped with Jest and needs to be installed separately
- Jest now includes full support of package.json exports - some existing imports might not resolve correctly
Upgraded to ESLint 8
ESLint has been bumped up from version 7 to 8. As with all major version changes, read through their migration guide for more information.
The biggest impact will likely be linting errors from new rules introduced with the update.
Removed Commands
We no longer provide the following commands:
modular convert
modular init
modular port
modular rename
Refer to the How To section for instructions on how to manually complete the tasks previously covered by these commands.
test
/ build
commands interface changed
modular test
now accepts package names as arguments instead of regular expressions. Regular expressions are still accepted with the--regex
optionmodular test
now supports all the selective options thatmodular build
supports (multiple packages,changed
,--ancestors
,--descendants
and all their combinations).modular build
without arguments now builds all the workspaces in the monorepo, in build order.
Other
- Dropped support for TypeScript versions below 4.5.3
- Jest
--watchAll
flag when running modular test is nowfalse
by default (Previously set to true unless running in CI) - Dropped support for minor versions of Node 14.17 and Node 16 version 16.9 and below
- Now support Node ^14.18.0, >=16.10.0, and >=18.0.0
- Dropped
USE_MODULAR_WEBPACK
environment variable, as Webpack is used by default. UseUSE_MODULAR_ESBUILD
env variable oruseModularEsbuild
in a modular configuration file to use esbuild - Changed default Content Delivery Network for ESM Views to esm.sh instead of Skypack, as it is no longer actively maintained. The CDN can still be configured through the
EXTERNAL_CDN_TEMPLATE
environment variable or through a modular configuration file.
Merged Changes
modular-scripts
@ 4.0.0 - See the GitHub release for full detailscreate-modular-react-app
@ 4.0.0 - See the GitHub release for full detailseslint-config-modular-app
@ 4.0.0 - See the GitHub release for full detailsmodular-template-app
@ 1.2.0 - See the GitHub release for full detailsmodular-template-esm-view
@ 1.1.0 - See the GitHub release for full detailsmodular-template-node-env-app
@ 0.2.1 - See the GitHub release for full detailsmodular-template-package
@ 1.2.0 - See the GitHub release for full detailsmodular-template-source
@ 1.1.0 - See the GitHub release for full detailsmodular-template-view
@ 1.2.0 - See the GitHub release for full details
Patch Versions
Patch versions of this release do not have a dedicated summary. For details of patch releases, please visit the GitHub releases page.