Skip to content

Commit

Permalink
Allow web-components prerelease package dependencies to lint
Browse files Browse the repository at this point in the history
  • Loading branch information
radium-v committed May 3, 2024
1 parent 50ce6d5 commit 0f28e96
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type ProjectIssues = { [projectName: string]: { [depName: string]: string } };

const NORMALIZED_INNER_WORKSPACE_VERSION = '*';
const NORMALIZED_PRERELEASE_RANGE_VERSION = '>=9.0.0-alpha';
const NORMALIZED_WEB_COMPONENTS_PRERELEASE_RANGE_VERSION = '>=3.0.0-beta';
const BEACHBALL_UNWANTED_PRERELEASE_RANGE_VERSION_REGEXP = /<9.0.0$/;

export default async function (tree: Tree, schema: NormalizePackageDependenciesGeneratorSchema) {
Expand Down Expand Up @@ -127,6 +128,9 @@ function getVersion(tree: Tree, deps: Record<string, string>, packageName: strin
}

if (semver.prerelease(current)) {
if (semver.satisfies(current, NORMALIZED_WEB_COMPONENTS_PRERELEASE_RANGE_VERSION)) {
return current;
}
return NORMALIZED_PRERELEASE_RANGE_VERSION;
}

Expand Down

0 comments on commit 0f28e96

Please sign in to comment.