1.0.3 β€’ Published 4 months ago

@sidharthsuresh1993/dep-impact v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

@sidharthsuresh1993/dep-impact πŸ“Š

A CLI tool to analyze the impact of npm dependencies on your project's performance.

npm version License: MIT Node.js CI

Features

  • πŸ“¦ Analyzes bundle size and gzip size
  • πŸ”„ Checks for ESM support and tree-shaking capability
  • πŸ“ˆ Shows transitive dependency count
  • πŸ’‘ Suggests lighter alternatives
  • 🎨 Beautiful terminal output
  • πŸ“‹ JSON report export
  • πŸ”„ Package comparison
  • πŸš€ GitHub Action integration
  • πŸ“Š Bundle size trend analysis

Installation

# Install globally
npm install -g @sidharthsuresh1993/dep-impact

# Or use with npx
npx @sidharthsuresh1993/dep-impact

Usage

Analyze Project Dependencies

npx @sidharthsuresh1993/dep-impact analyze

Options:

  • -e, --export: Export results to dep-impact-report.json
  • -s, --size-limit <size>: Set size limit for dependencies (in KB)
  • -t, --trend: Show bundle size trend for each dependency
  • -f, --format <format>: Output format (table, json, markdown)

Compare Packages

npx @sidharthsuresh1993/dep-impact compare moment dayjs

GitHub Action

Add this to your workflow file:

name: Dependency Size Check
on: [push, pull_request]

jobs:
  check-deps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: npx @sidharthsuresh1993/dep-impact analyze --size-limit 500

Output Example

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Package      β”‚ Version β”‚ Bundle   β”‚ Gzip  β”‚ Last       β”‚ ESM β”‚ Tree-Shakeableβ”‚ Dependenciesβ”‚ Alternativesβ”‚
β”‚              β”‚         β”‚ Size     β”‚ Size  β”‚ Update     β”‚     β”‚               β”‚             β”‚             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ lodash       β”‚ 4.17.21 β”‚ 531.2 KB β”‚ 71 KB β”‚ 2021-04-02 β”‚  βœ—  β”‚      βœ—       β”‚     0       β”‚ ramda,      β”‚
β”‚              β”‚         β”‚          β”‚       β”‚            β”‚     β”‚               β”‚             β”‚ underscore   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Development

Setup

# Clone the repository
git clone https://github.com/sidharthsuresh1993/dep-impact.git
cd dep-impact

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT Β© Sidharth Suresh

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago