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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mapbox/mason-js

v0.1.5

Published

js client for mason

Downloads

3,449

Readme

circleCI CircleCI

codecov

mason-js: a javascript client for mason

Why mason-js?

Mason-js is a JS client for Mason, the C++ package manager.

This project is:

  • The first standalone cross-platform client for Mason.
  • Makes installing packages seamless for node c++ addons.
  • Could also be used in stacks that have nodejs as a dep.
  • We are able to remove mason’s custom install scripts and house all of our logic in a JS client. Diff of install script vs mason-js in node-cpp-skel.

How to use this?

Install all package dependencies

mason-js install

  • installs all packages from the mason-versions.ini file

Example mason-versions.ini:

[headers]
protozero=1.6.1
boost=1.65.1
[compiled]
jpeg_turbo=1.5.1
libpng=1.6.28
libtiff=4.0.7
icu=57.1
proj=4.9.3
pixman=0.34.0
cairo=1.14.8

Symlink Installed Packages

mason-js link

  • symlinks packages

Install a Single Package

mason-js <package>=<version> --type=[header or compiled]

  • installs a single package

Example

mason-js protozero=1.5.1 --type=header

What is V1?

  • Ability to install all packages from a mason-versions.ini file
  • Ability to link all packages from a mason-versions.ini file
  • Ability to install a single package
  • Available on Mac, Linux, and Windows environments
    • Tests via CircleCI & Apprevyor

In short, mason-js:

  1. Reads a mason-versions.ini file in the root directory of a project.
  2. Installs header only and precompiled packages from the S3 bucket mason-binaries into a mason-packages folder
  3. Creates symlinks a .link directory to package executables

Remote Package Paths**:**

  • Header-only: s3://mason-binaries/headers/{package}/{version}.tar.gz

  • Binaries: s3://mason-binaries/{MASON_PLATFORM}-{MASON_PLATFORM_VERSION}/{package}/{version}.tar.gz

Note: The value of MASON_PLATFORM_VERSION is determined per platform.

Local Package Paths:

  • Header-only: ./mason_packages/headers/{package}/{version}/<source files>

    • e.g. mason_packages/headers/vtzero/556fac5/include/vtzero/vector_tile.hpp
  • Binaries: ./mason_packages/{platform}-{arch}/{package}/{version}/<files>

    • e.g. mason_packages/osx-x86_64/gdal/2.2.1/bin/ogr2ogr
  • Linked folder: ./mason_packages/.link/<files>

    • e.g. mason_packages/.link/lib/libpng.a

Development

Install Local Dependencies

npm install

npm link

Run Tests

npm test

Make commands

The Make file has a series of commands that run a Docker container locally. By using these commands, you’re able to simulate staging/production environments locally.

Make sure to set your NPMAccessToken in your environment before running any make commands.

  • make bash - opens a terminal shell session in your Docker image
  • make build - build your Docker image locally
  • make run - send a message to the queue. (this command runs make build first)
  • make test - run tests