Announcing pkg.pr.new

We’re excited to introduce pkg.pr.new, a GitHub app to get instant preview releases of your packages. It allows your contributors and users to test continuous releases of each commit in your project’s main branches and on every Pull Request!

We built pkg.pr.new to provide developers with a faster way to work together to test and validate changes. Currently, there is a lot of friction in testing a PR or an unreleased change in the main branch of a project. The user needs to clone the repository, build the package, and modify the target reproduction or project. This slows down the process of identifying and fixing issues.

With pkg.pr.new, you can immediately gather feedback to check the impact of your changes. We, web developers, understand the importance of a smooth and quick feedback loop (that’s why we love Vite, too!)

Once configured in a repository, pkg.pr.new publishes preview releases to a temporary registry for every commit, allowing you to access and test fixes right away in your local projects or online StackBlitz minimal reproductions. This tool is especially valuable for avoiding regressions, ensuring that changes work correctly before they are released.

Using a pkg.pr.new package

What is pkg.pr.new?

pkg.pr.new uses a CLI and GitHub Actions to publish unreleased packages to a temporary npm-compatible registry. It provides instant access to preview packages with a unique URL structure that allows you to easily use them in your projects.

A preview package can be accessed by its git commit hash:

npm i https://pkg.pr.new/tinybench@a832a55

Or using the GitHub PR number directly

npm i https://pkg.pr.new/valtio@906

One Click, Secure Reproductions

pkg.pr.new goes beyond publishing your package previews. You can define templates for your project, so your users can try out the packages in ready-to-use examples. Links to StackBlitz playgrounds will be included in the PR comment so your users can test it with a single click in a browser tab.

Opening a template from a pkg.pr.new comment

Apart from avoiding the need to do local configuration to try a pull request, these templates run in a secure sandbox in a browser tab avoiding the security risks of running code from unknown authors in other contributor’s machines.

Getting Started

Setting up pkg.pr.new is easy. After installing our GitHub app, you’ll be able to trigger continuous releases by running: npx pkg-pr-new publish from your GitHub actions setup. Follow the Setup guide in our docs to get pkg.pr.new previews for your packages today.

Why pkg.pr.new?

  • Instant Builds: Get immediate preview packages of your changes as soon as you make a commit or a pull request.
  • GitHub Workflows Friendly: Easily integrates with your existing GitHub workflows.
  • No Configuration: Works out of the box. No complicated setup required.
  • Single Command: A simple command is all it takes to publish your package.
  • Pull Request Comments: Automatically add helpful comments to your pull requests.

Built by the community, for the community

pkg.pr.new is Open Source, with its development led by @asleMammadam and @AmirSakhravi. We’re grateful to the projects that have already adopted the project for their invaluable feedback:

Radix VueViteBiomeValtioNuxtHubQwik UIQwik

If you’re part of their communities, you probably have already seen and used pkg.pr.new package previews. We hope you’ll also enjoy our continuous releases! Get involved and share your feedback with us after you try them out!

Mohammad Bagher Abiyat
Founder of tinylibs. Member of pmndrs and vitest (prev).
Explore more from StackBlitz

Subscribe to StackBlitz Updates

A newsletter from StackBlitz covering engineering achievements, product features, and updates from the community.

Using StackBlitz at work?

Create in-browser preview apps for every issue or pull request, share private templates with your org, manage your design system with zero overhead, and more.

Try StackBlitz Teams