Skip to content

feat(scripts): add split script#26491

Merged
caugner merged 3 commits intomainfrom
split-script
May 23, 2025
Merged

feat(scripts): add split script#26491
caugner merged 3 commits intomainfrom
split-script

Conversation

@caugner
Copy link
Contributor

@caugner caugner commented Apr 11, 2025

Summary

Adds a split script that makes it easy to split up BCD JSON files.

Test results and supporting details

Example:

% npm run split -- webdriver/bidi.json

> @mdn/browser-compat-data@6.0.16 split
> tsx scripts/split.ts webdriver/bidi.json

✔ Created: webdriver/bidi/browser.json
✔ Created: webdriver/bidi/browsingContext.json
✔ Created: webdriver/bidi/emulation.json
✔ Created: webdriver/bidi/input.json
✔ Created: webdriver/bidi/log.json
✔ Created: webdriver/bidi/network.json
✔ Created: webdriver/bidi/permission.json
✔ Created: webdriver/bidi/script.json
✔ Created: webdriver/bidi/session.json
✔ Created: webdriver/bidi/storage.json
✔ Created: webdriver/bidi/webExtension.json
✔ Deleted: webdriver/bidi.json

Related issues

@github-actions github-actions bot added infra Infrastructure issues (npm, GitHub Actions, releases) of this project scripts Issues or pull requests regarding the scripts in scripts/. size:l [PR only] 101-1000 LoC changed labels Apr 11, 2025
@caugner caugner mentioned this pull request Apr 11, 2025
@caugner caugner marked this pull request as ready for review April 15, 2025 14:13
@caugner caugner requested a review from queengooborg April 15, 2025 14:13
@caugner
Copy link
Contributor Author

caugner commented May 9, 2025

FYI @queengooborg I would also use this script in the WebDriver BiDi workflow in order to have one file per BiDi module, rather than everything in a single file.

@caugner caugner requested a review from Elchi3 May 13, 2025 16:37
@github-actions
Copy link
Contributor

github-actions bot commented May 23, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

Copy link
Contributor Author

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Self-approval, as this has been open for over 1 month, and I will be using it for the WebDriver BiDi data.

@caugner caugner merged commit ea49f49 into main May 23, 2025
11 checks passed
@caugner caugner deleted the split-script branch May 23, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra Infrastructure issues (npm, GitHub Actions, releases) of this project scripts Issues or pull requests regarding the scripts in scripts/. size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant