You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or, we could upgrade to the latest chalk which bundles its dependencies, but is ESM-only, with all the problems that brings. At the very least, we would need to do some changes to the jest config because it chokes on the chalk import statement, not sure what else.
parse-json is another ESM-only dependency in its latest version, so it might be worth considering making @preconstruct/cli ESM, and maybe migrating from jest to vitest? If the maintainers think this is worth pursuing, I will work on the related PRs.
btw, in terms of dependency-optimization, moving from babel to either esbuild-register or tsx, both of which use esbuild under the hood to do the live transpilation would bring the biggest benefit.
Another nice side-effect of the above is that live transpilation will follow the rules in tsconfig.json, instead of needing a separate babel.config.js
The second biggest would be to upgrade rollup plugins.
Activity
VanTanev commentedon Oct 16, 2024
There are two options for
chalk- we can either migrate topicocolors, but then the tests must include color codes - see 664680e#diff-6e2e2a1851648938b325ba84de634407a4e69a644ea61102df15ca4a8a7a9758Or, we could upgrade to the latest
chalkwhich bundles its dependencies, but is ESM-only, with all the problems that brings. At the very least, we would need to do some changes to the jest config because it chokes on the chalk import statement, not sure what else.VanTanev commentedon Oct 16, 2024
parse-jsonis another ESM-only dependency in its latest version, so it might be worth considering making@preconstruct/cliESM, and maybe migrating fromjesttovitest? If the maintainers think this is worth pursuing, I will work on the related PRs.VanTanev commentedon Oct 16, 2024
btw, in terms of dependency-optimization, moving from
babelto either esbuild-register or tsx, both of which useesbuildunder the hood to do the live transpilation would bring the biggest benefit.Another nice side-effect of the above is that live transpilation will follow the rules in
tsconfig.json, instead of needing a separatebabel.config.jsThe second biggest would be to upgrade
rollupplugins.