Skip to content

merge dev to main (v3.0.0-alpha.6) #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 29, 2025
Merged

merge dev to main (v3.0.0-alpha.6) #53

merged 8 commits into from
Jun 29, 2025

Conversation

ymc9
Copy link
Member

@ymc9 ymc9 commented Jun 28, 2025

Summary by CodeRabbit

  • New Features
    • Introduced an automated workflow for publishing and releasing packages, including changelog generation and draft GitHub releases.
  • Chores
    • Updated version numbers across all packages to the latest alpha release.
    • Improved version bumping automation to better handle workspace packages and ensure consistent versioning.
    • Enhanced workflow automation to restrict version bumping to the development branch and dynamically update release information.

@Copilot Copilot AI review requested due to automatic review settings June 28, 2025 08:07
Copy link

coderabbitai bot commented Jun 28, 2025

Walkthrough

This update introduces a new GitHub Actions workflow for publishing and releasing packages, restricts the version bump workflow to the 'dev' branch, and improves version bumping automation by preserving file formatting and outputting the new version for downstream use. Multiple package.json files across the repository are updated to version 3.0.0-alpha.6 (and 3.0.3 for the VSCode extension).

Changes

File(s) Change Summary
.github/workflows/bump-version.yml Restricts bump-version job to 'dev' branch, adds step ID for output, and uses dynamic version in PR messages.
.github/workflows/publish-release.yml Adds new workflow for publishing, changelog generation, and GitHub release creation.
scripts/bump-version.ts Excludes node_modules from package search, preserves formatting, outputs new version for CI, improves logic.
package.json
packages/*/package.json
samples/blog/package.json
Updates version field from 3.0.0-alpha.5 to 3.0.0-alpha.6 (or 3.0.2 to 3.0.3 for VSCode extension).

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant GitHub as GitHub Actions
    participant NPM as NPM Registry

    Dev->>GitHub: Push to main or manual dispatch (publish-release)
    GitHub->>GitHub: Checkout code, setup pnpm & Node.js
    GitHub->>GitHub: Install dependencies & build project
    GitHub->>GitHub: Extract version from package.json
    GitHub->>NPM: Publish packages with pnpm
    GitHub->>GitHub: Generate changelog from git history
    GitHub->>GitHub: Create draft prerelease with changelog
Loading

Possibly related PRs

Poem

From alpha five to alpha six we hop,
With workflows set to never stop.
Publishing, bumping, tags anew—
The rabbit keeps the versions true!
Changelogs written, releases in flight,
All by moon and monitor light.
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d28a93 and 5c39145.

📒 Files selected for processing (1)
  • .github/workflows/publish-release.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish-release.yml
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build-test (20.x)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Prepare for the v3.0.0-alpha.6 release by enhancing the bump script, updating package versions, and adding CI workflows for bumping and publishing.

  • Enhance scripts/bump-version.ts to filter out node_modules, include the root package, emit the new version for GitHub Actions, and switch to string-based version replacement.
  • Bump all sample and workspace package.json files from 3.0.0-alpha.5 to 3.0.0-alpha.6 (and the VSCode extension from 3.0.2 to 3.0.3).
  • Add two GitHub workflows: one to bump versions on dev (.github/workflows/bump-version.yml) and one to publish prereleases on main (.github/workflows/publish-release.yml).

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

File Description
scripts/bump-version.ts Filter out node_modules, include root, emit new_version for CI, and update via string replace
samples/blog/package.json (and all workspace package.json) Bump version to 3.0.0-alpha.6 (VSCode extension bumped to 3.0.3)
.github/workflows/bump-version.yml Run only on dev branch and embed the new version in commit message and PR title
.github/workflows/publish-release.yml Define a workflow to build, publish packages, and create a prerelease draft on main
Comments suppressed due to low confidence (1)

.github/workflows/publish-release.yml:6

  • Triggering releases on any push to main may fire unexpectedly. Consider restricting to tag creation (e.g., on: push: tags: ['v*']) or using the release event to avoid unintended prereleases.
        branches:

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
.github/workflows/publish-release.yml (1)

49-67: Add error handling for changelog generation.

The changelog generation logic could benefit from better error handling and formatting.

Improve the changelog generation with better error handling:

             - name: Generate changelog
               id: changelog
               run: |
+                  set -e
                   PREVIOUS_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
   
                   if [ -z "$PREVIOUS_TAG" ]; then
-                    CHANGELOG=$(git log --oneline --no-merges --format="* %s" HEAD)
+                    CHANGELOG=$(git log --oneline --no-merges --format="* %s" HEAD 2>/dev/null || echo "")
                   else
-                    CHANGELOG=$(git log --oneline --no-merges --format="* %s" ${PREVIOUS_TAG}..HEAD)
+                    CHANGELOG=$(git log --oneline --no-merges --format="* %s" ${PREVIOUS_TAG}..HEAD 2>/dev/null || echo "")
                   fi
   
                   if [ -z "$CHANGELOG" ]; then
                     CHANGELOG="* Automated release"
                   fi
   
+                  # Escape special characters for GitHub output
+                  CHANGELOG=$(echo "$CHANGELOG" | sed 's/\\/\\\\/g; s/"/\\"/g')
+                  
                   echo "changelog<<EOF" >> $GITHUB_OUTPUT
                   echo "$CHANGELOG" >> $GITHUB_OUTPUT
                   echo "EOF" >> $GITHUB_OUTPUT
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca05f6d and d55b536.

📒 Files selected for processing (17)
  • .github/workflows/bump-version.yml (2 hunks)
  • .github/workflows/publish-release.yml (1 hunks)
  • package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/common-helpers/package.json (1 hunks)
  • packages/create-zenstack/package.json (1 hunks)
  • packages/eslint-config/package.json (1 hunks)
  • packages/ide/vscode/package.json (1 hunks)
  • packages/language/package.json (1 hunks)
  • packages/runtime/package.json (1 hunks)
  • packages/sdk/package.json (1 hunks)
  • packages/tanstack-query/package.json (1 hunks)
  • packages/testtools/package.json (1 hunks)
  • packages/typescript-config/package.json (1 hunks)
  • packages/zod/package.json (1 hunks)
  • samples/blog/package.json (1 hunks)
  • scripts/bump-version.ts (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build-test (20.x)
🔇 Additional comments (22)
packages/language/package.json (1)

4-4: Version bump looks correct

3.0.0-alpha.6 matches the coordinated release version. No further action required.

packages/sdk/package.json (1)

3-3: Consistent version update

The SDK package is aligned to 3.0.0-alpha.6; nothing else changed. 👍

packages/eslint-config/package.json (1)

3-3: LGTM

Version bump is straightforward and safe.

packages/typescript-config/package.json (1)

3-3: OK to merge

Version field updated as expected.

samples/blog/package.json (1)

3-3: Sample project version aligned

Sample blog moves to 3.0.0-alpha.6; matches workspace packages. Make sure the root package.json has been bumped as well so that pnpm i keeps versions in sync.

packages/zod/package.json (1)

3-3: Version bump acknowledged and consistent

@zenstackhq/zod is now at 3.0.0-alpha.6. Looks good and aligns with the monorepo bump.

packages/runtime/package.json (1)

3-3: Runtime package version updated correctly

@zenstackhq/runtime moved to 3.0.0-alpha.6; no other metadata was touched.

packages/common-helpers/package.json (1)

3-3: Common-helpers version bump looks good

The version synchronises with the rest of the workspace.

packages/tanstack-query/package.json (1)

3-3: Tanstack-query package version increment verified

Package now references 3.0.0-alpha.6; change is straightforward.

package.json (1)

3-3: Root workspace version aligned

Root package.json updated to 3.0.0-alpha.6, matching all sub-packages.

packages/create-zenstack/package.json (1)

3-3: Version bump looks good

The new version string is consistent with the rest of the monorepo’s alpha.6 release train. No further issues spotted.

packages/ide/vscode/package.json (1)

4-4: Confirm intentional divergence in versioning scheme

All other workspace packages move to 3.0.0-alpha.6, while the VS Code extension advances to 3.0.3.
If this package intentionally follows its own semver track, no action is needed; otherwise please verify the version choice to avoid release-pipeline confusion.

packages/cli/package.json (1)

6-6: CLI version bump approved

The CLI aligns with the 3.0.0-alpha.6 release. Looks good.

packages/testtools/package.json (1)

3-3: Test tools version bump approved

Change is consistent with other workspace packages.

.github/workflows/bump-version.yml (2)

13-13: Nice guard – job limited to the dev branch

The branch condition prevents accidental bumps on other branches.


35-44: Verify that the bump script sets the new-version output correctly

steps.bump.outputs.new_version is referenced for commit messages and PR titles, but the shell script run by pnpm run bump-version must emit:

echo "new_version=<value>" >> "$GITHUB_OUTPUT"

Using the deprecated ::set-output command will silently drop the output on newer runners, breaking the subsequent steps.
Please confirm the script uses the $GITHUB_OUTPUT file or adjust the workflow accordingly.

scripts/bump-version.ts (4)

20-20: LGTM! Good improvement to exclude node_modules.

The filter to exclude node_modules directories prevents processing unwanted package.json files that could be present in dependencies.


23-24: LGTM! Including root package.json ensures consistency.

Explicitly including the root package.json ensures it's always processed, which is important for maintaining version consistency across the workspace.


55-57: LGTM! String replacement preserves formatting.

Using string replacement instead of JSON.stringify preserves the original formatting and indentation of the package.json files, which is much better for maintainability.


62-65: LGTM! Good CI integration with GitHub Actions output.

The GitHub Actions output functionality allows downstream workflow steps to use the new version, enabling dynamic commit messages and PR titles.

.github/workflows/publish-release.yml (2)

3-7: LGTM! Appropriate triggers for a release workflow.

The workflow correctly triggers on manual dispatch and pushes to the main branch, which aligns with typical release practices.


9-11: LGTM! Correct permissions for release creation.

The contents: write permission is necessary for creating GitHub releases and pushing tags.

ymc9 added 2 commits June 28, 2025 10:52
* chore: fix bump version script

* update CI script

* update
@ymc9 ymc9 added this pull request to the merge queue Jun 29, 2025
Merged via the queue into main with commit 50a3a79 Jun 29, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant