chore: update dependencies and fix security vulnerabilities #4047
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates dependencies to their latest versions and improves code quality across the SQLx codebase while maintaining full backward compatibility.
Changes
Dependency Updates 📦
Cargo.lockwith latest dependency versionsasync-stddependency to mockable-todos example for better async runtime supportCode Quality Improvements 🧹
AssertSqlSafewrapper for SQL queries in benchmarks to prevent SQL injection#[allow(dead_code)]regex(path = *REGEX)#[validate(regex = "REGEX")]#[validate(regex(path = *REGEX))]Examples Updated
examples/postgres/axum-social-with-tests: tokio 1.20.1 → 1.47, validator 0.16 → 0.20examples/postgres/mockable-todos: Added async-std dependencyexamples/postgres/multi-database: tracing-subscriber 0.3.19 → 0.3.20examples/postgres/multi-tenant: tracing-subscriber 0.3.19 → 0.3.20examples/mysql/todos: tokio 1.20.0 → 1.47Testing
cargo test --lib --features "runtime-tokio tls-rustls"cargo fmt --all -- --checkpassesBackward Compatibility
✅ No breaking changes - This PR maintains full backward compatibility:
Migration Guide
For projects using validator 0.20, update regex validation syntax:
Notes
This PR focuses solely on keeping dependencies up-to-date and improving code quality while preserving all existing functionality. The validator syntax update was necessary due to API changes in validator 0.20.