Skip to content

Commit

Permalink
chore: bump Docusaurus to 2.0 (#5377)
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
  • Loading branch information
3 people committed Aug 24, 2022
1 parent 9c3e58a commit 6ab767b
Show file tree
Hide file tree
Showing 18 changed files with 1,076 additions and 1,536 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportNamedDeclaration _error_ assertion TSESTree - Error 1`] = `"NO ERROR"`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportNamedDeclaration _error_ assertion Babel - Error 1`] = `[SyntaxError: A JSON module can only be imported with \`default\`. (1:9)]`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportNamedDeclaration _error_ assertion Error Alignment 1`] = `"Babel errored but TSESTree didn't"`;
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Object {
"declaration/ExportAllDeclaration/fixtures/_error_/kind-type/fixture.ts",
"declaration/ExportAllDeclaration/fixtures/_error_/type-kind/fixture.ts",
"declaration/ExportNamedDeclaration/fixtures/_error_/anonymous-class/fixture.ts",
"declaration/ExportNamedDeclaration/fixtures/_error_/assertion/fixture.ts",
"declaration/FunctionDeclaration/fixtures/_error_/missing-type-param/fixture.ts",
"declaration/TSDeclareFunction/fixtures/_error_/async/fixture.ts",
"declaration/TSDeclareFunction/fixtures/_error_/declare-with-body/fixture.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,11 @@ tester.addFixturePatternConfig('typescript/basics', {
* SyntaxError: Missing initializer in const declaration.
*/
'var-with-definite-assignment',
/**
* [BABEL ERRORED, BUT TS-ESTREE DID NOT]
* SyntaxError: A JSON module can only be imported with `default`.
*/
'export-with-import-assertions',
],
ignoreSourceType: [
/**
Expand Down
12 changes: 6 additions & 6 deletions packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
},
"dependencies": {
"@babel/runtime": "^7.18.3",
"@docusaurus/core": "2.0.0-beta.21",
"@docusaurus/preset-classic": "2.0.0-beta.21",
"@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.21",
"@docusaurus/theme-common": "2.0.0-beta.21",
"@docusaurus/core": "~2.0.1",
"@docusaurus/preset-classic": "~2.0.1",
"@docusaurus/remark-plugin-npm2yarn": "~2.0.1",
"@docusaurus/theme-common": "~2.0.1",
"@mdx-js/react": "1.6.22",
"@typescript-eslint/parser": "5.34.0",
"@typescript-eslint/website-eslint": "5.34.0",
Expand All @@ -37,7 +37,7 @@
"typescript": "*"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.21",
"@docusaurus/module-type-aliases": "~2.0.1",
"@types/react": "^18.0.9",
"@types/react-helmet": "^6.1.5",
"@types/react-router-dom": "^5.3.3",
Expand All @@ -50,7 +50,7 @@
"eslint-plugin-react-hooks": "^4.5.0",
"globby": "^11.1.0",
"monaco-editor": "^0.33.0",
"webpack": "^5.72.1"
"webpack": "^5.74.0"
},
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/components/ErrorsViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type Monaco from 'monaco-editor';
import clsx from 'clsx';

import type { ErrorItem, ErrorGroup } from './types';
import IconExternalLink from '@theme/IconExternalLink';
import IconExternalLink from '@theme/Icon/ExternalLink';
import styles from './ErrorsViewer.module.css';

export interface ErrorsViewerProps {
Expand Down
6 changes: 5 additions & 1 deletion packages/website/src/pages/play.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ function Play(): JSX.Element {
<Layout title="Playground" description="Playground" noFooter={true}>
<BrowserOnly fallback={<Loader />}>
{(): JSX.Element => {
const Playground = lazy(() => import('../components/Playground'));
const Playground = lazy(
() =>
// @ts-expect-error: This does not follow Node resolution
import('../components/Playground') as Promise<() => JSX.Element>,
);
return (
<Suspense fallback={<Loader />}>
<Playground />
Expand Down
5 changes: 2 additions & 3 deletions packages/website/src/theme/CodeBlock/Content/String.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

import React from 'react';
import clsx from 'clsx';
import { useThemeConfig, usePrismTheme } from '@docusaurus/theme-common';
import {
useThemeConfig,
parseCodeBlockTitle,
parseLanguage,
parseLines,
containsLineNumbers,
usePrismTheme,
useCodeWordWrap,
} from '@docusaurus/theme-common';
} from '@docusaurus/theme-common/internal';
import Highlight, { defaultProps, type Language } from 'prism-react-renderer';
import Line from '@theme/CodeBlock/Line';
import CopyButton from '@theme/CodeBlock/CopyButton';
Expand Down
4 changes: 2 additions & 2 deletions packages/website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"module": "CommonJS",
"moduleResolution": "NodeNext",
"allowJs": true,
"esModuleInterop": true,
"jsx": "react",
Expand Down
2,568 changes: 1,045 additions & 1,523 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 6ab767b

Please sign in to comment.