Files
oxc-project__oxc/.github/scripts/publish-if-needed.sh
Boshen 4da5da8eed fix(ci): skip already-published npm packages instead of erroring (#20173)
## Summary

- CI publish workflow fails when re-run after a partial publish because
npm rejects republishing an existing version
- Add version-published checks to `check-npm-packages.js` so
already-published packages are skipped in the dry-run step
- Extract a shared `publish-if-needed.sh` script that checks the npm
registry before publishing, used by all three trusted publish steps
- Consolidate the old `checkPackageExists` and new version check into a
single `npmViewVersion` helper to avoid redundant npm registry calls

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:20:59 +08:00

960 B
Executable File