chore: internalize/remove bundled runtime dependencies#1024
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 163ad19 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d69399c. Configure here.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1024 +/- ##
==========================================
+ Coverage 63.55% 63.95% +0.39%
==========================================
Files 208 212 +4
Lines 9924 10028 +104
Branches 1280 1321 +41
==========================================
+ Hits 6307 6413 +106
+ Misses 3592 3590 -2
Partials 25 25
|


Description
Combines four small "npm supply chain hardening" changes — each dropping a third-party runtime dependency from a published package — into one PR. Each is an independent, behavior-preserving change with its own commit, changeset, and tests. Dropping these direct dependencies also removes them from consumers' install graphs once the packages publish.
1. Remove
clsxfrom@knocklabs/react— KNO-13814Every call site was the simple
clsx("static-class", className)pattern. All ~29 sites across the guide components (Banner,Card,Modal) now use a small internalcxhelper in its ownpackages/react/src/modules/core/cx/folder —cx("knock-guide-banner", className)— replacing theclsxruntime dependency with one line of our own code.clsxremains in the lockfile only as a transitive dep of the@telegraph/*packages.2. Internalize
jwt-decodein@knocklabs/client— KNO-13812The decoder (base64url-decode the payload +
JSON.parse, no signature verification) now lives in its ownpackages/client/src/jwt/folder. Imports and the test mock are repointed;jwt-decodeis fully removed from the lockfile. Covered bytest/jwt.test.ts.3. Internalize
lodash.debouncein@knocklabs/react— KNO-13811The single call site uses default (trailing-edge) options, so a minimal
debouncenow lives in its ownpackages/react/src/modules/core/debounce/folder. Drops bothlodash.debounceand@types/lodash.debounce. Covered bytest/core/debounce.test.ts.4. Internalize
fast-deep-equalin@knocklabs/react-core— KNO-13810Reimplemented as
deepEqualin its ownpackages/react-core/src/modules/core/deepEqual/folder (default non-ES6 behavior: primitives, plain objects, arrays,Date,RegExp). Covered bytest/core/deepEqual.test.ts.