Skip to content

Commit

Permalink
chore: upgrade dependencies (#7065)
Browse files Browse the repository at this point in the history
* chore: upgrade dependencies

* fix project words
  • Loading branch information
Josh-Cena authored Mar 30, 2022
1 parent 2e79597 commit 3f33e90
Show file tree
Hide file tree
Showing 20 changed files with 314 additions and 313 deletions.
2 changes: 1 addition & 1 deletion admin/new.docusaurus.io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"@netlify/functions": "^1.0.0"
},
"devDependencies": {
"netlify-cli": "^9.13.4"
"netlify-cli": "^9.13.6"
}
}
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,33 +64,33 @@
"@babel/core": "^7.17.8",
"@babel/preset-typescript": "^7.16.7",
"@crowdin/cli": "^3.7.8",
"@swc/core": "^1.2.160",
"@swc/core": "^1.2.161",
"@swc/jest": "^0.2.20",
"@testing-library/react-hooks": "^7.0.2",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.180",
"@types/lodash": "^4.14.181",
"@types/node": "^17.0.23",
"@types/prompts": "^2.0.14",
"@types/react": "^17.0.43",
"@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.16.0",
"@typescript-eslint/parser": "^5.16.0",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"concurrently": "^7.0.0",
"cross-env": "^7.0.3",
"cspell": "^5.19.3",
"eslint": "^8.11.0",
"eslint": "^8.12.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-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-react-hooks": "^4.4.0",
"eslint-plugin-regexp": "^1.6.0",
"husky": "^7.0.4",
"image-size": "^1.0.1",
Expand All @@ -99,19 +99,19 @@
"lerna": "^4.0.0",
"lerna-changelog": "^2.2.0",
"lint-staged": "^12.3.7",
"netlify-cli": "^9.13.4",
"netlify-cli": "^9.13.6",
"nodemon": "^2.0.15",
"prettier": "^2.6.0",
"prettier": "^2.6.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-test-renderer": "^17.0.2",
"remark-parse": "^8.0.2",
"rimraf": "^3.0.2",
"sharp": "^0.30.3",
"stylelint": "^14.6.0",
"stylelint": "^14.6.1",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^25.0.0",
"typescript": "^4.6.3",
"unified": "^9.2.1"
"unified": "^9.2.2"
}
}
2 changes: 1 addition & 1 deletion packages/create-docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"prompts": "^2.4.2",
"semver": "^7.3.5",
"shelljs": "^0.8.5",
"supports-color": "^9.2.1",
"supports-color": "^9.2.2",
"tslib": "^2.3.1"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/create-docusaurus/templates/facebook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
"eslint": "^8.11.0",
"eslint": "^8.12.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-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.3.0",
"prettier": "^2.6.0",
"stylelint": "^14.6.0"
"eslint-plugin-react-hooks": "^4.4.0",
"prettier": "^2.6.1",
"stylelint": "^14.6.1"
},
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-cssnano-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"postcss-sort-media-queries": "^4.2.1"
},
"devDependencies": {
"to-vfile": "^6.0.0"
"to-vfile": "^6.1.0"
}
}
8 changes: 4 additions & 4 deletions packages/docusaurus-mdx-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"fs-extra": "^10.0.1",
"image-size": "^1.0.1",
"mdast-util-to-string": "^2.0.0",
"remark-emoji": "^2.1.0",
"remark-emoji": "^2.2.0",
"stringify-object": "^3.3.0",
"tslib": "^2.3.1",
"unist-util-visit": "^2.0.2",
"unist-util-visit": "^2.0.3",
"url-loader": "^4.1.1",
"webpack": "^5.70.0"
},
Expand All @@ -41,9 +41,9 @@
"@types/mdast": "^3.0.10",
"@types/stringify-object": "^3.3.1",
"@types/unist": "^2.0.6",
"remark": "^12.0.0",
"remark": "^12.0.1",
"remark-mdx": "^1.6.21",
"to-vfile": "^6.0.0",
"to-vfile": "^6.1.0",
"unist-builder": "^2.0.3",
"unist-util-remove-position": "^3.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"remark-stringify": "^8.1.0",
"semver": "^7.3.5",
"tslib": "^2.3.1",
"unified": "^9.2.1",
"unist-util-visit": "^2.0.2"
"unified": "^9.2.2",
"unist-util-visit": "^2.0.3"
},
"devDependencies": {
"@types/color": "^3.0.3",
Expand Down
4 changes: 3 additions & 1 deletion packages/docusaurus-module-type-aliases/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ declare module '@generated/i18n' {
}

declare module '@generated/codeTranslations' {
const codeTranslations: {[msgId: string]: string};
import type {CodeTranslations} from '@docusaurus/types';

const codeTranslations: CodeTranslations;
export = codeTranslations;
}

Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-remark-plugin-npm2yarn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"dependencies": {
"npm-to-yarn": "^1.0.1",
"tslib": "^2.3.1",
"unist-util-visit": "^2.0.2"
"unist-util-visit": "^2.0.3"
},
"devDependencies": {
"@types/mdast": "^3.0.10",
"remark": "^12.0.0",
"remark": "^12.0.1",
"remark-mdx": "^1.6.21",
"to-vfile": "^6.0.0"
"to-vfile": "^6.1.0"
},
"engines": {
"node": ">=14"
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@docusaurus/types": "2.0.0-beta.18",
"@types/mdx-js__react": "^1.5.5",
"@types/prismjs": "^1.26.0",
"@types/rtlcss": "^3.1.2",
"@types/rtlcss": "^3.1.3",
"cross-env": "^7.0.3",
"fs-extra": "^10.0.1",
"react-test-renderer": "^17.0.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/docusaurus-theme-translations/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import path from 'path';
import fs from 'fs-extra';
import type {CodeTranslations} from '@docusaurus/types';

function getDefaultLocalesDirPath(): string {
return path.join(__dirname, '../locales');
Expand Down Expand Up @@ -39,7 +40,7 @@ export async function readDefaultCodeTranslationMessages({
dirPath?: string;
locale: string;
name: string;
}): Promise<{[msgId: string]: string}> {
}): Promise<CodeTranslations> {
const localesToTry = codeTranslationLocalesToTry(locale);

// Return the content of the first file that match
Expand Down
8 changes: 5 additions & 3 deletions packages/docusaurus-types/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export type SiteMetadata = {
* @see https://help.phrase.com/help/chrome-json-messages
*/
export type TranslationMessage = {message: string; description?: string};
export type TranslationFileContent = {[key: string]: TranslationMessage};
export type TranslationFileContent = {[msgId: string]: TranslationMessage};
/**
* An abstract representation of how a translation file exists on disk. The core
* would handle the file reading/writing; plugins just need to deal with
Expand All @@ -169,12 +169,14 @@ export type I18n = DeepRequired<I18nConfig> & {currentLocale: string};

export type GlobalData = {[pluginName: string]: {[pluginId: string]: unknown}};

export type CodeTranslations = {[msgId: string]: string};

export type DocusaurusContext = {
siteConfig: DocusaurusConfig;
siteMetadata: SiteMetadata;
globalData: GlobalData;
i18n: I18n;
codeTranslations: {[msgId: string]: string};
codeTranslations: CodeTranslations;

// Don't put mutable values here, to avoid triggering re-renders
// We could reconsider that choice if context selectors are implemented
Expand Down Expand Up @@ -226,7 +228,7 @@ export type LoadContext = {
baseUrl: string;
i18n: I18n;
ssrTemplate: string;
codeTranslations: {[msgId: string]: string};
codeTranslations: CodeTranslations;
};

export type Props = LoadContext & {
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export async function load(options: LoadContextOptions): Promise<Props> {
baseUrl,
siteConfig.onDuplicateRoutes,
);
const codeTranslations: {[msgId: string]: string} = {
const codeTranslations = {
...(await getPluginsDefaultCodeTranslationMessages(plugins)),
...siteCodeTranslations,
};
Expand Down
10 changes: 5 additions & 5 deletions packages/docusaurus/src/server/translations/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import logger from '@docusaurus/logger';
import type {
TranslationFileContent,
TranslationFile,
TranslationMessage,
CodeTranslations,
InitializedPlugin,
} from '@docusaurus/types';

Expand Down Expand Up @@ -262,7 +262,7 @@ export async function localizePluginTranslationFile({

export async function getPluginsDefaultCodeTranslationMessages(
plugins: InitializedPlugin[],
): Promise<{[msgId: string]: string}> {
): Promise<CodeTranslations> {
const pluginsMessages = await Promise.all(
plugins.map((plugin) => plugin.getDefaultCodeTranslationMessages?.() ?? {}),
);
Expand All @@ -277,9 +277,9 @@ export function applyDefaultCodeTranslations({
extractedCodeTranslations,
defaultCodeMessages,
}: {
extractedCodeTranslations: {[msgId: string]: TranslationMessage};
defaultCodeMessages: {[msgId: string]: string};
}): {[msgId: string]: TranslationMessage} {
extractedCodeTranslations: TranslationFileContent;
defaultCodeMessages: CodeTranslations;
}): TranslationFileContent {
const unusedDefaultCodeMessages = _.difference(
Object.keys(defaultCodeMessages),
Object.keys(extractedCodeTranslations),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
import type {
InitializedPlugin,
TranslationFileContent,
TranslationMessage,
} from '@docusaurus/types';
import nodePath from 'path';
import {SRC_DIR_NAME} from '@docusaurus/utils';
Expand Down Expand Up @@ -130,7 +129,7 @@ function logSourceCodeFileTranslationsWarnings(

type SourceCodeFileTranslations = {
sourceCodeFilePath: string;
translations: {[msgId: string]: TranslationMessage};
translations: TranslationFileContent;
warnings: string[];
};

Expand Down Expand Up @@ -189,7 +188,7 @@ function extractSourceCodeAstTranslations(
Full code: ${generate(node).code}`;
}

const translations: {[msgId: string]: TranslationMessage} = {};
const translations: TranslationFileContent = {};
const warnings: string[] = [];
let translateComponentName: string | undefined;
let translateFunctionName: string | undefined;
Expand Down
6 changes: 2 additions & 4 deletions packages/docusaurus/src/webpack/aliases/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,11 @@ export function loadThemeAliases({
* instead of naively aliasing this to `client/exports`, we use fine-grained
* aliases instead.
*/
export async function loadDocusaurusAliases(): Promise<{
[aliasName: string]: string;
}> {
export async function loadDocusaurusAliases(): Promise<ThemeAliases> {
const dirPath = path.resolve(__dirname, '../../client/exports');
const extensions = ['.js', '.ts', '.tsx'];

const aliases: {[key: string]: string} = {};
const aliases: ThemeAliases = {};

(await fs.readdir(dirPath))
.filter((fileName) => extensions.includes(path.extname(fileName)))
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-copyright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"directory": "packages/stylelint-copyright"
},
"dependencies": {
"stylelint": "^14.6.0"
"stylelint": "^14.6.1"
}
}
3 changes: 2 additions & 1 deletion project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ marocchino
massoud
mathjax
mdast
mdxa
mdxast
mdxhast
MDXA
metadatum
metastring
middlewares
Expand Down Expand Up @@ -301,6 +301,7 @@ treosh
triaging
typecheck
typechecks
typedoc
typesense
unflat
unist
Expand Down
4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@docusaurus/utils": "2.0.0-beta.18",
"@docusaurus/utils-common": "2.0.0-beta.18",
"@popperjs/core": "^2.11.4",
"@swc/core": "^1.2.160",
"@swc/core": "^1.2.161",
"clsx": "^1.1.1",
"color": "^4.2.1",
"fs-extra": "^10.0.1",
Expand All @@ -62,7 +62,7 @@
"rehype-katex": "^6.0.2",
"remark-math": "^3.0.1",
"swc-loader": "^0.1.15",
"unist-util-visit": "^2.0.2",
"unist-util-visit": "^2.0.3",
"workbox-routing": "^6.5.2",
"workbox-strategies": "^6.5.2"
},
Expand Down
Loading

0 comments on commit 3f33e90

Please sign in to comment.