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

feat: automatically set the biome version in its outputted config file #31

Merged

Conversation

wangziling
Copy link
Contributor

Automatically set the biome version in its outputted config file, let it always use the version-matched json schema.

src/index.ts Outdated
const biomeJson = JSON.parse(
await fs.promises.readFile(jsonFilePath, 'utf-8'),
);
deepFillUpJsonValuePlaceholder(biomeJson, payload);
Copy link
Member

Choose a reason for hiding this comment

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

The deepFillUpJsonFilePlaceholder helper is quite complex. Can we keep it simple by just replace biomeJson['$schema']?

biomeJson['$schema'] = biomeJson['$schema'].replace('{version}', version);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure~~~

@chenjiahan chenjiahan changed the title Enable to automatically set the biome version in its outputted config file. feat: automatically set the biome version in its outputted config file Mar 6, 2025
@chenjiahan chenjiahan merged commit 038e873 into rspack-contrib:main Mar 6, 2025
1 check passed
@chenjiahan
Copy link
Member

Thank you!

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.

2 participants