Merge NPM, Yarn or Bower package dependencies into one package, with semver rules respected.

package.json, bower.json, merge, npm, yarn, bower, userfrosting, userfrosting-component
npm install @userfrosting/merge-package-dependencies@3.0.0



Branch Status
master Continuous Integration codecov
develop Continuous Integration codecov

A simple tool that can merge the dependency and devDependency dependency types for npm/yarn package.jsons or bower bower.jsons into a single package.json or bower.json object (and optionally file). To properly support frontend scenarios, this tool also merges resolutions, and ignores unnecessary field recommendations for private npm/yarn packages. Perfect for projects like UserFrosting where plugins (Sprinkles) provide virtually all functionality.

NOTE: While non-semver values are supported, they will act as an override and emit a warning (even if logging is disabled). This override behavior only applies to 'incoming' values. This behavior does not match npm, yarn or bower.

NOTE: This is currently an offline tool, and as such conflicts further down the dependency chain are not evaluated. There is however a duplicate dependency detection tool for yarn to allow the creation of workarounds in the meantime (see docs/api

NOTE: Any dependencies with a path specified as the version will not be adjusted, even if an output location is specified.


npm i -D  @userfrosting/merge-package-dependencies


To merge multiple package.json's into a single object, and save to a specified location...

import * as mergePackages from "@userfrosting/merge-package-dependencies";

let result = mergePackages.yarn(
        name: "pkg",
        version: "1.7.2",


API documentation is regenerated for every release using API Extractor and API Documenter. The results reside in docs/api.

Release process

Generally speaking, all releases should first traverse through alpha, beta, and rc (release candidate) to catch missed bugs and gather feedback as appropriate. Aside from this however, there are a few steps that MUST always be done.

  1. Make sure CHANGELOG.md is up to date.
  2. Update version via npm like npm version 3.0.0 or npm version patch.
  3. npm publish.
  4. Create release on GitHub from tag made by npm version.