From 159b7bbf7601f31d325d0d9eb71f138c85af350a Mon Sep 17 00:00:00 2001 From: ZayanKhan-12 <108294002+ZayanKhan-12@users.noreply.github.com> Date: Mon, 3 Aug 2026 20:15:29 -0400 Subject: [PATCH 1/2] fix: remove unused date-fns dependency from sdk-communication-layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit date-fns is not imported anywhere in the package (or the monorepo) — it is only declared in package.json and listed as a UMD global in the rollup config. Consumers were pulling in the full date-fns v2 tree (~25MB) for nothing, and the v2 pin also failed to dedupe against date-fns v3/v4 in downstream apps. Fixes #1352 Co-Authored-By: Claude Fable 5 --- packages/sdk-communication-layer/package.json | 1 - packages/sdk-communication-layer/rollup.config.js | 1 - yarn.lock | 1 - 3 files changed, 3 deletions(-) diff --git a/packages/sdk-communication-layer/package.json b/packages/sdk-communication-layer/package.json index b6b2cc685..c6645083e 100644 --- a/packages/sdk-communication-layer/package.json +++ b/packages/sdk-communication-layer/package.json @@ -48,7 +48,6 @@ "dependencies": { "@metamask/sdk-analytics": "workspace:*", "bufferutil": "^4.0.8", - "date-fns": "^2.29.3", "debug": "4.3.4", "utf-8-validate": "^5.0.2", "uuid": "^8.3.2" diff --git a/packages/sdk-communication-layer/rollup.config.js b/packages/sdk-communication-layer/rollup.config.js index b12de8452..f9328da96 100644 --- a/packages/sdk-communication-layer/rollup.config.js +++ b/packages/sdk-communication-layer/rollup.config.js @@ -22,7 +22,6 @@ const umdGlobals = { eciesjs: 'ECIES', debug: 'debug', uuid: 'uuid', - 'date-fns': 'dateFns', buffer: 'Buffer', 'readable-stream': 'ReadableStream', tslib: 'tslib', diff --git a/yarn.lock b/yarn.lock index fd525b269..4c60296eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13014,7 +13014,6 @@ __metadata: bufferutil: ^4.0.8 concurrently: ^9.1.2 cross-fetch: ^4.0.0 - date-fns: ^2.29.3 debug: 4.3.4 eciesjs: ^0.4.11 eslint: ^7.30.0 From e2bb17b508ea55e639cff80a6ca709420569b753 Mon Sep 17 00:00:00 2001 From: ZayanKhan-12 <108294002+ZayanKhan-12@users.noreply.github.com> Date: Mon, 3 Aug 2026 20:16:12 -0400 Subject: [PATCH 2/2] docs: add changelog entry Co-Authored-By: Claude Fable 5 --- packages/sdk-communication-layer/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/sdk-communication-layer/CHANGELOG.md b/packages/sdk-communication-layer/CHANGELOG.md index be9a1e58c..9f12705b4 100644 --- a/packages/sdk-communication-layer/CHANGELOG.md +++ b/packages/sdk-communication-layer/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Removed +- Remove unused `date-fns` dependency ([#1395](https://github.com/MetaMask/metamask-sdk/pull/1395)) ## [0.33.2] ### Changed