core(lantern): refactor to DevTools modules convention#16071
Merged
connorjclark merged 4 commits intomainfrom Jun 12, 2024
Merged
core(lantern): refactor to DevTools modules convention#16071connorjclark merged 4 commits intomainfrom
connorjclark merged 4 commits intomainfrom
Conversation
connorjclark
commented
Jun 12, 2024
| import {runTraceEngine} from '../metrics/MetricTestUtils.js'; | ||
|
|
||
| const {NetworkNode, CPUNode} = Lantern; | ||
| const {Simulator, DNSCache} = Lantern.Simulation; |
Collaborator
Author
There was a problem hiding this comment.
in some places I just do this so as not to fight line length limits
adamraine
approved these changes
Jun 12, 2024
| */ | ||
|
|
||
| import {BaseNode} from '../BaseNode.js'; | ||
| import * as Lantern from '../lantern.js'; |
Contributor
There was a problem hiding this comment.
nit: the old way may still be valid since we're in the lantern/ directory already. Also would this cause any sort of circular dependency situation?
Collaborator
Author
There was a problem hiding this comment.
ya know, the tests in CDT repo suggest relative imports like that are not preferred, but I do see non-test code doing that. so ok.
i'm not gonna keep spinning the wheels here so I'll keep it like this.
no circular issues here, everything executes fine. you have to be doing circular stuff in the root module scope for that.
This reverts commit a87e93a.
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.
ref #15841
Makes
core/lib/lantern/lantern.jsthe single entry point for all usages of Lantern in Lighthouse, tests, and types.