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

@guardian/bridget

v8.7.4

Published

This repo contains the thrift definitions defining the API between native layers (iOS, Android) and [Webview](https://github.com/guardian/dotcom-rendering).

Readme

Bridget

This repo contains the thrift definitions defining the API between native layers (iOS, Android) and Webview.

The repo is also responsible for generating and publishing packages to be used by iOS, Android and the Webview.

Thrift definitions

native.thrift are the functions to be implemented by iOS and Android. The webview will be able to call these functions with the specified arguments.

Generated packages

The Swift and TypeScript packages are generated and published using this GitHub action.

  • The TypeScript package can be installed from NPM
  • Swift package can be installed with Swift Package Manager from GitHub

For Android, Java interfaces for Bridget services are generated at build time in the Bridget module.

Adding a new function

  1. Define the function in native.thrift if it needs to be implemented in Swift & Kotlin
  2. Make sure to add a comment above the function to document what it does. It's a good idea to add the version it was available from too (this will be a minor update to the latest tag)
  3. Run npx changeset to create a changeset file describing your changes and the version bump type
  4. Make a pull request. It would be good to get a review from all teams who would need to implement or call the function. e.g. Android, iOS and apps-rendering
  5. Merging into main will trigger the Changesets action to create or update a "Version Packages" PR
  6. When the "Version Packages" PR is merged, the workflow will automatically publish the new packages
  7. If you don't see the published packages, start by inspecting the GitHub action run
  8. Bump the version in your repo (iOS, Android or apps-rendering) and implement the function or make the function call. Make sure the function is always available in the current environment. This can be done by checking the thrift version number of the webView or native layer

Releasing Bridget

Bridget is released by the release.yml GitHub Action. The repository uses:

  • npm trusted publishing: No NPM_TOKEN needed. Publishing to npm is authenticated via GitHub's OIDC token. See npm's trusted publishing docs for more information.

  • GitHub App authentication: The workflow uses a GitHub App to publish Swift and Android packages. This requires:

    • APP_ID (repository variable)
    • GH_APP_PRIVATE_KEY (repository secret)

    The GitHub App needs read/write permissions for the guardian/bridget-swift and guardian/bridget-android repositories.

Testing a prerelease

You can use prereleases to test a new version of the models across web, Android and iOS without making a full release.

To do this, create a new prerelease in the GitHub releases UI (or click here). The tag is used as the version. For example, once the prerelease workflow has finished running for a prerelease created with tag v0.0.0-2024-02-16:

  • install from npm: npm install @guardian/[email protected]
  • find the swift package: https://github.com/guardian/bridget-swift/tree/v0.0.0-2024-02-16
  • find the android package: https://github.com/guardian/bridget-android/tree/v0.0.0-2024-02-16

Note: The prerelease workflow is part of the same release.yml workflow file and also uses npm trusted publishing.

GitHub Action fails with "Authentication failed"

This is likely caused by an issue with the GitHub App credentials. To fix this:

  1. Check that the GH_APP_PRIVATE_KEY repository secret is valid and hasn't expired
  2. Verify that the APP_ID repository variable is correct
  3. Ensure the GitHub App has the necessary read/write permissions for the bridget-swift and bridget-android repositories

Note: updating secrets and variables requires admin permissions on the repository.

Setting the version bump

Versions are managed by Changesets. When you make changes that require a version bump:

  1. Run npx changeset in your local repository
  2. Select the type of version bump (patch, minor, or major)
  3. Provide a description of the changes
  4. Commit the generated changeset file (in .changeset/) with your pull request

When your PR is merged to main, the Changesets GitHub Action will:

  • Create or update a "Version Packages" PR that includes all pending changesets
  • When you merge that PR, the workflow will automatically publish the new version

For more information, see the Changesets documentation.

About the name

The name Bridget was chosen out of a list of a dozen suggestions, containing mostly bridge related puns.