feat: added package dependency detection - #197
Merged
matt-dahlgren merged 3 commits intoJul 28, 2026
Merged
Conversation
matt-dahlgren
approved these changes
Jul 28, 2026
matt-dahlgren
left a comment
Collaborator
There was a problem hiding this comment.
great work thank you!
matt-dahlgren
merged commit Jul 28, 2026
34a3403
into
CA-Visualizer-for-Education:main
3 checks passed
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.
Overview
I added a way for getFileImports to detect package imports and wrote tests for it as well.
Proposed Changes
In Java package declarations only occur as the first line of the file, if package is seen in the file, then it will first create a set of all files in the package, and then parse the entire file looking for files that are used from the package.
How to Test & Review
I wrote 2 tests covering the case when there is a package declaration, and when there is both a package declaration and imports in the file, which can be tested using npm test.
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
Before opening your pull request:
I have performed a self-review of my changes.
I have added tests for my changes, if applicable.
I have updated the project documentation, if applicable.
(Frontend) I have added/updated text in
i18nJSON files for any new user-facing strings to support multilingual features.After opening your pull request:
I have verified that the CI tests have passed.
I have requested a review from a project maintainer, and a fellow student.
Technical Debt: If temporary workarounds or "TODOs" were used, I have opened a tracking issue to address them properly.
Questions and Comments
(Include any questions or comments you have regarding your changes.)