Skip to main content
The check-updates command checks if all installed Refine packages are up to date. It compares your installed versions with the latest available versions on npm and displays a summary.

Usage

refine check-updates

How It Works

The check-updates command:
  1. Scans your project for all @refinedev/* packages
  2. Uses npm outdated to check for available updates
  3. Compares current, wanted, and latest versions
  4. Displays a formatted table with update information
  5. Provides changelog links for each package

Version Types

The command displays three types of versions:
  • Current - The version currently installed in your project
  • Wanted - The maximum version that satisfies the semver range in package.json
  • Latest - The latest stable version available on npm

Examples

Check for Updates

Run the command to see if updates are available:
refine check-updates
Output
 Checking for updates...

┌─────────────────────────────────────────────────────────────────┐
                      Available Updates
├──────────────────────────┬─────────┬─────────┬──────────────────┤
 Package Current Wanted Latest
├──────────────────────────┼─────────┼─────────┼──────────────────┤
 @refinedev/core 4.45.0 4.45.2 4.46.0
 @refinedev/antd 5.35.0 5.35.2 5.36.0
 @refinedev/react-router 4.15.0 4.15.1 4.16.0
 @refinedev/cli 2.15.0 2.15.1 2.16.0
└──────────────────────────┴─────────┴─────────┴──────────────────┘

📚 View changelogs:
 @refinedev/core: https://c.refine.dev/core
 @refinedev/antd: https://c.refine.dev/antd
 @refinedev/react-router: https://c.refine.dev/react-router
 @refinedev/cli: https://c.refine.dev/cli

💡 Run 'refine update' to update packages

All Packages Up to Date

When all packages are current:
refine check-updates
Output
 Checking for updates...

All `Refine` packages are up to date 🎉

Check Updates in CI/CD

Use in continuous integration to monitor dependencies:
refine check-updates
The command exits with:
  • Exit code 0 - All packages are up to date
  • Non-zero exit code - Updates are available (use with --fail flag if supported)

Understanding Version Ranges

Current Version

The currently installed version in node_modules:
package.json
{
  "dependencies": {
    "@refinedev/core": "^4.45.0"
  }
}
Installed: 4.45.0

Wanted Version

The maximum version that satisfies your semver range:
  • If package.json has ^4.45.0, wanted is the latest 4.x.x (e.g., 4.45.2)
  • If package.json has ~4.45.0, wanted is the latest 4.45.x (e.g., 4.45.2)
  • If package.json has 4.45.0, wanted is exactly 4.45.0

Latest Version

The absolute latest stable version on npm (e.g., 4.46.0)

Common Use Cases

Regular Maintenance Checks

Run weekly to stay informed about updates:
refine check-updates

Before Starting New Features

Check for updates before beginning development:
refine check-updates
If updates are available:
refine update

Pre-deployment Verification

Ensure dependencies are current before deploying:
refine check-updates

Dependency Audit

Combine with other audit commands:
refine check-updates
npm audit
The command provides direct links to changelogs:
  • @refinedev/corehttps://c.refine.dev/core
  • @refinedev/antdhttps://c.refine.dev/antd
  • @refinedev/muihttps://c.refine.dev/mui
  • @refinedev/mantinehttps://c.refine.dev/mantine
  • And all other @refinedev/* packages
These links redirect to the GitHub releases page for each package.

CI/CD Integration

GitHub Actions

Create a workflow to check for updates:
.github/workflows/check-updates.yml
name: Check Refine Updates

on:
  schedule:
    - cron: '0 9 * * 1'  # Every Monday at 9am
  workflow_dispatch:

jobs:
  check-updates:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '20'
      
      - name: Install dependencies
        run: npm ci
      
      - name: Check for updates
        run: npx refine check-updates

GitLab CI

Add to your .gitlab-ci.yml:
.gitlab-ci.yml
check-updates:
  stage: test
  script:
    - npm ci
    - npx refine check-updates
  only:
    - schedules

Jenkins

Create a scheduled job:
pipeline {
  agent any
  triggers {
    cron('H 9 * * 1')
  }
  stages {
    stage('Check Updates') {
      steps {
        sh 'npm ci'
        sh 'npx refine check-updates'
      }
    }
  }
}

Combining with Update Command

The typical workflow:
  1. Check for available updates:
    refine check-updates
    
  2. Review the changelog links
  3. Update packages:
    refine update
    
  4. Test your application:
    npm test
    refine dev
    

Package Manager Support

The command works with all package managers:
refine check-updates
It uses npm outdated internally to check versions.

Output Format

The command provides a clean, formatted table:
┌──────────────────────────┬─────────┬─────────┬──────────────────┐
│ Package                  │ Current │ Wanted  │ Latest           │
├──────────────────────────┼─────────┼─────────┼──────────────────┤
│ @refinedev/core          │ 4.45.0  │ 4.45.2  │ 4.46.0           │
└──────────────────────────┴─────────┴─────────┴──────────────────┘
Each column shows:
  • Package - Full package name
  • Current - Installed version
  • Wanted - Safe update version
  • Latest - Newest available version

Best Practices

1. Regular Monitoring

Check for updates regularly:
# Add to your weekly routine
refine check-updates

2. Review Before Updating

Don’t update blindly. Review changelogs first:
refine check-updates
# Visit the changelog links
# Then update
refine update

3. Automate Checks

Set up automated checks in CI:
# Check on every pull request
on: [pull_request]
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - run: npx refine check-updates

4. Track Update History

Keep a log of when you check and update:
echo "$(date): $(refine check-updates)" >> update-log.txt

5. Combine with Security Audits

Check for both updates and vulnerabilities:
refine check-updates
npm audit

Troubleshooting

Command Times Out

If the check takes too long:
# The command uses a 25-second timeout
# If it times out, check your network connection

No Output

If you see no output:
  1. Ensure Refine packages are installed:
    npm list | grep @refinedev
    
  2. Verify npm is working:
    npm outdated
    

Incorrect Version Information

If versions seem wrong:
  1. Clear npm cache:
    npm cache clean --force
    
  2. Update npm:
    npm install -g npm@latest
    
  3. Run check again:
    refine check-updates
    

Missing Packages in Output

If some packages aren’t shown:
  • Only @refinedev/* packages are checked
  • Packages must be in dependencies or devDependencies
  • Scoped packages from other orgs are ignored

Comparison with npm outdated

While npm outdated checks all packages, refine check-updates:
  • Filters only @refinedev/* packages
  • Provides direct changelog links
  • Formats output for better readability
  • Integrates with refine update command
# npm outdated shows ALL packages
npm outdated

# refine check-updates shows only Refine packages
refine check-updates

Next Steps

Build docs developers (and LLMs) love