chore(dts-plugin): drop ansi-colors dependency#4704
chore(dts-plugin): drop ansi-colors dependency#4704gu-stav wants to merge 1 commit intomodule-federation:mainfrom
ansi-colors dependency#4704Conversation
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: c0bf5b7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 45 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
ansi-colors dependency
59e9f38 to
c0bf5b7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59e9f382ef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } catch (err) { | ||
| console.error(ansiColors.red(`Unable to compile federated types, ${err}`)); | ||
| console.error( | ||
| styleText('red', `Unable to compile federated types, ${err}`), |
There was a problem hiding this comment.
Avoid util.styleText without raising Node floor
retrieveTypesAssetsInfo now calls styleText, but util.styleText was only added in Node v20.12.0. This package has no engines guard and the repo declares node: ^20, which still includes 20.0–20.11, so users on those supported runtimes will hit TypeError: styleText is not a function in the error path and lose the original diagnostic. Please keep a backward-compatible colorization fallback (or explicitly raise/enforce the minimum Node version).
Useful? React with 👍 / 👎.
Description
Drop the dependency
ansi-colors. Like in previous PRs this can be done natively usingstyleText. The Vite plugin is pulling insdk,dts-pluginandruntimeand none of the other packages have a dependency on it, meaning we can effectively drop one dependency and slim down on installation size.Related Issue
Types of changes
Checklist