Skip to content

Commit

Permalink
chore: Update auto-update-deps.yml to use npm-check-updates for check…
Browse files Browse the repository at this point in the history
…ing outdated dependencies
  • Loading branch information
hrishikesh-mahajan committed Sep 16, 2024
1 parent ca2ad33 commit 6554015
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/auto-update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,37 @@ jobs:
with:
version: "latest" # Specify the pnpm version you want

- name: Install pnpm dependencies
run: pnpm install --no-frozen-lockfile
- name: Install npm-check-updates
run: npm install -g npm-check-updates

- name: Get outdated dependencies
uses: mathiasvr/command-output@v2.0.0
continue-on-error: true
id: outdated
with:
run: pnpm outdated --long
run: |
ncu --format repo > ncu-output.txt
echo "| Package | Current Version | Latest Version | URL |" >> ncu-output.md
echo "| --- | --- | --- | --- |" >> ncu-output.md
# Process the `ncu` output and format it into Markdown
awk -F '→' '
BEGIN { OFS=" | " }
/^ / { gsub(/^[ \t]+/, "", $0); gsub(/^[^ ]+ /, "", $0); gsub(/ +$/, "", $0); split($0, parts, " "); printf "| %s | %s | %s | %s\n", parts[1], parts[2], parts[3], parts[4] }
' ncu-output.txt >> ncu-output.md
cat ncu-output.md
- name: Install Bun dependencies
run: bun install

- name: Update package.json
run: npm install -g npm-check-updates && ncu -u
run: ncu -u

- name: Update Bun dependencies
uses: mathiasvr/command-output@v2.0.0
id: updates
with:
run: bun install
run: bun install | head -n -2

- name: Update npm dependencies
run: npm install --package-lock-only
Expand Down

0 comments on commit 6554015

Please sign in to comment.