New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@docusaurus/utils-validation

Package Overview
Dependencies
Maintainers
5
Versions
1833
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/utils-validation - npm Package Compare versions

Comparing version 2.0.0-alpha.64 to 2.0.0-alpha.65

2

lib/validationSchemas.js

@@ -41,3 +41,3 @@ "use strict";

exports.AdmonitionsSchema = Joi.object().default({});
exports.URISchema = Joi.alternatives(Joi.string().uri(), Joi.custom((val, helpers) => {
exports.URISchema = Joi.alternatives(Joi.string().uri({ allowRelative: true }), Joi.custom((val, helpers) => {
try {

@@ -44,0 +44,0 @@ const url = new URL(val);

{
"name": "@docusaurus/utils-validation",
"version": "2.0.0-alpha.64",
"version": "2.0.0-alpha.65",
"description": "Node validation utility functions for Docusaurus packages",

@@ -19,3 +19,3 @@ "main": "./lib/index.js",

"dependencies": {
"@docusaurus/utils": "2.0.0-alpha.64",
"@docusaurus/utils": "2.0.0-alpha.65",
"@hapi/joi": "17.1.1",

@@ -27,3 +27,3 @@ "chalk": "^3.0.0"

},
"gitHead": "5fdf3979c3595115109fc2e249ced846368c1f75"
"gitHead": "deb65e2bd92a9b11fe067c7dc30b3d49b7828b5c"
}

@@ -112,12 +112,22 @@ /**

test('URISchema', () => {
const {testFail, testOK} = createTestHelpers({schema: URISchema});
const validURL = 'https://docusaurus.io';
const doubleHash = 'https://docusaurus.io#github#/:';
const invalidURL = 'invalidURL';
const invalidURL = 'spaces are invalid in a URL';
const relativeURL = 'relativeURL';
const relativeURLWithParent = '../relativeURLWithParent';
const urlFromIssue = 'https://riot.im/app/#/room/#ligo-public:matrix.org';
const {testFail, testOK} = createTestHelpers({schema: URISchema});
testOK(validURL);
testOK(doubleHash);
testFail(invalidURL);
testOK(relativeURL);
testOK(relativeURLWithParent);
testOK(urlFromIssue);
const protocolRelativeUrl1 = '//docusaurus.io/path';
const protocolRelativeUrl2 = '//docusaurus.io/docs/doc1#hash';
testOK(protocolRelativeUrl1);
testOK(protocolRelativeUrl2);
});
});

@@ -29,3 +29,3 @@ /**

export const URISchema = Joi.alternatives(
Joi.string().uri(),
Joi.string().uri({allowRelative: true}),
Joi.custom((val, helpers) => {

@@ -32,0 +32,0 @@ try {

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