npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@secorto/wait-netlify

v0.1.0

Published

Readme

@secorto/wait-netlify

Small helper package that waits for the correct Netlify deploy preview and writes the resolved URL to the GitHub Actions environment as NETLIFY_PREVIEW_URL.

Purpose

This package is used to resolve a deploy preview for the current branch or commit before running end-to-end validation jobs. It is intentionally focused on the deployment lookup and not on browser or Playwright configuration.

What it does

  • Lists Netlify deploys for the target site
  • Filters by branch and/or commit when possible
  • Chooses the best preview URL candidate
  • Writes NETLIFY_PREVIEW_URL=<url> to GITHUB_ENV

Required environment variables

For CI/runtime

  • NETLIFY_AUTH_TOKEN — Netlify token with the least privilege needed
  • NETLIFY_SITE_ID — Netlify site identifier
  • GITHUB_ENV — GitHub Actions environment file path
  • PR_BRANCH or GITHUB_REF_NAME — branch used to match preview deploys
  • COMMIT_ID — exact commit SHA used to correlate the matching deploy; required for PR-like runs because matching is SHA-based and polling will time out without it

Optional

  • GITHUB_REF — fallback branch reference when needed

Typical usage

NETLIFY_AUTH_TOKEN=xxx \
NETLIFY_SITE_ID=yyy \
PR_BRANCH=feature/my-branch \
COMMIT_ID=abcd1234 \
GITHUB_ENV=/tmp/env \
node packages/wait-netlify/src/wait-netlify-runner.js

This writes a line such as:

NETLIFY_PREVIEW_URL=https://branch--site.netlify.app

Matching behavior

The helper tries to find the most relevant preview deploy by comparing the current branch/commit against Netlify deploy metadata. For PR-like runs, COMMIT_ID is required because the matching logic is SHA-based; without it the helper cannot select the correct deploy and the polling loop will eventually time out.

For default branch runs, it can also accept production deploys when appropriate.

Security notes

  • Keep the token in GitHub Secrets
  • Avoid echoing secrets in logs
  • Use the least-privilege scope available for Netlify

Related documentation

For the broader E2E runtime variables used by Playwright and the project test workflow, see:

That document covers test-runner concerns such as BASE_URL, REAL_THIRD_PARTY, and the A11y opt-in flags. This package only resolves the preview URL used by those tests.