chore: upgrade dependencies (#7138)

* chore: upgrade dependencies

* reorg

* update comment
This commit is contained in:
Joshua Chen 2022-04-09 12:36:10 +08:00 committed by GitHub
parent e5bf59fd9b
commit 2a7820582c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 552 additions and 558 deletions

View file

@ -9,6 +9,6 @@
"@netlify/functions": "^1.0.0"
},
"devDependencies": {
"netlify-cli": "^9.13.6"
"netlify-cli": "^9.16.4"
}
}

View file

@ -60,11 +60,8 @@
"lock:update": "npx yarn-deduplicate"
},
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.8",
"@babel/preset-typescript": "^7.16.7",
"@crowdin/cli": "^3.7.8",
"@swc/core": "^1.2.162",
"@swc/core": "^1.2.164",
"@swc/jest": "^0.2.20",
"@testing-library/react-hooks": "^7.0.2",
"@types/fs-extra": "^9.0.13",
@ -72,22 +69,22 @@
"@types/lodash": "^4.14.181",
"@types/node": "^17.0.23",
"@types/prompts": "^2.0.14",
"@types/react": "^17.0.43",
"@types/react": "^18.0.0",
"@types/react-dev-utils": "^9.0.10",
"@types/react-test-renderer": "^17.0.1",
"@types/semver": "^7.3.9",
"@types/shelljs": "^0.8.11",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"concurrently": "^7.0.0",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"concurrently": "^7.1.0",
"cross-env": "^7.0.3",
"cspell": "^5.19.5",
"eslint": "^8.12.0",
"cspell": "^5.19.6",
"eslint": "^8.13.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^26.1.3",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.1.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
@ -99,9 +96,9 @@
"lerna": "^4.0.0",
"lerna-changelog": "^2.2.0",
"lint-staged": "^12.3.7",
"netlify-cli": "^9.13.6",
"netlify-cli": "^9.16.4",
"nodemon": "^2.0.15",
"prettier": "^2.6.1",
"prettier": "^2.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-test-renderer": "^17.0.2",

View file

@ -27,7 +27,7 @@
"fs-extra": "^10.0.1",
"lodash": "^4.17.21",
"prompts": "^2.4.2",
"semver": "^7.3.5",
"semver": "^7.3.6",
"shelljs": "^0.8.5",
"supports-color": "^9.2.2",
"tslib": "^2.3.1"

View file

