-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Refactor how manifest flags are set #28686
Conversation
f946a57
to
ae35e76
Compare
This refactor is in support of #28687 |
ae35e76
to
625f942
Compare
8899d67
to
2287421
Compare
Builds ready [8899d67]
Page Load Metrics (2248 ± 87 ms)
Bundle size diffs
|
Builds ready [2287421]
Page Load Metrics (1785 ± 136 ms)
Bundle size diffs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly just rewriting the comments to be clearer, and one actual bug.
Also, check-optional-e2e-trigger.ts
should be run through Prettier.
Builds ready [2f7df84]
Page Load Metrics (1726 ± 94 ms)
Bundle size diffs
|
The pieces of `set-manifest-flags.ts` related to _getting_ flags have been moved to the new `get-manifest-flags.ts` module. This module will be used in a later PR by a script run during a CI workflow. The migrated steps were also made asynchronous so that the asynchronous steps could be run in parallel rather than blocking the process. Documentation has been added to the `ManifestFlags` type as well, in preparation for adding a new property in the next PR.
Co-authored-by: Howard Braham <[email protected]>
Co-authored-by: Howard Braham <[email protected]>
f28b0ac
to
4b330e6
Compare
Builds ready [afda5dd]
Page Load Metrics (2144 ± 133 ms)
Bundle size diffs
|
development/lib/get-manifest-flag.ts
Outdated
* | ||
* @returns Any manifest flags found | ||
*/ | ||
export async function getManifestFlags(): Promise<ManifestFlags> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now have two functions in the code base named getManifestFlags
that both end up getting the same flags, but in different ways (runtime vs compile time) :-/ One is async (this one), and the other must stay synchronous as it is designed to be blocking and used on app initialization.
Think you could rename one or the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Seems better to rename this one. Maybe fetchManifestFlags
or createManifestFlags
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either is fine with me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gudahtt @davidmurdoch @DDDDDanica I think this one should be called fetchManifestFlagsFromGitAndPR
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [77fcfbf]
Page Load Metrics (1675 ± 59 ms)
Bundle size diffs
|
4a2f700
to
9af5440
Compare
LGTM ! |
Builds ready [9af5440]
Page Load Metrics (1624 ± 67 ms)
Bundle size diffs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Howard for renaming, LGTM
Description
The pieces of
set-manifest-flags.ts
related to getting flags have been moved to the newget-manifest-flags.ts
module. This module will be used in a later PR by a script run during a CI workflow.The migrated steps were also made asynchronous so that the asynchronous steps could be run in parallel rather than blocking the process.
Documentation has been added to the
ManifestFlags
type as well, in preparation for adding a new property in the next PR.Related issues
Related to #28685
Manual testing steps
N/A, no functional changes.
Screenshots/Recordings
N/A
Pre-merge author checklist
Pre-merge reviewer checklist