Skip to content

chore(react-core): internalize fast-deep-equal (KNO-13810)#1023

Closed
kylemcd wants to merge 1 commit into
kyle-kno-13811-internalize-lodashdebounce-in-knocklabsreact-and-drop-thefrom
kyle-kno-13810-internalize-fast-deep-equal-in-knocklabsreact-core-and-drop
Closed

chore(react-core): internalize fast-deep-equal (KNO-13810)#1023
kylemcd wants to merge 1 commit into
kyle-kno-13811-internalize-lodashdebounce-in-knocklabsreact-and-drop-thefrom
kyle-kno-13810-internalize-fast-deep-equal-in-knocklabsreact-core-and-drop

Conversation

@kylemcd

@kylemcd kylemcd commented Jun 17, 2026

Copy link
Copy Markdown
Member

Description

Internalizes fast-deep-equal in @knocklabs/react-core and drops the runtime dependency. It is reimplemented as a small internal deepEqual (the default non-ES6 behavior: recursive comparison of primitives, plain objects, arrays, Date, and RegExp; no Map/Set special-casing).

What changed

  • Added packages/react-core/src/modules/core/deepEqual/ — a dedicated folder containing the deepEqual util.
  • Repointed the single import in useStableOptions.ts.
  • Added packages/react-core/test/core/deepEqual.test.ts covering primitives, NaN, nested objects/arrays, key-order independence, differing key counts, array-vs-object, Date, and RegExp.
  • Dropped fast-deep-equal from packages/react-core/package.json and updated the lockfile.

fast-deep-equal remains in the lockfile only as a transitive dependency of ajv — it is no longer a direct dependency of ours.

Why: Part of the npm supply chain hardening effort. @knocklabs/react-core is published, so dropping the dependency also removes it from every consumer's install graph.

Linear: KNO-13810


Stack (bottom → top) — npm supply chain hardening:

  1. chore(react): remove clsx dependency (KNO-13814) #1020 — remove clsx from @knocklabs/react
  2. chore(client): internalize jwt-decode (KNO-13812) #1021 — internalize jwt-decode in @knocklabs/client
  3. chore(react): internalize lodash.debounce (KNO-13811) #1022 — internalize lodash.debounce in @knocklabs/react
  4. chore(react-core): internalize fast-deep-equal (KNO-13810) #1023 — internalize fast-deep-equal in @knocklabs/react-core ◀ this PR

Checklist

  • Tests have been added (test/core/deepEqual.test.ts) and useStableOptions.test.ts passes against the internalized deepEqual.

@linear-code

linear-code Bot commented Jun 17, 2026

Copy link
Copy Markdown

KNO-13810

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview, Comment Jun 17, 2026 2:39pm
javascript-nextjs-example Ready Ready Preview, Comment Jun 17, 2026 2:39pm
javascript-slack-connect-example Ready Ready Preview, Comment Jun 17, 2026 2:39pm
javascript-slack-kit-example Ready Ready Preview, Comment Jun 17, 2026 2:39pm

Request Review

kylemcd commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kylemcd kylemcd force-pushed the kyle-kno-13811-internalize-lodashdebounce-in-knocklabsreact-and-drop-the branch from 6a97082 to 29f99c5 Compare June 17, 2026 14:36
@kylemcd kylemcd force-pushed the kyle-kno-13810-internalize-fast-deep-equal-in-knocklabsreact-core-and-drop branch from 08eb941 to d69399c Compare June 17, 2026 14:36
@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d69399c

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

This PR includes changesets to release 1 package
Name Type
@knocklabs/react-core 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

@kylemcd

kylemcd commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

Combined into #1024.

@kylemcd kylemcd deleted the branch kyle-kno-13811-internalize-lodashdebounce-in-knocklabsreact-and-drop-the June 17, 2026 14:51
@kylemcd kylemcd closed this Jun 17, 2026
@kylemcd kylemcd deleted the kyle-kno-13810-internalize-fast-deep-equal-in-knocklabsreact-core-and-drop branch June 17, 2026 14:51
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 63.58%. Comparing base (29f99c5) to head (d69399c).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ges/react-core/src/modules/core/deepEqual/index.ts 97.43% 1 Missing ⚠️
Additional details and impacted files
@@                                             Coverage Diff                                              @@
##           kyle-kno-13811-internalize-lodashdebounce-in-knocklabsreact-and-drop-the    #1023      +/-   ##
============================================================================================================
- Coverage                                                                     63.64%   63.58%   -0.07%     
============================================================================================================
  Files                                                                           210      211       +1     
  Lines                                                                         10081    10157      +76     
  Branches                                                                       1303     1329      +26     
============================================================================================================
+ Hits                                                                           6416     6458      +42     
- Misses                                                                         3640     3678      +38     
+ Partials                                                                         25       21       -4     
Files with missing lines Coverage Δ
...ct-core/src/modules/core/hooks/useStableOptions.ts 100.00% <100.00%> (ø)
...ges/react-core/src/modules/core/deepEqual/index.ts 97.43% <97.43%> (ø)

... and 10 files with indirect coverage changes

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