fix(align-deps): allow partial configuration in 'vigilant' mode#1951
Merged
tido64 merged 3 commits intomicrosoft:mainfrom Oct 23, 2022
Merged
fix(align-deps): allow partial configuration in 'vigilant' mode#1951tido64 merged 3 commits intomicrosoft:mainfrom
tido64 merged 3 commits intomicrosoft:mainfrom
Conversation
afoxman
approved these changes
Oct 21, 2022
packages/align-deps/src/cli.ts
Outdated
| const allPackages: string[] = []; | ||
| for (const pkg of await findWorkspacePackages()) { | ||
| const p = path.join(pkg, "package.json"); | ||
| if (fs.existsSync(p)) { |
Contributor
There was a problem hiding this comment.
Really? How does it find the packages? Just by the presence of the directory? Or the entry in the workspace list (for non-globbed entries)? This bends my world view in ways I don't like.
Member
Author
There was a problem hiding this comment.
No, this is a bug in tools-workspaces that I thought I had fixed. What you see here is just a workaround I used while testing internally. Let me find it on Monday.
packages/align-deps/src/config.ts
Outdated
| * @param manifestPath The path to the package manifest to load configuration from | ||
| * @returns Presets loaded from the package manifest; otherwise `null` | ||
| */ | ||
| export function loadPresetsOverride(manifestPath: string): string[] | null { |
Contributor
There was a problem hiding this comment.
nit: Maybe loadPackagePresets so it's clear what is doing the overriding and what is being overridden at the call-sites?
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.
Description
In v1, we allow packages to only declare
customProfilesin config. In essence, it made the--custom-profilesflag a fallback similar to--vigilant. This is feature is currently missing in v2.Test plan
Tested in an internal repo. Tests were also added.