Skip to content

React compiler#286

Open
burtonjong wants to merge 10 commits intomainfrom
react-compiler
Open

React compiler#286
burtonjong wants to merge 10 commits intomainfrom
react-compiler

Conversation

@burtonjong
Copy link
Member

@burtonjong burtonjong commented Feb 28, 2026

Summary by CodeRabbit

  • New Features

    • Enabled React Compiler in Next.js for improved client performance.
  • Bug Fixes & Improvements

    • Stricter typings and safer parsing across client state and API calls.
    • Better error handling with user-facing notifications and improved clipboard feedback.
    • Minor SVG/UI fixes for more consistent icon rendering.
  • Chores

    • Upgraded Next.js and React; consolidated linting and dev tooling across the repo.

@burtonjong burtonjong requested a review from a team as a code owner February 28, 2026 21:59
@vercel
Copy link

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
helios-telemetry Ready Ready Preview, Comment Feb 28, 2026 11:48pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

📝 Walkthrough

Walkthrough

Migrates ESLint to the flat config format (adds eslint.config.mjs, removes package-level .eslintrc.cjs), updates linting/dev dependencies and editor settings, and applies scattered client-side fixes: typed API calls, promise-voiding, SVG prop casing, safer localStorage deserialization, and small type/tsconfig edits.

Changes

Cohort / File(s) Summary
Root ESLint & Prettier
/.eslintrc.cjs, /eslint.config.mjs, /.eslintignore, /.prettierrc.cjs, /tsconfig.json, /.vscode/settings.json
Remove old root .eslintrc.cjs, add new flat eslint.config.mjs, adjust .eslintignore, update Prettier tailwind path, add VSCode ESLint settings, and point TS config to eslint.config.mjs.
Root package metadata
/package.json
Remove dependencies block, update/add ESLint & plugin devDependencies (ESLint 9, @eslint/js, react/next plugins, typescript-eslint), and other lint-related package version changes.
Package-level ESLint removals
packages/amplify/.eslintrc.cjs, packages/client/.eslintrc.cjs, packages/server/.eslintrc.cjs, packages/shared/.eslintrc.cjs, packages/client/.eslintignore
Delete package-specific ESLint configs; remove some ignored paths in client ignore (node_modules, tailwind.config.ts).
Client package metadata & Next config
packages/client/package.json, packages/client/next.config.mjs
Client: switch lint script to eslint ., upgrade Next/React versions, remove many local ESLint deps and add babel-plugin-react-compiler; add reactCompiler: true to Next config.
Server package metadata
packages/server/package.json
Move TypeScript to devDependencies, add uuid runtime dependency, remove various ESLint packages from server devDependencies.
TypeScript project config tweaks
packages/client/tsconfig.json, packages/server/tsconfig.json, packages/shared/tsconfig.json, packages/amplify/tsconfig.json, packages/db/tsconfig.json
Add "types": ["node"] to several tsconfigs, remove .eslintrc.cjs from includes, and normalize include/exclude formatting.
Client – state, deserialization & managers
packages/client/src/components/global/AppStateEffectsManager.tsx, packages/client/src/components/global/LapDataListenerManager.tsx, packages/client/src/components/containers/MLContainer.tsx
Introduce robust localStorage deserialization and validators in AppStateEffectsManager; change some initial fetch/refetch calls to void-prefixed to discard promises (suppress unhandled warnings).
Client – API, stores, pages
packages/client/src/lib/api.ts, packages/client/src/stores/useLapData.ts, packages/client/src/pages/api/*
Normalize interceptor errors to Error objects; add typed axios generics for endpoints and enhance error notifications/handling in stores and API routes.
Client – UI components & props
packages/client/src/components/**/PlayIcon.tsx, PauseIcon.tsx, Plotly.tsx, MapContainer.tsx, MapMolecules/*.tsx, RaceTab.tsx, DriverFilter.tsx, DatePickerColumn.tsx, PlaybackDatePicker.tsx, DriverNameUpdate.tsx
SVG props converted to camelCase; several handler props changed to async (Promise<void>) and call sites updated with void wrappers; Map components get typed TrackSourceProps and enum-based demo checks; RaceTab/Playback components updated to use typed axios responses and improved error/notification handling.
Client – types & misc
packages/client/src/types.d.ts, packages/client/src/hooks/PIS/PIS.motor.tsx, packages/client/src/contexts/FullscreenWrapper.tsx
Change JSX IntrinsicElements from interface to type alias; remove an eslint directive comment; replace fullscreen/request calls with void-prefixed calls to ignore returned promises.
Misc / cleanup
/test.ts
Remove local test.ts content.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • alexwhelan12
  • justin-phxm
  • dastine0308

Poem

🐰
The config files hopped and found a new home,
Flat linting fields where all rules roam.
Types tightened, promises quietly voided,
SVG ears fixed, and storage no longer cloyed.
Hooray — the repo’s neat, the rabbit’s overjoyed! 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The pull request title 'React compiler' is vague and does not clearly summarize the actual changes made. The changeset involves a comprehensive ESLint configuration migration and upgrade, moving from legacy ESLint setup to a flat config with new plugins, plus React compiler addition and multiple dependency updates. The title only references the minor React compiler feature addition and lacks specificity about the primary changes. Consider a more descriptive title that captures the main scope, such as 'Migrate to ESLint flat config and upgrade dependencies' or 'ESLint migration and React compiler integration'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch react-compiler

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/client/src/components/molecules/LogoStatusMolecules/Settings/DriverNameUpdate.tsx (1)

76-106: ⚠️ Potential issue | 🟡 Minor

Loading state not reset when validation fails.

When validateInputs() returns false on line 81, the function exits without calling setLoading(false), leaving the UI stuck in a loading state with the spinner visible.

Proposed fix
   const handleSubmit = async (e: React.FormEvent) => {
     e.preventDefault();
     setLoading(true);
     setErrorMessages({});
     setStatusMessage("");
     if (validateInputs()) {
       if (await checkMQTTPassword()) {
         axios
           .post<{ message: string }>(`${prodURL}/updatedriverinfo`, {
             Rfid: driverDetails.Rfid,
             name: driverDetails.name,
           })
           .then((res) => {
             if (res.status === 200) {
               setStatusMessage(res.data.message);
               setLoading(false);
             } else {
               setStatusMessage("Error updating driver info 1");
               setLoading(false);
             }
           })
           .catch(() => {
             setStatusMessage("Error updating driver info 2");
             setLoading(false);
           });
       } else {
         setStatusMessage("Incorrect password, please try again.");
         setLoading(false);
       }
+    } else {
+      setLoading(false);
     }
   };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client/src/components/molecules/LogoStatusMolecules/Settings/DriverNameUpdate.tsx`
around lines 76 - 106, The handleSubmit function sets loading true but never
resets it if validateInputs() returns false; modify handleSubmit (the
validateInputs branch) to ensure setLoading(false) is called before exiting when
validation fails (either by setting setLoading(false) immediately after the
validateInputs() check fails or by returning early after calling
setLoading(false)), so that the loading spinner is always cleared; ensure this
uses the existing setLoading and validateInputs symbols and does not change the
axios flow.
packages/client/src/components/molecules/LogoStatusMolecules/PlaybackDatePicker.tsx (1)

182-190: ⚠️ Potential issue | 🟠 Major

Stale closure: fetchPlaybackData uses stale playbackDateTime state.

When playbackSwitch becomes true, setPlaybackDateTime is called on line 187, but fetchPlaybackData() is invoked immediately after. Since React state updates are asynchronous, fetchPlaybackData will use the old playbackDateTime value captured in its closure, not the newly set value from currentAppState.playbackDateTime.

Consider restructuring to ensure the fetch uses the correct values:

Proposed fix
   useEffect(() => {
     if (
       currentAppState.playbackSwitch &&
       currentAppState.playbackDateTime?.date
     ) {
       setPlaybackDateTime(currentAppState.playbackDateTime);
-      void fetchPlaybackData();
     }
   }, [currentAppState.playbackSwitch]);
+
+  useEffect(() => {
+    if (currentAppState.playbackSwitch && playbackDateTime.date) {
+      void fetchPlaybackData();
+    }
+  }, [playbackDateTime]);

Alternatively, pass the datetime explicitly to fetchPlaybackData as a parameter instead of relying on closure state.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client/src/components/molecules/LogoStatusMolecules/PlaybackDatePicker.tsx`
around lines 182 - 190, The effect currently calls setPlaybackDateTime and
immediately calls fetchPlaybackData, causing fetchPlaybackData to capture a
stale playbackDateTime; update the logic so fetchPlaybackData uses the new value
— either 1) change the useEffect to depend on currentAppState.playbackDateTime
(or local playbackDateTime) and call fetchPlaybackData only after
playbackDateTime updates, or 2) refactor fetchPlaybackData to accept the
datetime explicitly and call fetchPlaybackData(currentAppState.playbackDateTime)
right after setPlaybackDateTime; ensure you update the dependency array for
useEffect accordingly and reference the existing setPlaybackDateTime and
fetchPlaybackData functions.
🧹 Nitpick comments (4)
packages/client/src/contexts/FullscreenWrapper.tsx (1)

44-48: Consider adding error handling for fullscreen API rejections.

Both requestFullscreen() and exitFullscreen() return Promises that can reject (e.g., permission denied, element detached). While the void prefix correctly silences floating-promise warnings, errors are silently swallowed.

💡 Optional: Add minimal error handling
     if (!document.fullscreenElement) {
-      void elementReferenced.requestFullscreen();
+      elementReferenced.requestFullscreen().catch(() => {
+        // Fullscreen may fail silently (e.g., permission denied)
+      });
     } else {
-      void document.exitFullscreen?.();
+      document.exitFullscreen?.().catch(() => {
+        // Exit may fail silently
+      });
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/src/contexts/FullscreenWrapper.tsx` around lines 44 - 48, The
fullscreen calls use void to silence promises but silently swallow rejections;
update the toggle logic in FullscreenWrapper (the
elementReferenced.requestFullscreen() and document.exitFullscreen() invocations)
to handle Promise rejections by appending .catch(...) or using try/catch with
await and log or surface the error (e.g., console.error or a provided logger)
and optionally recover UI state if requestFullscreen/exitFullscreen fails so
failures are not ignored.
packages/client/src/components/containers/Plotly.tsx (1)

35-39: Add error handling for newPlot failures.

The promise chain lacks a .catch() handler. If newPlot rejects (e.g., invalid data, DOM issues), the error is silently swallowed, potentially leaving the component in an inconsistent state.

🛡️ Proposed fix to handle errors
-              void newPlot(originRef.current, data, layout, config).then(
-                (ref) => {
-                  setHandle((instance = ref));
-                },
-              );
+              newPlot(originRef.current, data, layout, config)
+                .then((ref) => {
+                  setHandle((instance = ref));
+                })
+                .catch((err) => {
+                  console.error("Failed to initialize Plotly chart:", err);
+                });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/src/components/containers/Plotly.tsx` around lines 35 - 39,
The promise returned by newPlot (called with originRef.current, data, layout,
config) needs a .catch handler to surface and handle errors — update the chain
that currently calls .then(ref => setHandle((instance = ref))) to add .catch(err
=> { console.error("Plotly newPlot failed", err); setHandle(null); /* cleanup
instance if needed */ }); so that failures don't get swallowed and the component
state (setHandle/instance) is cleared on error; ensure you reference newPlot,
originRef, setHandle and instance when making this change.
packages/client/src/components/tabs/RaceTab.tsx (1)

