Skip to content

Commit d49da28

Browse files
chore(deps): bump pbf from 4.0.2 to 5.1.2 (#1484)
* chore(deps): bump pbf from 4.0.2 to 5.1.2 Bumps [pbf](https://github.com/mapbox/pbf) from 4.0.2 to 5.1.2. - [Release notes](https://github.com/mapbox/pbf/releases) - [Commits](mapbox/pbf@v4.0.2...v5.1.2) --- updated-dependencies: - dependency-name: pbf dependency-version: 5.1.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix(deps): adopt pbf 5 API — named PbfReader import + vector-tile 3 pbf 5 is ESM-only and replaced its default export with named `PbfReader`/`PbfWriter` classes, so `import Pbf from "pbf"` no longer type-checks (TS1192), failing every build-dependent CI job. @mapbox/vector-tile 2.x still declares `pbf@^4`, which kept a duplicate pbf 4 nested under it and typed `VectorTile` against the old default export. Bumping to @mapbox/vector-tile 3.0.0 — the first release built against pbf 5 — drops the duplicate and types the constructor as `PbfReader`. Verified by decoding a real Overture PMTiles tile (base theme, z8/x134/y86) through the changed path: 15,815 features across 5 layers decoded and converted to GeoJSON. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Qiusheng Wu <giswqs@gmail.com>
1 parent f0243f2 commit d49da28

3 files changed

Lines changed: 22 additions & 10 deletions

File tree

package-lock.json

Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/plugins/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@geolibre/core": "*",
2626
"@geoman-io/maplibre-geoman-free": "^0.8.4",
2727
"@loaders.gl/i3s": "^4.4.3",
28-
"@mapbox/vector-tile": "^2.0.5",
28+
"@mapbox/vector-tile": "^3.0.0",
2929
"@maplibre/maplibre-gl-directions": "^0.9.1",
3030
"@tauri-apps/api": "^2.11.1",
3131
"@tauri-apps/plugin-opener": "^2.5.4",
@@ -60,7 +60,7 @@
6060
"maplibre-gl-usgs-lidar": "^0.11.1",
6161
"maplibre-gl-vector": "^0.10.1",
6262
"netcdfjs": "^4.0.0",
63-
"pbf": "^4.0.2",
63+
"pbf": "^5.1.2",
6464
"pmtiles": "^4.4.1",
6565
"proj4": "^2.21.0",
6666
"shpjs": "^6.2.0",

packages/plugins/src/plugins/overture-query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
fetchReleases,
66
type OvertureTheme,
77
} from "maplibre-gl-overture-maps";
8-
import Pbf from "pbf";
8+
import { PbfReader } from "pbf";
99
import { PMTiles } from "pmtiles";
1010
import type { GeoLibreOvertureQuery, GeoLibreOvertureQueryResult } from "../types";
1111

@@ -419,7 +419,7 @@ export async function queryOvertureFeatures(
419419
tilesRead += 1;
420420
if (!response) continue;
421421
if (truncated) return;
422-
const vectorTile = new VectorTile(new Pbf(response.data));
422+
const vectorTile = new VectorTile(new PbfReader(response.data));
423423
const source = vectorTile.layers[query.sourceLayer];
424424
if (!source) continue;
425425
for (let index = 0; index < source.length; index += 1) {

0 commit comments

Comments
 (0)