Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@userfrosting/merge-package-dependencies

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@userfrosting/merge-package-dependencies

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

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51
increased by4.08%
Maintainers
2
Weekly downloads
 
Created
Source

merge-package-dependencies

BranchStatus
masterContinuous 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.

Install

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

Usage

IMPORTANT
This is an ES module package targeting NodeJS ^12.17.0 || >=14.0.0, refer to the NodeJS ESM docs regarding how to correctly import. ESM loaders like @babel/loader or esm likely won't work as expected.

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",
    },
    [
        "../app/sprinkles/core/",
        "../app/sprinkles/account/",
        "../app/sprinkles/admin/"
    ],
    "../app/assets/"
);

API

See docs/api.

License

MIT

Contributing

See CONTRIBUTING.md.

Keywords

FAQs

Package last updated on 16 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc