Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Updates the react-spatial package to require React 19+, modernizes tooling (ESLint 9 flat config, updated Jest config), and migrates repo workflows/docs from Yarn to pnpm.
Changes:
- Bump React peer deps to
^19and refresh related dependency/tooling versions. - Migrate scripts, docs, hooks, lint-staged, and CI from Yarn to pnpm (and add
packageManagerpin). - Adjust code/tests for new lint/runtime expectations (optional chaining, snapshot updates, test refactors).
Reviewed changes
Copilot reviewed 66 out of 71 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adds TS config (noEmit/allowJs) to support updated tooling. |
| styleguide.config.js | Adds watch ignore patterns for faster styleguidist dev workflow. |
| src/utils/KML.js | Uses optional chaining to avoid null/undefined access. |
| src/styleguidist/StyleGuide.js | Refactors effects/refs for updated lint/runtime expectations. |
| src/styleguidist/ComponentsList.js | Removes unnecessary React import (new JSX runtime). |
| src/setupTests.js | Adds TextEncoder/TextDecoder globals for Jest environment. |
| src/components/Zoom/snapshots/Zoom.test.js.snap | Snapshot update for React/tooling changes. |
| src/components/Zoom/Zoom.test.js | Removes unnecessary async/await; lint suppressions added. |
| src/components/Zoom/Zoom.js | Removes eslint disable comment around prop spreading. |
| src/components/StopsFinder/snapshots/StopsFinder.test.js.snap | Snapshot update for React/tooling changes. |
| src/components/StopsFinder/StopsFinderOption.js | Refactors styled helper to satisfy linting. |
| src/components/StopsFinder/StopsFinder.js | Uses optional chaining for param serialization. |
| src/components/ScaleLine/snapshots/ScaleLine.test.js.snap | Snapshot header update. |
| src/components/ScaleLine/ScaleLine.test.js | Reorders imports (jest-canvas-mock). |
| src/components/ScaleLine/ScaleLine.js | Removes eslint disable comment around prop spreading. |
| src/components/RouteSchedule/RouteSchedule.test.js | Reorders imports (jest-date-mock). |
| src/components/RouteSchedule/RouteSchedule.js | Removes eslint disable comments around prop spreading. |
| src/components/ResizeHandler/ResizeHandler.test.js | Removes legacy eslint disables; minor cleanup. |
| src/components/ResizeHandler/ResizeHandler.js | Removes eslint disable comments around findDOMNode (commented code). |
| src/components/README.md | Updates component generator command to pnpm. |
| src/components/Popup/snapshots/Popup.test.js.snap | Snapshot header update. |
| src/components/Popup/Popup.test.js | Adds lint disables; optional chaining in teardown; moves jest-canvas-mock import. |
| src/components/Popup/Popup.js | Optional chaining for pixel array checks; removes eslint disable comment. |
| src/components/Permalink/Permalink.test.js | Reorders imports (jest-canvas-mock). |
| src/components/Permalink/Permalink.js | Removes eslint disable comments around param reassignment. |
| src/components/Overlay/snapshots/Overlay.test.js.snap | Snapshot header update. |
| src/components/NorthArrow/snapshots/NorthArrow.test.js.snap | Snapshot header update; removes one snapshot entry. |
| src/components/NorthArrow/NorthArrow.test.js | Reorders imports; removes one test; removes eslint disable comments. |
| src/components/NorthArrow/NorthArrow.js | Removes eslint disable comment around prop spreading. |
| src/components/MousePosition/snapshots/MousePosition.test.js.snap | Snapshot header update. |
| src/components/MousePosition/MousePosition.test.js | Reorders imports (jest-canvas-mock); removes eslint disable header. |
| src/components/MousePosition/MousePosition.js | Simplifies projection guard with optional chaining; removes eslint disable. |
| src/components/LayerTree/snapshots/LayerTree.test.js.snap | Snapshot header update. |
| src/components/LayerTree/LayerTree.test.js | Reorders imports; removes eslint disable header. |
| src/components/LayerTree/LayerTree.js | Refactors static helpers; uses optional chaining; removes some eslint disables. |
| src/components/Geolocation/snapshots/Geolocation.test.js.snap | Snapshot header update. |
| src/components/Geolocation/Geolocation.test.js | Reorders imports; optional chaining in teardown. |
| src/components/Geolocation/Geolocation.js | Removes eslint disable comment around prop spreading. |
| src/components/FitExtent/snapshots/FitExtent.test.js.snap | Snapshot header update; renames snapshot key. |
| src/components/FitExtent/FitExtent.test.js | Wraps tests in describe block; formatting cleanup. |
| src/components/FitExtent/FitExtent.js | Removes eslint disable comment around prop spreading. |
| src/components/FeatureExportButton/snapshots/FeatureExportButton.test.js.snap | Snapshot header update. |
| src/components/FeatureExportButton/FeatureExportButton.test.js | Reorders imports (jest-canvas-mock). |
| src/components/FeatureExportButton/FeatureExportButton.js | Removes eslint disable comments; keeps behavior. |
| src/components/Copyright/snapshots/Copyright.test.js.snap | Snapshot header update. |
| src/components/Copyright/Copyright.test.js | Reorders imports (jest-canvas-mock). |
| src/components/Copyright/Copyright.js | Refactors ref callback; removes eslint disable comment. |
| src/components/CanvasSaveButton/snapshots/CanvasSaveButton.test.js.snap | Snapshot header update. |
| src/components/CanvasSaveButton/CanvasSaveButton.test.js | Reorders imports; refactors async interactions. |
| src/components/CanvasSaveButton/CanvasSaveButton.js | Optional chaining for extraData; refactors array filtering; removes eslint disables. |
| src/components/BasicMap/BasicMap.test.js | Reorders imports (jest-canvas-mock). |
| src/components/BaseLayerSwitcher/BaseLayerSwitcher.test.js | Removes unnecessary async/await in fireEvent usage. |
| src/components/BaseLayerSwitcher/BaseLayerSwitcher.js | Removes eslint disable header/comments; keeps behavior. |
| scripts/read-pkg-json.js | Updates helper output from yarn commands to pnpm; formatting cleanup. |
| package.json | React 19 peer deps; pnpm migration; dependency/tooling bumps; adds packageManager. |
| jest.config.js | Updates transforms; removes unused moduleNameMapper entry. |
| eslint.config.mjs | Adds ESLint 9 flat config based on @geops/eslint-config-react. |
| doc/README.md | Updates dev command examples to pnpm. |
| README.md | Updates install command example to pnpm. |
| DEVELOP.md | Updates dev/test/coverage command examples to pnpm. |
| .nvmrc | Bumps Node version to 24. |
| .lintstagedrc.js | Runs related tests via pnpm instead of yarn. |
| .husky/post-rebase | Uses pnpm install after rebase. |
| .husky/post-merge | Uses pnpm install after merge. |
| .husky/post-checkout | Uses pnpm install after checkout. |
| .husky/commit-msg | Uses pnpm commitlint. |
| .gitignore | Ignores pnpm-workspace.yaml. |
| .github/workflows/main.yml | Switches CI commands from yarn to pnpm. |
| .eslintrc.js | Removes legacy ESLint config (replaced by flat config). |
Comments suppressed due to low confidence (1)
src/components/CanvasSaveButton/CanvasSaveButton.test.js:135
- This test schedules assertions inside
window.setTimeoutbut does not wait for that callback to run. Jest can finish the test before the expectations execute, leading to false positives or flakiness. Use fake timers withjest.runAllTimers()/advanceTimersByTime, or return/await a Promise (orwaitFor) that resolves after the timeout so the assertions are actually awaited.
window.setTimeout(() => {
expect(saveStart).toHaveBeenCalledTimes(1);
expect(saveEnd).toHaveBeenCalledTimes(1);
expect(link.href).toBe("http://localhost/fooblob");
expect(link.download).toBe(".jpg");
expect(link.click).toHaveBeenCalledTimes(1);
spy3.mockRestore();
});
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
* fix: use mui9 * fix: use mui9 * fix: use mui9
oterral
added a commit
that referenced
this pull request
May 8, 2026
BREAKING CHANGES: react-spatial now supports only react >= 19 and mui >= 9, use version 2.x.x for react 18 support.
oterral
added a commit
that referenced
this pull request
May 8, 2026
BREAKING CHANGE: react-spatial now supports only react >= 19 and mui >= 9, use version 2.x.x for react 18 support.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How to
BREAKING CHANGES: react-spatial now supports only react >= 19 , use version 2.x.x for react 18 support
Others