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

lerna-script-tasks-modules

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lerna-script-tasks-modules

module version sync task for lerna-script

  • 1.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
98
decreased by-39.13%
Maintainers
3
Weekly downloads
 
Created
Source

lerna-script-tasks-modules

Syncs dependencies/devDependencies/peerDependencies for modules within repo.

install

npm install --save-dev lerna-script-tasks-modules

Usage

Say you have modules:

  • /packages/a with version 1.0.0
  • /packages/b with version 1.0.0 and it depends on module a where {dependencies: {"a": "~1.0.0"}}

and you up the version of /packages/a to 2.0.0. If you want for version of a to be in sync in module b, then you could do:

//lerna.js
const syncModules = require('lerna-script-tasks-modules')

module.exports['modules:sync'] = syncModules()

and then upon executing lerna-script modules:sync version of dependency a for module b will be set to ~2.0.0. Same goes for devDependencies and peerDependencies.

API

({packages: [], transformDependencies: version => version, transformPeerDependencies: version => version})(log): Promise

Returns a function that syncs module versions across repo.

Parameters:

  • packages, optional = list of lerna packages. Loads defaults of not provided.
  • transformDependencies, optional = function to transform dependencies and devDependencies. Defaults to version => '~' + version.
  • transformPeerDependencies, optional - function to transform peerDependencies. Defaults to version => '>=' + version.

FAQs

Package last updated on 11 Apr 2021

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