Skip to content

v3: ESM, linting, remove stale code & deps#353

Open
mourner wants to merge 2 commits into
masterfrom
simplify-deps
Open

v3: ESM, linting, remove stale code & deps#353
mourner wants to merge 2 commits into
masterfrom
simplify-deps

Conversation

@mourner
Copy link
Copy Markdown
Member

@mourner mourner commented May 28, 2026

  • Switched package to ESM ("type": "module")
  • Replaced tape with the built-in node --test runner
  • Removed tinyglobby dependency (no longer needed)
  • Added ESLint linting
  • Bumped CI Node version from 18 to 24 (current LTS); minimum supported Node is now 20
  • Removed leftover Travis CI config
  • Updated maki and mapbox-gl-style-spec to current versions
  • Dropped stale files: CHANGELOG.md (easier to maintain via GH release notes), migrate.sh, unused iconset JSONs, empty bin field

@mourner mourner requested a review from a team as a code owner May 28, 2026 09:10
@ohsk
Copy link
Copy Markdown

ohsk commented May 29, 2026

Hey @mourner, checking with the Map Designers, seems like no one has much context on this repo and how to approach a review here. Any guidance you can provide or are we the best team to go to for a review on this?

@mourner
Copy link
Copy Markdown
Member Author

mourner commented Jun 1, 2026

@ohsk this repo is a collection of older Mapbox GL JS styles which is mostly used as a dev dependency for testing across GL JS related projects. It's been historically owned by the Map Design team since it contains map styles, but since we don't do any changes to the styles here anymore (the current work happens on style-distillery etc.), I guess it'd make sense to have it owned by the GL JS team cc @tristen

@badiuoanaalexandra badiuoanaalexandra self-requested a review June 1, 2026 10:57
@badiuoanaalexandra
Copy link
Copy Markdown
Contributor

badiuoanaalexandra commented Jun 1, 2026

@ohsk I can review this one for now, but I think it makes sense to have this owned by gl-js.

pull_request:
branches: [master]

on: [push, pull_request]
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.

Does this need to run on push as well without a PR created?

Comment thread eslint.config.js
@@ -0,0 +1 @@
export {default} from 'eslint-config-mourner';
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.

We have also company wide eslint that you could also add here @mapbox/eslint-plugin-mapbox (it has some extra things such as flags if there are protential tokens in the code)

Comment thread index.js
var path = require('path');
module.exports.styles = {};
module.exports.sprites = {};
import fs from 'node:fs';
Copy link
Copy Markdown
Contributor

@badiuoanaalexandra badiuoanaalexandra Jun 2, 2026

Choose a reason for hiding this comment

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

We are still using this package in core-styles and it seems that it is not easy to start using dynamic import as these are used in a constructor. Used here https://github.com/mapbox/core-styles/blob/main/lib/sprites-read.js#L20C7-L20C20 and here https://github.com/mapbox/core-styles/blob/main/lib/styles-read.js#L7. Could this support both ESM and CJS?

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