Skip to content

feat(deps): update dependabot config and add support for @node-core #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,56 @@ updates:
interval: monthly
commit-message:
prefix: meta
ignore:
- dependency-name: '@node-core/*'
cooldown:
default-days: 3
groups:
format:
orama:
patterns:
- 'prettier'
- '@orama/*'
cli:
patterns:
- 'commander'
- '@clack/prompts'
lint:
patterns:
- 'prettier'
- 'eslint'
- 'eslint-*'
- '@eslint/*'
- 'lint-staged'
- 'globals'
- 'stylelint-*'
orama:
- '@eslint/*'
unist:
patterns:
- '@orama/*'
- 'unified'
- 'unist-*'
- 'vfile'
remark:
patterns:
- 'remark-*'
- 'shiki'
rehype:
patterns:
- 'rehype-*'
ast:
patterns:
- 'estree-*'
- 'hast-*'
- 'mdast-*'
- 'hastscript'
- 'acorn'
recma:
patterns:
- 'recma-*'
compiling:
patterns:
- '@minify-html/node'
- '@rollup/*'
- 'rolldown'
- 'lightningcss'
react:
patterns:
- 'preact'
- 'preact-*'
open-pull-requests-limit: 10
53 changes: 53 additions & 0 deletions .github/workflows/update-internal-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Upgrade @node-core/* Dependencies

on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 0' # Runs weekly on Sunday at 03:00 UTC

env:
COMMIT_MESSAGE: 'chore: upgrade internal dependencies to latest versions'

jobs:
upgrade-node-core-deps:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1

- name: Upgrade @node-core/* dependencies in package.json
run: |
# Parse package.json and find @node-core/* dependencies (both deps/devDeps)
for section in dependencies devDependencies; do
jq -r --arg section "$section" '.[$section] | keys[]' package.json | grep '^@node-core/' | while read dep; do
# Get latest version from npm
latest=$(npm view "$dep" version)
echo "Upgrading $dep to $latest"
# Use jq to update the version in package.json
jq --arg section "$section" --arg dep "$dep" --arg ver "^$latest" \
'(.[$section][$dep]) |= $ver' package.json > package.json.tmp && mv package.json.tmp package.json
done
done

- name: Install upgraded dependencies
run: npm install
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Create or update PR for upgraded dependencies
uses: gr2m/create-or-update-pull-request-action@b65137ca591da0b9f43bad7b24df13050ea45d1b # v1.10.1
with:
title: ${{ env.COMMIT_MESSAGE }}
body: 'This PR upgrades all @node-core/* dependencies in package.json to their latest versions.'
commit-message: ${{ env.COMMIT_MESSAGE }}
branch: 'upgrade-node-core-deps'
path: '.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As requested by nodejs/admin#991, this should be

Suggested change
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.DOC_KIT_BOT_PAT }}

Loading