Skip to content

Upgrade React ecosystem dependencies to v19 #3247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c89b109
Upgrade React ecosystem dependencies to v19
RichDom2185 Jul 14, 2025
ad2e743
Fix some breaking changes
RichDom2185 Jul 14, 2025
10d86bd
Fix more breaking changes
RichDom2185 Jul 14, 2025
c27412e
Fix remaining codebase errors
RichDom2185 Jul 14, 2025
2dd629a
Fix some test errors
RichDom2185 Jul 14, 2025
a4f9ad6
Update AcademyNavigationBar.tsx
RichDom2185 Jul 14, 2025
df551c8
Fix remaining test error
RichDom2185 Jul 14, 2025
2516f8d
Fix missed type bug
RichDom2185 Jul 14, 2025
b950de0
Remove deprecated react-test-renderer
RichDom2185 Jul 14, 2025
090a536
Delete useless test
RichDom2185 Jul 14, 2025
0c8ba12
Update some snapshots
RichDom2185 Jul 14, 2025
210060c
Update more snapshots
RichDom2185 Jul 14, 2025
2606626
Fix some tests and snapshots
RichDom2185 Jul 14, 2025
39c8903
Update more snapshots
RichDom2185 Jul 14, 2025
c8235b7
Update Repl tests
RichDom2185 Jul 14, 2025
04a6f42
Update editor tests
RichDom2185 Jul 14, 2025
5643270
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Jul 28, 2025
2e27929
Update lockfile post-merge
RichDom2185 Jul 28, 2025
13fafdd
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Aug 9, 2025
82a0121
Fix JSX namespace errors
RichDom2185 Aug 9, 2025
f91299f
Merge branch 'master' into react-19
RichDom2185 Aug 9, 2025
6175671
Merge branch 'master' into react-19
RichDom2185 Aug 9, 2025
5afe646
Merge branch 'master' into react-19
RichDom2185 Aug 9, 2025
e8089da
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Aug 10, 2025
221279b
Update dependencies post-merge
RichDom2185 Aug 10, 2025
ce6fce8
Deduplicate dependencies
RichDom2185 Aug 10, 2025
2854533
Update snapshots post-merge
RichDom2185 Aug 10, 2025
a5c3bce
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Aug 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@
"phaser": "~3.90.0",
"query-string": "^9.0.0",
"re-resizable": "^6.9.9",
"react": "^18.3.1",
"react": "^19.1.0",
"react-ace": "^14.0.0",
"react-copy-to-clipboard": "^5.1.0",
"react-debounce-render": "^8.0.2",
"react-dom": "^18.3.1",
"react-dom": "^19.1.0",
"react-drag-drop-files": "^3.0.0",
"react-draggable": "^4.4.5",
"react-dropzone": "^14.2.3",
"react-i18next": "^15.0.0",
"react-konva": "^18.2.10",
"react-konva": "^19.0.7",
"react-latex-next": "^3.0.0",
"react-mde": "^11.5.0",
"react-papaparse": "^4.0.2",
Expand Down Expand Up @@ -139,12 +139,11 @@
"@types/js-cookie": "^3.0.6",
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.195",
"@types/react": "^18.3.3",
"@types/react": "^19.1.8",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "^18.3.0",
"@types/react-dom": "^19.1.6",
"@types/react-redux": "^7.1.24",
"@types/react-syntax-highlighter": "^15.5.7",
"@types/react-test-renderer": "^18.0.0",
"@types/redux-mock-store": "^1.0.3",
"@types/showdown": "^2.0.1",
"@types/xml2js": "^0.4.11",
Expand Down Expand Up @@ -173,10 +172,10 @@
"prettier": "^3.3.3",
"process": "^0.11.10",
"react-error-overlay": "^6.0.11",
"react-test-renderer": "^18.2.0",
"redux-saga-test-plan": "^4.0.6",
"resize-observer-polyfill": "^1.5.1",
"sass": "^1.63.6",
"shallow-react-snapshot": "^0.2.2",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"timers-browserify": "^2.0.12",
Expand Down
2 changes: 1 addition & 1 deletion src/commons/ContentDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Card, Elevation } from '@blueprintjs/core';
import React, { useEffect } from 'react';
import React, { type JSX, useEffect } from 'react';

