[lockfile-explorer] Move graph generation logic to the server process#5358
Merged
octogonz merged 27 commits intomicrosoft:mainfrom Sep 14, 2025
Merged
[lockfile-explorer] Move graph generation logic to the server process#5358octogonz merged 27 commits intomicrosoft:mainfrom
octogonz merged 27 commits intomicrosoft:mainfrom
Conversation
- Rename `LockfileDependency` -> `LfxGraphDependency` - Rename `DependencyKind` -> `LfxDependencyKind` and simplify the enum members - Rename `LockfileEntryFilter` -> `LfxGraphEntryKind` - Eliminate circular dependency in IJsonLfxGraph.ts
…eliminate it entirely soon)
…aphLoader.generateLockfileGraph() so the test now passes
iclanton
approved these changes
Sep 14, 2025
| type IJsonLfxWorkspace, | ||
| lfxGraphSerializer, | ||
| type LfxGraph | ||
| } from '../../../temp/lfx-shared'; |
Member
There was a problem hiding this comment.
Importing from something called temp is weird. Why not just lfx-shared?
Collaborator
Author
There was a problem hiding this comment.
I've moved it from lockfile-explorer/temp/lfx-shared to lockfile-explorer/build/lfx-shared and added build/ to .gitignore. Docusaurus already uses build for built outputs, so this is pretty conventional.
Upgrade "js-yaml" from "~3.13.1" to "~4.1.0"
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.
Summary
This is another refactoring change, continuing the work from PR #5357
Details
LfxGraphis now transmitted to the client using a new/api/graphendpoint, which also includes the workspace configuration. This eliminates the original/api/lockfileendpoint.lockfile-explorer-web's shared code into a packlet, which enforces that its imports cannot go outside its folder. Thenlockfile-explorer(the server) uses heft.json to copy the packlet intotemp/lfx-shared/. This folder needs to be included in the published NPM package, becauselockfile-explorer-webis only a dev dependency.lockfile-expolorer. (Thelockfile-expolorer-webproject was also using relaxed lint rules, but IIRC that was because of problems with ReduxJS heavy reliance on inferred types.)How it was tested
Impacted documentation
None
@william2958