@ -27,15 +27,15 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
"eslint": "^8.12.0",
"eslint": "^8.13.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"prettier": "^2.6.1",
"prettier": "^2.6.2",
"stylelint": "^14.6.1"
},
"browserslist": {

View file

@ -18,8 +18,8 @@
},
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.17.8",
"@babel/traverse": "^7.17.3",
"@babel/parser": "^7.17.9",
"@babel/traverse": "^7.17.9",
"@docusaurus/logger": "2.0.0-beta.18",
"@docusaurus/utils": "2.0.0-beta.18",
"@mdx-js/mdx": "^1.6.22",
@ -33,7 +33,7 @@
"tslib": "^2.3.1",
"unist-util-visit": "^2.0.3",
"url-loader": "^4.1.1",
"webpack": "^5.70.1"
"webpack": "^5.72.0"
},
"devDependencies": {
"@docusaurus/types": "2.0.0-beta.18",

View file

@ -26,17 +26,17 @@
"@docusaurus/logger": "2.0.0-beta.18",
"@docusaurus/utils": "2.0.0-beta.18",
"@mapbox/hast-util-to-jsx": "^2.0.0",
"color": "^4.2.1",
"color": "^4.2.3",
"commander": "^5.1.0",
"fs-extra": "^10.0.1",
"hast-util-to-string": "^1.0.4",
"html-tags": "^3.1.0",
"html-tags": "^3.2.0",
"import-fresh": "^3.3.0",
"jscodeshift": "^0.13.1",
"rehype-parse": "^7.0.1",
"remark-parse": "^8.0.2",
"remark-stringify": "^8.1.0",
"semver": "^7.3.5",
"semver": "^7.3.6",
"tslib": "^2.3.1",
"unified": "^9.2.2",
"unist-util-visit": "^2.0.3"

View file

@ -32,7 +32,7 @@
"remark-admonitions": "^1.2.1",
"tslib": "^2.3.1",
"utility-types": "^3.10.0",
"webpack": "^5.70.1"
"webpack": "^5.72.0"
},
"devDependencies": {
"@docusaurus/types": "2.0.0-beta.18",

View file

@ -37,7 +37,7 @@
"remark-admonitions": "^1.2.1",
"tslib": "^2.3.1",
"utility-types": "^3.10.0",
"webpack": "^5.70.1"
"webpack": "^5.72.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.18",

View file

@ -25,7 +25,7 @@
"fs-extra": "^10.0.1",
"remark-admonitions": "^1.2.1",
"tslib": "^2.3.1",
"webpack": "^5.70.1"
"webpack": "^5.72.0"
},
"devDependencies": {
"@docusaurus/types": "2.0.0-beta.18"

View file

@ -30,7 +30,7 @@
"react-waypoint": "^10.1.0",
"sharp": "^0.30.3",
"tslib": "^2.3.1",
"webpack": "^5.70.1"
"webpack": "^5.72.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.18",

View file

@ -20,7 +20,7 @@
},
"license": "MIT",
"dependencies": {
"@babel/core": "^7.17.8",
"@babel/core": "^7.17.9",
"@babel/preset-env": "^7.16.11",
"@docusaurus/core": "2.0.0-beta.18",
"@docusaurus/theme-common": "2.0.0-beta.18",
@ -32,7 +32,7 @@
"core-js": "^3.21.1",
"terser-webpack-plugin": "^5.3.1",
"tslib": "^2.3.1",
"webpack": "^5.70.1",
"webpack": "^5.72.0",
"webpack-merge": "^5.8.0",
"workbox-build": "^6.5.2",
"workbox-precaching": "^6.5.2",

View file

@ -42,6 +42,9 @@
"rtlcss": "^3.5.0"
},
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.9",
"@babel/preset-typescript": "^7.16.7",
"@docusaurus/module-type-aliases": "2.0.0-beta.18",
"@docusaurus/types": "2.0.0-beta.18",
"@types/mdx-js__react": "^1.5.5",

View file

@ -569,7 +569,9 @@ declare module '@theme/MDXComponents' {
readonly h4: (props: ComponentProps<'h4'>) => JSX.Element;
readonly h5: (props: ComponentProps<'h5'>) => JSX.Element;
readonly h6: (props: ComponentProps<'h6'>) => JSX.Element;
} & {[tagName: string]: ComponentType<unknown>};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[tagName: string]: ComponentType<any>;
};
const MDXComponents: MDXComponentsObject;
export default MDXComponents;

View file

