Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions devserver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"commander": "^14.0.0",
"js-slang": "^1.0.81",
"re-resizable": "^6.9.11",
"react": "^18.3.1",
"react": "^19.0.0",
"react-ace": "^10.1.0",
"react-dom": "^18.3.1",
"react-dom": "^19.0.0",
"vite": "^7.1.11",
"vite-plugin-node-polyfills": "^0.24.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitest/browser-playwright": "^4.0.4",
"eslint": "^9.35.0",
"playwright": "^1.55.1",
Expand Down
2 changes: 1 addition & 1 deletion lib/lintplugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jsdoc": "^51.3.1",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-hooks": "^7.0.0",
"globals": "^15.11.0",
"typescript": "^5.8.2",
"typescript-eslint": "^8.33.1"
Expand Down
8 changes: 4 additions & 4 deletions lib/modules-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"type": "module",
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^5.1.0",
"@vitest/browser-playwright": "^4.0.4",
"eslint": "^9.35.0",
Expand Down Expand Up @@ -34,8 +34,8 @@
"@blueprintjs/core": "^5.10.2",
"@blueprintjs/icons": "^5.9.0",
"js-slang": "^1.0.81",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"scripts-info": {
"docs": "Build the documentation for documentation server using Typedoc"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"@sourceacademy/vitest-reporter": "workspace:^",
"@stylistic/eslint-plugin": "^4.4.1",
"@types/node": "^22.15.30",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitest/coverage-v8": "^4.0.4",
"@vitest/eslint-plugin": "^1.3.4",
"@yarnpkg/types": "^4.0.1",
Comment on lines 57 to 64

This comment was marked as outdated.

Comment on lines 57 to 64
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The upgrade to React 19 requires an initial argument for useRef(). Existing calls without an argument, like useRef<T>(), will now cause a compilation error.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The project's dependencies are being upgraded to React 19, which introduces a breaking change to the useRef hook. Specifically, useRef now requires an initial value and can no longer be called without arguments. The codebase contains calls like React.useRef<T>() in files such as src/tabs/Rune/src/hollusion_canvas.tsx and src/tabs/AugmentedReality/src/AugmentedContent.tsx. These calls will now fail during TypeScript compilation with the error Expected 1 argument but saw none, preventing the application from building.

💡 Suggested Fix

Update all instances of useRef() that are called without an argument to provide an initial value. For refs that should start as empty, initialize them with null. For example, change React.useRef<T>() to React.useRef<T | null>(null).

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L57-L64

Potential issue: The project's dependencies are being upgraded to React 19, which
introduces a breaking change to the `useRef` hook. Specifically, `useRef` now requires
an initial value and can no longer be called without arguments. The codebase contains
calls like `React.useRef<T>()` in files such as `src/tabs/Rune/src/hollusion_canvas.tsx`
and `src/tabs/AugmentedReality/src/AugmentedContent.tsx`. These calls will now fail
during TypeScript compilation with the error `Expected 1 argument but saw none`,
preventing the application from building.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7303593

Expand All @@ -68,7 +68,7 @@
"eslint-plugin-jsdoc": "^51.3.1",
"eslint-plugin-mdx": "^3.6.2",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-hooks": "^7.0.0",
"eslint-plugin-yml": "^1.19.0",
"husky": "^9.1.7",
"jsdom": "^26.1.0",
Expand All @@ -81,8 +81,8 @@
"dependencies": {
"js-slang": "^1.0.81",
"lodash": "^4.17.21",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devEngines": {
"packageManager": {
Expand Down
8 changes: 4 additions & 4 deletions src/bundles/ar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
},
"dependencies": {
"os": "^0.1.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"saar": "^1.0.4",
"uniqid": "^5.4.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"typescript": "^5.8.2"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/bundles/pix_n_flix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"private": true,
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react": "^19.0.0",
"@vitest/browser-playwright": "^4.0.4",
"playwright": "^1.55.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "^5.8.2",
"vitest": "^4.0.4",
"vitest-browser-react": "^2.0.2"
Expand Down
8 changes: 4 additions & 4 deletions src/bundles/unity_academy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"dependencies": {
"@blueprintjs/core": "^5.10.2",
"@blueprintjs/icons": "^5.9.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"typescript": "^5.8.2"
},
"type": "module",
Expand Down
8 changes: 4 additions & 4 deletions src/tabs/ArcadeTwod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"@blueprintjs/icons": "^5.9.0",
"@sourceacademy/modules-lib": "workspace:^",
"phaser": "^3.54.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1"
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
8 changes: 4 additions & 4 deletions src/tabs/AugmentedReality/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"@blueprintjs/icons": "^5.9.0",
"@sourceacademy/bundle-ar": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"saar": "^1.0.4"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1"
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Comment on lines +9 to 19

This comment was marked as outdated.

Comment on lines +9 to 19

This comment was marked as outdated.

Expand Down
8 changes: 4 additions & 4 deletions src/tabs/CopyGc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"dependencies": {
"@sourceacademy/bundle-copy_gc": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1"
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
8 changes: 4 additions & 4 deletions src/tabs/Csg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"@blueprintjs/icons": "^5.9.0",
"@sourceacademy/bundle-csg": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1"
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
8 changes: 4 additions & 4 deletions src/tabs/Curve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"@blueprintjs/icons": "^5.9.0",
"@sourceacademy/bundle-curve": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitest/browser-playwright": "^4.0.4",
"@vitest/coverage-v8": "^4.0.4",
"playwright": "^1.55.1",
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/Game/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"dependencies": {
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1"
"@types/react": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/MarkSweep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"dependencies": {
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1"
"@types/react": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/Nbody/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"@sourceacademy/modules-lib": "workspace:^",
"nbody": "^0.2.0",
"plotly.js-dist": "^2.17.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"three": "^0.181.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/plotly.js": "^2.35.4",
"@types/react": "^18.3.1",
"@types/react": "^19.0.0",
"@types/three": "^0.181.0"
},
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/tabs/Painter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"dependencies": {
"@sourceacademy/bundle-painter": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1"
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/Physics2D/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"@box2d/debug-draw": "^0.10.0",
"@sourceacademy/bundle-physics_2d": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1"
"@types/react": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/Pixnflix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"dependencies": {
"@sourceacademy/bundle-pix_n_flix": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1"
"@types/react": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/Plotly/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"dependencies": {
"@sourceacademy/bundle-plotly": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1"
"@types/react": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/Repeat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"dependencies": {
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1"
"@types/react": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
8 changes: 4 additions & 4 deletions src/tabs/Repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"@sourceacademy/bundle-repl": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"ace-builds": "^1.25.1",
"react": "^18.3.1",
"react": "^19.0.0",
"react-ace": "^10.1.0",
"react-dom": "^18.3.1"
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1"
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/RobotSimulation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"@dimforge/rapier3d-compat": "^0.11.2",
"@sourceacademy/bundle-robot_simulation": "workspace:^",
"@sourceacademy/modules-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@sourceacademy/modules-buildtools": "workspace:^",
"@types/react": "^18.3.1"
"@types/react": "^19.0.0"
},
"scripts": {
"build": "buildtools build tab .",
Expand Down
Loading
Loading