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

commonpkg

v2.0.0

Published

Share your common scripts, dependencies, and files between your repos

Readme

commonpkg

commonpkg allows you to share common package.json properties between different repositories.

How to use it

Publish your common configurations as an npm module. In the package.json of that module, add the key commonpkgShare. Add any package.json properties you want to share under this key. For example...

{
  "name": "my-common-config",
  "version": "1.0.0",
  "description": "Common configurations for MyProject repos",
  "repository": "https://github.com/my-project/common-config",
  "license": "Unlicense",
  "commonpkgShare": {
    "scripts": {
      "lint": "tslint '**/*.t{s,sx}' -e '**/node_modules/**' --fix",
      "precommit": "lint-staged"
    },
    "devDependencies": {
      "lint-staged": "^3.4.0",
      "ts-node": "^3.0.3",
      "tslint": "^5.0.0",
      "tslint-config-standard": "^5.0.2",
      "typescript": "^2.1.6"
    },
    "lint-staged": {
      "*.{ts,tsx}": [
        "yarn lint",
        "git add"
      ]
    },
    "pre-commit": "lint-staged"
  }
}

Now in the package where you want to inherit these configurations, do the following:

Add your common configurations as a dependency:

npm install my-common-config --save-dev

Install commonpkg

npm install commonpkg --save-dev

Configure the package.json

  1. Tell commonpkg the name of the package that has your configurations. You do that by adding the key commonpkg to the root of your package.json.
  2. Add commonpkg to your npm scripts. You will use npm run commonpkg to run the commonpkg script

For example...

{
  "name": "package-where-i-wanna-import-some-configs",
  "version": "1.0.0",
  "main": "dist/index.js",
  "description": "This is My Package",
  "repository": "https://github.com/my-project/my-package.git",
  "license": "Unlicense",
  "scripts": {
    "commonpkg": "commonpkg" // <== add a script like this
  },
  "commonpkg": "my-common-config", // <== add this key to point to the package that has the configs
  "devDependencies": {
    "my-common-config": "^1.0.0",
    "commonpkg": "^2.0.0"
  }
}

✨ Run the magic command ✨

Now run npm run commonpkg and commonpkg will merge the shared properties from my-common-config with your current package.json. After the merge, your package.json will look like this:

The results

{
  "name": "package-where-i-wanna-import-some-configs",
  "version": "1.0.0",
  "main": "dist/index.js",
  "description": "This is My Package",
  "repository": "https://github.com/my-project/my-package.git",
  "license": "Unlicense",
  "scripts": {
    "commonpkg": "commonpkg",
    "lint": "tslint '**/*.t{s,sx}' -e '**/node_modules/**' --fix",
    "precommit": "lint-staged"
  },
  "commonpkg": "my-common-config",
  "devDependencies": {
    "my-common-config": "^1.0.0",
    "commonpkg": "^2.0.0",
    "lint-staged": "^3.4.0",
    "ts-node": "^3.0.3",
    "tslint": "^5.0.0",
    "tslint-config-standard": "^5.0.2",
    "typescript": "^2.1.6"
  },
  "lint-staged": {
    "*.{ts,tsx}": [
      "yarn lint",
      "git add"
    ]
  },
  "pre-commit": "lint-staged"
}

If the dependencies between your old package.json and new package.json are different. commonpkg will remind you to reinstall your node_modules.

You can do npm run commonpkg whenever your common configurations change and commonpkg will pull in the updates.

Bonus tip

You can also use the repo of your common config to check-in files such as tslint.json, .eslintrc, .babelrc, etc and extend those config files from your main package, like so:

For example, your .eslintrc can be:

{
  "extends": "./node_modules/my-common-config/.eslintrc",

  "rules": {
    "eqeqeq": 1
  }
}

You don't even need commonpkg to do this.

Real example

We use commonpkg to share common configurations and files which we keep in our common-config repository with other repositories such as hollowverse.

Contributing

The goal of commonpkg is to serve the requirements of the Hollowverse project. Unfortunately, we don't have the resources to fix bugs or implement features that don't affect us.

However, commonpkg is not super complicated. Check out its source code.

If you need to fix a bug or add a feature, feel free to open an issue to discuss it, and we'll be happy to provide pointers on how to approach it.