Skip to content

[rush] Dedupe DependencySpecifier parsing#5337

Merged
dmichon-msft merged 1 commit intomicrosoft:mainfrom
dmichon-msft:dependency-specifier-cache
Aug 28, 2025
Merged

[rush] Dedupe DependencySpecifier parsing#5337
dmichon-msft merged 1 commit intomicrosoft:mainfrom
dmichon-msft:dependency-specifier-cache

Conversation

@dmichon-msft
Copy link
Contributor

@dmichon-msft dmichon-msft commented Aug 28, 2025

Summary

Adds a caching layer to the parsing of DependencySpecifier objects.

In large monorepos, it is very common to see the exact same dependency specifier in many packages, e.g. the dependency on @rushstack/heft.

Details

Since dependency specifiers are immutable, dedupes at parse time based on the input strings. Alias targets share the same cache.

How it was tested

Used the new version to run a rush install in a large monorepo.
Before:
image

After:
image

Impacted documentation

None.

@dmichon-msft dmichon-msft merged commit 600cc25 into microsoft:main Aug 28, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Aug 28, 2025
@dmichon-msft dmichon-msft deleted the dependency-specifier-cache branch August 28, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants