Fix lint:teams package script #6941
Open
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.
Explanation
With the Yarn upgrade, the
lint:teamspackage script now prints an error indicating that thenpmMinimalAgeGateconfiguration option is unrecognized. This script uses the Yarn API to get the list of workspaces, so it's possible something changed internally to where we now need a different incantation to initialize Yarn.This commit fixes the script so that it uses
yarn workspacesto get information about the workspaces instead of the Yarn API. This has always been known to work in the past so hopefully it should avoid any future breakages.References
(N/A)
Checklist
Note
Switches
lint-teams-jsonto useyarn workspacesviaexeca, removing Yarn API usage and adjusting name parsing.scripts/lint-teams-json.ts:yarn workspaces list --json --no-privateexecuted viaexecaand parse JSON lines.Workspacetype and adjust package name extraction toworkspace.name.slice(1).Written by Cursor Bugbot for commit 9d0c3ab. This will update automatically on new commits. Configure here.