Add multi-version publishing script with dist-tags #115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multi-Version Publishing Script with Dist-Tags
This PR implements a comprehensive publishing script that solves the workspace naming conflict issue outlined in the TODO.md. The script allows publishing all version-specific packages under the unified "libpg-query" name using dist-tags.
🎯 Problem Solved
The repository has multiple packages:
@libpg-query/v13(version 13.0.0)@libpg-query/v14(version 14.0.0)@libpg-query/v15(version 15.0.0)@libpg-query/v16(version 16.0.0)@libpg-query/v17(version 17.0.0)These need unique names in the workspace but should all be published as
libpg-querywith different dist-tags for easy installation.🚀 Solution
Created
scripts/publish-versions.jsthat:pg13,pg14,pg15,pg16,pg17📋 Features
Core Functionality
analyze-sizes.jspnpm buildbefore publishing each packagepnpm publish --tag pgXXfor each versionSafety & Testing
CLI Interface
🧪 Testing Results
Dry-run testing shows the script correctly identifies and processes all packages:
📦 Installation After Publishing
Once published, users can install specific PostgreSQL versions:
🔧 Changes Made
scripts/publish-versions.js- Main publishing script with full functionalitypackage.json- Added convenient npm scripts:publish:dry-run- Test publishing workflowpublish:versions- Publish all versionspublish:specific- Publish specific versionsTODO.md- Marked "publish setup with name proxy" as completed🏗️ Implementation Details
The script follows the exact approach outlined in the TODO.md:
package.jsonduring publishingpnpm publish --tag <dist-tag>for each versionThe implementation reuses proven patterns from the existing
analyze-sizes.jsscript for package discovery and follows the same code style and structure.✅ Verification
Link to Devin run: https://app.devin.ai/sessions/01f8ae7005974e279e7da7345d75ec7f
Requested by: Dan Lynch ([email protected])