Skip to content

chore(typescript): drop lodash.get dependency#4705

Merged
ScriptedAlchemy merged 2 commits into
module-federation:mainfrom
gu-stav:chore/drop-lodash-get-ts
Jul 2, 2026
Merged

chore(typescript): drop lodash.get dependency#4705
ScriptedAlchemy merged 2 commits into
module-federation:mainfrom
gu-stav:chore/drop-lodash-get-ts

Conversation

@gu-stav

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

Copy link
Copy Markdown
Contributor

Description

Drop dependency lodash.get in typescript package and replace it with optional chaining.

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

netlify Bot commented May 6, 2026

Copy link
Copy Markdown

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit e0d2aaf
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/6a45ead36915f90007d41203
😎 Deploy Preview https://deploy-preview-4705--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

changeset-bot Bot commented May 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e0d2aaf

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

This PR includes changesets to release 1 package
Name Type
@module-federation/typescript 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 commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

@2heal1 Is there anything stopping from these 3 dependency cleanups to be merged? Otherwise I'd close the PRs.

I apologize for the ping 🙈

2heal1 commented May 28, 2026

Copy link
Copy Markdown
Member

Could you please rebase this branch on the latest main and resolve the current conflicts? We can continue review once the branch is up to date.

@gu-stav gu-stav force-pushed the chore/drop-lodash-get-ts branch from d750260 to 1929195 Compare May 28, 2026 07:46
@gu-stav

gu-stav commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

@gu-stav gu-stav force-pushed the chore/drop-lodash-get-ts branch from 1929195 to 372f944 Compare June 3, 2026 08:42
@gu-stav gu-stav force-pushed the chore/drop-lodash-get-ts branch from dec0377 to 026e083 Compare June 21, 2026 13:21
@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@e0d2aaf

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@e0d2aaf

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@e0d2aaf

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@e0d2aaf

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@e0d2aaf

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@e0d2aaf

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@e0d2aaf

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@e0d2aaf

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@e0d2aaf

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@e0d2aaf

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@e0d2aaf

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@e0d2aaf

@module-federation/metro-plugin-rock

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rock@e0d2aaf

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@e0d2aaf

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@e0d2aaf

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@e0d2aaf

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@e0d2aaf

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@e0d2aaf

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@e0d2aaf

@module-federation/observability-plugin

pnpm add https://pkg.pr.new/@module-federation/observability-plugin@e0d2aaf

@module-federation/playground

pnpm add https://pkg.pr.new/@module-federation/playground@e0d2aaf

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@e0d2aaf

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@e0d2aaf

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@e0d2aaf

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@e0d2aaf

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@e0d2aaf

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@e0d2aaf

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@e0d2aaf

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@e0d2aaf

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@e0d2aaf

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@e0d2aaf

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@e0d2aaf

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@e0d2aaf

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@e0d2aaf

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@e0d2aaf

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@e0d2aaf

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@e0d2aaf

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@e0d2aaf

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@e0d2aaf

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@e0d2aaf

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@e0d2aaf

commit: e0d2aaf

@ScriptedAlchemy ScriptedAlchemy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The optional-chaining rewrite is behavior-equivalent to lodash.get, including the edge case where devServer.static is an array (both return undefined and fall through to output.path). The cast is necessary since webpack's Compiler['options'] does not type devServer. Checked repo-wide: nothing else consumes lodash.get, so the root devDependency removal is safe, and the package is formally deprecated upstream. Builds clean on the updated branch.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

12 package(s) changed, 30 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/cli 26.3 kB no change 786 B no change
@module-federation/core 39.1 kB no change 173 B no change
@module-federation/devtools 665.5 kB no change 4.0 kB no change
@module-federation/enhanced 810.0 kB no change 672 B no change
@module-federation/inject-external-runtime-core-plugin 5.2 kB -26 B (-0.5%) 520 B no change
@module-federation/managers 69.8 kB no change 334 B no change
@module-federation/manifest 136.1 kB no change 182 B no change
@module-federation/metro-plugin-rnc-cli 0 B no change 314 B no change
@module-federation/node 193.4 kB no change 217 B no change
@module-federation/storybook-addon 79.2 kB no change 100 B no change
@module-federation/typescript 36.9 kB -85 B (-0.2%) 0 B no change
@module-federation/utilities 110.6 kB no change 328 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/cli 2.3 kB -30 B (-1.3%) 2.3 kB -30 B (-1.3%)
@module-federation/core 1.1 kB -31 B (-2.8%) 1.0 kB -30 B (-2.8%)
@module-federation/devtools 30.3 kB -26 B (-0.1%) 30.3 kB -26 B (-0.1%)
@module-federation/enhanced 2.6 kB -44 B (-1.6%) 2.6 kB -44 B (-1.6%)
@module-federation/inject-external-runtime-core-plugin 396 B no change 396 B no change
@module-federation/managers 2.4 kB -26 B (-1.0%) 2.4 kB -26 B (-1.0%)
@module-federation/manifest 6.1 kB -39 B (-0.6%) 6.1 kB -39 B (-0.6%)
@module-federation/metro-plugin-rnc-cli 411 B -25 B (-5.7%) 411 B -25 B (-5.7%)
@module-federation/node 9.2 kB -28 B (-0.3%) 9.2 kB -28 B (-0.3%)
@module-federation/storybook-addon 1.9 kB -24 B (-1.2%) 1.7 kB -24 B (-1.3%)
@module-federation/typescript n/a n/a n/a n/a
@module-federation/utilities 2.6 kB -31 B (-1.2%) 2.6 kB -31 B (-1.2%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 21.4 kB -14 B (-0.1%) 22.5 kB -13 B (-0.1%) +1.1 kB +1 B

Total dist (raw): 35.63 MB (-111 B (-0.0%))
Total ESM gzip: 129.5 kB (no change)
Total web bundle (gzip): 254.4 kB (-304 B (-0.1%))
Total node bundle (gzip): 254.8 kB (-303 B (-0.1%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.8 kB (no change)
Tracked ./bundler node bundle (gzip): 4.8 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

@ScriptedAlchemy ScriptedAlchemy merged commit 6b22938 into module-federation:main Jul 2, 2026
35 of 49 checks passed
@2heal1 2heal1 mentioned this pull request Jul 8, 2026
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.

3 participants