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

@by-association-only/translation-checker

v1.0.12

Published

Check Shopify theme translations match those used in local liquid files.

Readme

Translation Checker

image

What it does

Correctly set up, this script will prevent any files being deployed until all of the translations used in the local theme files are present on the live theme.

It runs in the terminal, and sits in front of any Shopify CLI theme comands.

  • Pulls the current live en.default.json into a temp folder
  • Scans local liquid files to construct an array of translation strings used in the theme
  • Check that all of the strings exist in the temp en.default.json
  • Print out the location of any missing strings in the terminal

Setup

  1. Add a config file in the root: .bao-stores (or use existing .bao-translation-checker)

The tool will check for .bao-stores first, then fall back to .bao-translation-checker if not found.

List each store name on a separate line (the part before .myshopify.com).

Example: If your stores are:

  • acmestore.myshopify.com
  • acmestore-us.myshopify.com

You would enter:

acmestore
acmestore-us
  1. Run the check at the start of your deploy script:
  "scripts": {
    ...
    "deploy": "npm run translations:check && npm run deploy:all",
    "deploy:all": "npm run deploy:uk && npm run deploy:us",
    "deploy:uk": "...",
    "deploy:us": "...",
    "shopify": "shopify",
    "translations:check": "npm run shopify theme info && npx @by-association-only/translation-checker"
  }

Because the script exits with process.exit(1), it will prevent any further commands running if it finds any missing translations.

Issues

Please make sure you are using Shopify CLI v3.71+ and Node v18.20+ before continuing

1) No Shopify CLI

If the theme repo you're installing on does not have Shopify CLI, please run npm i @shopify/cli --save-dev

2) Error: Command failed: shopify theme pull

image

This means you're not logged into the CLI, or the CLI version is too old. It can be in issue on older themes that don't use the Shopify CLI, as this script cannot pass on the CLI's interactive login prompt.

To get around this, edit your package.json to include a 'shopify' command prior to running the translation checker. This will force a login prompt to be sent to your terminal. For example:

  "scripts": {
    ...
    "deploy": "yarn translations:check && unisian-tools deploy --skipPrompts",
    "translations:check": "yarn run shopify theme info && npx @by-association-only/translation-checker",
    "shopify": "shopify"
  },

If you're not authenticated, you'll now see the 'press any key to open in browser' terminal prompt from Shopify.

3) Error: Only file and data URLs are supported by the default ESM loader

Use node version 18.20.0+ to run the translation checker.

4) SyntaxError: Unexpected token } in JSON

The en.default.json file on the live theme likely contains invalid JSON.

The terminal should give you an idea where the error is:

Go into the code editor and fix the issue shown in the terminal.

If that doesn't resolve it, copy en.default.json out from the code editor and run through a JSON validator like https://jsonlint.com/ to find the issue.