Skip to content

Adds pkg.pr.new to publish PR preview versions - #3668

Merged
melloware merged 3 commits into
orval-labs:masterfrom
arthurfiorette:pkgprnew
Jun 30, 2026
Merged

Adds pkg.pr.new to publish PR preview versions#3668
melloware merged 3 commits into
orval-labs:masterfrom
arthurfiorette:pkgprnew

Conversation

@arthurfiorette

@arthurfiorette arthurfiorette commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This PR adds a new step on pr-check workflow that uses https://pkg.pr.new/ to publish a preview version of orval on each PR opened.

You still need to connect pkg.pr.new github app to this repo before merging this :)

Hopefully this helps trying out new changes without disrupting orval's release scheduled or complex beta release publish flows.

Summary by CodeRabbit

  • New Features
    • Added an automated preview publishing step for pull request builds, generating release packages after checks complete.
    • Added an npm badge linking to the npm preview site for the package.
  • Chores
    • Added a development dependency to support preview package publishing.

Copilot AI review requested due to automatic review settings June 30, 2026 17:53
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ad9acfc5-2014-4533-9bbd-63c06709d658

📥 Commits

Reviewing files that changed from the base of the PR and between 0883c7f and d17c83b.

📒 Files selected for processing (1)
  • .github/workflows/pr-checks.yaml

📝 Walkthrough

Walkthrough

Adds workflow concurrency, a publish-preview CI job, the pkg-pr-new dev dependency, and a new pkg.pr.new badge in the README.

Changes

CI Preview Publishing

Layer / File(s) Summary
Publish preview workflow
.github/workflows/pr-checks.yaml, package.json
Adds workflow concurrency control, a publish-preview job after pr-checks, and the pkg-pr-new dev dependency used to publish preview packages with commit-SHA commenting.
README preview badge
README.md
Adds a pkg.pr.new badge for orval-labs/orval near the existing README badges.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • snebjorn

Poem

🐰 A preview hops out with every PR,
With badge and build, it doesn’t go far,
The SHA leaves a note, crisp and bright,
Packages wink in the pull request light ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding pkg.pr.new support to publish preview versions for pull requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@socket-security

socket-security Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpkg-pr-new@​0.0.751001007093100

View full report

Copilot AI 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.

Pull request overview

This PR introduces a new Zod output “variant” option (classic vs Zod Mini) across the generator/writers/docs/tests, and adds a GitHub Actions job to publish per-PR preview packages using pkg-pr-new.

Changes:

  • Add override.zod.variant: 'classic' | 'mini', including Zod Mini generation paths, import selection (zod vs zod/mini), and target validation (Mini requires Zod v4).
  • Update schema writers, reusable schema rewriting, and test contexts/snapshots to account for the new variant and Zod Mini output shape.
  • Add pkg-pr-new and a new publish-preview workflow job to publish PR preview versions.

Reviewed changes

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

Show a summary per file
File Description
packages/zod/src/zod.test.ts Adds coverage for Zod Mini rendering and dependency selection.
packages/zod/src/index.ts Implements Zod Mini rendering, variant plumbing, dependency import source selection, and array bound checks.
packages/zod/src/compatible-v4.ts Adds Zod target validation and helpers for import source/type name based on variant.
packages/zod/src/compatible-v4.test.ts Tests new target helper functions (variant import/type and Mini/v4 validation).
packages/solid-start/src/index.test.ts Updates test output context to include zod.variant.
packages/orval/src/write-zod-specs.ts Adds variant-aware Zod import emission and variant-aware schema type annotation.
packages/orval/src/write-zod-specs.test.ts Adds regression test for Zod Mini schema file imports/output.
packages/orval/src/utils/options.ts Normalizes override.zod.variant (defaulting to classic) and disallows it at per-operation/tag scope.
packages/orval/src/utils/options.test.ts Tests variant defaulting and operation/tag override filtering.
packages/orval/src/reusable-schemas.ts Threads variant through reusable schema generation; adds PURE annotations for Mini lazy edges.
packages/orval/src/reusable-schemas.test.ts Tests PURE annotation behavior for Mini lazy self-loops.
packages/mock/src/faker/getters/combine.test.ts Updates test context to include zod.variant.
packages/mcp/src/index.ts Emits variant-aware Zod import for generated MCP zod files.
packages/hono/src/index.ts Emits variant-aware Zod import for generated hono zod files.
packages/core/src/types.ts Introduces ZodVariantOption and documents the new variant option in types.
packages/core/src/test-utils/context.ts Updates shared test context defaults to include zod.variant.
packages/angular/src/http-resource.test.ts Updates test output context to include zod.variant.
packages/angular/src/http-client.test.ts Updates test output context to include zod.variant.
package.json Adds pkg-pr-new dependency.
docs/content/docs/reference/configuration/output.mdx Documents new override.zod.variant option.
docs/content/docs/guides/zod.mdx Adds Zod Mini guidance and example config/snippets (including type inference section).
bun.lock Locks pkg-pr-new dependency.
.github/workflows/pr-checks.yaml Adds publish-preview job to publish PR preview packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pr-checks.yaml
Comment thread package.json

@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

🤖 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/pr-checks.yaml:
- Around line 61-64: The Checkout repository step in the PR workflow is leaving
the default GitHub token persisted in the workspace, which can be reused by
PR-controlled code later in the job. Update the actions/checkout usage in the
PR-checks workflow to disable credential persistence by setting
persist-credentials to false alongside the existing ref configuration so the
checked-out code cannot access the checkout token.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b3495edd-4f4c-402f-bd71-a6841aab113c

📥 Commits

Reviewing files that changed from the base of the PR and between 5c810c8 and 029becb.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/pr-checks.yaml
  • package.json

Comment thread .github/workflows/pr-checks.yaml
@melloware melloware added the enhancement New feature or request label Jun 30, 2026
@melloware

Copy link
Copy Markdown
Collaborator

@anymaniax we have to add this pkg.pr.new github app permissons to this repo?

@melloware melloware added this to the 8.20.0 milestone Jun 30, 2026
@melloware
melloware merged commit 0645dc3 into orval-labs:master Jun 30, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants