Skip to content

Commit 9171085

Browse files
authored
Upgrade Jest website to Docusaurus v3 (#14463)
1 parent 70138b8 commit 9171085

File tree

10 files changed

+2232
-1763
lines changed

10 files changed

+2232
-1763
lines changed

constraints.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
2020
% A list of exception to same version rule
2121
\+ member(DependencyIdent, [
2222
% Allow enzyme example workspace use a older version react and react-dom, because enzyme don't support react 17
23-
'react', 'react-dom',
23+
'react', 'react-dom', '@types/react',
2424
% Only RN should be bumped to react 18
2525
'react-test-renderer',
2626
% @types/node in the root need to stay on ~14.14.45

docs/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@ test('does not show prototypes for object and array inline', () => {
17541754

17551755
Default: `undefined`
17561756

1757-
The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
1757+
The path to a module that can resolve test\<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
17581758

17591759
```js title="custom-resolver.js"
17601760
module.exports = {

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@types/babel__template": "^7.0.2",
2222
"@types/node": "~14.14.45",
2323
"@types/which": "^3.0.0",
24+
"@types/ws": "8.5.1",
2425
"@typescript-eslint/eslint-plugin": "^5.14.0",
2526
"@typescript-eslint/parser": "^5.14.0",
2627
"ansi-regex": "^5.0.1",
@@ -172,6 +173,7 @@
172173
},
173174
"resolutions": {
174175
"@types/node": "~14.14.45",
176+
"@types/react": "^18.2.21",
175177
"ansi-escapes/type-fest": "^2.0.0",
176178
"babel-jest": "workspace:^",
177179
"jest": "workspace:^",

packages/pretty-format/src/__tests__/react.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,11 +769,11 @@ test('supports context Consumer with a child', () => {
769769

770770
expect(
771771
formatElement(
772-
React.createElement(Consumer, null, () =>
773-
React.createElement('div', null, 'child'),
774-
),
772+
React.createElement(Consumer, {
773+
children: () => React.createElement('div', null, 'child'),
774+
}),
775775
),
776-
).toBe('<Context.Consumer>\n [Function anonymous]\n</Context.Consumer>');
776+
).toBe('<Context.Consumer>\n [Function children]\n</Context.Consumer>');
777777
});
778778

779779
test('ReactElement removes undefined props', () => {

website/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,25 @@
3232
]
3333
},
3434
"dependencies": {
35-
"@docusaurus/core": "^2.0.0",
36-
"@docusaurus/plugin-client-redirects": "^2.0.0",
37-
"@docusaurus/plugin-pwa": "^2.0.0",
38-
"@docusaurus/preset-classic": "^2.0.0",
39-
"@docusaurus/remark-plugin-npm2yarn": "^2.0.0",
35+
"@docusaurus/core": "0.0.0-5658",
36+
"@docusaurus/plugin-client-redirects": "0.0.0-5658",
37+
"@docusaurus/plugin-pwa": "0.0.0-5658",
38+
"@docusaurus/preset-classic": "0.0.0-5658",
39+
"@docusaurus/remark-plugin-npm2yarn": "0.0.0-5658",
4040
"clsx": "^2.0.0",
41-
"docusaurus-remark-plugin-tab-blocks": "^1.2.0",
42-
"react": "^17.0.2",
43-
"react-dom": "^17.0.2",
41+
"docusaurus-remark-plugin-tab-blocks": "^2.0.0-beta",
42+
"react": "^18.2.0",
43+
"react-dom": "^18.2.0",
4444
"react-github-btn": "^1.3.0",
4545
"react-lite-youtube-embed": "^2.2.2",
4646
"react-markdown": "^8.0.0"
4747
},
4848
"devDependencies": {
4949
"@babel/core": "^7.11.6",
5050
"@crowdin/cli": "^3.5.2",
51-
"@docusaurus/module-type-aliases": "^2.0.0",
52-
"@tsconfig/docusaurus": "^1.0.5",
53-
"@types/react": "^17.0.3",
51+
"@docusaurus/module-type-aliases": "0.0.0-5658",
52+
"@docusaurus/tsconfig": "0.0.0-5658",
53+
"@types/react": "^18.2.21",
5454
"graphql": "^16.3.0",
5555
"graphql-request": "^6.0.0",
5656
"js-yaml": "^4.1.0",

website/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
// This file is not used in compilation. It is here just for a nice editor experience.
3-
"extends": "@tsconfig/docusaurus/tsconfig.json",
3+
"extends": "@docusaurus/tsconfig",
44
"compilerOptions": {
55
"baseUrl": "."
66
}

website/versioned_docs/version-29.4/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,7 @@ test('does not show prototypes for object and array inline', () => {
16831683

16841684
Default: `undefined`
16851685

1686-
The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
1686+
The path to a module that can resolve test\<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
16871687

16881688
```js title="custom-resolver.js"
16891689
module.exports = {

website/versioned_docs/version-29.5/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ test('does not show prototypes for object and array inline', () => {
17181718

17191719
Default: `undefined`
17201720

1721-
The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
1721+
The path to a module that can resolve test\<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
17221722

17231723
```js title="custom-resolver.js"
17241724
module.exports = {

website/versioned_docs/version-29.6/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@ test('does not show prototypes for object and array inline', () => {
17541754

17551755
Default: `undefined`
17561756

1757-
The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
1757+
The path to a module that can resolve test\<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
17581758

17591759
```js title="custom-resolver.js"
17601760
module.exports = {

0 commit comments

Comments
 (0)