@enkidevs/curriculum-ast-validators
Advanced tools
Comparing version 2.2.0 to 3.0.0
const visit = require('unist-util-visit'); | ||
const jsYaml = require('js-yaml'); | ||
const { | ||
insightAspects, | ||
insightCategories, | ||
} = require('@enkidevs/curriculum-helpers'); | ||
const { insightCategories } = require('@enkidevs/curriculum-helpers'); | ||
@@ -25,14 +22,2 @@ module.exports = function validateYaml(ast) { | ||
const invalidAspects = parsedValue.aspects.filter( | ||
(aspect) => !insightAspects.includes(aspect) | ||
); | ||
if (invalidAspects.length > 0) { | ||
throw new Error( | ||
`Invalid insight aspects "${invalidAspects.join( | ||
'", "' | ||
)}". Valid aspects are "${insightAspects.join('", "')}"` | ||
); | ||
} | ||
if (!insightCategories.includes(parsedValue.category)) { | ||
@@ -39,0 +24,0 @@ throw new Error( |
{ | ||
"name": "@enkidevs/curriculum-ast-validators", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "Validators for Enki Curriculum AST", | ||
@@ -36,3 +36,3 @@ "author": "Nemanja Stojanovic <nemanjacoder@gmail.com>", | ||
"dependencies": { | ||
"@enkidevs/curriculum-helpers": "^7.1.0", | ||
"@enkidevs/curriculum-helpers": "^8.0.0", | ||
"js-yaml": "^3.13.1", | ||
@@ -42,6 +42,6 @@ "unist-util-visit": "^2.0.0" | ||
"devDependencies": { | ||
"@enkidevs/curriculum-parser-markdown": "^8.1.0", | ||
"@enkidevs/curriculum-parser-markdown": "^9.0.0", | ||
"jest": "^26.0.1" | ||
}, | ||
"gitHead": "aa05a8e10674abb8244db8a84f10251bd40735c8" | ||
"gitHead": "795db423e34c93185318410cf32aff4ed017558e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
12138
247
+ Added@enkidevs/curriculum-helpers@8.0.0(transitive)
- Removed@enkidevs/curriculum-helpers@7.1.0(transitive)