Skip to content

Bump pbf from 4.0.1 to 5.0.0#12383

Closed
dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/npm_and_yarn/pbf-5.0.0
Closed

Bump pbf from 4.0.1 to 5.0.0#12383
dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/npm_and_yarn/pbf-5.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 26, 2026

Copy link
Copy Markdown
Contributor

Bumps pbf from 4.0.1 to 5.0.0.

Release notes

Sourced from pbf's releases.

v5.0.0

Breaking changes

  • The Pbf class is split into separate PbfReader and PbfWriter classes, so bundlers can tree-shake the half you don't use.
  • Removed the legacy readVarint64 method — use readVarint(true) for signed 64-bit reads.

Performance

On the Mapbox vector-tile benchmark (439 tiles, 37.5 MB), v5 is ~25% faster to decode and ~27% faster to encode than v4. Highlights:

  • Generated reader code was rewritten from a callback-based style into inlined while loops with direct field-number dispatch, letting V8 fully inline each reader (biggest decode win).
  • writeVarint / readVarint got single-byte fast paths for the common case (tags, small ints).
  • Buffer growth in makeRoomForExtraLength now uses Uint8Array.copyWithin instead of a manual byte-shift loop (biggest encode win).
  • writeBytes uses typedArray.set instead of a manual copy loop.

Other improvements

  • The schema compiler (compile.js) was significantly simplified — generated code is cleaner and easier to read.
  • Fixed a bug in compiled packed sfixed64 fields.

v4.0.2

  • Add sanitization of field names in pbf/compile to protect against injection via malicious proto schema.
  • Modernize dev dependencies.
Commits
  • b920044 5.0.0
  • eab5420 fix namespace collision in map compile
  • b4853f4 update benchmark numbers
  • 056ad86 simplify compile.js, fix packed sfixed64 compilation
  • eac564b more efficient compiled code for reads (40% faster)
  • ac7490d update benchmarks & bench results
  • d56c87d optimize writeVarint (fast path)
  • b8c8a9f optimize writes via copyWithin (~23% faster)
  • 82ccb60 optimize writeBytes
  • 23a47f2 remove legacy readVarint64
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by mbx-npm-08-production, a new releaser for pbf since your current version.


@dependabot dependabot Bot added the chore-dependabot Automated PRs for keeping dependencies up-to-date label May 26, 2026
@tyrasd

tyrasd commented May 26, 2026

Copy link
Copy Markdown
Member

blocked by mapbox/vector-tile-js#93

@tyrasd tyrasd added the waitfor-upstream Waiting for something in an upstream project label May 26, 2026
@tyrasd

tyrasd commented May 27, 2026

Copy link
Copy Markdown
Member

@dependabot recreate

Bumps [pbf](https://github.com/mapbox/pbf) from 4.0.1 to 5.0.0.
- [Release notes](https://github.com/mapbox/pbf/releases)
- [Commits](mapbox/pbf@v4.0.1...v5.0.0)

---
updated-dependencies:
- dependency-name: pbf
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/npm_and_yarn/pbf-5.0.0 branch from 960e398 to fc083c7 Compare May 27, 2026 12:24
@dependabot @github

dependabot Bot commented on behalf of github May 27, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #12391.

@dependabot dependabot Bot closed this May 27, 2026
@dependabot dependabot Bot deleted the dependabot/npm_and_yarn/pbf-5.0.0 branch May 27, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore-dependabot Automated PRs for keeping dependencies up-to-date waitfor-upstream Waiting for something in an upstream project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant