Skip to content

Commit

Permalink
build: support workspace as dependency version (#15474)
Browse files Browse the repository at this point in the history
The repo switch to use "workspace:" as the monorepo dependency version.
Add `fluid-build` support for that.
  • Loading branch information
curtisman authored May 5, 2023
1 parent cb98c6e commit b29ad42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ export class BuildGraph {
const child = this.buildPackages.get(name);
if (child) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
if (semver.satisfies(child.pkg.version, version!)) {
const satisfied =
version!.startsWith("workspace:") ||
semver.satisfies(child.pkg.version, version!);
if (satisfied) {
if (depFilter(child.pkg)) {
verbose(
`Package dependency: ${node.pkg.nameColored} => ${child.pkg.nameColored}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export async function symlinkPackage(
for (const { name: dep, version } of pkg.combinedDependencies) {
const depBuildPackage = buildPackages.get(dep);
// Check and fix link if it is a known package and version satisfy the version.
// TODO: check of extranous symlinks
// TODO: check of extraneous symlinks
if (depBuildPackage) {
const sameMonoRepo = MonoRepo.isSame(pkg.monoRepo, depBuildPackage.monoRepo);
const satisfied =
Expand Down

0 comments on commit b29ad42

Please sign in to comment.