@ -31,9 +31,12 @@ function useContextValue(): ContextValue {
const [tabGroupChoices, setChoices] = useState<{
readonly [groupId: string]: string;
}>({});
const setChoiceSyncWithLocalStorage = useCallback((groupId, newChoice) => {
const setChoiceSyncWithLocalStorage = useCallback(
(groupId: string, newChoice: string) => {
createStorageSlot(`${TAB_CHOICE_PREFIX}${groupId}`).set(newChoice);
}, []);
},
[],
);
useEffect(() => {
try {

View file

@ -37,7 +37,7 @@
"@docusaurus/utils": "2.0.0-beta.18",
"@docusaurus/utils-validation": "2.0.0-beta.18",
"algoliasearch": "^4.13.0",
"algoliasearch-helper": "^3.7.4",
"algoliasearch-helper": "^3.8.2",
"clsx": "^1.1.1",
"eta": "^1.12.3",
"fs-extra": "^10.0.1",

View file

@ -14,6 +14,7 @@ import Link from '@docusaurus/Link';
import Head from '@docusaurus/Head';
import {isRegexpStringMatch, useSearchPage} from '@docusaurus/theme-common';
import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';
import type {SearchClient} from 'algoliasearch/lite';
import {useAlgoliaContextualFacetFilters} from '@docusaurus/theme-search-algolia/client';
import Translate, {translate} from '@docusaurus/Translate';
import styles from './styles.module.css';
@ -145,7 +146,7 @@ function DocSearch({
}, [setIsOpen]);
const onInput = useCallback(
(event) => {
(event: KeyboardEvent) => {
importDocSearchModalIfNeeded().then(() => {
setIsOpen(true);
setInitialQuery(event.key);
@ -194,7 +195,7 @@ function DocSearch({
);
const transformSearchClient = useCallback(
(searchClient) => {
(searchClient: SearchClient) => {
searchClient.addAlgoliaAgent(
'docusaurus',
siteMetadata.docusaurusVersion,

View file

@ -20,7 +20,7 @@
"history": "^4.9.0",
"joi": "^17.6.0",
"utility-types": "^3.10.0",
"webpack": "^5.70.1",
"webpack": "^5.72.0",
"webpack-merge": "^5.8.0"
}
}

View file

@ -32,7 +32,7 @@
"shelljs": "^0.8.5",
"tslib": "^2.3.1",
"url-loader": "^4.1.1",
"webpack": "^5.70.1"
"webpack": "^5.72.0"
},
"engines": {
"node": ">=14"
@ -42,7 +42,7 @@
"@types/dedent": "^0.7.0",
"@types/github-slugger": "^1.3.0",
"@types/micromatch": "^4.0.2",
"@types/react-dom": "^17.0.14",
"@types/react-dom": "^18.0.0",
"dedent": "^0.7.0"
}
}

View file

@ -31,16 +31,16 @@
"url": "https://github.com/facebook/docusaurus/issues"
},
"dependencies": {
"@babel/core": "^7.17.8",
"@babel/generator": "^7.17.7",
"@babel/core": "^7.17.9",
"@babel/generator": "^7.17.9",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime": "^7.17.8",
"@babel/runtime-corejs3": "^7.17.8",
"@babel/traverse": "^7.17.3",
"@babel/runtime": "^7.17.9",
"@babel/runtime-corejs3": "^7.17.9",
"@babel/traverse": "^7.17.9",
"@docusaurus/cssnano-preset": "2.0.0-beta.18",
"@docusaurus/logger": "2.0.0-beta.18",
"@docusaurus/mdx-loader": "2.0.0-beta.18",
@ -55,7 +55,7 @@
"babel-plugin-dynamic-import-node": "2.3.0",
"boxen": "^6.2.1",
"chokidar": "^3.5.3",
"clean-css": "^5.2.4",
"clean-css": "^5.3.0",
"cli-table3": "^0.6.1",
"combine-promises": "^1.1.0",
"commander": "^5.1.0",
@ -71,7 +71,7 @@
"file-loader": "^6.2.0",
"fs-extra": "^10.0.1",
"html-minifier-terser": "^6.1.0",
"html-tags": "^3.1.0",
"html-tags": "^3.2.0",
"html-webpack-plugin": "^5.5.0",
"import-fresh": "^3.3.0",
"leven": "^3.1.0",
@ -90,7 +90,7 @@
"react-router-dom": "^5.2.0",
"remark-admonitions": "^1.2.1",
"rtl-detect": "^1.0.4",
"semver": "^7.3.5",
"semver": "^7.3.6",
"serve-handler": "^6.1.3",
"shelljs": "^0.8.5",
"terser-webpack-plugin": "^5.3.1",
@ -98,9 +98,9 @@
"update-notifier": "^5.1.0",
"url-loader": "^4.1.1",
"wait-on": "^6.0.1",
"webpack": "^5.70.1",
"webpack": "^5.72.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-dev-server": "^4.7.4",
"webpack-dev-server": "^4.8.1",
"webpack-merge": "^5.8.0",
"webpackbar": "^5.0.2"
},
@ -109,7 +109,7 @@
"@docusaurus/types": "2.0.0-beta.18",
"@types/detect-port": "^1.3.2",
"@types/nprogress": "^0.2.0",
"@types/react-dom": "^17.0.14",
"@types/react-dom": "^18.0.0",
"@types/react-router-config": "^5.0.6",
"@types/rtl-detect": "^1.0.0",
"@types/serve-handler": "^6.1.1",

View file

@ -23,6 +23,7 @@ type Props = RouteComponentProps & {
readonly routes: RouteConfig[];
readonly delay: number;
readonly location: Location;
readonly children: JSX.Element;
};
type State = {
nextRouteHasLoaded: boolean;

View file

@ -34,6 +34,7 @@ if (ExecutionEnvironment.canUseDOM) {
process.env.NODE_ENV === 'production' ? ReactDOM.hydrate : ReactDOM.render;
preload(routes, window.location.pathname).then(() => {
renderMethod(
// @ts-expect-error: https://github.com/staylor/react-helmet-async/pull/165
<HelmetProvider>
<BrowserRouter>
<App />

View file

@ -83,7 +83,9 @@ async function doRender(locals: Locals & {path: string}) {
const linksCollector = createStatefulLinksCollector();
const appHtml = ReactDOMServer.renderToString(
// @ts-expect-error: we are migrating away from react-loadable anyways
<Loadable.Capture report={(moduleName) => modules.add(moduleName)}>
{/* @ts-expect-error: https://github.com/staylor/react-helmet-async/pull/165 */}
<HelmetProvider context={helmetContext}>
<StaticRouter location={location} context={routerContext}>
<LinksCollectorProvider linksCollector={linksCollector}>

View file

@ -27,7 +27,7 @@ function assertIsHtmlTagObject(val: unknown): asserts val is HtmlTagObject {
)} is not a valid HTML tag object. "tagName" must be defined as a string.`,
);
}
if (!htmlTags.includes((val as HtmlTagObject).tagName)) {
if (!(htmlTags as string[]).includes((val as HtmlTagObject).tagName)) {
throw new Error(
`Error loading ${JSON.stringify(val)}, "${
(val as HtmlTagObject).tagName
@ -38,7 +38,7 @@ function assertIsHtmlTagObject(val: unknown): asserts val is HtmlTagObject {
function htmlTagObjectToString(tag: unknown): string {
assertIsHtmlTagObject(tag);
const isVoidTag = voidHtmlTags.includes(tag.tagName);
const isVoidTag = (voidHtmlTags as string[]).includes(tag.tagName);
const tagAttributes = tag.attributes ?? {};
const attributes = Object.keys(tagAttributes)
.map((attr) => {

View file

@ -27,6 +27,6 @@
"node": ">=14"
},
"devDependencies": {
"@types/sharp": "^0.30.0"
"@types/sharp": "^0.30.1"
}
}

View file

@ -35,7 +35,7 @@
},
"dependencies": {
"@crowdin/cli": "^3.7.8",
"@crowdin/crowdin-api-client": "^1.15.1",
"@crowdin/crowdin-api-client": "^1.16.0",
"@docusaurus/core": "2.0.0-beta.18",
"@docusaurus/logger": "2.0.0-beta.18",
"@docusaurus/plugin-client-redirects": "2.0.0-beta.18",
@ -48,16 +48,16 @@
"@docusaurus/theme-live-codeblock": "2.0.0-beta.18",
"@docusaurus/utils": "2.0.0-beta.18",
"@docusaurus/utils-common": "2.0.0-beta.18",
"@popperjs/core": "^2.11.4",
"@swc/core": "^1.2.161",
"@popperjs/core": "^2.11.5",
"@swc/core": "^1.2.164",
"clsx": "^1.1.1",
"color": "^4.2.1",
"color": "^4.2.3",
"fs-extra": "^10.0.1",
"netlify-plugin-cache": "^1.0.3",
"raw-loader": "^4.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-medium-image-zoom": "^4.3.5",
"react-medium-image-zoom": "^4.3.6",
"react-popper": "^2.2.5",
"rehype-katex": "^6.0.2",
"remark-math": "^3.0.1",

View file

@ -6,6 +6,9 @@
"baseUrl": ".",
"resolveJsonModule": true,
"strict": true,
// Work around a type error in react-medium-image-zoom.
// https://github.com/rpearce/image-zoom/pull/303
"skipLibCheck": true,
"types": ["@types/jest"]
},
"exclude": ["src/sw.js"]

977
yarn.lock

File diff suppressed because it is too large Load diff