chore: upgrade mapbox versions for accessibility issues#145
chore: upgrade mapbox versions for accessibility issues#145anguyen-yext2 wants to merge 3 commits intomainfrom
Conversation
|
. 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
WalkthroughThe pull request upgrades the Mapbox GL library peer dependency from version ^2.9.2 to ^3.20.0 in the pages-components package. The development-only type definitions package ( 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
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 | 🔴 CriticalUpdate default CDN version to align with peer dependency, but note that peer dependency version doesn't exist.
The
loadfunction defaults tov1.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.0cannot be satisfied by any released version.Recommended actions:
- 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" } = {}) {
- Review the peer dependency
^3.20.0inpackage.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-glfrom^2.9.2to^3.20.0is a major version change that will require consumers to update their Mapbox GL dependency. The removal of@types/mapbox-glfrom 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/pages-components/package.jsonpackages/pages-components/src/map/providers/mapbox.ts
No description provided.