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

myst-frontmatter

Package Overview
Dependencies
Maintainers
3
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 1.7.4 to 1.7.5

16

dist/licenses/validators.js

@@ -88,2 +88,3 @@ import { validationWarning, defined, incrementOptions, validateObjectKeys, validateString, validateUrl, validateBoolean, } from 'simple-validators';

export function validateLicense(input, opts) {
var _a;
if (typeof input === 'string') {

@@ -93,3 +94,4 @@ const value = validateString(input, opts);

return undefined;
const valueSpdx = correctLicense(value);
// Do not try to coerce long values into SPDX licenses
const valueSpdx = value.length < 15 ? correctLicense(value) : undefined;
if (URL_ID_LOOKUP[cleanUrl(value)]) {

@@ -133,3 +135,13 @@ input = { id: URL_ID_LOOKUP[cleanUrl(value)] };

else {
validationWarning(`no license ID - using a SPDX license ID is recommended, see https://spdx.org/licenses/`, opts);
if (value.url) {
const url = (_a = validateUrl(value.url, { property: '', messages: {} })) !== null && _a !== void 0 ? _a : '';
const idFromUrl = URL_ID_LOOKUP[cleanUrl(url)];
if (idFromUrl) {
output.id = idFromUrl;
value.url = ID_LICENSE_LOOKUP[idFromUrl].url;
}
}
if (!output.id) {
validationWarning(`no license ID - using a SPDX license ID is recommended, see https://spdx.org/licenses/`, opts);
}
}

@@ -136,0 +148,0 @@ const expected = output.id ? ID_LICENSE_LOOKUP[output.id] : undefined;

2

package.json
{
"name": "myst-frontmatter",
"version": "1.7.4",
"version": "1.7.5",
"sideEffects": false,

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

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