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

protoconsent-validate

v1.0.1

Published

GitHub Action and CLI to validate .well-known/protoconsent.json files

Readme

ProtoConsent Validate Action

A GitHub Action that validates .well-known/protoconsent.json declaration files against the ProtoConsent specification v0.2. See the main repo for full documentation.

Usage

# .github/workflows/validate-protoconsent.yml
name: Validate ProtoConsent declaration
on:
  push:
    paths: [".well-known/protoconsent.json"]
  pull_request:
    paths: [".well-known/protoconsent.json"]
jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ProtoConsent/validate-action@main

Inputs

| Input | Default | Description | |---|---|---| | file | .well-known/protoconsent.json | Path to the file to validate |

Outputs

| Output | Description | |---|---| | result | pass or fail | | errors | Number of errors found | | warnings | Number of warnings found |

What it checks

  1. protoconsent version field ("0.2")
  2. purposes object with at least one known purpose
  3. Per-purpose: used (boolean), optional legal_basis, sharing, providers (array), retention (object)
  4. retention discriminated union: session, fixed (with value/unit), or until_withdrawal
  5. Optional links: policy, rights (HTTPS recommended)
  6. Optional last_updated (ISO 8601 date, YYYY-MM-DD)
  7. Optional data_handling: storage_region (string), international_transfers (boolean)
  8. Unknown fields flagged as info
  9. File size limit (50 KB)

Errors fail the workflow. Warnings appear as annotations but don't fail.

Custom file path

- uses: ProtoConsent/validate-action@main
  with:
    file: "public/.well-known/protoconsent.json"

Job summary

The action writes a check results table to the GitHub Actions job summary, visible in the workflow run UI.

CLI

You can also validate files from the command line without GitHub Actions:

npx protoconsent-validate .well-known/protoconsent.json

Or run directly from the repository:

npx github:ProtoConsent/validate-action .well-known/protoconsent.json

If no file is specified, it defaults to .well-known/protoconsent.json.

Output example:

  ✓ Version: "0.2"
  ✓ 6 purpose(s) declared: functional, analytics, ads, personalization, third_parties, advanced_tracking.
  ✓ Functional: used = true
  ✓ Analytics: used = false
  ✓ Storage region: eu
  ✓ Last updated: 2026-04-13

6 pass, 0 warn, 0 error

Exit code is 0 if no errors, 1 if any errors are found.

License

MIT