102-109: Return a consistent type from fetchDriverNames.

Line 108 returns an object while success returns IDriverData[]. This widens the function contract unnecessarily and pushes error-shape handling downstream.

Proposed diff
-  const fetchDriverNames = async () => {
+  const fetchDriverNames = async (): Promise<IDriverData[]> => {
     try {
       const response = await axios.get<IDriverData[]>(`${prodURL}/drivers`);
 
       return response.data;
     } catch (error) {
-      return { error: "Error fetching drivers" };
+      return [];
     }
   };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/src/components/tabs/RaceTab.tsx` around lines 102 - 109,
fetchDriverNames currently returns IDriverData[] on success but an object {
error: ... } on failure, causing an inconsistent return type; change
fetchDriverNames so it always resolves to IDriverData[] (or rejects) by removing
the mismatched error object—either rethrow the caught error (e.g., throw new
Error with context) or return an empty array and log the error; update the catch
in fetchDriverNames (the function using axios.get and prodURL) to consistently
return Promise<IDriverData[]> or propagate the error so callers receive a
uniform type.
packages/client/src/components/molecules/MapMolecules/MapControls.tsx (1)

93-93: Redundant type annotation on map callback parameter.

The track: TrackList type annotation is redundant since trackList is already typed as TrackList[] in the component props (line 42), and TypeScript will correctly infer the element type in the .map() callback.

If this was added to satisfy an ESLint rule (such as @typescript-eslint/explicit-function-return-type or similar), consider configuring the rule to allow inferred types in callbacks instead. Explicit annotations in array method callbacks can interfere with the React Compiler's optimization heuristics.

♻️ Optional: Remove redundant type annotation
-          {trackList.map((track: TrackList, index) => {
+          {trackList.map((track, index) => {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/src/components/molecules/MapMolecules/MapControls.tsx` at
line 93, In MapControls, remove the redundant type annotation on the .map()
callback parameter — replace the callback signature using (track: TrackList,
index) => ... with (track, index) => ... since the prop trackList is already
typed as TrackList[]; update the map usage inside the MapControls component
accordingly and, if ESLint flagged this, adjust the rule configuration or add an
inline eslint-disable comment for that specific case rather than reintroducing
the redundant type.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.prettierrc.cjs:
- Line 15: Update the tailwindConfig property in .prettierrc.cjs: the current
value "tailwind.config.ts" is incorrect for the repo root; change the
tailwindConfig entry (the tailwindConfig key in .prettierrc.cjs) to point to the
real file at "./packages/client/tailwind.config.ts" so
prettier-plugin-tailwindcss can resolve and sort Tailwind classes correctly.

In `@package.json`:
- Around line 33-37: The package.json currently pins "@eslint/js": "^10.0.1"
while "eslint" is pinned to "9.0.0", causing a peer dependency conflict; fix by
choosing one of the two options: either downgrade "@eslint/js" to a
9.x-compatible version (change "@eslint/js" to a ^9.x release) so it aligns with
"eslint": "9.0.0", or upgrade "eslint" to a ^10.x version so both "@eslint/js"
and "eslint" use the same major (10) series; update the package.json dependency
entries for "@eslint/js" and/or "eslint" accordingly and run your package
manager (npm/yarn/pnpm) to refresh lockfile and verify no peer warnings.

In `@packages/client/package.json`:
- Around line 57-58: Update the package.json "resolutions" entries so they match
the devDependency versions for the React type packages: replace the pinned
versions for "@types/react" and "@types/react-dom" in the resolutions section
(currently 19.0.7 and 19.0.3) with the upgraded versions used in devDependencies
(19.2.10 and 19.2.3) so Yarn no longer forces the older types and the
devDependency upgrades take effect.

In `@packages/client/src/components/global/AppStateEffectsManager.tsx`:
- Around line 78-83: The deserialization currently accepts NaN/Infinity because
it only checks typeof for lat/long; update the validation to reject non-finite
numbers by replacing the typeof checks with Number.isFinite(lat) &&
Number.isFinite(long) and return null if either is not finite so the returned
value (the object cast to AppState["lapCoords"]) only contains valid
coordinates.
- Around line 16-20: Persisted favourites are being written to the "settings"
key but never read back; update the PersistedSettings type to include the
favourites field (matching AppState.favourites shape), then modify
fetchSettingsFromLocalStorage to parse favourites from the "settings" payload
and fall back to the legacy "favourites" key if absent; ensure
saveSettingsToLocalStorage continues to serialize currentAppState (including
favourites) and that fetchSettingsFromLocalStorage merges the parsed favourites
into the restored state so user selections aren't lost.

In `@packages/client/src/components/tabs/RaceTab.tsx`:
- Line 12: The import in RaceTab.tsx currently deep-imports IDriverData and
ILapData from "@shared/helios-types/src/types"; update the import to use the
package's public entrypoint so all types come from "@shared/helios-types"
instead (e.g., import IDriverData, ILapData alongside IFormattedLapData and
prodURL from "@shared/helios-types"). Modify the import statement that
references IDriverData and ILapData to remove the "/src/types" path and
consolidate imports from the public module to avoid brittle deep imports.
- Around line 93-95: The async fetch in RaceTab can be subject to race
conditions: calls to fetchFilteredLaps/formatLapData may resolve out of order
and an older response can overwrite state via setFilteredLaps; add a request
token/sequence guard so only the latest request updates state (e.g., maintain a
incrementing requestId or AbortController stored in a ref when initiating the
fetch, capture the current token before awaiting fetchFilteredLaps, and after
awaiting check that the token still matches the latest token in the ref before
calling setFilteredLaps); ensure you clean up/replace the token on new requests
and handle cancellation/errors accordingly.

In `@packages/client/src/pages/api/checkMQTTPassword.ts`:
- Around line 5-8: The current equality check in checkMQTTPassword uses a type
assertion and allows auth bypass when process.env.DRIVER_UPDATE_PASSWORD is
unset; change the runtime logic in the checkMQTTPassword handler to (1) treat
process.env.DRIVER_UPDATE_PASSWORD as required — if it's falsy, reject requests
(return 401/500) and log/configuration error, (2) validate req.body at runtime
(ensure typeof req.body === 'object' and typeof req.body.password === 'string')
instead of using "as { password: string }", and (3) perform a strict comparison
between validated req.body.password and process.env.DRIVER_UPDATE_PASSWORD,
returning unauthorized on mismatch; also add/update .env.example to document
DRIVER_UPDATE_PASSWORD.

In `@packages/client/src/types.d.ts`:
- Around line 3-7: The current declaration uses a `type` alias for
React.JSX.IntrinsicElements and replaces the whole set with `ThreeElements`,
which breaks declaration merging; change this to an `interface`-based
augmentation that merges instead of replaces: replace the `declare global {
namespace React { namespace JSX { type IntrinsicElements = ThreeElements; } } }`
pattern by either (A) augmenting the existing `ThreeElements` interface in the
`@react-three/fiber` types or (B) declaring `declare module "react/jsx-runtime"`
and add `interface IntrinsicElements extends Partial<ThreeElements> {}` (or a
merge that extends existing IntrinsicElements) so you extend rather than
overwrite JSX.IntrinsicElements; target the declarations referencing React, JSX,
IntrinsicElements, and ThreeElements when applying the fix.

In `@packages/server/package.json`:
- Around line 48-49: The start script preloads ts-node at runtime but ts-node is
currently only listed under devDependencies, causing production installs with
--omit=dev to fail; update package.json by moving "ts-node": "^10.9.2" from
devDependencies into dependencies (keep the same version), remove it from
devDependencies, and then run a fresh install so the production build can
resolve the node -r ts-node/register preload used by the start script.

---

Outside diff comments:
In
`@packages/client/src/components/molecules/LogoStatusMolecules/PlaybackDatePicker.tsx`:
- Around line 182-190: The effect currently calls setPlaybackDateTime and
immediately calls fetchPlaybackData, causing fetchPlaybackData to capture a
stale playbackDateTime; update the logic so fetchPlaybackData uses the new value
— either 1) change the useEffect to depend on currentAppState.playbackDateTime
(or local playbackDateTime) and call fetchPlaybackData only after
playbackDateTime updates, or 2) refactor fetchPlaybackData to accept the
datetime explicitly and call fetchPlaybackData(currentAppState.playbackDateTime)
right after setPlaybackDateTime; ensure you update the dependency array for
useEffect accordingly and reference the existing setPlaybackDateTime and
fetchPlaybackData functions.

