Repository navigation
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
|
@microsoft-github-policy-service agree |
Author
|
CI note: the Windows Node 26 failure is in |
This branch has not been deployed
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.
Summary
Fixes #6222.
Rush now accepts pnpm workspace package aliases that use caret shorthand, such as
"ui-core-v1": "workspace:@example/ui-core@^". PreviouslyDependencySpecifierpassed the shorthand^tonpm-package-argas though it were a complete npm range, causing commands such asrush update,rush build, andrush list --toto fail withInvalid tag name "^".Details
Workspace aliases still expose their target package through
aliasTarget, which allows Rush's project dependency graph to resolve the aliased workspace project. For the pnpm-only^and~shorthand forms, the target is represented directly as a workspace range instead of being validated as a standalone npm specifier. Full ranges such asworkspace:alias@^1.2.3continue through the existingnpm-package-argpath unchanged.This is backwards compatible and limited to parsing workspace protocol aliases. It does not change how normal npm aliases, catalog specifiers, or non-aliased workspace specifiers are parsed.
How it was tested
workspace:@example/ui-core@^. The same input fails on the baseline implementation withInvalid tag name "^": Tags may not have any characters that encodeURIComponent encodes.and parses successfully with this change.rush build --to @microsoft/rush-libpassed.rushx testinlibraries/rush-libpassed: 1980 successes, 0 failures, 2 skipped.rush build --to @microsoft/rushpassed.@example/web-appdepending on"ui-core-v1": "workspace:@example/ui-core@^"; the locally built Rush completedrush update,rush list --to @example/web-app, andrush buildsuccessfully.rush change --verify --no-fetchexited successfully.rush prettierhook ran during commit.Impacted documentation
No documentation impact identified.