Environment
listr2 supports only modern node.js environments, since it is mostly intended for CLI applications, but can be used as a task list in any application.
listr2supports bothesmandcjsmodules for now. But is only bundled foresmmodules going forward.- You need a supported
node.jsversion, end-of-life versions are deprecated and not supported.
Supporting Multiple Node Module Structures v10.1.0 #755
listr2 supports both esm and cjs module structures however with the recent changes on node, we only bundle esm modules going forward. This will still support cjs module structure.
Thanks to @hyperz111 for making me aware of this change, which cut our bundle distribution size in half.
Given the latest changes on ts-node, jest, and ts-jest allowed us to move everything in the repository to esm. This enabled the repository starting from version v6 to use dynamic imports for anything that is using an esm module. So from that version and upward, everything should be up to date with the upstream of the dependencies. So keeping the cjs version does not hinder us from updating the given packages.
The community is moving to pure
esmmodules. sindresorhus who is the maintainer of many-corenpmpackages (cheers! ) has to lead the movement with the deprecatednode.js10support. You can read more about it here in his post.