In
`@packages/client/src/components/molecules/LogoStatusMolecules/Settings/DriverNameUpdate.tsx`:
- Around line 76-106: The handleSubmit function sets loading true but never
resets it if validateInputs() returns false; modify handleSubmit (the
validateInputs branch) to ensure setLoading(false) is called before exiting when
validation fails (either by setting setLoading(false) immediately after the
validateInputs() check fails or by returning early after calling
setLoading(false)), so that the loading spinner is always cleared; ensure this
uses the existing setLoading and validateInputs symbols and does not change the
axios flow.

---

Nitpick comments:
In `@packages/client/src/components/containers/Plotly.tsx`:
- Around line 35-39: The promise returned by newPlot (called with
originRef.current, data, layout, config) needs a .catch handler to surface and
handle errors — update the chain that currently calls .then(ref =>
setHandle((instance = ref))) to add .catch(err => { console.error("Plotly
newPlot failed", err); setHandle(null); /* cleanup instance if needed */ }); so
that failures don't get swallowed and the component state (setHandle/instance)
is cleared on error; ensure you reference newPlot, originRef, setHandle and
instance when making this change.

In `@packages/client/src/components/molecules/MapMolecules/MapControls.tsx`:
- Line 93: In MapControls, remove the redundant type annotation on the .map()
callback parameter — replace the callback signature using (track: TrackList,
index) => ... with (track, index) => ... since the prop trackList is already
typed as TrackList[]; update the map usage inside the MapControls component
accordingly and, if ESLint flagged this, adjust the rule configuration or add an
inline eslint-disable comment for that specific case rather than reintroducing
the redundant type.

In `@packages/client/src/components/tabs/RaceTab.tsx`:
- Around line 102-109: fetchDriverNames currently returns IDriverData[] on
success but an object { error: ... } on failure, causing an inconsistent return
type; change fetchDriverNames so it always resolves to IDriverData[] (or
rejects) by removing the mismatched error object—either rethrow the caught error
(e.g., throw new Error with context) or return an empty array and log the error;
update the catch in fetchDriverNames (the function using axios.get and prodURL)
to consistently return Promise<IDriverData[]> or propagate the error so callers
receive a uniform type.

In `@packages/client/src/contexts/FullscreenWrapper.tsx`:
- Around line 44-48: The fullscreen calls use void to silence promises but
silently swallow rejections; update the toggle logic in FullscreenWrapper (the
elementReferenced.requestFullscreen() and document.exitFullscreen() invocations)
to handle Promise rejections by appending .catch(...) or using try/catch with
await and log or surface the error (e.g., console.error or a provided logger)
and optionally recover UI state if requestFullscreen/exitFullscreen fails so
failures are not ignored.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77523a9 and 6b12a40.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (42)
  • .eslintignore
  • .eslintrc.cjs
  • .prettierrc.cjs
  • .vscode/settings.json
  • eslint.config.mjs
  • package.json
  • packages/amplify/.eslintrc.cjs
  • packages/amplify/tsconfig.json
  • packages/client/.eslintignore
  • packages/client/.eslintrc.cjs
  • packages/client/next.config.mjs
  • packages/client/package.json
  • packages/client/src/components/atoms/PauseIcon.tsx
  • packages/client/src/components/atoms/PlayIcon.tsx
  • packages/client/src/components/containers/MLContainer.tsx
  • packages/client/src/components/containers/MapContainer.tsx
  • packages/client/src/components/containers/Plotly.tsx
  • packages/client/src/components/global/AppStateEffectsManager.tsx
  • packages/client/src/components/global/LapDataListenerManager.tsx
  • packages/client/src/components/molecules/LogoStatusMolecules/DataPickerMolecules/DatePickerColumn.tsx
  • packages/client/src/components/molecules/LogoStatusMolecules/PlaybackDatePicker.tsx
  • packages/client/src/components/molecules/LogoStatusMolecules/Settings/DriverNameUpdate.tsx
  • packages/client/src/components/molecules/MapMolecules/Map.tsx
  • packages/client/src/components/molecules/MapMolecules/MapControls.tsx
  • packages/client/src/components/molecules/RaceTabMolecules/DriverFilter.tsx
  • packages/client/src/components/tabs/RaceTab.tsx
  • packages/client/src/contexts/FullscreenWrapper.tsx
  • packages/client/src/hooks/PIS/PIS.motor.tsx
  • packages/client/src/lib/api.ts
  • packages/client/src/pages/api/checkMQTTPassword.ts
  • packages/client/src/pages/api/getLapCorrelationMatrix.ts
  • packages/client/src/pages/api/getPacketCorrelationMatrix.ts
  • packages/client/src/stores/useLapData.ts
  • packages/client/src/types.d.ts
  • packages/client/tsconfig.json
  • packages/server/.eslintrc.cjs
  • packages/server/package.json
  • packages/server/tsconfig.json
  • packages/shared/.eslintrc.cjs
  • packages/shared/tsconfig.json
  • test.ts
  • tsconfig.json
💤 Files with no reviewable changes (9)
  • packages/amplify/.eslintrc.cjs
  • .eslintignore
  • packages/client/.eslintrc.cjs
  • packages/client/.eslintignore
  • packages/client/src/hooks/PIS/PIS.motor.tsx
  • packages/shared/.eslintrc.cjs
  • packages/server/.eslintrc.cjs
  • test.ts
  • .eslintrc.cjs

Comment on lines +78 to +83
if (typeof lat !== "number" || typeof long !== "number") {
return null;
}

return { lat, long } as AppState["lapCoords"];
};
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Reject non-finite coordinates during deserialization.

Line 78 allows NaN/Infinity because they are still number. That can propagate invalid map coordinates.

💡 Proposed fix
-  if (typeof lat !== "number" || typeof long !== "number") {
+  if (
+    typeof lat !== "number" ||
+    typeof long !== "number" ||
+    !Number.isFinite(lat) ||
+    !Number.isFinite(long)
+  ) {
     return null;
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (typeof lat !== "number" || typeof long !== "number") {
return null;
}
return { lat, long } as AppState["lapCoords"];
};
if (
typeof lat !== "number" ||
typeof long !== "number" ||
!Number.isFinite(lat) ||
!Number.isFinite(long)
) {
return null;
}
return { lat, long } as AppState["lapCoords"];
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/src/components/global/AppStateEffectsManager.tsx` around
lines 78 - 83, The deserialization currently accepts NaN/Infinity because it
only checks typeof for lat/long; update the validation to reject non-finite
numbers by replacing the typeof checks with Number.isFinite(lat) &&
Number.isFinite(long) and return null if either is not finite so the returned
value (the object cast to AppState["lapCoords"]) only contains valid
coordinates.

Comment on lines +5 to +8
if (
(req.body as { password: string }).password ===
process.env.DRIVER_UPDATE_PASSWORD
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n packages/client/src/pages/api/checkMQTTPassword.ts

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 655


🏁 Script executed:

rg -n -C3 'DRIVER_UPDATE_PASSWORD'

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 644


🏁 Script executed:

fd -HI '\.(env|env\.example|env\.local)' --type f

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 132


🏁 Script executed:

git ls-files | grep -E '(env|config)' | head -20

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 633


🏁 Script executed:

cat -n packages/client/.env.example packages/server/.env.example

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 1488


Prevent auth bypass when DRIVER_UPDATE_PASSWORD is unset, and validate request body at runtime.

The type assertion as { password: string } does not validate the runtime payload. If DRIVER_UPDATE_PASSWORD is undefined, the equality check will pass when req.body.password is also undefined, authorizing any request without a password field. Additionally, DRIVER_UPDATE_PASSWORD is not documented in .env.example, indicating it may not be consistently configured.

🔧 Proposed fix
 export default function handler(req: NextApiRequest, res: NextApiResponse) {
   if (req.method === "POST") {
-    if (
-      (req.body as { password: string }).password ===
-      process.env.DRIVER_UPDATE_PASSWORD
-    ) {
+    const expectedPassword = process.env.DRIVER_UPDATE_PASSWORD;
+    if (!expectedPassword) {
+      res.status(500).json({ error: "Server auth config missing" });
+      return;
+    }
+
+    const providedPassword =
+      req.body &&
+      typeof req.body === "object" &&
+      "password" in req.body
+        ? (req.body as { password?: unknown }).password
+        : undefined;
+
+    if (typeof providedPassword !== "string") {
+      res.status(400).json({ error: "Invalid request body" });
+      return;
+    }
+
+    if (providedPassword === expectedPassword) {
       res.status(200).send("Authorized");
     } else {
       res.status(401).json({ error: "Unauthorized" });
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (
(req.body as { password: string }).password ===
process.env.DRIVER_UPDATE_PASSWORD
) {
const expectedPassword = process.env.DRIVER_UPDATE_PASSWORD;
if (!expectedPassword) {
res.status(500).json({ error: "Server auth config missing" });
return;
}
const providedPassword =
req.body &&
typeof req.body === "object" &&
"password" in req.body
? (req.body as { password?: unknown }).password
: undefined;
if (typeof providedPassword !== "string") {
res.status(400).json({ error: "Invalid request body" });
return;
}
if (providedPassword === expectedPassword) {
res.status(200).send("Authorized");
} else {
res.status(401).json({ error: "Unauthorized" });
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/src/pages/api/checkMQTTPassword.ts` around lines 5 - 8, The
current equality check in checkMQTTPassword uses a type assertion and allows
auth bypass when process.env.DRIVER_UPDATE_PASSWORD is unset; change the runtime
logic in the checkMQTTPassword handler to (1) treat
process.env.DRIVER_UPDATE_PASSWORD as required — if it's falsy, reject requests
(return 401/500) and log/configuration error, (2) validate req.body at runtime
(ensure typeof req.body === 'object' and typeof req.body.password === 'string')
instead of using "as { password: string }", and (3) perform a strict comparison
between validated req.body.password and process.env.DRIVER_UPDATE_PASSWORD,
returning unauthorized on mismatch; also add/update .env.example to document
DRIVER_UPDATE_PASSWORD.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
packages/client/src/components/tabs/RaceTab.tsx (1)

97-99: ⚠️ Potential issue | 🟠 Major

Guard against stale async responses when switching drivers quickly.

The race condition flagged in previous review is still present. When users select drivers rapidly, an older request can resolve after a newer one and overwrite the latest driver's data in state.

Proposed fix using a request sequence guard
+  const latestRequestRef = React.useRef(0);
+
   const handleDropdown = useCallback(
     async (event: SelectChangeEvent<number | string>) => {
       const newRFID = event.target.value;
       setDriverRFID(newRFID);
       setCopy(0);

       if (Number.isNaN(newRFID) || newRFID === "Show all data") {
         setFilteredLaps(lapData);
       } else {
+        const requestId = ++latestRequestRef.current;
         const response = await fetchFilteredLaps(Number(newRFID));
+        if (requestId !== latestRequestRef.current) return;
         const formattedData = response.map(formatLapData);
         setFilteredLaps(formattedData);
       }
     },
     [formatLapData, lapData],
   );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/src/components/tabs/RaceTab.tsx` around lines 97 - 99, When
fetching filtered laps in RaceTab.tsx, guard against stale async responses by
adding a request-sequencing check: maintain a component-scoped incrementing
requestId (useRef) that you increment before calling fetchFilteredLaps, store
the currentId in the closure, and after awaiting response and mapping with
formatLapData only call setFilteredLaps if the stored currentId matches the
latest ref value; this ensures older fetches cannot overwrite newer driver data
(apply this to the function that runs the fetch and updates state around
fetchFilteredLaps, formatLapData, and setFilteredLaps).
🧹 Nitpick comments (4)
packages/client/src/components/tabs/RaceTab.tsx (1)

106-114: Inconsistent return type is a code smell.

fetchDriverNames returns IDriverData[] on success but { error: string } on error. While the caller handles this with Array.isArray(), a more idiomatic approach would be to either throw the error (letting the caller's try/catch handle it) or return a consistent type.

Option 1: Let error propagate (recommended)
   const fetchDriverNames = async () => {
-    try {
-      const response = await axios.get<IDriverData[]>(`${prodURL}/drivers`);
-
-      return response.data;
-    } catch (error) {
-      return { error: "Error fetching drivers" };
-    }
+    const response = await axios.get<IDriverData[]>(`${prodURL}/drivers`);
+    return response.data;
   };

The outer try/catch in useEffect will handle errors, making the Array.isArray() check unnecessary.

Option 2: Return empty array on error
   const fetchDriverNames = async () => {
     try {
       const response = await axios.get<IDriverData[]>(`${prodURL}/drivers`);
-
       return response.data;
     } catch (error) {
-      return { error: "Error fetching drivers" };
+      return [];
     }
   };

This aligns with fetchFilteredLaps which already returns [] on error.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/src/components/tabs/RaceTab.tsx` around lines 106 - 114, The
fetchDriverNames function currently returns IDriverData[] on success but an
object { error: string } on failure; change it to return a consistent type by
letting errors propagate: in fetchDriverNames (the async function named
fetchDriverNames) remove the catch that returns { error: ... } and instead
rethrow the caught error (or just omit the try/catch) so the caller's try/catch
in the useEffect handles failures; ensure the function signature still indicates
it returns Promise<IDriverData[]> and remove any Array.isArray() checks at the
call site if you rely on the outer error handling, or alternatively (if you
prefer Option 2) return [] on error to match fetchFilteredLaps — pick one
consistent approach and update fetchDriverNames and its callers accordingly.
packages/client/tsconfig.json (2)

7-7: Remove the direct node_modules/@types path mapping and use the installed @types/plotly.js-dist-min package instead.

The @types/plotly.js-dist-min package is already declared as a dependency in package.json (version ^2), so the path mapping should not bypass the standard module resolution. Manually coupling type resolution to node_modules/@types/plotly.js breaks portability and defeats the purpose of proper type package management.

Either remove this paths entry entirely and let module resolution use the installed @types/plotly.js-dist-min directly, or use a local type shim if custom type declarations are needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/tsconfig.json` at line 7, Remove the explicit paths mapping
that points "plotly.js-dist-min" to "node_modules/@types/plotly.js" in
tsconfig.json; instead rely on the installed type package
`@types/plotly.js-dist-min` by deleting the "plotly.js-dist-min":
["node_modules/@types/plotly.js"] entry (or replace it with a local type shim if
you need custom declarations). This change affects the "paths" entry in
tsconfig.json and ensures the compiler resolves types via the installed `@types`
package rather than a hardcoded node_modules path.

12-14: Consider separating tooling types to improve architectural clarity.

While the current setup doesn't cause practical issues, splitting "types": ["node"] and .cjs/.mjs includes into a dedicated tooling config would make the browser/tooling boundary more explicit. This is especially helpful for preventing accidental Node global usage in browser code as the project evolves.

The refactor is straightforward but optional—only pursue if the team values explicit architectural separation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client/tsconfig.json` around lines 12 - 14, Remove Node-specific
tooling types and non-browser file globs from the package client tsconfig by
extracting them into a dedicated tooling tsconfig (e.g., tsconfig.tooling.json)
and have the package/tsconfig.json extend only browser-safe settings;
specifically, move the "types": ["node"] entry and the "**/*.cjs"/"**/*.mjs"
include patterns into the new tooling config, update the original "include" to
only browser sources (e.g., .ts/.tsx) and add an "extends" reference to the
tooling config where build/test tooling needs Node types; update references to
the tsconfig file in build/test scripts if necessary so tooling still picks up
node types while browser code cannot accidentally rely on Node globals.
packages/server/tsconfig.json (1)

25-25: Narrow **/*.cjs and **/*.mjs include patterns to root level only.

The recursive glob patterns will match config files at any directory depth within packages/server. If the intent is to include only root-level config files like prettier.config.cjs, use *.cjs and *.mjs instead to be explicit and prevent accidental matches in future subdirectories.

  "include": ["src/**/*", "*.cjs", "*.mjs"],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/server/tsconfig.json` at line 25, Update the tsconfig.json "include"
array to avoid recursive matching of config files: replace the recursive glob
strings "**/*.cjs" and "**/*.mjs" with root-level patterns "*.cjs" and "*.mjs"
so only top-level config files (e.g., prettier.config.cjs) are included rather
than any files in subdirectories; locate and edit the "include" entry in the
tsconfig.json and make this replacement.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 33-36: The package.json lists mismatched ESLint package versions;
update the "@eslint/js" dependency to match the installed "eslint" version (set
"@eslint/js" to "9.7.0") or bump both "eslint" and "@eslint/js" together to the
same new version to avoid rule/config mismatches—modify the "@eslint/js" entry
in package.json so it exactly matches the "eslint" version used.

In `@packages/server/package.json`:
- Line 34: The dependency "uuid" was bumped to v11 which has breaking changes;
either pin it back to the v9 series (e.g., set "uuid" to a 9.x version) until we
complete compatibility work, or if you opt into v11: update the package.json
engines field to require Node >=16, run CI/build/test to validate no
UMD/minified assumptions, audit imports/usages of uuid (e.g., any default import
vs named imports or v4()/v5() calls) and TypeScript types, and adjust code or
build config accordingly to accommodate v11's new typings and transpilation
targets before merging.

---

Duplicate comments:
In `@packages/client/src/components/tabs/RaceTab.tsx`:
- Around line 97-99: When fetching filtered laps in RaceTab.tsx, guard against
stale async responses by adding a request-sequencing check: maintain a
component-scoped incrementing requestId (useRef) that you increment before
calling fetchFilteredLaps, store the currentId in the closure, and after
awaiting response and mapping with formatLapData only call setFilteredLaps if
the stored currentId matches the latest ref value; this ensures older fetches
cannot overwrite newer driver data (apply this to the function that runs the
fetch and updates state around fetchFilteredLaps, formatLapData, and
setFilteredLaps).

---

Nitpick comments:
In `@packages/client/src/components/tabs/RaceTab.tsx`:
- Around line 106-114: The fetchDriverNames function currently returns
IDriverData[] on success but an object { error: string } on failure; change it
to return a consistent type by letting errors propagate: in fetchDriverNames
(the async function named fetchDriverNames) remove the catch that returns {
error: ... } and instead rethrow the caught error (or just omit the try/catch)
so the caller's try/catch in the useEffect handles failures; ensure the function
signature still indicates it returns Promise<IDriverData[]> and remove any
Array.isArray() checks at the call site if you rely on the outer error handling,
or alternatively (if you prefer Option 2) return [] on error to match
fetchFilteredLaps — pick one consistent approach and update fetchDriverNames and
its callers accordingly.

In `@packages/client/tsconfig.json`:
- Line 7: Remove the explicit paths mapping that points "plotly.js-dist-min" to
"node_modules/@types/plotly.js" in tsconfig.json; instead rely on the installed
type package `@types/plotly.js-dist-min` by deleting the "plotly.js-dist-min":
["node_modules/@types/plotly.js"] entry (or replace it with a local type shim if
you need custom declarations). This change affects the "paths" entry in
tsconfig.json and ensures the compiler resolves types via the installed `@types`
package rather than a hardcoded node_modules path.
- Around line 12-14: Remove Node-specific tooling types and non-browser file
globs from the package client tsconfig by extracting them into a dedicated
tooling tsconfig (e.g., tsconfig.tooling.json) and have the
package/tsconfig.json extend only browser-safe settings; specifically, move the
"types": ["node"] entry and the "**/*.cjs"/"**/*.mjs" include patterns into the
new tooling config, update the original "include" to only browser sources (e.g.,
.ts/.tsx) and add an "extends" reference to the tooling config where build/test
tooling needs Node types; update references to the tsconfig file in build/test
scripts if necessary so tooling still picks up node types while browser code
cannot accidentally rely on Node globals.

In `@packages/server/tsconfig.json`:
- Line 25: Update the tsconfig.json "include" array to avoid recursive matching
of config files: replace the recursive glob strings "**/*.cjs" and "**/*.mjs"
with root-level patterns "*.cjs" and "*.mjs" so only top-level config files
(e.g., prettier.config.cjs) are included rather than any files in
subdirectories; locate and edit the "include" entry in the tsconfig.json and
make this replacement.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6b12a40 and 7d9131d.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • package.json
  • packages/client/package.json
  • packages/client/src/components/tabs/RaceTab.tsx
  • packages/client/tsconfig.json
  • packages/db/tsconfig.json
  • packages/server/package.json
  • packages/server/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/client/package.json

Comment on lines +33 to +36
"@eslint/js": "9.39.3",
"@next/eslint-plugin-next": "^16.1.6",
"@types/eslint": "^9.6.0",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"clsx": "^2.1.1",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "latest",
"eslint": "9.7.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

@eslint/js npm package versions

💡 Result:

  • Current latest version (npm): @eslint/js@9.35.0 (npm shows 75 versions total). [1]
  • Major version line: 9.x (e.g., 9.0.0 exists). [2]

To list all published versions from your terminal:

npm view `@eslint/js` versions --json

To get just the latest:

npm view `@eslint/js` version

Sources: [1], [2]


🌐 Web query:

eslint @eslint/js version compatibility

💡 Result:

  • @eslint/js is versioned in lockstep with eslint (same version numbers are published), and ESLint itself depends on the matching @eslint/js version (e.g., eslint@9.9.1 pulls @eslint/js@9.9.1). So the practical compatibility rule is: use the same major (and ideally the same exact) version of @eslint/js as your eslint version. [1] [2] [3]

Examples

  • ESLint 9.x → install @eslint/js@^9 (or match exact, e.g. 9.35.0). [2]
  • ESLint 8.x → install @eslint/js@^8 (e.g. 8.57.1). [1]

Why this matters

  • @eslint/js is just the packaged replacement for eslint:recommended / eslint:all configs, and those configs are tied to the set of core rules available in that ESLint major line—mixing majors can lead to “rule not found” / config mismatches. [1] [2]

Sources

  1. npm package page for @eslint/js@8.57.1 (version line) — shows the 8.57.1 release and what the package contains. [1]
  2. npm package page for latest @eslint/js (shows 9.35.0 and repo under eslint). [2]
  3. Example dependency graph showing eslint@9.9.1 depending on @eslint/js@9.9.1. [3]

🌐 Web query:

@eslint/js 9.39.3 npm

💡 Result:

@eslint/js@9.39.3 is a published npm package version (ESLint JavaScript language implementation), released on 2026-02-20. [1][2]

Install it:

npm i -D `@eslint/js`@9.39.3

For reference, newer versions exist (e.g. 10.0.1). [2]


Use matching versions for @eslint/js and eslint.

@eslint/js and eslint are versioned in lockstep and must use the same version numbers to avoid rule mismatch and configuration errors. Currently eslint@9.7.0 is paired with @eslint/js@9.39.3, which deviates from this requirement. Update @eslint/js to 9.7.0 to match eslint, or upgrade both together to a newer matching version.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 33 - 36, The package.json lists mismatched ESLint
package versions; update the "@eslint/js" dependency to match the installed
"eslint" version (set "@eslint/js" to "9.7.0") or bump both "eslint" and
"@eslint/js" together to the same new version to avoid rule/config
mismatches—modify the "@eslint/js" entry in package.json so it exactly matches
the "eslint" version used.

"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.5.3"
"uuid": "^11.0.5"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

curl -s https://registry.npmjs.org/uuid | jq '.versions | keys | sort -V | .[-20:]'

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 210


🏁 Script executed:

curl -s https://registry.npmjs.org/uuid | jq '.versions | keys | map(select(startswith("11"))) | .[-10:]'

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 175


🏁 Script executed:

curl -s https://registry.npmjs.org/uuid | jq '.versions | keys | map(select(test("^[0-9]")) and (test("^[89]") or test("^1[01]"))) | .[-15:]'

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 199


🌐 Web query:

uuid npm package v11 breaking changes release notes

💡 Result:

uuid v11.0.0 (released 2024-10-26/27) breaking changes (per upstream changelog/release notes):

  • Ported the project to TypeScript (affects build artifacts/typing expectations). [1]
  • Node.js support matrix changed: supports Node 16–20 only. [1]
  • Internal/state/options refactors for v1() and v7() (behavior may differ if you rely on edge-case option/state behavior). [1]
  • Removed the minified UMD build from the published package. [2]
  • Dropped support for older browsers (e.g., those lacking proper const/let and default-args support) and stopped transpiling the browser build to ES2015. [2]

Sources: [1] [2]


🏁 Script executed:

cat -n packages/server/package.json | head -20

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 884


🏁 Script executed:

fd -name ".nvmrc" -o -name ".node-version"

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 305


🏁 Script executed:

rg '"engines"' packages/server/package.json

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 57


🏁 Script executed:

find . -name ".nvmrc" -o -name ".node-version"

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 118


🏁 Script executed:

curl -s https://registry.npmjs.org/uuid | jq '.versions | keys | map(select(test("^[0-9]+"))) | reverse | .[0:20]'

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 346


Review uuid v11 breaking changes before merging.

uuid v11.0.5 is confirmed to exist, but introduces significant breaking changes from the v9.x series:

  • TypeScript rewrite — expect different type definitions and IDE behavior
  • Node.js 16–20 only — drops support for older versions; verify the project's Node.js requirement (currently unspecified in engines field)
  • Removed minified UMD build — review if build configuration assumes this
  • Dropped ES2015 transpilation — older browser support removed

Ensure compatibility with your target Node.js version and test the upgrade thoroughly before deployment.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/server/package.json` at line 34, The dependency "uuid" was bumped to
v11 which has breaking changes; either pin it back to the v9 series (e.g., set
"uuid" to a 9.x version) until we complete compatibility work, or if you opt
into v11: update the package.json engines field to require Node >=16, run
CI/build/test to validate no UMD/minified assumptions, audit imports/usages of
uuid (e.g., any default import vs named imports or v4()/v5() calls) and
TypeScript types, and adjust code or build config accordingly to accommodate
v11's new typings and transpilation targets before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant