Skip to content

Commit

Permalink
fix: package without version
Browse files Browse the repository at this point in the history
  • Loading branch information
andreeapescar committed Feb 13, 2023
1 parent 58e2e77 commit 7d5d542
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rubric-utils.ts
Expand Up @@ -3,7 +3,8 @@ import {
modelsForPackage,
elementForPackage,
pieShortIdGenerator,
elementsHasPackage
elementsHasPackage,
getPackageWithoutVersion
} from "./utils/utils";
import cloneDeep from "lodash/cloneDeep";

Expand Down Expand Up @@ -46,7 +47,7 @@ export const complexRubricChecks = (content: PieContent, configSettings = {}) =>
const elements = content.elements || {};
const elementsKeys = Object.keys(elements || {});
// tODO make sure not to use versions (eg: @1.1.0, @latest)
const elementsValues = Object.values(elements || {});
const elementsValues = Object.values(elements || {}).map(elementValue => getPackageWithoutVersion(elementValue));
// complexRubricElements: those elements in config where item type is @pie-element/complex-rubric
const complexRubricElements = elementsKeys.filter(key => elements[key] && elements[key].indexOf(COMPLEX_RUBRIC) >= 0);
// complexRubricItemsLength: how many complex-rubric elements are declared
Expand Down

0 comments on commit 7d5d542

Please sign in to comment.