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
How It Works
Thecheck-updates command:
- Scans your project for all
@refinedev/*packages - Uses
npm outdatedto check for available updates - Compares current, wanted, and latest versions
- Displays a formatted table with update information
- 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:Output
All Packages Up to Date
When all packages are current:Output
Check Updates in CI/CD
Use in continuous integration to monitor dependencies:- Exit code 0 - All packages are up to date
- Non-zero exit code - Updates are available (use with
--failflag if supported)
Understanding Version Ranges
Current Version
The currently installed version innode_modules:
package.json
4.45.0
Wanted Version
The maximum version that satisfies your semver range:- If
package.jsonhas^4.45.0, wanted is the latest4.x.x(e.g.,4.45.2) - If
package.jsonhas~4.45.0, wanted is the latest4.45.x(e.g.,4.45.2) - If
package.jsonhas4.45.0, wanted is exactly4.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:Before Starting New Features
Check for updates before beginning development:Pre-deployment Verification
Ensure dependencies are current before deploying:Dependency Audit
Combine with other audit commands:Changelog Links
The command provides direct links to changelogs:- @refinedev/core →
https://c.refine.dev/core - @refinedev/antd →
https://c.refine.dev/antd - @refinedev/mui →
https://c.refine.dev/mui - @refinedev/mantine →
https://c.refine.dev/mantine - And all other
@refinedev/*packages
CI/CD Integration
GitHub Actions
Create a workflow to check for updates:.github/workflows/check-updates.yml
GitLab CI
Add to your.gitlab-ci.yml:
.gitlab-ci.yml
Jenkins
Create a scheduled job:Combining with Update Command
The typical workflow:-
Check for available updates:
- Review the changelog links
-
Update packages:
-
Test your application:
Package Manager Support
The command works with all package managers:npm outdated internally to check versions.
Output Format
The command provides a clean, formatted table:- Package - Full package name
- Current - Installed version
- Wanted - Safe update version
- Latest - Newest available version
Best Practices
1. Regular Monitoring
Check for updates regularly:2. Review Before Updating
Don’t update blindly. Review changelogs first:3. Automate Checks
Set up automated checks in CI:4. Track Update History
Keep a log of when you check and update:5. Combine with Security Audits
Check for both updates and vulnerabilities:Troubleshooting
Command Times Out
If the check takes too long:No Output
If you see no output:-
Ensure Refine packages are installed:
-
Verify npm is working:
Incorrect Version Information
If versions seem wrong:-
Clear npm cache:
-
Update npm:
-
Run check again:
Missing Packages in Output
If some packages aren’t shown:- Only
@refinedev/*packages are checked - Packages must be in
dependenciesordevDependencies - Scoped packages from other orgs are ignored
Comparison with npm outdated
Whilenpm outdated checks all packages, refine check-updates:
- Filters only
@refinedev/*packages - Provides direct changelog links
- Formats output for better readability
- Integrates with
refine updatecommand