Skip to content

chore: upgrade mapbox versions for accessibility issues#145

Merged
asanehisa merged 4 commits intomainfrom
upgrade-mapbox
Mar 19, 2026
Merged

chore: upgrade mapbox versions for accessibility issues#145
asanehisa merged 4 commits intomainfrom
upgrade-mapbox

Conversation

@anguyen-yext2
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

⚠️ No Changeset found

Latest commit: 4dc39d6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

. prepare$ pnpm build
. prepare: > @yext/pages-components@2.0.2 build /Users/anguyen/js/packages/pages-components
. prepare: > tsup && pnpm build:css
. prepare: CLI Building entry: src/index.ts
. prepare: CLI Using tsconfig: tsconfig.json
. prepare: CLI tsup v8.3.6
. prepare: CLI Using tsup config: /Users/anguyen/js/packages/pages-components/tsup.config.ts
. prepare: CLI Target: esnext
. prepare: CLI Cleaning output folder
. prepare: ESM Build start
. prepare: ESM dist/index.css             2.33 KB
. prepare: ESM dist/debugger-GQLPSISB.css 2.03 KB
. prepare: ESM dist/debugger-3ZMPVPKH.js  6.14 KB
. prepare: ESM dist/index.js              73.11 KB
. prepare: ESM dist/chunk-FFY3Y364.js     773.00 B
. prepare: ESM ⚡️ Build success in 142ms
. prepare: DTS Build start
. prepare: DTS ⚡️ Build success in 1640ms
. prepare: DTS dist/index.d.ts 67.17 KB
. prepare: > @yext/pages-components@2.0.2 build:css /Users/anguyen/js/packages/pages-components
. prepare: > lightningcss --minify --bundle --targets ">= 0.25%" src/index.css -o dist/index.css
. prepare: Done
Done in 4.4s
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 63e5650f-520a-4767-9889-cfeb1692c3ec

📥 Commits

Reviewing files that changed from the base of the PR and between 249b45a and 4dc39d6.

📒 Files selected for processing (1)
  • packages/pages-components/src/map/providers/mapbox.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/pages-components/src/map/providers/mapbox.ts

Walkthrough

The pull request upgrades the Mapbox GL peer dependency in the pages-components package from ^2.9.2 to ^3.20.0 and removes the devDependency @types/mapbox-gl. The Mapbox provider implementation is changed to stop mutating the global Mapbox instance's accessToken and instead supply the API key via the accessToken option when constructing the Map.

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, so the check cannot assess whether the description relates to the changeset. Add a pull request description explaining the motivation for upgrading Mapbox versions and the accessibility issues being addressed.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: upgrading Mapbox versions to address accessibility issues, which aligns with the dependency version bump and API key handling refactor.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch upgrade-mapbox
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@anguyen-yext2 anguyen-yext2 requested a review from a team March 18, 2026 22:07
Copy link

@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.

Caution

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

⚠️ Outside diff range comments (1)
packages/pages-components/src/map/providers/mapbox.ts (1)

147-148: ⚠️ Potential issue | 🔴 Critical

Update default CDN version to align with peer dependency, but note that peer dependency version doesn't exist.

The load function defaults to v1.13.0, but the peer dependency requires ^3.20.0. This creates an incompatibility—consumers using the default CDN load will get a v1.x version that doesn't support the current API expectations.

However, there's a critical issue: v3.20.0 does not exist. The latest available stable version of Mapbox GL JS v3 is v3.19.0-beta.2 (as of February 2026). The peer dependency constraint ^3.20.0 cannot be satisfied by any released version.

Recommended actions:

  1. Update the default to v3.19.0 (latest available):
Proposed fix
-function load(resolve: () => void, _: () => void, _apiKey: string, { version = "v1.13.0" } = {}) {
+function load(resolve: () => void, _: () => void, _apiKey: string, { version = "v3.19.0" } = {}) {
  1. Review the peer dependency ^3.20.0 in package.json—it may be incorrectly specified or intended as a future constraint. Consider aligning it with an existing release (e.g., ^3.19.0-beta).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/pages-components/src/map/providers/mapbox.ts` around lines 147 -
148, The default CDN version in the load function is set to "v1.13.0" which
conflicts with the package peer dependency "^3.20.0" (a version that doesn't
exist); update the default in the load(resolve, _, _apiKey, { version =
"v1.13.0" } = {}) function to "v3.19.0" (the latest available stable v3) and
also update or correct the peer dependency entry in package.json (currently
"^3.20.0") to a real released range such as "^3.19.0" or a beta range like
"^3.19.0-beta" so both the runtime default and peer dependency align.
🧹 Nitpick comments (1)
packages/pages-components/package.json (1)

96-96: Major version bump requires consumer attention.

Upgrading mapbox-gl from ^2.9.2 to ^3.20.0 is a major version change that will require consumers to update their Mapbox GL dependency. The removal of @types/mapbox-gl from devDependencies is correct since Mapbox GL v3 ships with built-in TypeScript definitions.

Consider documenting this breaking change in release notes or a migration guide for consumers.

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

In `@packages/pages-components/package.json` at line 96, You bumped the mapbox-gl
dependency to "^3.20.0" and removed `@types/mapbox-gl`, which is a breaking
major-version change for consumers; update the project release notes/CHANGELOG
and README to clearly document the breaking change and migration steps (mention
that Mapbox GL v3 includes built-in TypeScript types and consumers must upgrade
their mapbox-gl peer dependency), add a short migration guide listing any API
changes to watch for when moving from 2.x → 3.x, and include a NOTE near the
"mapbox-gl": "^3.20.0" entry so maintainers and consumers see the required
action.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/pages-components/src/map/providers/mapbox.ts`:
- Around line 147-148: The default CDN version in the load function is set to
"v1.13.0" which conflicts with the package peer dependency "^3.20.0" (a version
that doesn't exist); update the default in the load(resolve, _, _apiKey, {
version = "v1.13.0" } = {}) function to "v3.19.0" (the latest available stable
v3) and also update or correct the peer dependency entry in package.json
(currently "^3.20.0") to a real released range such as "^3.19.0" or a beta range
like "^3.19.0-beta" so both the runtime default and peer dependency align.

---

Nitpick comments:
In `@packages/pages-components/package.json`:
- Line 96: You bumped the mapbox-gl dependency to "^3.20.0" and removed
`@types/mapbox-gl`, which is a breaking major-version change for consumers; update
the project release notes/CHANGELOG and README to clearly document the breaking
change and migration steps (mention that Mapbox GL v3 includes built-in
TypeScript types and consumers must upgrade their mapbox-gl peer dependency),
add a short migration guide listing any API changes to watch for when moving
from 2.x → 3.x, and include a NOTE near the "mapbox-gl": "^3.20.0" entry so
maintainers and consumers see the required action.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c7af1670-08c1-405a-a43c-6e1e956e7c87

📥 Commits

Reviewing files that changed from the base of the PR and between f717519 and 249b45a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • packages/pages-components/package.json
  • packages/pages-components/src/map/providers/mapbox.ts

@benlife5
Copy link
Contributor

Tests are failing bc we need to update a secret, we'll have it fixed soon

@benlife5
Copy link
Contributor

Checks passing now

@asanehisa asanehisa merged commit 3f0c63c into main Mar 19, 2026
22 checks passed
@asanehisa asanehisa deleted the upgrade-mapbox branch March 19, 2026 15:53
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.

4 participants