Cloudflare is now backing pkg.pr.new's data infrastructure!
We call it "Continuous Releases" too.
With pkg.pr.new, each of your commits and pull requests will trigger an instant preview release without publishing anything to NPM. This enables users to access features and bug-fixes without the need to wait for release cycles using npm or pull request merges.
pkg.pr.new won't publish anything to NPM; instead, it leverages its own URLs, which are npm-compatible.
npm i https://pkg.pr.new/tinylibs/tinybench/tinybench@a832a55
# npm i https://pkg.pr.new/${owner}/${repo}/${package}@{commit}
It is aiming to reduce the number of these comments :)
This was fixed in #18. Can we release that fix?
Show that your project uses pkg.pr.new by adding a badge to your README:
Automatically on Repository Page:
Visit your repository page at https://pkg.pr.new/~/OWNER/REPO and you'll find a badge with a copy button that will copy the markdown code for you.
Direct Badge URL:
Use this format to create a badge for your repository:
markdown
[](https://pkg.pr.new/~/OWNER/REPO)
Just replace OWNER and REPO with your GitHub username/organization and repository name.
These are some of the projects and companies using pkg.pr.new:
<img height="40" src="https://raw.githubusercontent.com/intlify/art/master/logo_symbol.svg">
<img height="40" src="https://raw.githubusercontent.com/vite-pwa/.github/main/hero-light.svg">
Feel free to add your project or company here to join the pkg.pr.new family :)
You can also join our discord server here, so we all have fun together!
First install the GitHub Application.
[!IMPORTANT] Make sure it's installed on the repository before trying to publish a package. To read about the permissions the app needs, check #305.
After installing on your repository, run pkg-pr-new from your lockfile in workflows (for example with pnpm exec pkg-pr-new publish) to get continuous releases.
npm install --save-dev pkg-pr-new
For workspaces and monorepos:
pnpm exec pkg-pr-new publish './packages/A' './packages/B' # or `pnpm exec pkg-pr-new publish './packages/*'`
You can also pass prebuilt tarballs (.tgz or .tar.gz) directly, which is handy when your build pipeline already produces tarballs in a custom way:
pnpm exec pkg-pr-new publish './artifacts/*.tgz'
[!NOTE] Prebuilt tarballs are uploaded as-is: pkg.pr.new will not repack them. If one tarball references another tarball being published in the same call, pkg.pr.new will print a warning and that reference will not be rewritten to a pkg.pr.new URL. Repack with the resolved version yourself if you need cross-package linking.
[!CAUTION] In CI environments, avoid
npx,pnpm dlx,yarn dlx, andbunxfor this step. Installpkg-pr-newas a dependency and execute it from the lockfile (npm exec,pnpm exec,yarn, orbun run).[!IMPORTANT] Make sure the pkg-pr-new command runs only once in a defined workflow (that's part of how it avoids spam)! So instead of multiple times running pkg-pr-new for each workspace package, the command should be run one time for all the desired packages using the pattern above.
For templates (experimental):
[!NOTE] With templates, pkg.pr.new will generate Stackblitz instances for the given directories with the new built packages.
pnpm exec pkg-pr-new publish './packages/A' --template './examples/*'
By default, pkg.pr.new will generate a template called "default" which includes each built package in the dependencies. This can be disabled with --no-template.
Compact URLs are the default (and will fall back to long form if npm metadata is unavailable). To force long-form URLs, use --no-compact:
pnpm exec pkg-pr-new publish --no-compact './packages/A' './packages/B'
Compact URLs rely on your package being published on npm with a valid
repositoryfield inpackage.json. See this. pkg.pr.new is case sensitive, if the GitHub owner isPuruVJ, the package.jsonrepositoryfield should not havepuruvj.
With default compact URLs:
npm i https://pkg.pr.new/tinybench@a832a55
With --no-compact or if npm metadata is unavailable:
npm i https://pkg.pr.new/tinylibs/tinybench/tinybench@a832a55
For CLI applications you might want to show npx instead of npm i for the preview command. This can be accomplished with the --bin flag:
pnpm exec pkg-pr-new publish --bin
With --bin:
npx https://pkg.pr.new/pkg-pr-new@a832a55
Without --bin:
npm i https://pkg.pr.new/pkg-pr-new@a832a55
You can control publishing comments with --comment:
pnpm exec pkg-pr-new publish --comment=update # default
Using --comment=update, pkg.pr.new would generate one initial comment and then edit it in the following commits.
With --comment=create, each commit would generate a comment for itself, useful for triggering workflows, like workflow execution using maintainer comments.
And --comment=off would turn off comments for maintainers who prefer minimal pull requests.
--commentWithShaspecifies whether to replace the PR number with the commit SHA in the generated comments.
With --commentWithSha:
pnpm exec pkg-pr-new publish --commentWithSha
Generated comments use commit SHA URLs:
```sh npm i https://pkg.pr.new/tinybe
$ claude mcp add pkg.pr.new \
-- python -m otcore.mcp_server <graph>