myst-frontmatter
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -8,3 +8,3 @@ "use strict"; | ||
const types_1 = require("./types"); | ||
exports.SITE_FRONTMATTER_KEYS = ['title', 'description', 'venue', 'keywords']; | ||
exports.SITE_FRONTMATTER_KEYS = ['title', 'description', 'venue', 'keywords', 'design']; | ||
exports.PROJECT_FRONTMATTER_KEYS = [ | ||
@@ -28,3 +28,2 @@ 'authors', | ||
'exports', | ||
'design', | ||
].concat(exports.SITE_FRONTMATTER_KEYS); | ||
@@ -95,3 +94,3 @@ exports.PAGE_FRONTMATTER_KEYS = [ | ||
const JUPYTEXT_KEYS = ['formats', 'text_representation']; | ||
exports.RESERVED_EXPORT_KEYS = ['format', 'template', 'output', 'id', 'name']; | ||
exports.RESERVED_EXPORT_KEYS = ['format', 'template', 'output', 'id', 'name', 'renderer']; | ||
const GITHUB_USERNAME_REPO_REGEX = '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$'; | ||
@@ -397,2 +396,9 @@ const ORCID_REGEX = '^(http(s)?://orcid.org/)?([0-9]{4}-){3}[0-9]{3}[0-9X]$'; | ||
} | ||
if ((0, simple_validators_1.defined)(value.design)) { | ||
const designOpts = (0, simple_validators_1.incrementOptions)('design', opts); | ||
const design = (0, simple_validators_1.validateObject)(value.design, designOpts); | ||
if (design) { | ||
output.design = validateSiteDesign(design, designOpts); | ||
} | ||
} | ||
return output; | ||
@@ -499,9 +505,2 @@ } | ||
} | ||
if ((0, simple_validators_1.defined)(value.design)) { | ||
const designOpts = (0, simple_validators_1.incrementOptions)('design', opts); | ||
const design = (0, simple_validators_1.validateObject)(value.design, designOpts); | ||
if (design) { | ||
output.design = validateSiteDesign(design, designOpts); | ||
} | ||
} | ||
return output; | ||
@@ -508,0 +507,0 @@ } |
@@ -5,3 +5,3 @@ import { validate } from 'doi-utils'; | ||
import { CreditRoles, ExportFormats } from './types'; | ||
export const SITE_FRONTMATTER_KEYS = ['title', 'description', 'venue', 'keywords']; | ||
export const SITE_FRONTMATTER_KEYS = ['title', 'description', 'venue', 'keywords', 'design']; | ||
export const PROJECT_FRONTMATTER_KEYS = [ | ||
@@ -25,3 +25,2 @@ 'authors', | ||
'exports', | ||
'design', | ||
].concat(SITE_FRONTMATTER_KEYS); | ||
@@ -92,3 +91,3 @@ export const PAGE_FRONTMATTER_KEYS = [ | ||
const JUPYTEXT_KEYS = ['formats', 'text_representation']; | ||
export const RESERVED_EXPORT_KEYS = ['format', 'template', 'output', 'id', 'name']; | ||
export const RESERVED_EXPORT_KEYS = ['format', 'template', 'output', 'id', 'name', 'renderer']; | ||
const GITHUB_USERNAME_REPO_REGEX = '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$'; | ||
@@ -385,2 +384,9 @@ const ORCID_REGEX = '^(http(s)?://orcid.org/)?([0-9]{4}-){3}[0-9]{3}[0-9X]$'; | ||
} | ||
if (defined(value.design)) { | ||
const designOpts = incrementOptions('design', opts); | ||
const design = validateObject(value.design, designOpts); | ||
if (design) { | ||
output.design = validateSiteDesign(design, designOpts); | ||
} | ||
} | ||
return output; | ||
@@ -486,9 +492,2 @@ } | ||
} | ||
if (defined(value.design)) { | ||
const designOpts = incrementOptions('design', opts); | ||
const design = validateObject(value.design, designOpts); | ||
if (design) { | ||
output.design = validateSiteDesign(design, designOpts); | ||
} | ||
} | ||
return output; | ||
@@ -495,0 +494,0 @@ } |
{ | ||
"name": "myst-frontmatter", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"license": "MIT", | ||
"description": "Frontmatter types and validation for the mystjs ecosystem", | ||
"author": "Franklin Koch <franklin@curvenote.com>", | ||
"homepage": "https://github.com/curvenote/curvenote#readme", | ||
"homepage": "https://github.com/executablebooks/mystjs/tree/main/packages/myst-frontmatter", | ||
"main": "./dist/cjs/index.js", | ||
@@ -25,3 +25,3 @@ "module": "./dist/esm/index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/curvenote/curvenote.git" | ||
"url": "git+https://github.com/executablebooks/mystjs.git" | ||
}, | ||
@@ -41,7 +41,7 @@ "scripts": { | ||
"bugs": { | ||
"url": "https://github.com/curvenote/curvenote/issues" | ||
"url": "https://github.com/executablebooks/mystjs/issues" | ||
}, | ||
"dependencies": { | ||
"doi-utils": "^1.0.4", | ||
"simple-validators": "^0.0.1" | ||
"simple-validators": "^0.0.2" | ||
}, | ||
@@ -48,0 +48,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
287054
0
6043
+ Addedsimple-validators@0.0.2(transitive)
- Removedsimple-validators@0.0.1(transitive)
Updatedsimple-validators@^0.0.2