Skip to content

ArcherGu/npm-upstream-check

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Npm Upstream Check

CI

Usage

Your npm package may depend on another npm package, and when the upstream package is updated, you may need to make some changes, and this action can help you.

Example

- name: Check npm upstream
  id: cnu
  uses: ArcherGu/npm-upstream-check@v1
  with:
    upstream: esbuild
  
- name: Get the outputs
  run: |
    echo "Need Update: ${{ steps.cnu.outputs.need-update }}"
    echo "Dependencies: ${{ steps.cnu.outputs.dependencies }}"

Inputs

  • upstream: The upstream package name
    • required
    • example: esbuild or esbuild,rollup
  • deep: Deep check, e.g. monorepo
    • optional
    • default: false
  • check-only: Only check, not update package.json
    • optional
    • default: false
  • all: Check all dependencies, not just upstream
    • optional
    • default: false

Outputs

  • need-update: Whether the dependencies need to be updated
    • example: true or false
  • dependencies: The dependencies that need to be updated, in JSON string format
    • example: {"esbuild": "^0.13.0"}

License

MIT License © 2023 Archer Gu