Skip to content

feat: add getTimeline() and refactor data compression - #137

Merged
tonypconway merged 21 commits into
mainfrom
package-timeline
Jul 21, 2026
Merged

tonypconway merged 21 commits into
mainfrom
package-timeline

Conversation

@tonypconway

@tonypconway tonypconway commented Jun 22, 2026 •

Copy link
Copy Markdown
Collaborator

This PR does three things:

  • feat: Adds a new getTimeline() method for getting the series of minimum browser changes, either grouped by date or by browser.
  • refactor: Substantial refactoring of the data compression process that replaces the full list of browsers from @mdn/browser-compat-data and downstream-browsers.json and features from web-features (in their very pared down form) with a change-list timeline that reflects which versions supported Baseline (newly available) on a given date. Thanks to @swwind for the idea!
  • refactor: Some common functions have been moved to a util.ts module for use in other scripts.
  • fix: Removes process.exit() calls when unsupported option combinations are passed to getCompatibleVersions() and getAllVersions() in favour of throwing an Error. There is a small security risk with process.exit() calls that sites accepting unsanitised inputs could be the subject of attacks. Unsupported config options now throw and Error which should allow for more graceful handling. Thanks to @bnbdr for flagging this as vulnerability CVE-2026-45819 .

Fixes #134

@swwind swwind 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.

Besides, why do I have the permission to click the "Approve" button for this PR? It doesn't look like I have the write permission to this repo or something else.

@tonypconway
tonypconway force-pushed the package-timeline branch 2 times, most recently from f2e5a2b to dc665f4 Compare July 13, 2026 09:23
@tonypconway

Copy link
Copy Markdown
Collaborator Author

I think because my initial branch was base on yours, GitHub automatically made you a read-only approver.

I'm pretty comfortable with where this has landed.

FYI @ai , I have made some architectural changes to this module to support your friends working on browserslist-rs and improve performance. I've tested against browserlist and this is reliably giving the same output as before, so I'm going to push live on Wednesday if I don't hear any objections. Cheers!

@swwind

swwind commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

I think because my initial branch was base on yours, GitHub automatically made you a read-only approver.

In fact, I've found that anyone can submit an white "approve" decision for any pull request in any project. Perhaps this is a feature of GitHub. I hope I haven't messed up this PR.

@tonypconway

Copy link
Copy Markdown
Collaborator Author

Ah right, just good vibes then, haha. You can set rules around PRs needing approvals before the can be merged, but that's not needed her, just needs to pass the test matrix. Then one of the web-platform-dx owners or I can merge it (I'll squash the commits before merging for cleanliness).

@swwind

swwind commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@tonypconway Just a gentle ping here, is there any remaining issues before this can be merged? Happy to help if needed.

swwind and others added 21 commits July 21, 2026 14:02
// TODO: rewrite commands for building timeline
// TODO: look at a better way to determine "widely available on date" correctness
// TODO: backfill older browser versions in timeline for getAllVersions
…ove Object.entries/values to preserver Node 6 compat
NB: #c4e7a20fccf883801ccc922d4ee19e56c43dbffb fixed a bug that misattributed engine versions, meaning KaiOS 3.x had the wrong Baseline year, reflected in changes here.
@tonypconway

Copy link
Copy Markdown
Collaborator Author

So sorry, have had some family commitments and sickness blocking me for the last few days. Merging and publishing as v2.11.0 now. For some reasons one of the CLI tests timed out on certain Node versions, but it seems to be environmental rather than a problem with the package, as a re-run of the tests was successful: https://github.com/web-platform-dx/baseline-browser-mapping/actions/runs/29837636545

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.

Proposal: Expose raw features dataset in the published npm package

2 participants