Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

myst-frontmatter

Package Overview
Dependencies
Maintainers
2
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myst-frontmatter - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

24

dist/cjs/frontmatter/validators.js

@@ -114,3 +114,12 @@ "use strict";

const JUPYTEXT_KEYS = ['formats', 'text_representation'];
exports.RESERVED_EXPORT_KEYS = ['format', 'template', 'output', 'id', 'name', 'renderer'];
exports.RESERVED_EXPORT_KEYS = [
'format',
'template',
'output',
'id',
'name',
'renderer',
'article',
'sub_articles',
];
const KNOWN_ALIASES = {

@@ -540,2 +549,15 @@ author: 'authors',

}
if ((0, simple_validators_1.defined)(value.article)) {
output.article = (0, simple_validators_1.validateString)(value.article, (0, simple_validators_1.incrementOptions)('article', opts));
}
if ((0, simple_validators_1.defined)(value.sub_articles)) {
if (output.format !== types_1.ExportFormats.xml) {
(0, simple_validators_1.validationError)("sub_articles are only supported for exports of format 'jats'", opts);
}
else {
output.sub_articles = (0, simple_validators_1.validateList)(value.sub_articles, (0, simple_validators_1.incrementOptions)('sub_articles', opts), (file, ind) => {
return (0, simple_validators_1.validateString)(file, (0, simple_validators_1.incrementOptions)(`sub_articles.${ind}`, opts));
});
}
}
return output;

@@ -542,0 +564,0 @@ }

@@ -108,3 +108,12 @@ import doi from 'doi-utils';

const JUPYTEXT_KEYS = ['formats', 'text_representation'];
export const RESERVED_EXPORT_KEYS = ['format', 'template', 'output', 'id', 'name', 'renderer'];
export const RESERVED_EXPORT_KEYS = [
'format',
'template',
'output',
'id',
'name',
'renderer',
'article',
'sub_articles',
];
const KNOWN_ALIASES = {

@@ -522,2 +531,15 @@ author: 'authors',

}
if (defined(value.article)) {
output.article = validateString(value.article, incrementOptions('article', opts));
}
if (defined(value.sub_articles)) {
if (output.format !== ExportFormats.xml) {
validationError("sub_articles are only supported for exports of format 'jats'", opts);
}
else {
output.sub_articles = validateList(value.sub_articles, incrementOptions('sub_articles', opts), (file, ind) => {
return validateString(file, incrementOptions(`sub_articles.${ind}`, opts));
});
}
}
return output;

@@ -524,0 +546,0 @@ }

@@ -100,2 +100,5 @@ import type { CreditRole } from 'credit-roles';

output?: string;
article?: string;
/** sub_articles are only for jats xml export */
sub_articles?: string[];
} & Record<string, any>;

@@ -102,0 +105,0 @@ export declare type SiteFrontmatter = {

2

package.json
{
"name": "myst-frontmatter",
"version": "0.0.11",
"version": "0.0.12",
"sideEffects": false,

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc