Skip to content

Comments

fix(align-deps): allow partial configuration in 'vigilant' mode#1951

Merged
tido64 merged 3 commits intomicrosoft:mainfrom
tido64:tido/align-deps/fix-partial-conf
Oct 23, 2022
Merged

fix(align-deps): allow partial configuration in 'vigilant' mode#1951
tido64 merged 3 commits intomicrosoft:mainfrom
tido64:tido/align-deps/fix-partial-conf

Conversation

@tido64
Copy link
Member

@tido64 tido64 commented Oct 21, 2022

Description

In v1, we allow packages to only declare customProfiles in config. In essence, it made the --custom-profiles flag a fallback similar to --vigilant. This is feature is currently missing in v2.

Test plan

Tested in an internal repo. Tests were also added.

@tido64 tido64 added the feature: align-deps This is related to align-deps label Oct 21, 2022
@tido64 tido64 mentioned this pull request Oct 21, 2022
24 tasks
const allPackages: string[] = [];
for (const pkg of await findWorkspacePackages()) {
const p = path.join(pkg, "package.json");
if (fs.existsSync(p)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

@tido64 tido64 Oct 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe loadPackagePresets so it's clear what is doing the overriding and what is being overridden at the call-sites?

@tido64 tido64 merged commit 8cd4405 into microsoft:main Oct 23, 2022
@tido64 tido64 deleted the tido/align-deps/fix-partial-conf branch October 23, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: align-deps This is related to align-deps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants