Cloudflare is now backing pkg.pr.new’s data infrastructure!

When a commit is pushed or a pull request is created, pkg.pr.new creates an instantly usable version of the package that can be installed directly from a unique npm compatible URL. This allows users and contributors to test and give feedback about new features or bug fixes before they are officially released.

For example, thanks to pkg.pr.new, you can test the latest commit in the main branch of the vite repository using:

npm i https://pkg.pr.new/vite@main

pkg.pr.new can be easily installed using the GitHub app and a GitHub workflow command. It also supports template-powered interactive StackBlitz demos. Users can try the preview packages in a completely sandboxed and isolated environment thanks to WebContainers. For more information, you can check out the announcement post.

A growing community

Thanks to a very active user base, the adoption of pkg.pr.new has skyrocketed! At the time of writing this post:

  • 1M+ preview packages released!
  • 1M+ templates generated to showcase the packages
  • 1K+ repositories in more than 600 organizations are using pkg.pr.new

Many projects and companies are using pkg.pr.new, including Meta, Hugging Face, Vite, Svelte, Nuxt, Vue.js, Vitest, Qwik, TanStack, tRPC, and many others.

Scaling pkg.pr.new

As we move into onboarding more Open Source projects and releasing the next million preview packages, we are thrilled to announce that Cloudflare is now backing pkg.pr.new’s data infrastructure through Project Alexandria to help us scale sustainably! Cloudflare will cover the cost of pkg.pr.new R2 usage, assuring its continued growth.

Cloudflare features have been fundamental to the architecture of pkg.pr.new. Each preview package generated by pkg.pr.new is stored in Cloudflare R2 buckets to provide fast access to preview releases. When a user installs a preview, it’s streamed directly from R2. This reduces memory overhead and ensures fast delivery, even for large packages. And for larger packages, we utilize R2’s multipart upload functionality, allowing the system to handle packages of any size efficiently by splitting them into manageable chunks during the upload process.

We also implemented a storage management system that monitors package usage patterns. By automatically removing unused or old builds, pkg.pr.new stays true to its purpose: providing temporary, on-demand preview releases rather than serving as a permanent package registry. Packages are automatically removed if they haven’t been downloaded in over a month, or are older than six months. This cleanup mechanism kept storage costs manageable. With Cloudflare supporting us, we’ll be able to keep scaling and bump these limits as needed to ensure the best experience for our users.

It’s all about collaboration

pkg.pr.new is maintained by the StackBlitz-labs team, with development led by Mohammad and Amir (learn more about our work at Thundraa). We’d like to thank our users and 50+ contributors for providing feedback and helping us improve the tool.

And once more we want to thank Cloudflare for their support. With Cloudflare help, we’ll be able to continue scaling up pkg.pr.new to help Open Source teams, contributors, and users test, review, and deliver faster and better quality releases! A big shoutout to Dario Piotrowicz for making this happen.

Amir Hossein Sakhravi
The other half of pkg.pr.new
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