Skip to content

fix(ci): stop forwarding --if-present to the test script on publish - #28

Merged
Eliav2 merged 1 commit into
mainfrom
fix/publish-workflow-arg-order
Aug 8, 2026
Merged

Eliav2 merged 1 commit into
mainfrom
fix/publish-workflow-arg-order

Conversation

@Eliav2

@Eliav2 Eliav2 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

release-and-publish has failed on every merge since #25, so nothing has published since #24. npm is on 0.4.3; main is on 0.5.0.

Cause

.github/workflows/publish.yml:

- run: pnpm -s test --if-present

pnpm consumes --if-present only when it precedes the script name. Trailing it, the flag is forwarded to the script, so the step ran vitest run --if-present:

CACError: Unknown option `--ifPresent`

It sat there harmlessly for a long time because there was no test script: pnpm skipped the missing script and forwarded nothing. Commit 0b1774f (#25) added "test": "vitest run", so the flag started reaching vitest.

PR publish
#20, #22, #23, #24 success
#25 (added the test script) failure
#27 failure

ci.yml was never affected, since it calls pnpm test.

Fix

Dropped the flag rather than reordering it. The guard has no purpose now that the script is permanent, and it is precisely what hid the failure for two releases. Verified pnpm -s test runs the suite (45 passed) and that no other workflow has the same ordering.

Releasing 0.5.0

Merging this does not publish. The workflow triggers on pushes to main that touch package.json, and this change does not touch it. Re-running the failed run would not help either, since a re-run uses the workflow file at that commit, which still has the bug.

So 0.5.0 needs a workflow_dispatch run after this merges. The job already skips when the version is on npm, so it is safe to dispatch.

🤖 Generated with Claude Code

pnpm consumes --if-present only when it precedes the script name. Trailing it,
the flag is forwarded to the script, so the step ran `vitest run --if-present`:

  CACError: Unknown option `--ifPresent`

Harmless while there was no `test` script, because pnpm skipped the missing
script and forwarded nothing. Adding one in 0b1774f made the flag reach vitest,
so release-and-publish has failed on every merge since, and 0.4.4 and 0.5.0 were
never published. npm is still on 0.4.3.

Dropped rather than reordered: the guard has no purpose now that the script is
permanent, and it is what hid the failure for two releases. ci.yml was never
affected, it calls `pnpm test`.

Publishing 0.5.0 needs a workflow_dispatch run, since this workflow triggers on
pushes to main that touch package.json and this change does not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codesandbox

codesandbox Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web Editor • VS Code • Insiders

Open Preview

@netlify

netlify Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for react-responsive-overflow-list ready!

Name Link
🔨 Latest commit d18791b
🔍 Latest deploy log https://app.netlify.com/projects/react-responsive-overflow-list/deploys/6a77b451ac99a000088cbff8
😎 Deploy Preview https://deploy-preview-28--react-responsive-overflow-list.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Eliav2, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ad89a71d-e33a-4a89-b413-16ad7435d113

📥 Commits

Reviewing files that changed from the base of the PR and between 1cf6a29 and d18791b.

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

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

@Eliav2
Eliav2 merged commit 45fb8dc into main Aug 8, 2026
6 checks passed
@Eliav2
Eliav2 deleted the fix/publish-workflow-arg-order branch August 8, 2026 22:59
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