Simplify publish and quality workflows#85
Conversation
Publish CLI and Compute packages directly from their package directories instead of staging transformed publish artifacts. Rely on committed package metadata, package-local LICENSE files, .npmignore rules, and prepack builds for package contents. Add the Compute publish workflow, use the shared package version resolver for both packages, and require explicit package directories when resolving release versions. Switch publishing workflows to pnpm for versioning, registry lookup, authentication checks, and publishing. Remove the staging publish scripts and their staging-specific tests. Update publishing docs, ADRs, and onboarding guidance to describe direct package inspection with pnpm pack. Add repo agent guidance for pnpm usage in repo commands while preserving npm guidance for user-facing content.
|
Warning Review limit reached
More reviews will be available in 1 hour, 20 minutes, and 55 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR migrates the Prisma monorepo from a staged-artifact publishing model to direct 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
…flows # Conflicts: # .github/workflows/pr-quality.yml # packages/cli/tests/publish-prep.test.ts # packages/cli/tests/resolve-package-version.test.ts # scripts/prepare-cli-publish.mjs # scripts/resolve-cli-version.mjs
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/publish-compute.yml:
- Around line 134-137: The "Publish official package to npm" step publishes
without authentication; update the workflow to configure npm auth by adding
registry-url to the existing actions/setup-node step (so setup-node registers
the registry) and set NODE_AUTH_TOKEN in the publish step's environment (env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}) so the pnpm publish command runs
authenticated; locate the "Publish official package to npm" run step and the
earlier actions/setup-node invocation to apply these changes.
- Line 20: Add human-readable display names for the workflow jobs by adding a
name: field for each job key (e.g., publish-dev and publish-official) so the UI
shows a friendly label; update the job definitions where the keys publish-dev
and publish-official are declared to include descriptive name strings like
"Publish (dev)" and "Publish (official)" respectively.
- Around line 99-107: The step with id compute_version sets the shell variable
LATEST but never writes it to the GitHub Actions step outputs, so
steps.compute_version.outputs.latest is undefined; modify the step that defines
LATEST (the block invoking node scripts/resolve-package-version.mjs next-beta)
to also export the value to GITHUB_OUTPUT (e.g., append a line that writes
latest=${LATEST} to "$GITHUB_OUTPUT") so that the step output latest is
available for the summary; ensure the change occurs in the same block that
defines LATEST and preserves the existing call to resolve-package-version.mjs.
In `@AGENTS.md`:
- Line 11: Clarify the guidance "Run root scripts only when they match the
changed surface" by replacing or augmenting it with a concrete rule and example:
state that root-level scripts (e.g., root tsc, root lint, or other monorepo-wide
checks) should only be run when changes touch files outside a single package or
affect shared/config files, and add an example like "avoid running root tsc or
root lint when only package-local code changed; run package-level scripts
instead." Also mention that touching package manifests, build configs, or shared
libs should trigger root scripts.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8f23f6c7-51f4-47cf-9b69-3b001e690e2c
📒 Files selected for processing (26)
.github/workflows/preview-cli-package.yml.github/workflows/publish-cli.yml.github/workflows/publish-compute.ymlAGENTS.mdREADME.mddocs/architecture/adrs/0001-preview-package-and-publishing.mddocs/architecture/package-structure.mddocs/onboarding/common-tasks.mddocs/onboarding/getting-started.mddocs/onboarding/testing.mddocs/reference/testing-patterns.mdpackage.jsonpackages/cli/.npmignorepackages/cli/AGENTS.mdpackages/cli/LICENSEpackages/cli/tests/publish-prep.test.tspackages/cli/tests/resolve-package-version.test.tspackages/compute/.npmignorepackages/compute/LICENSEpackages/compute/package.jsonscripts/prepare-cli-publish.d.mtsscripts/prepare-cli-publish.mjsscripts/resolve-cli-version.d.mtsscripts/resolve-cli-version.mjsscripts/resolve-package-version.d.mtsscripts/resolve-package-version.mjs
💤 Files with no reviewable changes (6)
- scripts/prepare-cli-publish.d.mts
- scripts/resolve-cli-version.d.mts
- scripts/prepare-cli-publish.mjs
- package.json
- packages/cli/tests/publish-prep.test.ts
- scripts/resolve-cli-version.mjs
Adds required PR quality automation and simplifies package publishing so CI uses the committed package manifests directly instead of generated staging artifacts.
Changes
Why
Publishing from committed package directories matches conventional npm package workflows and makes package contents easier to review. The package-aware version resolver keeps CLI and Compute release versioning consistent without duplicating scripts, while pnpm-only repo commands keep CI and agent instructions aligned with the workspace package manager.