From a4d4ee8338c547b532da6a4b2c2d4e964eb35ee2 Mon Sep 17 00:00:00 2001 From: Christopher Ehrlich Date: Fri, 2 Dec 2022 01:30:04 +0100 Subject: [PATCH] feat(docs): i18n stuff (#820) * links in left sidebar use active language * add ToC for in progress translations * prettier * github icon rtl * implement getIsRtlFromUrl * navbar rtl fix * gap in search * use isLtr * code blocks are always ltr * leftSidebar has scrollbar on right side ltr&rtl * arabic sample files * more rtl styling * fix merge conflict * fix missing '!' * prettier * use padding-start * css cleanup * more direction-independent classes * rtl spacing stuff * fix lists and tables in rtl * fix avatar in quotes (but should be a component) * prettier * fix code embeds having rtl punctuation * slightly less awful nativeHeader type * prettier * outdated docs ltr + mx * prettier * fix ts-errors * add todo * chore: add changeset * remove changeset Co-authored-by: Julius Marminge Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> --- cli/package.json | 4 +- package.json | 8 +- pnpm-lock.yaml | 245 ++++++++++-------- www/package.json | 8 +- www/src/components/docs/breadCrumbs.tsx | 11 +- .../components/docs/outdatedDocsBanner.astro | 5 +- www/src/components/docs/pageContent.astro | 8 + www/src/components/navigation/Search.tsx | 4 +- .../components/navigation/githubIcon.astro | 14 +- .../components/navigation/leftSidebar.astro | 30 ++- www/src/components/navigation/moreMenu.astro | 8 +- www/src/components/navigation/navbar.astro | 11 +- .../navigation/tableOfContents.astro | 16 +- www/src/config.ts | 24 +- www/src/languages.ts | 24 ++ www/src/layouts/docs.astro | 7 +- www/src/pages/en/usage/trpc.md | 2 +- www/src/pages/en/usage/typescript.md | 2 +- www/src/styles/global.css | 8 +- 19 files changed, 265 insertions(+), 174 deletions(-) diff --git a/cli/package.json b/cli/package.json index c982d1bd4a..7bb36c13a1 100644 --- a/cli/package.json +++ b/cli/package.json @@ -54,8 +54,8 @@ "@types/gradient-string": "^1.1.2", "@types/inquirer": "^9.0.2", "@types/node": "^18.8.0", - "prettier": "^2.7.1", - "prettier-plugin-tailwindcss": "0.2.0-beta.3", + "prettier": "^2.8.0", + "prettier-plugin-tailwindcss": "^0.2.0", "tsup": "^6.2.3", "type-fest": "^3.0.0", "typescript": "^4.9.3" diff --git a/package.json b/package.json index f8a5ce6f5f..4974a50afa 100644 --- a/package.json +++ b/package.json @@ -48,16 +48,16 @@ "@changesets/cli": "^2.25.0", "@manypkg/cli": "^0.19.2", "@types/node": "^18.8.0", - "@typescript-eslint/eslint-plugin": "^5.39.0", - "@typescript-eslint/parser": "^5.39.0", - "eslint": "^8.24.0", + "@typescript-eslint/eslint-plugin": "^5.45.0", + "@typescript-eslint/parser": "^5.45.0", + "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "eslint-config-turbo": "^0.0.4", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.31.8", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-unicorn": "44.0.0", - "prettier": "^2.7.1", + "prettier": "^2.8.0", "turbo": "^1.5.5", "typescript": "^4.9.3" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9e34aa2302..991fd75e13 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,16 +8,16 @@ importers: '@changesets/cli': ^2.25.0 '@manypkg/cli': ^0.19.2 '@types/node': ^18.8.0 - '@typescript-eslint/eslint-plugin': ^5.39.0 - '@typescript-eslint/parser': ^5.39.0 - eslint: ^8.24.0 + '@typescript-eslint/eslint-plugin': ^5.45.0 + '@typescript-eslint/parser': ^5.45.0 + eslint: ^8.28.0 eslint-config-prettier: ^8.5.0 eslint-config-turbo: ^0.0.4 eslint-plugin-prettier: ^4.2.1 eslint-plugin-react: ^7.31.8 eslint-plugin-react-hooks: ^4.6.0 eslint-plugin-unicorn: 44.0.0 - prettier: ^2.7.1 + prettier: ^2.8.0 turbo: ^1.5.5 typescript: ^4.9.3 dependencies: @@ -25,16 +25,16 @@ importers: '@changesets/cli': 2.25.0 '@manypkg/cli': 0.19.2 '@types/node': 18.8.0 - '@typescript-eslint/eslint-plugin': 5.39.0_bj2hu2svjatbgqrx6ek4wcgmym - '@typescript-eslint/parser': 5.39.0_zea7lsic7rryqsxn44jhihuxfi - eslint: 8.24.0 - eslint-config-prettier: 8.5.0_eslint@8.24.0 - eslint-config-turbo: 0.0.4_eslint@8.24.0 - eslint-plugin-prettier: 4.2.1_cfn5x6ujhhgzv3423d6k7r2zzm - eslint-plugin-react: 7.31.8_eslint@8.24.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.24.0 - eslint-plugin-unicorn: 44.0.0_eslint@8.24.0 - prettier: 2.7.1 + '@typescript-eslint/eslint-plugin': 5.45.0_czs5uoqkd3podpy6vgtsxfc7au + '@typescript-eslint/parser': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + eslint: 8.28.0 + eslint-config-prettier: 8.5.0_eslint@8.28.0 + eslint-config-turbo: 0.0.4_eslint@8.28.0 + eslint-plugin-prettier: 4.2.1_cwlo2dingkvfydnaculr42urve + eslint-plugin-react: 7.31.8_eslint@8.28.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.28.0 + eslint-plugin-unicorn: 44.0.0_eslint@8.28.0 + prettier: 2.8.0 turbo: 1.5.5 typescript: 4.9.3 @@ -51,8 +51,8 @@ importers: gradient-string: ^2.0.2 inquirer: ^9.1.2 ora: 6.1.2 - prettier: ^2.7.1 - prettier-plugin-tailwindcss: 0.2.0-beta.3 + prettier: ^2.8.0 + prettier-plugin-tailwindcss: ^0.2.0 sort-package-json: ^2.0.0 tsup: ^6.2.3 type-fest: ^3.0.0 @@ -71,8 +71,8 @@ importers: '@types/gradient-string': 1.1.2 '@types/inquirer': 9.0.2 '@types/node': 18.8.0 - prettier: 2.7.1 - prettier-plugin-tailwindcss: 0.2.0-beta.3_prettier@2.7.1 + prettier: 2.8.0 + prettier-plugin-tailwindcss: 0.2.0_prettier@2.8.0 tsup: 6.2.3_typescript@4.9.3 type-fest: 3.0.0 typescript: 4.9.3 @@ -93,18 +93,18 @@ importers: '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 '@types/react-typist': ^2.0.3 - '@typescript-eslint/parser': ^5.39.0 + '@typescript-eslint/parser': ^5.45.0 '@vercel/analytics': ^0.1.5 astro: ^1.6.9 clsx: ^1.2.1 embla-carousel: ^7.0.3 embla-carousel-autoplay: ^7.0.3 - eslint: ^8.24.0 + eslint: ^8.28.0 eslint-plugin-astro: ^0.19.0 eslint-plugin-jsx-a11y: ^6.6.1 - prettier: ^2.7.1 + prettier: ^2.8.0 prettier-plugin-astro: ^0.7.0 - prettier-plugin-tailwindcss: 0.2.0-beta.3 + prettier-plugin-tailwindcss: ^0.2.0 react: 18.0.0 react-dom: 18.0.0 react-typist: ^2.0.5 @@ -138,14 +138,14 @@ importers: '@types/react': 18.0.17 '@types/react-dom': 18.0.6 '@types/react-typist': 2.0.3 - '@typescript-eslint/parser': 5.39.0_zea7lsic7rryqsxn44jhihuxfi + '@typescript-eslint/parser': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a astro: 1.6.9_@types+node@18.8.0 - eslint: 8.24.0 - eslint-plugin-astro: 0.19.0_eslint@8.24.0 - eslint-plugin-jsx-a11y: 6.6.1_eslint@8.24.0 - prettier: 2.7.1 + eslint: 8.28.0 + eslint-plugin-astro: 0.19.0_eslint@8.28.0 + eslint-plugin-jsx-a11y: 6.6.1_eslint@8.28.0 + prettier: 2.8.0 prettier-plugin-astro: 0.7.0 - prettier-plugin-tailwindcss: 0.2.0-beta.3_prettier@2.7.1 + prettier-plugin-tailwindcss: 0.2.0_prettier@2.8.0 react: 18.0.0 react-dom: 18.0.0_react@18.0.0 react-typist: 2.0.5_zpnidt7m3osuk7shl3s4oenomq @@ -313,7 +313,7 @@ packages: dependencies: '@vscode/emmet-helper': 2.8.4 events: 3.3.0 - prettier: 2.7.1 + prettier: 2.8.0 prettier-plugin-astro: 0.7.0 source-map: 0.7.4 vscode-css-languageservice: 6.0.1 @@ -690,7 +690,7 @@ packages: fs-extra: 7.0.1 lodash.startcase: 4.4.0 outdent: 0.5.0 - prettier: 2.7.1 + prettier: 2.8.0 resolve-from: 5.0.0 semver: 5.7.1 dev: false @@ -876,7 +876,7 @@ packages: '@changesets/types': 5.2.0 fs-extra: 7.0.1 human-id: 1.0.2 - prettier: 2.7.1 + prettier: 2.8.0 dev: false /@docsearch/css/3.3.0: @@ -971,8 +971,8 @@ packages: dev: true optional: true - /@eslint/eslintrc/1.3.2: - resolution: {integrity: sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==} + /@eslint/eslintrc/1.3.3: + resolution: {integrity: sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -1007,8 +1007,8 @@ packages: react-dom: 18.0.0_react@18.0.0 dev: false - /@humanwhocodes/config-array/0.10.7: - resolution: {integrity: sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==} + /@humanwhocodes/config-array/0.11.7: + resolution: {integrity: sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -1017,9 +1017,6 @@ packages: transitivePeerDependencies: - supports-color - /@humanwhocodes/gitignore-to-minimatch/1.0.2: - resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==} - /@humanwhocodes/module-importer/1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -1365,6 +1362,10 @@ packages: resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} dev: false + /@types/semver/7.3.13: + resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} + dev: false + /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: @@ -1382,8 +1383,8 @@ packages: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true - /@typescript-eslint/eslint-plugin/5.39.0_bj2hu2svjatbgqrx6ek4wcgmym: - resolution: {integrity: sha512-xVfKOkBm5iWMNGKQ2fwX5GVgBuHmZBO1tCRwXmY5oAIsPscfwm2UADDuNB8ZVYCtpQvJK4xpjrK7jEhcJ0zY9A==} + /@typescript-eslint/eslint-plugin/5.45.0_czs5uoqkd3podpy6vgtsxfc7au: + resolution: {integrity: sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -1393,13 +1394,14 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.39.0_zea7lsic7rryqsxn44jhihuxfi - '@typescript-eslint/scope-manager': 5.39.0 - '@typescript-eslint/type-utils': 5.39.0_zea7lsic7rryqsxn44jhihuxfi - '@typescript-eslint/utils': 5.39.0_zea7lsic7rryqsxn44jhihuxfi + '@typescript-eslint/parser': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/scope-manager': 5.45.0 + '@typescript-eslint/type-utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a debug: 4.3.4 - eslint: 8.24.0 + eslint: 8.28.0 ignore: 5.2.0 + natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.3.7 tsutils: 3.21.0_typescript@4.9.3 @@ -1408,8 +1410,8 @@ packages: - supports-color dev: false - /@typescript-eslint/parser/5.39.0_zea7lsic7rryqsxn44jhihuxfi: - resolution: {integrity: sha512-PhxLjrZnHShe431sBAGHaNe6BDdxAASDySgsBCGxcBecVCi8NQWxQZMcizNA4g0pN51bBAn/FUfkWG3SDVcGlA==} + /@typescript-eslint/parser/5.45.0_hsf322ms6xhhd4b5ne6lb74y4a: + resolution: {integrity: sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1418,24 +1420,24 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.39.0 - '@typescript-eslint/types': 5.39.0 - '@typescript-eslint/typescript-estree': 5.39.0_typescript@4.9.3 + '@typescript-eslint/scope-manager': 5.45.0 + '@typescript-eslint/types': 5.45.0 + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.3 debug: 4.3.4 - eslint: 8.24.0 + eslint: 8.28.0 typescript: 4.9.3 transitivePeerDependencies: - supports-color - /@typescript-eslint/scope-manager/5.39.0: - resolution: {integrity: sha512-/I13vAqmG3dyqMVSZPjsbuNQlYS082Y7OMkwhCfLXYsmlI0ca4nkL7wJ/4gjX70LD4P8Hnw1JywUVVAwepURBw==} + /@typescript-eslint/scope-manager/5.45.0: + resolution: {integrity: sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.39.0 - '@typescript-eslint/visitor-keys': 5.39.0 + '@typescript-eslint/types': 5.45.0 + '@typescript-eslint/visitor-keys': 5.45.0 - /@typescript-eslint/type-utils/5.39.0_zea7lsic7rryqsxn44jhihuxfi: - resolution: {integrity: sha512-KJHJkOothljQWzR3t/GunL0TPKY+fGJtnpl+pX+sJ0YiKTz3q2Zr87SGTmFqsCMFrLt5E0+o+S6eQY0FAXj9uA==} + /@typescript-eslint/type-utils/5.45.0_hsf322ms6xhhd4b5ne6lb74y4a: + resolution: {integrity: sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -1444,10 +1446,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.39.0_typescript@4.9.3 - '@typescript-eslint/utils': 5.39.0_zea7lsic7rryqsxn44jhihuxfi + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.3 + '@typescript-eslint/utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a debug: 4.3.4 - eslint: 8.24.0 + eslint: 8.28.0 tsutils: 3.21.0_typescript@4.9.3 typescript: 4.9.3 transitivePeerDependencies: @@ -1457,9 +1459,14 @@ packages: /@typescript-eslint/types/5.39.0: resolution: {integrity: sha512-gQMZrnfEBFXK38hYqt8Lkwt8f4U6yq+2H5VDSgP/qiTzC8Nw8JO3OuSUOQ2qW37S/dlwdkHDntkZM6SQhKyPhw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true - /@typescript-eslint/typescript-estree/5.39.0_typescript@4.9.3: - resolution: {integrity: sha512-qLFQP0f398sdnogJoLtd43pUgB18Q50QSA+BTE5h3sUxySzbWDpTSdgt4UyxNSozY/oDK2ta6HVAzvGgq8JYnA==} + /@typescript-eslint/types/5.45.0: + resolution: {integrity: sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + /@typescript-eslint/typescript-estree/5.45.0_typescript@4.9.3: + resolution: {integrity: sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1467,8 +1474,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.39.0 - '@typescript-eslint/visitor-keys': 5.39.0 + '@typescript-eslint/types': 5.45.0 + '@typescript-eslint/visitor-keys': 5.45.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1478,29 +1485,31 @@ packages: transitivePeerDependencies: - supports-color - /@typescript-eslint/utils/5.39.0_zea7lsic7rryqsxn44jhihuxfi: - resolution: {integrity: sha512-+DnY5jkpOpgj+EBtYPyHRjXampJfC0yUZZzfzLuUWVZvCuKqSdJVC8UhdWipIw7VKNTfwfAPiOWzYkAwuIhiAg==} + /@typescript-eslint/utils/5.45.0_hsf322ms6xhhd4b5ne6lb74y4a: + resolution: {integrity: sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.39.0 - '@typescript-eslint/types': 5.39.0 - '@typescript-eslint/typescript-estree': 5.39.0_typescript@4.9.3 - eslint: 8.24.0 + '@types/semver': 7.3.13 + '@typescript-eslint/scope-manager': 5.45.0 + '@typescript-eslint/types': 5.45.0 + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.3 + eslint: 8.28.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.24.0 + eslint-utils: 3.0.0_eslint@8.28.0 + semver: 7.3.7 transitivePeerDependencies: - supports-color - typescript dev: false - /@typescript-eslint/visitor-keys/5.39.0: - resolution: {integrity: sha512-yyE3RPwOG+XJBLrhvsxAidUgybJVQ/hG8BhiJo0k8JSAYfk/CshVcxf0HwP4Jt7WZZ6vLmxdo1p6EyN3tzFTkg==} + /@typescript-eslint/visitor-keys/5.45.0: + resolution: {integrity: sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.39.0 + '@typescript-eslint/types': 5.45.0 eslint-visitor-keys: 3.3.0 /@vercel/analytics/0.1.5_react@18.0.0: @@ -1708,7 +1717,7 @@ packages: engines: {node: ^14.18.0 || >=16.0.0} dependencies: '@astrojs/compiler': 0.24.0 - '@typescript-eslint/types': 5.39.0 + '@typescript-eslint/types': 5.45.0 astrojs-compiler-sync: 0.2.3_@astrojs+compiler@0.24.0 debug: 4.3.4 eslint-visitor-keys: 3.3.0 @@ -3177,25 +3186,25 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - /eslint-config-prettier/8.5.0_eslint@8.24.0: + /eslint-config-prettier/8.5.0_eslint@8.28.0: resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.24.0 + eslint: 8.28.0 dev: false - /eslint-config-turbo/0.0.4_eslint@8.24.0: + /eslint-config-turbo/0.0.4_eslint@8.28.0: resolution: {integrity: sha512-HErPS/wfWkSdV9Yd2dDkhZt3W2B78Ih/aWPFfaHmCMjzPalh+5KxRRGTf8MOBQLCebcWJX0lP1Zvc1rZIHlXGg==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 dependencies: - eslint: 8.24.0 - eslint-plugin-turbo: 0.0.4_eslint@8.24.0 + eslint: 8.28.0 + eslint-plugin-turbo: 0.0.4_eslint@8.28.0 dev: false - /eslint-plugin-astro/0.19.0_eslint@8.24.0: + /eslint-plugin-astro/0.19.0_eslint@8.28.0: resolution: {integrity: sha512-XOvTgFlSThgUQwDMjbj9gTu75Sig5IWpseN1hsGputC9tiZ857CrMLK3UimWCwIS6n3hTYYPWIkpcucEU/o0Uw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -3203,8 +3212,8 @@ packages: dependencies: '@typescript-eslint/types': 5.39.0 astro-eslint-parser: 0.6.1 - eslint: 8.24.0 - eslint-utils: 3.0.0_eslint@8.24.0 + eslint: 8.28.0 + eslint-utils: 3.0.0_eslint@8.28.0 postcss: 8.4.16 postcss-selector-parser: 6.0.10 sourcemap-codec: 1.4.8 @@ -3212,7 +3221,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y/6.6.1_eslint@8.24.0: + /eslint-plugin-jsx-a11y/6.6.1_eslint@8.28.0: resolution: {integrity: sha512-sXgFVNHiWffBq23uiS/JaP6eVR622DqwB4yTzKvGZGcPq6/yZ3WmOZfuBks/vHWo9GaFOqC2ZK4i6+C35knx7Q==} engines: {node: '>=4.0'} peerDependencies: @@ -3226,7 +3235,7 @@ packages: axobject-query: 2.2.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.24.0 + eslint: 8.28.0 has: 1.0.3 jsx-ast-utils: 3.3.3 language-tags: 1.0.5 @@ -3234,7 +3243,7 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-prettier/4.2.1_cfn5x6ujhhgzv3423d6k7r2zzm: + /eslint-plugin-prettier/4.2.1_cwlo2dingkvfydnaculr42urve: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -3245,22 +3254,22 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.24.0 - eslint-config-prettier: 8.5.0_eslint@8.24.0 - prettier: 2.7.1 + eslint: 8.28.0 + eslint-config-prettier: 8.5.0_eslint@8.28.0 + prettier: 2.8.0 prettier-linter-helpers: 1.0.0 dev: false - /eslint-plugin-react-hooks/4.6.0_eslint@8.24.0: + /eslint-plugin-react-hooks/4.6.0_eslint@8.28.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.24.0 + eslint: 8.28.0 dev: false - /eslint-plugin-react/7.31.8_eslint@8.24.0: + /eslint-plugin-react/7.31.8_eslint@8.28.0: resolution: {integrity: sha512-5lBTZmgQmARLLSYiwI71tiGVTLUuqXantZM6vlSY39OaDSV0M7+32K5DnLkmFrwTe+Ksz0ffuLUC91RUviVZfw==} engines: {node: '>=4'} peerDependencies: @@ -3269,7 +3278,7 @@ packages: array-includes: 3.1.5 array.prototype.flatmap: 1.3.0 doctrine: 2.1.0 - eslint: 8.24.0 + eslint: 8.28.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -3283,15 +3292,15 @@ packages: string.prototype.matchall: 4.0.7 dev: false - /eslint-plugin-turbo/0.0.4_eslint@8.24.0: + /eslint-plugin-turbo/0.0.4_eslint@8.28.0: resolution: {integrity: sha512-dfmYE/iPvoJInQq+5E/0mj140y/rYwKtzZkn3uVK8+nvwC5zmWKQ6ehMWrL4bYBkGzSgpOndZM+jOXhPQ2m8Cg==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 dependencies: - eslint: 8.24.0 + eslint: 8.28.0 dev: false - /eslint-plugin-unicorn/44.0.0_eslint@8.24.0: + /eslint-plugin-unicorn/44.0.0_eslint@8.28.0: resolution: {integrity: sha512-GbkxkdNzY7wNEfZnraAP+oA+aqqzSrNZmO37kjW1DyqnSK/ah08ySDdIecObpx46twv+zcQvH8i0CHP98Wo64w==} engines: {node: '>=14.18'} peerDependencies: @@ -3300,8 +3309,8 @@ packages: '@babel/helper-validator-identifier': 7.19.1 ci-info: 3.4.0 clean-regexp: 1.0.0 - eslint: 8.24.0 - eslint-utils: 3.0.0_eslint@8.24.0 + eslint: 8.28.0 + eslint-utils: 3.0.0_eslint@8.28.0 esquery: 1.4.0 indent-string: 4.0.0 is-builtin-module: 3.2.0 @@ -3329,13 +3338,13 @@ packages: esrecurse: 4.3.0 estraverse: 5.3.0 - /eslint-utils/3.0.0_eslint@8.24.0: + /eslint-utils/3.0.0_eslint@8.28.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.24.0 + eslint: 8.28.0 eslint-visitor-keys: 2.1.0 /eslint-visitor-keys/2.1.0: @@ -3346,15 +3355,15 @@ packages: resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - /eslint/8.24.0: - resolution: {integrity: sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==} + /eslint/8.28.0: + resolution: {integrity: sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.3.2 - '@humanwhocodes/config-array': 0.10.7 - '@humanwhocodes/gitignore-to-minimatch': 1.0.2 + '@eslint/eslintrc': 1.3.3 + '@humanwhocodes/config-array': 0.11.7 '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 @@ -3362,7 +3371,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.24.0 + eslint-utils: 3.0.0_eslint@8.28.0 eslint-visitor-keys: 3.3.0 espree: 9.4.0 esquery: 1.4.0 @@ -3372,12 +3381,12 @@ packages: find-up: 5.0.0 glob-parent: 6.0.2 globals: 13.17.0 - globby: 11.1.0 grapheme-splitter: 1.0.4 ignore: 5.2.0 import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 + is-path-inside: 3.0.3 js-sdsl: 4.1.5 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 @@ -3799,7 +3808,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.11 + fast-glob: 3.2.12 ignore: 5.2.0 merge2: 1.4.1 slash: 3.0.0 @@ -4269,6 +4278,10 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + /is-path-inside/3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + /is-plain-obj/1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} @@ -5137,6 +5150,10 @@ packages: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} dev: false + /natural-compare-lite/1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + dev: false + /natural-compare/1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -5663,22 +5680,22 @@ packages: engines: {node: ^14.15.0 || >=16.0.0, npm: '>=6.14.0'} dependencies: '@astrojs/compiler': 0.29.17 - prettier: 2.7.1 + prettier: 2.8.0 sass-formatter: 0.7.5 synckit: 0.8.4 dev: true - /prettier-plugin-tailwindcss/0.2.0-beta.3_prettier@2.7.1: - resolution: {integrity: sha512-aq8gjelLGg/XGSHgxcJJhw4uaxvy7Ikdd6fcYE4X4I6wkDSiaPmnuSik+lkW4R9xbuTcekdZAkxXh7TeOl+eXg==} + /prettier-plugin-tailwindcss/0.2.0_prettier@2.8.0: + resolution: {integrity: sha512-Ruqig/mdWCSpqdq9WK44nrmqM4BFWTzBPhPGwC5NK3coV9eZntEQPB84MGZbjAg0XQU02jVRHXNRPREBzxvM+A==} engines: {node: '>=12.17.0'} peerDependencies: prettier: '>=2.2.0' dependencies: - prettier: 2.7.1 + prettier: 2.8.0 dev: true - /prettier/2.7.1: - resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==} + /prettier/2.8.0: + resolution: {integrity: sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==} engines: {node: '>=10.13.0'} hasBin: true diff --git a/www/package.json b/www/package.json index 12d700f54b..d7eb9ce51f 100644 --- a/www/package.json +++ b/www/package.json @@ -38,14 +38,14 @@ "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "@types/react-typist": "^2.0.3", - "@typescript-eslint/parser": "^5.39.0", + "@typescript-eslint/parser": "^5.45.0", "astro": "^1.6.9", - "eslint": "^8.24.0", + "eslint": "^8.28.0", "eslint-plugin-astro": "^0.19.0", "eslint-plugin-jsx-a11y": "^6.6.1", - "prettier": "^2.7.1", + "prettier": "^2.8.0", "prettier-plugin-astro": "^0.7.0", - "prettier-plugin-tailwindcss": "0.2.0-beta.3", + "prettier-plugin-tailwindcss": "^0.2.0", "react": "18.0.0", "react-dom": "18.0.0", "react-typist": "^2.0.5", diff --git a/www/src/components/docs/breadCrumbs.tsx b/www/src/components/docs/breadCrumbs.tsx index 83f8b7f38e..25192464c9 100644 --- a/www/src/components/docs/breadCrumbs.tsx +++ b/www/src/components/docs/breadCrumbs.tsx @@ -2,6 +2,7 @@ import { SIDEBAR } from "../../config"; import { getLanguageFromURL } from "../../languages"; type SlugType = "" | "usage" | "deployment"; +type Entry = { text: string; link: string }; export default function BreadCrumbs() { const lang = getLanguageFromURL(window.location.href); @@ -19,12 +20,10 @@ export default function BreadCrumbs() { window.location.pathname.slice(1).split("/").length > 2 ? window.location.pathname.slice(1).split("/")[1] : "" || ""; - const actualEntries = - SIDEBAR[lang][ - slugToEntryPath( - slug === undefined || slug === "" ? "" : (slug as SlugType), - ) - ]; + // TODO: find a way to use inference here to gain better typesafety + const actualEntries = SIDEBAR[lang][ + slugToEntryPath(slug === undefined || slug === "" ? "" : (slug as SlugType)) + ] as Entry[] | undefined; const getPathNameFromLink = (link: string) => { return actualEntries?.find((entry) => entry.link === link)?.text; diff --git a/www/src/components/docs/outdatedDocsBanner.astro b/www/src/components/docs/outdatedDocsBanner.astro index 1881ffac36..51615ef84c 100644 --- a/www/src/components/docs/outdatedDocsBanner.astro +++ b/www/src/components/docs/outdatedDocsBanner.astro @@ -42,7 +42,10 @@ Astro.response.headers.set("Cache-Control", `s-max-age=${ONE_WEEK}`); { diffInDays > 0 && ( -
+

Attention: This page is{" "} diff --git a/www/src/components/docs/pageContent.astro b/www/src/components/docs/pageContent.astro index 0b353278ed..e62dd6c1ac 100644 --- a/www/src/components/docs/pageContent.astro +++ b/www/src/components/docs/pageContent.astro @@ -48,9 +48,17 @@ const [_1, _2, lang] = path.split("/");