Repository navigation
Take the style library without lodash (#356) - #434
Merged
Merged
Conversation
ngx-reactome-cytoscape-style no longer imports lodash (reactome/ngx-reactome-base#15): its four uses are native code or small local memoize/throttle held to lodash's behaviour by spec. The lockfile moves the library to that build (76de66a, built from dc16af7) by its entry alone -- `npm update` also rewrote unrelated entries, so it was edited and checked with `npm ci` instead. ehld.service's one isArray is Array.isArray. With the router change (#432), which takes the state service's lodash imports, nothing the embed loads imports lodash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…spec guards It was inlined for its CommonJS lodash import, which is gone. All 84 spec files pass without the option; the interop spec still imports the library directly, so a build that brings back a CommonJS-only import fails there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Review (subagent, adversarial): no defects. The hand-edited lock entry matches 76de66a's package.json exactly and uses the same git+ssh#sha form, so npm ci fetches exactly that build (git dependencies carry no integrity field); the library diff between the two builds is only the bundle (local memoize, faithful throttle port, Array.isArray, typeof) with an unchanged d.ts; WebsiteAngular uses only Style, extract, ReactomeEventTypes and INTERACTOR_BADGE_MIN_ZOOM; lodash stays declared here for five details components. Loose ends fixed in the latest commit: vitest.config.ts no longer inlines the library (it was there for the lodash import; all 84 spec files pass without it), and the interop spec says what it guards now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #356. It follows #432 (router) and reactome/ngx-reactome-base#15.
What it does
ngx-reactome-cytoscape-style. Its four uses became native code or a small localmemoize/throttle, each held to lodash's behaviour by a spec that runs lodash alongside. The review there checked the throttle against lodash's source branch by branch.76de66a, built fromdc16af7) by its entry alone.npm updatealso rewrote unrelated entries: it dropped peer packages and flippeddevflags. So the entry was edited by hand and checked withnpm ci.ehld.service's oneisArrayis nowArray.isArray.With #432, which took the state service's lodash imports, nothing the embed loads imports lodash.
Size. On main + this PR, the embed's JavaScript is 1,496 KB, down from 1,650 KB before #432, with 1.43 MB initial.
lodashand@angular/routerare both at 0 in the stats.Checks
🤖 Generated with Claude Code