Skip to content

Update workspace-tools and simplify hasher logic#567

Merged
ecraig12345 merged 1 commit intomicrosoft:mainfrom
ecraig12345:wstools
Feb 26, 2026
Merged

Update workspace-tools and simplify hasher logic#567
ecraig12345 merged 1 commit intomicrosoft:mainfrom
ecraig12345:wstools

Conversation

@ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Feb 26, 2026

Update workspace-tools to 0.41.0 and make corresponding API updates.

Remove backfill-hasher's dependency on @rushstack/package-deps-hash (mainly to avoid pulling in @rushstack/node-core-library and all its unneeded deps), and export helpers that are currently duplicated by lage. The logic from getPackageDeps has been copied/modified in a new file getFileHashes to more accurately reflect what it does.

Improve documentation and simplify logic throughout backfill-hasher:

  • Document the key and value formats for various internal structures, and ensure the tests use realistic input
  • Use for..of instead of .forEach() since .forEach() can cause perf issues in hot paths
  • Simplify resolveExternalDependencies and remove unnecessarily confusing resolveInternalDependencies which is actually a trivial operation (both copying what was already done in lage)
  • Remove trivial helpers which are better handled inline or via workspace-tools
  • Change RepoInfo to internally use PackageInfos format to store info about repo-internal packages, instead of WorkspaceInfos, since the mapping from name to package is more efficient for some usage

@ecraig12345 ecraig12345 merged commit 8991848 into microsoft:main Feb 26, 2026
7 checks passed
@ecraig12345 ecraig12345 deleted the wstools branch February 26, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant