fix: Add Docker tag validation and remove unused dependency#272
fix: Add Docker tag validation and remove unused dependency#272jaypatrick merged 1 commit intomainfrom
Conversation
- Add version format validation in release workflow to prevent malformed tags - Remove @electric-sql/pglite dependency from package.json Co-Authored-By: Warp <agent@warp.dev>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
adblock-compiler | 003c5d3 | Feb 09 2026, 01:35 AM |
There was a problem hiding this comment.
Pull request overview
This PR tightens the release pipeline by adding a version-format guard before tagging/pushing Docker images, and it removes an unused npm dependency to reduce the dependency footprint.
Changes:
- Add release-workflow validation to reject malformed version strings before using them as Docker tags.
- Remove
@electric-sql/pglitefrompackage.jsonand clean it out ofpackage-lock.json.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
package.json |
Removes the unused @electric-sql/pglite dependency. |
package-lock.json |
Updates lockfile metadata and removes the @electric-sql/pglite package entry. |
.github/workflows/release.yml |
Adds version parsing + validation before computing Docker image tags. |
| # Validate version format (must not start with . and must be semver-like) | ||
| if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then | ||
| echo "Error: Invalid version format '$VERSION'. Must start with a number (e.g., 0.11.6 or 0.11.6-beta.1)" >&2 |
There was a problem hiding this comment.
The new version regex is only a prefix check, so values like 0.11.6/invalid or 0.11.6+build would pass validation but still produce an invalid Docker tag (and can break the release). Consider validating the entire string against Docker tag constraints (and, if desired, full semver), e.g., enforce only [A-Za-z0-9_.-], disallow +, and ensure the whole value matches (use ^...$).
| # Validate version format (must not start with . and must be semver-like) | |
| if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then | |
| echo "Error: Invalid version format '$VERSION'. Must start with a number (e.g., 0.11.6 or 0.11.6-beta.1)" >&2 | |
| # Validate version format: | |
| # - must be semver-like MAJOR.MINOR.PATCH | |
| # - may have an optional pre-release suffix (e.g., -beta.1) | |
| # - must be a valid Docker tag: only [A-Za-z0-9_.-], no '+' or '/' | |
| if [[ ! "$VERSION" =~ ^[0-9]+(\.[0-9]+){2}(-[A-Za-z0-9_.-]+)?$ ]]; then | |
| echo "Error: Invalid version format '$VERSION'. Must be like 0.11.6 or 0.11.6-beta.1 and contain only [A-Za-z0-9_.-]." >&2 |
Co-Authored-By: Warp agent@warp.dev