export type ContentDisplayProps = {
fullWidth?: boolean;
Expand Down
18 changes: 10 additions & 8 deletions src/commons/__tests__/__snapshots__/ContentDisplay.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`ContentDisplay page renders correctly 1`] = `
<div
className="ContentDisplay row center-xs"
>
<DocumentFragment>
<div
className="col-md-10 col-xs-11 contentdisplay-content-parent"
class="ContentDisplay row center-xs"
>
<div
className="contentdisplay-content bp6-card bp6-elevation-3"
class="col-md-10 col-xs-11 contentdisplay-content-parent"
>
<div>
Test Content
<div
class="contentdisplay-content bp6-card bp6-elevation-3"
>
<div>
Test Content
</div>
</div>
</div>
</div>
</div>
</DocumentFragment>
`;
83 changes: 71 additions & 12 deletions src/commons/__tests__/__snapshots__/Markdown.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,16 +1,75 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Markdown page renders correctly 1`] = `
<div
className="md bp6-running-text"
dangerouslySetInnerHTML={
{
"__html": "<p>Welcome to the Source Academy playground!</p>
<p>The book <a href="https://sourceacademy.org/sicpjs/" rel="noopener noreferrer" target="_blank"><em>Structure and Interpretation of Computer Programs, JavaScript Edition</em></a>
uses JavaScript sublanguages that we call <a href="https://docs.sourceacademy.org/" rel="noopener noreferrer" target="_blank"><em>Source</em></a>. You have chosen the sublanguage <a href="https://docs.sourceacademy.org/source_1/" rel="noopener noreferrer" target="_blank"><em>Source §1</em></a>.</p>
<p>In the editor on the left, you can use the <a href="https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts" rel="noopener noreferrer" target="_blank"><em>Ace keyboard shortcuts</em></a>
and also the <a href="https://github.com/source-academy/frontend/wiki/Source-Academy-Keyboard-Shortcuts" rel="noopener noreferrer" target="_blank"><em>Source Academy keyboard shortcuts</em></a>.</p>",
}
}
/>
<DocumentFragment>
<div
class="md bp6-running-text"
>
<p>
Welcome to the Source Academy playground!
</p>


<p>
The book
<a
href="https://sourceacademy.org/sicpjs/"
rel="noopener noreferrer"
target="_blank"
>
<em>
Structure and Interpretation of Computer Programs, JavaScript Edition
</em>
</a>

uses JavaScript sublanguages that we call
<a
href="https://docs.sourceacademy.org/"
rel="noopener noreferrer"
target="_blank"
>
<em>
Source
</em>
</a>
. You have chosen the sublanguage
<a
href="https://docs.sourceacademy.org/source_1/"
rel="noopener noreferrer"
target="_blank"
>
<em>
Source §1
</em>
</a>
.
</p>


<p>
In the editor on the left, you can use the
<a
href="https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts"
rel="noopener noreferrer"
target="_blank"
>
<em>
Ace keyboard shortcuts
</em>
</a>

and also the
<a
href="https://github.com/source-academy/frontend/wiki/Source-Academy-Keyboard-Shortcuts"
rel="noopener noreferrer"
target="_blank"
>
<em>
Source Academy keyboard shortcuts
</em>
</a>
.
</p>
</div>
</DocumentFragment>
`;
2 changes: 1 addition & 1 deletion src/commons/achievement/control/AchievementEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext, useState } from 'react';
import React, { type JSX, useContext, useState } from 'react';
import { AchievementContext } from 'src/features/achievement/AchievementConstants';

import AchievementAdder from './achievementEditor/AchievementAdder';
Expand Down
2 changes: 1 addition & 1 deletion src/commons/achievement/control/GoalEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext, useState } from 'react';
import React, { type JSX, useContext, useState } from 'react';
import { AchievementContext } from 'src/features/achievement/AchievementConstants';

import EditableGoal from './goalEditor/EditableGoal';
Expand Down
2 changes: 1 addition & 1 deletion src/commons/assessment/Assessment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '@blueprintjs/core';
import { IconNames } from '@blueprintjs/icons';
import { sortBy } from 'lodash';
import React, { useEffect, useMemo, useState } from 'react';
import React, { type JSX, useEffect, useMemo, useState } from 'react';
import { useDispatch } from 'react-redux';
import { Navigate, useLoaderData, useParams } from 'react-router';
import { numberRegExp } from 'src/features/academy/AcademyTypes';
Expand Down
Loading