Skip to content

chore: remove Lerna and publishing scripts#72

Merged
shuhuiluo merged 2 commits into
mainfrom
shuhui/npm
Aug 12, 2025
Merged

chore: remove Lerna and publishing scripts#72
shuhuiluo merged 2 commits into
mainfrom
shuhui/npm

Conversation

@shuhuiluo

@shuhuiluo shuhuiluo commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

Removed lerna.json, custom publishing scripts, and related GPG setup from workflows. Simplified the publishing process by migrating to direct npm commands in GitHub Actions. Cleaned up unnecessary dependencies and configurations.

Summary by CodeRabbit

  • Chores
    • Simplified publish flow: build and tests run before release; publish now driven by release tag/version and a single publish step.
    • Removed legacy monorepo tooling and the old automated publish script; extraneous CI steps (GPG, nightly login) removed to speed releases.
  • Tests
    • Updated test command used in the release pipeline for consistency.
  • Notes
    • No user-facing functionality changes; package usage remains the same.

Removed `lerna.json`, custom publishing scripts, and related GPG setup from workflows. Simplified the publishing process by migrating to direct npm commands in GitHub Actions. Cleaned up unnecessary dependencies and configurations.
@shuhuiluo shuhuiluo requested a review from giuseppecrj August 11, 2025 08:29
@coderabbitai

coderabbitai Bot commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Updates CI publish flow to build and test with Bun, simplify publishing by deriving version from the release tag and running npm publish, and remove Lerna configuration and a legacy release/publish script that previously automated branching, PR creation, and lerna-based publishing.

Changes

Cohort / File(s) Summary
GitHub Actions: Publish flow
.github/workflows/npm-publish.yml
Trigger changed to release.published; removed custom checkout options and GPG steps; added bun run build; replaced forge test with bun run test; removed nightly/login steps; publish consolidated into inline steps that derive VERSION (strip leading v), run npm version --no-git-tag-version, then npm publish --access public.
Lerna config removal
lerna.json
Deleted Lerna monorepo/versioning configuration (version, npmClient, publish/version command settings, packages).
Legacy publish script removal
scripts/publish-to-npm.sh
Deleted full release orchestration script (git cleanliness checks, branch/PR creation, CI monitoring, lerna publish, and related automation).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor GitHub_Actions as GitHub Actions
  participant Repo as Repository
  participant Bun as Bun runtime
  participant NPM as npm Registry
  participant GH as GitHub Release Event

  GH-->>GitHub_Actions: release.published (tag_name)
  GitHub_Actions->>Repo: actions/checkout
  GitHub_Actions->>Bun: setup bun
  GitHub_Actions->>Repo: bun install
  GitHub_Actions->>Repo: bun run build
  GitHub_Actions->>Repo: bun run test
  GitHub_Actions->>Repo: derive VERSION (strip leading "v")
  GitHub_Actions->>Repo: npm version VERSION --no-git-tag-version
  GitHub_Actions->>NPM: npm publish --access public
  NPM-->>GitHub_Actions: publish result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

I hop through commits, nibble the old,
I toss Lerna's leash into a fold.
Bun kneads the code, tests tumble and run,
Tag hums a version — publish begun.
A tiny rabbit celebrates: npm, we're done! 🐰✨


📜 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 1729270 and 5fd1dcd.

📒 Files selected for processing (1)
  • .github/workflows/npm-publish.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Foundry project
🔇 Additional comments (2)
.github/workflows/npm-publish.yml (2)

32-34: Build step with Bun looks fine

Assuming package.json defines a build script, this is good. No issues spotted.


36-36: Tests via Bun look good

Assuming a test script is defined, this aligns with the Bun-based flow.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch shuhui/npm

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.
  • 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.

Support

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

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 generate unit tests to generate unit tests for 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/workflows/npm-publish.yml (2)

24-28: Verify Foundry is still required

You removed Forge-based test execution but still install Foundry. If tests no longer rely on Forge/Foundry, drop this to speed up CI; otherwise keep and call it explicitly.

If not needed, remove:

-      - name: Install Foundry
-        uses: foundry-rs/foundry-toolchain@v1
-        with:
-          version: stable

32-34: Build step looks good; consider reproducibility

  • Pin Bun to a specific minor (vs. latest) for deterministic builds.
  • Optionally use bun install --frozen-lockfile and cache bun.lockb to stabilize installs.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 45d0b91 and 1729270.

📒 Files selected for processing (3)
  • .github/workflows/npm-publish.yml (2 hunks)
  • lerna.json (0 hunks)
  • scripts/publish-to-npm.sh (0 hunks)
💤 Files with no reviewable changes (2)
  • lerna.json
  • scripts/publish-to-npm.sh
🔇 Additional comments (1)
.github/workflows/npm-publish.yml (1)

36-36: Confirm test runner coverage

Switching to bun run test is fine if it invokes all suites. If you still have Forge tests, keep a Foundry run as well or make sure your Bun test script delegates to Forge.

Comment thread .github/workflows/npm-publish.yml Outdated
Comment thread .github/workflows/npm-publish.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@shuhuiluo shuhuiluo added this pull request to the merge queue Aug 12, 2025
Merged via the queue into main with commit 243054b Aug 12, 2025
2 checks passed
@shuhuiluo shuhuiluo deleted the shuhui/npm branch August 12, 2025 20:01
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.

2 participants