Skip to content

chore: publish packages from their dir instead of root - #88

Merged
saltenasl merged 2 commits into
mainfrom
ls/publish-from-package-dir
Oct 31, 2025
Merged

saltenasl merged 2 commits into
mainfrom
ls/publish-from-package-dir

Conversation

@saltenasl

@saltenasl saltenasl commented Oct 31, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Updated the npm publishing workflow to publish each package from its own directory, improving release reliability and consistency and reducing publish errors during automated releases.

@saltenasl
saltenasl requested a review from a team as a code owner October 31, 2025 16:38
@coderabbitai

coderabbitai Bot commented Oct 31, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The CD workflow's npm publish step was changed from a single top-level pnpm publish using a filter to a multi-line shell script. The script reads the package name from prior outputs, strips the scope to compute the package directory under packages/, cds into that directory, and runs pnpm publish --no-git-checks. The publish now runs from inside each package directory rather than via a top-level filter.

Sequence Diagram(s)

sequenceDiagram
    participant Prev as Previous Step
    participant Script as Publish Script
    participant Shell as Shell (workspace)
    participant PNPM as pnpm publish

    Note over Prev,Script: Old flow: top-level pnpm publish with --filter
    Prev->>Script: emits package name
    Script->>Script: strip scope from package name
    Script->>Script: build path packages/PKG_DIR
    Script->>Shell: cd packages/PKG_DIR
    Shell->>PNPM: pnpm publish --no-git-checks
    PNPM-->>Shell: publish result
    Shell-->>Script: exit status
Loading

Suggested reviewers

  • Artmann
  • andyjakubowski

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "chore: publish packages from their dir instead of root" directly and accurately reflects the main change: the publish step in the CI/CD workflow was refactored to run from within each package's directory rather than from the root using a filter. The title is concise, specific, and clearly communicates the intent without vague language or unnecessary details. A reviewer scanning the history would immediately understand this is a workflow optimization for the npm publishing process.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 69dd40b and c4bd587.

📒 Files selected for processing (1)
  • .github/workflows/cd.yml (1 hunks)
🔇 Additional comments (1)
.github/workflows/cd.yml (1)

88-93: Looks good—previous critical issues resolved.

The script now properly quotes $PKG_DIR and includes error handling (|| exit 1), addressing the concerns from the prior review. The implementation is clean and follows the same pattern as the "Validate package version" step. The approach of publishing from within the package directory is correct for pnpm monorepos.


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Oct 31, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.11%. Comparing base (581676b) to head (c4bd587).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #88   +/-   ##
=======================================
  Coverage   92.11%   92.11%           
=======================================
  Files          20       20           
  Lines         431      431           
  Branches      116      119    +3     
=======================================
  Hits          397      397           
  Misses         34       34           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 581676b and 69dd40b.

📒 Files selected for processing (1)
  • .github/workflows/cd.yml (1 hunks)

Comment thread .github/workflows/cd.yml Resolved
@saltenasl
saltenasl merged commit 1cfc40e into main Oct 31, 2025
@saltenasl
saltenasl deleted the ls/publish-from-package-dir branch October 31, 2025 16:58
@coderabbitai coderabbitai Bot mentioned this pull request Oct 31, 2025
Yggdrasill501 pushed a commit that referenced this pull request Oct 31, 2025
* chore: publish packages from their dir instead of root

* chore: safe cd
saltenasl added a commit that referenced this pull request Nov 1, 2025
saltenasl added a commit that referenced this pull request Nov 1, 2025
* Revert "chore: use npm to publish (#89)"

This reverts commit e31f9df.

* Revert "chore: publish packages from their dir instead of root (#88)"

This reverts commit 1cfc40e.

* chore: quote the filter parameter
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