Skip to content

Commit

Permalink
chore: backport retro compatible commits for the Docusaurus v2.4 rele…
Browse files Browse the repository at this point in the history
…ase (#8809)

Co-authored-by: Joshua Chen <[email protected]>
Co-authored-by: sebastienlorber <[email protected]>
Co-authored-by: Sébastien Lorber <[email protected]>
Co-authored-by: Ben Gubler <[email protected]>
Co-authored-by: Davide Donadio <[email protected]>
Co-authored-by: Petter Drønnen <[email protected]>
Co-authored-by: Moritz Stückler <[email protected]>
Co-authored-by: Mysterious_Dev <[email protected]>
Co-authored-by: TrueQAP <[email protected]>
Co-authored-by: Kagan <[email protected]>
Co-authored-by: Dewansh Thakur <[email protected]>
Co-authored-by: Armano <[email protected]>
Co-authored-by: Anas <[email protected]>
Co-authored-by: Tanner Dolby <[email protected]>
Co-authored-by: Davide Donadio <[email protected]>
Co-authored-by: biplavmz <[email protected]>
Co-authored-by: Vishruta Patil <[email protected]>
fix(theme-classic): fix tab focus bug in dropdown (#8697) (#8699)
fix(theme): improve color toggle when using dark navbar (#8615)
fix(theme-translations): fix wrong arabic words (tip/next) (#8744)
fix(core): baseUrl error banner link anchor case (#8746)
fix(search): search page should react to querystring changes + cleanup/refactor (#8757)
fix(theme): allow tabs children to be falsy (#8801)
fix(theme): codeblock buttons should be kept on the right when using RTL locale (#8803)
  • Loading branch information
17 people authored Mar 24, 2023
1 parent 985a64a commit 4fb67ef
Show file tree
Hide file tree
Showing 122 changed files with 1,730 additions and 492 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"__snapshots__",
"website/src/data/users.tsx",
"website/src/data/tweets.tsx",
"website/docusaurus.config.localized.json",
"*.xyz",
"*.docx",
"versioned_docs",
Expand Down
2 changes: 1 addition & 1 deletion admin/new.docusaurus.io/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.docusaurus.io",
"version": "2.3.1",
"version": "2.4.0",
"private": true,
"scripts": {
"start": "npx --package netlify-cli netlify dev"
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.3.1",
"version": "2.4.0",
"npmClient": "yarn",
"useWorkspaces": true,
"changelog": {
Expand Down
6 changes: 3 additions & 3 deletions packages/create-docusaurus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-docusaurus",
"version": "2.3.1",
"version": "2.4.0",
"description": "Create Docusaurus apps easily.",
"type": "module",
"repository": {
Expand All @@ -22,8 +22,8 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/logger": "2.3.1",
"@docusaurus/utils": "2.3.1",
"@docusaurus/logger": "2.4.0",
"@docusaurus/utils": "2.4.0",
"commander": "^5.1.0",
"fs-extra": "^10.1.0",
"lodash": "^4.17.21",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-typescript-template",
"version": "2.3.1",
"version": "2.4.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -15,16 +15,16 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/preset-classic": "2.3.1",
"@docusaurus/core": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.3.1",
"@docusaurus/module-type-aliases": "2.4.0",
"@tsconfig/docusaurus": "^1.0.5",
"typescript": "^4.7.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const config = {
},
items: [
{
type: 'doc',
docId: 'intro',
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
Expand Down
8 changes: 4 additions & 4 deletions packages/create-docusaurus/templates/classic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-template",
"version": "2.3.1",
"version": "2.4.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -14,16 +14,16 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/preset-classic": "2.3.1",
"@docusaurus/core": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.3.1"
"@docusaurus/module-type-aliases": "2.4.0"
},
"browserslist": {
"production": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const config = {
},
items: [
{
type: 'doc',
docId: 'intro',
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
Expand Down
6 changes: 3 additions & 3 deletions packages/create-docusaurus/templates/facebook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-facebook-template",
"version": "2.3.1",
"version": "2.4.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -18,8 +18,8 @@
"format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\""
},
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/preset-classic": "2.3.1",
"@docusaurus/core": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-cssnano-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/cssnano-preset",
"version": "2.3.1",
"version": "2.4.0",
"description": "Advanced cssnano preset for maximum optimization.",
"main": "lib/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-logger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/logger",
"version": "2.3.1",
"version": "2.4.0",
"description": "An encapsulated logger for semantically formatting console messages.",
"main": "./lib/index.js",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions packages/docusaurus-mdx-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/mdx-loader",
"version": "2.3.1",
"version": "2.4.0",
"description": "Docusaurus Loader for MDX",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -20,8 +20,8 @@
"dependencies": {
"@babel/parser": "^7.18.8",
"@babel/traverse": "^7.18.8",
"@docusaurus/logger": "2.3.1",
"@docusaurus/utils": "2.3.1",
"@docusaurus/logger": "2.4.0",
"@docusaurus/utils": "2.4.0",
"@mdx-js/mdx": "^1.6.22",
"escape-html": "^1.0.3",
"file-loader": "^6.2.0",
Expand All @@ -37,7 +37,7 @@
"webpack": "^5.73.0"
},
"devDependencies": {
"@docusaurus/types": "2.3.1",
"@docusaurus/types": "2.4.0",
"@types/escape-html": "^1.0.2",
"@types/mdast": "^3.0.10",
"@types/stringify-object": "^3.3.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-migrate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/migrate",
"version": "2.3.1",
"version": "2.4.0",
"description": "A CLI tool to migrate from older versions of Docusaurus.",
"license": "MIT",
"engines": {
Expand All @@ -24,8 +24,8 @@
"dependencies": {
"@babel/core": "^7.18.6",
"@babel/preset-env": "^7.18.6",
"@docusaurus/logger": "2.3.1",
"@docusaurus/utils": "2.3.1",
"@docusaurus/logger": "2.4.0",
"@docusaurus/utils": "2.4.0",
"@mapbox/hast-util-to-jsx": "^2.0.0",
"color": "^4.2.3",
"commander": "^5.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-module-type-aliases/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/module-type-aliases",
"version": "2.3.1",
"version": "2.4.0",
"description": "Docusaurus module type aliases.",
"types": "./src/index.d.ts",
"publishConfig": {
Expand All @@ -13,7 +13,7 @@
},
"dependencies": {
"@docusaurus/react-loadable": "5.5.2",
"@docusaurus/types": "2.3.1",
"@docusaurus/types": "2.4.0",
"@types/history": "^4.7.11",
"@types/react": "*",
"@types/react-router-config": "*",
Expand Down
14 changes: 7 additions & 7 deletions packages/docusaurus-plugin-client-redirects/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-client-redirects",
"version": "2.3.1",
"version": "2.4.0",
"description": "Client redirects plugin for Docusaurus.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -18,18 +18,18 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/logger": "2.3.1",
"@docusaurus/utils": "2.3.1",
"@docusaurus/utils-common": "2.3.1",
"@docusaurus/utils-validation": "2.3.1",
"@docusaurus/core": "2.4.0",
"@docusaurus/logger": "2.4.0",
"@docusaurus/utils": "2.4.0",
"@docusaurus/utils-common": "2.4.0",
"@docusaurus/utils-validation": "2.4.0",
"eta": "^2.0.0",
"fs-extra": "^10.1.0",
"lodash": "^4.17.21",
"tslib": "^2.4.0"
},
"devDependencies": {
"@docusaurus/types": "2.3.1"
"@docusaurus/types": "2.4.0"
},
"peerDependencies": {
"react": "^16.8.4 || ^17.0.0",
Expand Down
16 changes: 8 additions & 8 deletions packages/docusaurus-plugin-content-blog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-blog",
"version": "2.3.1",
"version": "2.4.0",
"description": "Blog plugin for Docusaurus.",
"main": "lib/index.js",
"types": "src/plugin-content-blog.d.ts",
Expand All @@ -18,13 +18,13 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/logger": "2.3.1",
"@docusaurus/mdx-loader": "2.3.1",
"@docusaurus/types": "2.3.1",
"@docusaurus/utils": "2.3.1",
"@docusaurus/utils-common": "2.3.1",
"@docusaurus/utils-validation": "2.3.1",
"@docusaurus/core": "2.4.0",
"@docusaurus/logger": "2.4.0",
"@docusaurus/mdx-loader": "2.4.0",
"@docusaurus/types": "2.4.0",
"@docusaurus/utils": "2.4.0",
"@docusaurus/utils-common": "2.4.0",
"@docusaurus/utils-validation": "2.4.0",
"cheerio": "^1.0.0-rc.12",
"feed": "^4.2.2",
"fs-extra": "^10.1.0",
Expand Down
16 changes: 8 additions & 8 deletions packages/docusaurus-plugin-content-docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-docs",
"version": "2.3.1",
"version": "2.4.0",
"description": "Docs plugin for Docusaurus.",
"main": "lib/index.js",
"sideEffects": false,
Expand Down Expand Up @@ -35,13 +35,13 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/logger": "2.3.1",
"@docusaurus/mdx-loader": "2.3.1",
"@docusaurus/module-type-aliases": "2.3.1",
"@docusaurus/types": "2.3.1",
"@docusaurus/utils": "2.3.1",
"@docusaurus/utils-validation": "2.3.1",
"@docusaurus/core": "2.4.0",
"@docusaurus/logger": "2.4.0",
"@docusaurus/mdx-loader": "2.4.0",
"@docusaurus/module-type-aliases": "2.4.0",
"@docusaurus/types": "2.4.0",
"@docusaurus/utils": "2.4.0",
"@docusaurus/utils-validation": "2.4.0",
"@types/react-router-config": "^5.0.6",
"combine-promises": "^1.1.0",
"fs-extra": "^10.1.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/docusaurus-plugin-content-docs/src/sidebars/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export type SidebarItemLink = SidebarItemBase & {
href: string;
label: string;
autoAddBaseUrl?: boolean;
description?: string;
};

export type SidebarItemAutogenerated = SidebarItemBase & {
Expand All @@ -57,6 +58,7 @@ type SidebarItemCategoryBase = SidebarItemBase & {
label: string;
collapsed: boolean;
collapsible: boolean;
description?: string;
};

export type SidebarItemCategoryLinkDoc = {type: 'doc'; id: string};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ const sidebarItemLinkSchema = sidebarItemBaseSchema.append<SidebarItemLink>({
label: Joi.string()
.required()
.messages({'any.unknown': '"label" must be a string'}),
description: Joi.string().optional().messages({
'any.unknown': '"description" must be a string',
}),
});

const sidebarItemCategoryLinkSchema = Joi.object<SidebarItemCategoryLink>()
Expand Down Expand Up @@ -116,6 +119,9 @@ const sidebarItemCategorySchema =
collapsible: Joi.boolean().messages({
'any.unknown': '"collapsible" must be a boolean',
}),
description: Joi.string().optional().messages({
'any.unknown': '"description" must be a string',
}),
});

const sidebarItemSchema = Joi.object<SidebarItemConfig>().when('.type', {
Expand Down
12 changes: 6 additions & 6 deletions packages/docusaurus-plugin-content-pages/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-pages",
"version": "2.3.1",
"version": "2.4.0",
"description": "Pages plugin for Docusaurus.",
"main": "lib/index.js",
"types": "src/plugin-content-pages.d.ts",
Expand All @@ -18,11 +18,11 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/mdx-loader": "2.3.1",
"@docusaurus/types": "2.3.1",
"@docusaurus/utils": "2.3.1",
"@docusaurus/utils-validation": "2.3.1",
"@docusaurus/core": "2.4.0",
"@docusaurus/mdx-loader": "2.4.0",
"@docusaurus/types": "2.4.0",
"@docusaurus/utils": "2.4.0",
"@docusaurus/utils-validation": "2.4.0",
"fs-extra": "^10.1.0",
"tslib": "^2.4.0",
"webpack": "^5.73.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/docusaurus-plugin-debug/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-debug",
"version": "2.3.1",
"version": "2.4.0",
"description": "Debug plugin for Docusaurus.",
"main": "lib/index.js",
"types": "src/plugin-debug.d.ts",
Expand All @@ -20,9 +20,9 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/types": "2.3.1",
"@docusaurus/utils": "2.3.1",
"@docusaurus/core": "2.4.0",
"@docusaurus/types": "2.4.0",
"@docusaurus/utils": "2.4.0",
"fs-extra": "^10.1.0",
"react-json-view": "^1.21.3",
"tslib": "^2.4.0"
Expand Down
Loading

0 comments on commit 4fb67ef

Please sign in to comment.