Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add undist script #2474

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add undist script #2474

wants to merge 1 commit into from

Conversation

jamesnw
Copy link
Collaborator

@jamesnw jamesnw commented Dec 19, 2024

As we migrate more keys to BCD, adding or changing keys will be more challenging. We essentially will need to "undist" the .dist file, and move the keys without comments over to the .yml file.

Some examples-

# Move compat_features keys to webgpu.yml
npm run undist features/webgpu.yml.dist

# It works for paths ending in ".yml", ".yml.dist" or without either
npm run undist features/lh

# It sorts the keys by default, but this can be disabled
npm run undist features/is -- --no-s

# You can add keys, either as multiple options or comma separated
npm run undist features/modal -- -a new.key -a another.new.key -a multiple,keys

# I'll probably run dist immediately after
npm run undist features/inert -- -a new.key; npm run dist

I'm wondering if the positional argument should be a feature id rather than a path, as this is only useful for features, and not drafts.

I opted to make this work on a single file rather than multiple to enable the add functionality, as that use case seems the most common.

@github-actions github-actions bot added the tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant