Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/archergu/npm-upstream-check

Check the updates of upstream npm dependencies
https://github.com/archergu/npm-upstream-check

actions npm npm-package

Last synced: 2 days ago
JSON representation

Check the updates of upstream npm dependencies

Awesome Lists containing this project

README

        

# Npm Upstream Check

[![CI](https://github.com/ArcherGu/npm-upstream-check/actions/workflows/ci.yml/badge.svg)](https://github.com/ArcherGu/npm-upstream-check/actions/workflows/ci.yml)

## 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

```yaml
- 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](https://github.com/archergu)