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

@niktekio/swapdeps

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@niktekio/swapdeps

For projects that reside in their own repository, but are placed into the filesystem of a monorepo, this tool will swap between workspace package links and versioned links for doing deployments from the detached repository. Just set the package versions i

  • 1.0.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

When you want to have detached repositories co-located in a monorepo like the following:

monorepo/packages/mysharedlib <- part of monorepo> monorepo/sites/docsite <- part of monorepo> monorepo/sites/privatesite <- from separate repo>

You need to change the dependency links of privatesite from "mysharedlib":"workspace:^" to "mysharedlib":"~1.0.0" when deploying the website so that the build process can succeed.

Similar to the publishConfig directive https://pnpm.io/package_json#publishconfig you just declare the versions for dependencies|devDependencies|peerDependencies in a deployConfig block and this tool will swap between those and workspace:^

You should trigger this command first in your scripts.build or potentially in scripts.install so that it adjusts the workspace links to the proper versions before the rest of the build.

FAQs

Package last updated on 20 May 2023

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