fix(internal/librarian/nodejs): stop renaming snippet metadata files#4840
Conversation
The copySamplesFromStaging function was renaming snippet metadata files from the generator's underscore pattern (snippet_metadata_<api>.json) to a dot pattern (snippet_metadata.<api>.json). This caused repos to end up with both naming variants, since the old dot-pattern files were never cleaned up. Use the generator's underscore pattern as the canonical name.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4840 +/- ##
==========================================
- Coverage 81.40% 81.39% -0.01%
==========================================
Files 130 130
Lines 10895 10891 -4
==========================================
- Hits 8869 8865 -4
Misses 1387 1387
Partials 639 639 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request updates the naming convention for snippet_metadata files in the Node.js generator. The logic that previously renamed snippet_metadata_<api>.json to snippet_metadata.<api>.json has been removed from internal/librarian/nodejs/generate.go. Correspondingly, tests in internal/librarian/nodejs/generate_test.go have been adjusted to expect the snippet_metadata_<api>.json format directly, and the test verifying the absence of the old underscore-prefixed names has been removed. There are no review comments to provide feedback on.
The copySamplesFromStaging function was renaming snippet metadata files from the generator's underscore pattern (snippet_metadata_.json) to a dot pattern (snippet_metadata..json). This caused repos to end up with both naming variants, since the old dot-pattern files were never cleaned up.
Use the generator's underscore pattern as the canonical name.