Skip to content

Switch to ESM, modernize, upgrade deps#113

Merged
mourner merged 5 commits into
mainfrom
modernize
May 27, 2026
Merged

Switch to ESM, modernize, upgrade deps#113
mourner merged 5 commits into
mainfrom
modernize

Conversation

@mourner

@mourner mourner commented May 27, 2026

Copy link
Copy Markdown
Member
  • Modernized to ESM: converted the package and all source/scripts/tests to ES modules, upgraded dependencies, and dropped legacy helpers.
  • Fixtures as JSON: replaced all src/*.js fixture modules with plain src/*.json files, loaded at runtime.
  • Test suite migration: ported tests from tape to the built-in node:test runner.
  • Linting: added ESLint with eslint-config-mourner, configured for the codebase's 2-space indent, and fixed the resulting issues.
  • Simpler layout: collapsed lib/generateBuffer.js into index.js, removed the lib/ directory, moved real-world-extents.json next to the scripts that use it, deleted the stale scripts/dump mason/protoc helper, and removed CHANGELOG.md (easier to maintain it as GitHub release notes).
  • CI: refreshed the GitHub Actions workflow, added a lint step, and added a drift check that rebuilds fixtures/ and fails if anything changed — so the committed artifacts can't go stale silently.
  • Package scripts: added lint and a prepublishOnly hook that runs lint + build + tests before publish.
  • Docs/API: regenerated info.json files and synced README/API to match.

Note on -2 byte fixture changes

After the pbf dependency upgrade, regenerated tiles are 2 bytes smaller per feature. The previous version emitted an empty packed tags field (12 00) for features with no tags; the new version correctly omits the empty field, as expected for proto2 packed repeated fields. Decoded tile content is unchanged — only the redundant empty-field bytes are gone.

Comment thread test/docs.test.js Fixed
branyip
branyip previously approved these changes May 27, 2026

@branyip branyip left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for the changes!

@mourner
mourner merged commit e84c337 into main May 27, 2026
5 checks passed
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.

3 participants