Skip to content

chore: write BCD version to README in web_generator#537

Open
kevmoo wants to merge 1 commit intomainfrom
compat_data_log
Open

chore: write BCD version to README in web_generator#537
kevmoo wants to merge 1 commit intomainfrom
compat_data_log

Conversation

@kevmoo
Copy link
Copy Markdown
Member

@kevmoo kevmoo commented Apr 19, 2026

Since it affects what we end up generating!

Since it affects what we end up generating!
@kevmoo kevmoo requested a review from srujzs April 19, 2026 23:59
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds tracking for the @mdn/browser-compat-data package version in the README and updates the update_idl_bindings.dart script to automate this process. Review feedback suggests refactoring the version retrieval logic to avoid redundant parsing of the package-lock.json file and improving the log message to accurately reflect that all package versions are being updated.


final sourceContent = readmeFile.readAsStringSync();

final bcdVersion = _packageLockVersion(_browserCompatData);
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.

medium

The _packageLockVersion function reads and parses package-lock.json from disk every time it is called. With the addition of the BCD version, this file is now read and parsed four times in a row. Consider refactoring the logic to read and parse the lockfile once and then retrieve the versions for all required packages to improve efficiency.

print(ansi.styleBold.wrap('No update for readme.'));
} else {
print(ansi.styleBold.wrap('Updating readme for IDL version $idlVersion'));
print(ansi.styleBold.wrap('Updating readme for IDL version $idlVersion and BCD version $bcdVersion'));
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.

medium

The log message specifically highlights the IDL and BCD versions, but the README update covers all four package versions (CSS, Elements, IDL, and BCD). If only the CSS or Elements versions change, this message could be misleading. Consider using a more inclusive message that reflects that all versions are being updated in the README.

Suggested change
print(ansi.styleBold.wrap('Updating readme for IDL version $idlVersion and BCD version $bcdVersion'));
print(ansi.styleBold.wrap('Updating readme with latest package versions'));

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.

1 participant