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

@ckwalsh/signedsource

v0.4.0

Published

Library to sign and verify generated code, based on Meta's signedsource package.

Readme

main

@ckwalsh/signedsource

Library to sign generated code to ensure it has not been tampered with, based on Meta's signedsource package.

This library supports both fully and partially generated documents, and both cryptographic and non-cryptographic signatures.

This package does not contain any user tooling for working with generated files. If you are looking for a CLI, check out @ckwalsh/signedsource-cli.

Installation

npm install @ckwalsh/signedsource
yarn add @ckwalsh/signedsource
pnpm add @ckwalsh/signedsource

Working with Generated Files

Generated files are annotated with specially formatted tags in their comments. These tags consist of two parts, separated by a space:

  • Type: Generated files can be marked as either @generated or @partially-generated
    • @generated files cannot be modified without invalidating the embedded signature. Use this for files that should never be manually altered.
    • @partially-generated files can contain sections bounded by BEGIN MANUAL SECTION SectionName and END MANUAL SECTION, between which the content may be changed without invalidating the embedded signature. It is possible to extract and retain these manual sections when working with codegen, allowing manual sections to remain untouched while generated code is updated.
  • Signature Token: Unsigned files contain a signature placeholder, while signed files contain a cryptographic signature.
    • Placeholders are of the form <<SignedSource::PaddingData>>. For backwards compatibility with the Meta implementation, the placeholder <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>> is frequently used.
    • Signatures are of the form SignedSource<<SignatureData>>. Signatures compatible with the Meta library consist of 32 hexadecimal characters, representing the md5 digest of the signed content. Signatures may also be created using a JSON Web Key (JWK), consisting of the base64url encoded protected header and signature of a JSON Web Signature (JWS). The payload for the JWS is the sha256 digest of the signed content, and is omitted from the token.

Examples

Generated Source

/* eslint-disable */

/* @generated SignedSource<<6fde99c7ccfb41abcb26139df27817ec>> */

const foo = 'bar';

Partially Generated Source

/* eslint-disable */

/* @partially-generated SignedSource<<b2e42e793ae28eece8f6d05cae623680>> */

const foo = 'bar';

/* BEGIN MANUAL SECTION pets */

// This section can be modified without invalidating the signature

const favoritePet = 'cats';

/* END MANUAL SECTION */