Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"clear": "docusaurus clear",
"serve": "docusaurus serve"
"serve": "docusaurus serve",
"test:schema": "run test:unit packages/docusaurus"
},
"dependencies": {
"@docusaurus/core": "^3.7.0",
Expand Down Expand Up @@ -79,6 +80,7 @@
"@docusaurus/types": "^3.7.0",
"@types/dompurify": "^3",
"@types/git-url-parse": "^9.0.0",
"@types/jest": "^28.1.6",
"@types/markdown-it": "^12.2.3",
"@types/marked": "^5.0.0",
"@types/mdast": "^4.0.3",
Expand All @@ -91,6 +93,7 @@
"@types/resolve": "^1.20.0",
"@types/semver": "^7.1.0",
"@types/three": "^0.144.0",
"ajv": "^8.17.1",
"clipanion": "^4.0.0-rc.2",
"mdast-util-mdx-jsx": "^3.0.0",
"unified": "^11.0.4"
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus/static/configuration/yarnrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
"httpTimeout": {
"_package": "@yarnpkg/core",
"title": "Amount of time to wait before cancelling pending HTTP requests.",
"type": "mixed",
"type": ["number", "string"],
"oneOf": [
{ "type": "number" },
{ "type": "string", "pattern": "^(\\d*\\.?\\d+)(ms|s|m|h|d|w)?$" }
Expand Down Expand Up @@ -487,7 +487,7 @@
"_package": "@yarnpkg/core",
"title": "Minimum age of a package version according to the publish date on the npm registry to be considered for installation.",
"description": "If a package version is newer than the minimal age gate, it will not be considered for installation. This can be used to reduce the likelihood of installing compromised packages, or to avoid relying on packages that could still be unpublished (e.g. the npm registry has specific rules for packages less than 3 days old).",
"type": "mixed",
"type": ["number", "string"],
"oneOf": [
{ "type": "number" },
{ "type": "string", "pattern": "^(\\d*\\.?\\d+)(ms|s|m|h|d|w)?$" }
Expand Down Expand Up @@ -861,7 +861,7 @@
"_package": "@yarnpkg/core",
"title": "Define the minimal amount of time between two telemetry events.",
"description": "By default we only send one request per week, making it impossible for us to track your usage with a lower granularity.",
"type": "mixed",
"type": ["number", "string"],
"oneOf": [
{ "type": "number" },
{ "type": "string", "pattern": "^(\\d*\\.?\\d+)(ms|s|m|h|d|w)?$" }
Expand Down
24 changes: 24 additions & 0 deletions packages/docusaurus/tests/schema.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Ajv2019 from 'ajv/dist/2019';
import draft2019Schema from 'ajv/dist/refs/json-schema-2019-09/schema.json';

import manifestSchema from '../static/configuration/manifest.json';
import yarnRcSchema from '../static/configuration/yarnrc.json';

const ajv = new Ajv2019();
const validate = ajv.compile(draft2019Schema);

describe(`manifest.json`, () => {
it(`is a valid JSON Schema`, () => {
const result = validate(manifestSchema);
expect(validate.errors).toBeNull();
expect(result).toBe(true);
});
});

describe(`yarnrc.json`, () => {
it(`is a valid JSON Schema`, () => {
const result = validate(yarnRcSchema);
expect(validate.errors).toBeNull();
expect(result).toBe(true);
});
});
4 changes: 3 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5957,6 +5957,7 @@ __metadata:
"@tanstack/react-query": "npm:^5.74.7"
"@types/dompurify": "npm:^3"
"@types/git-url-parse": "npm:^9.0.0"
"@types/jest": "npm:^28.1.6"
"@types/markdown-it": "npm:^12.2.3"
"@types/marked": "npm:^5.0.0"
"@types/mdast": "npm:^4.0.3"
Expand All @@ -5982,6 +5983,7 @@ __metadata:
"@yarnpkg/pnpify": "workspace:^"
"@yarnpkg/sdks": "workspace:^"
"@yarnpkg/shell": "workspace:^"
ajv: "npm:^8.17.1"
algoliasearch: "npm:^4.14.2"
ansi-to-html: "npm:^0.7.2"
clipanion: "npm:^4.0.0-rc.2"
Expand Down Expand Up @@ -6848,7 +6850,7 @@ __metadata:
languageName: node
linkType: hard

"ajv@npm:^8.0.0, ajv@npm:^8.9.0":
"ajv@npm:^8.0.0, ajv@npm:^8.17.1, ajv@npm:^8.9.0":
version: 8.17.1
resolution: "ajv@npm:8.17.1"
dependencies:
Expand Down