Skip to content

Upgrade React to 16.14.0, TypeScript to 4.9.5, and refresh browserslist#304

Merged
abettermap merged 1 commit intoLanguage-Mapping:masterfrom
ankit0504:agupta/upgrade-phase-1-safe-bumps
Apr 25, 2026
Merged

Upgrade React to 16.14.0, TypeScript to 4.9.5, and refresh browserslist#304
abettermap merged 1 commit intoLanguage-Mapping:masterfrom
ankit0504:agupta/upgrade-phase-1-safe-bumps

Conversation

@ankit0504
Copy link
Copy Markdown
Collaborator

@ankit0504 ankit0504 commented Apr 20, 2026

Issues resolved by this pull request

None — this is phase 1 of a broader staged upgrade effort, not tied to a specific issue. Eventual goal is to add a component that allows you to see the map in different years.

Prerequisites

  • Reviewer should run yarn install after checking out the branch, since
    yarn.lock changed.
  • On Node 17+ (Netlify currently uses Node 20), yarn start continues to
    require NODE_OPTIONS=--openssl-legacy-provider until CRA is replaced.
    This PR does not change that; it will be addressed in a later phase.

Review type

  • FYI: dependency bumps only; no UI or behavior changes intended.
  • Content/copy
  • Needs feedback
  • Functionality
  • Code

What to review

  • package.json / yarn.lock: React 16.13.116.14.0, TypeScript
    3.9.54.9.5, and an updated caniuse-lite (via
    npx update-browserslist-db@latest, no package.json entry).
  • src/utils.ts and src/components/map/utils.ts: removed the
    navigator.msMaxTouchPoints fallback in isTouchEnabled. This property
    was removed from lib.dom.d.ts in TypeScript 4+ and only applied to
    IE11, which has been EOL'd since 2022 and is already excluded by the
    project's browserslist config.
  • No new DevTools console errors introduced by these changes.
  • No visual/style changes.

Verification

  • npx tsc --noEmit — passes clean.
  • yarn build — production build succeeds.
  • yarn start — dev server compiles successfully on Node 22 with the
    legacy-openssl flag.

What's next (out of scope for this PR)

Subsequent phases I'd like to propose in follow-up PRs:

  • Phase 2: migrate off CRA (Vite or CRA 5) — drops the OpenSSL flag.
  • Phase 3: React 16 → 17 → 18 (createRoot, strict mode).
  • Phase 4: Material-UI v4 → MUI v5 + replace material-table and
    react-swipeable-views (both abandoned).
  • Phase 5: React Router 5 → 6, react-query v2 → TanStack Query v5,
    react-map-gl 5 → 7, replace react-map-gl-geocoder.

Remove the dead IE-only msMaxTouchPoints check in isTouchEnabled
(removed from lib.dom.d.ts in TS 4+; IE11 was EOL'd in 2022 and is
already excluded by the project browserslist).
Copy link
Copy Markdown
Contributor

@abettermap abettermap left a comment

Choose a reason for hiding this comment

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

Hi @ankit0504, thanks for your interest in contributing! Full disclosure I have a full time job and not a lot of time to review/test PRs. So, for these initial dependency/upgrade housekeeping PRs, I will review code but trust that you are testing the output and builds!

As far as the upgrades go, my vote would be to go as far as you can (not in one PR of course, but gradually and piecemeal). I wrote this code nearly 5 years ago and am aware it is massively outdated, so if you can get us all the way to React 19, and newest versions of the big stuff (tanstack query, react router, material UI, mapbox, Airtable, etc.), that would be huge.

In terms of actual feature additions, like the time series, I would prefer if the ELA guys (Ross and Dan) test that before we merge. Once we get your other housekeeping PRs in, we should once again have interim/temporary Netlify deployments for them to test. When they say it's cool, we'll merge!

Let me know what you think of that and I'm happy to merge this first one.

@ankit0504
Copy link
Copy Markdown
Collaborator Author

Hi @ankit0504, thanks for your interest in contributing! Full disclosure I have a full time job and not a lot of time to review/test PRs. So, for these initial dependency/upgrade housekeeping PRs, I will review code but trust that you are testing the output and builds!

As far as the upgrades go, my vote would be to go as far as you can (not in one PR of course, but gradually and piecemeal). I wrote this code nearly 5 years ago and am aware it is massively outdated, so if you can get us all the way to React 19, and newest versions of the big stuff (tanstack query, react router, material UI, mapbox, Airtable, etc.), that would be huge.

In terms of actual feature additions, like the time series, I would prefer if the ELA guys (Ross and Dan) test that before we merge. Once we get your other housekeeping PRs in, we should once again have interim/temporary Netlify deployments for them to test. When they say it's cool, we'll merge!

Let me know what you think of that and I'm happy to merge this first one.

Hello @abettermap! Thanks for your response :) We are totally aligned on this. I also have a full daytime job and won't be spending a ton of time on this either hahah

I'm in contact with Ross about major features like the time slider. My idea was to build some prototypes and send him screen recordings and only submit PRs when I have his green light. For these initial ones since the product isn't changing I haven't really looped him in.

I have a stack already and I'll build off that to keep PR's small and manageable for review. I'm running everything locally and testing it as I submit PR's. I stopped for now where I couldn't test without access to the Airflow data. Ross just shared that with me so I should be good to go from here! I'm looking forward to working on this!

@abettermap
Copy link
Copy Markdown
Contributor

@ankit0504

I'm in contact with Ross about major features like the time slider. My idea was to build some prototypes and send him screen recordings and only submit PRs when I have his green light. For these initial ones since the product isn't changing I haven't really looped him in.

Sounds good. I also gave you a write role so feel free to clone and push non-master branches directly in this repo now. I have created a common ruleset for master to prevent merging without code reviews, but if it gets too restrictive then let's chat!

As for this branch, I'm going to merge it along with the others if they're working for me. Really looking forward to Vite, CRA is soooo slow!

@abettermap abettermap merged commit 41be216 into Language-Mapping:master Apr 25, 2026
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.

2 participants