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

deps-diff

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deps-diff

Dependency difference create using by json or markdown format

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-98.08%
Maintainers
1
Weekly downloads
 
Created
Source

deps-diff

Tiny utility for extract dependency difference two commit hash.

Download Status Github Star Github Issues NPM version License

Usage

# markdown
deps-diff md -p [your project directory]

# or use pipe
deps-diff json -p [your project directory] | deps-diff-pipe-md

output like below,

- deps
  - dev
    - add rollup: 3.1.0
    - change deps-diff: 0.6.0 > 0.7.0

Yes, you can add this content to git commit log.

CLI Option

Command

commanddesc.
jsondependencies difference generate json format
mddependencies difference generate markdown format

Option

commandaliasdefaultarraydesc.
projectpprocess.cwd()project directory from which to extract version changes, if you not pass this option that will be use cwd(current working directory)
configcconfiguration file path, if you not pass this option that will be use find '.depsrc' first
dependenciesdprodoarray of dependency type: dev, prod, peer
ignoreioignore specfic dependency with action. You can pass dev-add, dev-remove, dev-change, prod-add, prod-remove, prod-change, peer-add, peer-remove, peer-change
prev-hashlatest commit hashprevious git commit hash for comparison
next-hashprocess.cwd()/package.jsonprevious git commit hash for comparison
title-list-type#list type of markdown document title
deps-list-typem (replace -)list type of markdown document dependency
content-list-typem (replace -)list type of markdown document content
git-basedirprocess.cwd()git base directory. This directory exists .git
git-binarygitgit binary filename

Monorepo

If your project structure like below,

├─ .git/
├─ packages/
│  ├─ my-project/
│  │  ├─ package.json # deps-diff install here
│  │  ├─ Button.tsx
│  │  ├─ Input.tsx
│  ├─ pages/
│  │  ├─ Hero.tsx
│  │  ├─ User.tsx

You can add npm scripts that,

# my-project > package.json > scripts

deps-diff md -d prod -d dev --project . --git-basedir ../..

Custom format markdown

You have to inheritance AbstractParser and implement it. MarkdownParser is markdown parser example.

Keywords

FAQs

Package last updated on 27 Jan 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