Skip to content

chore(dts-plugin): drop ansi-colors dependency#4704

Open
gu-stav wants to merge 1 commit intomodule-federation:mainfrom
gu-stav:chore/drop-ansi-colors-dts
Open

chore(dts-plugin): drop ansi-colors dependency#4704
gu-stav wants to merge 1 commit intomodule-federation:mainfrom
gu-stav:chore/drop-ansi-colors-dts

Conversation

@gu-stav
Copy link
Copy Markdown
Contributor

@gu-stav gu-stav commented May 6, 2026

Description

Drop the dependency ansi-colors. Like in previous PRs this can be done natively using styleText. The Vite plugin is pulling in sdk, dts-plugin and runtime and 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

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit c0bf5b7
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69fb1bb1ccf5430008b1988d
😎 Deploy Preview https://deploy-preview-4704--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 6, 2026

🦋 Changeset detected

Latest commit: c0bf5b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 45 packages
Name Type
@module-federation/dts-plugin Patch
@module-federation/cli Patch
@module-federation/enhanced Patch
@module-federation/manifest Patch
@module-federation/metro Patch
@module-federation/rspack Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rspress-plugin Patch
@module-federation/storybook-addon Patch
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/metro-plugin-rnef Patch
@module-federation/metro-plugin-rock Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
node-dynamic-remote-new-version Patch
node-dynamic-remote Patch
remote5 Patch
remote6 Patch
website-new Patch
@module-federation/runtime Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/runtime-core Patch
create-module-federation Patch
@module-federation/treeshake-server Patch
@module-federation/treeshake-frontend Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch

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

@gu-stav gu-stav changed the title chore(dts-plugin): drop ansi-colors dependency chore(dts-plugin): drop ansi-colors dependency May 6, 2026
@gu-stav gu-stav force-pushed the chore/drop-ansi-colors-dts branch from 59e9f38 to c0bf5b7 Compare May 6, 2026 10:45
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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}`),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant