facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.25k stars 626 forks source link

[0.76] Fix publish script to avoid dist-tag colliding with semver #1201

Closed robhogan closed 10 months ago

robhogan commented 10 months ago

Summary

Previously hotfix releases on old stable branches used to automatically publish with latest, which overwrote the tag for the actual latest release.

https://github.com/facebook/metro/pull/1086 attempted to fix that, and mostly works, but npm does not allow dist tags that pass semver.isValid(), because that would conflict with semver specifiers in package@[tagorsemver]. Our stable branch naming convention 0.76.x happens to be valid semver, and is rejected as a tag name.

This uses 0.76-stable instead via shell substitution. I've just used it to semi-manually successfully publish 0.76.9.

Test plan