Skip to content

Conversation

@chaizhenhua
Copy link

@chaizhenhua chaizhenhua commented Jan 10, 2026

Summary

  • Upgrade reqwest from =0.12.8 to ^0.12.20 to resolve compatibility issues with axum 0.8+
  • Upgrade deno_core from 0.355.0 to 0.376.0 along with all related deno extensions
  • Add BorrowMutError regression test to prevent callback-related panics
  • Add .gitattributes to preserve mixed line endings in the repository

Changes

Dependency Upgrades

Package Old Version New Version
deno_core ^0.355.0 ^0.376.0
deno_ast =0.49.0 ^0.52.0
deno_permissions ^0.72.0 ^0.85.0
reqwest =0.12.8 ^0.12.20
All deno_* extensions various latest compatible

Code Changes

  • Updated API calls to match new deno_core interfaces
  • Refactored broadcast_channel wrapper for new deno_broadcast_channel API
  • Added uuid dependency for broadcast_channel feature
  • Updated module loader and import provider implementations
  • Fixed console and web stub implementations for compatibility

@chaizhenhua chaizhenhua changed the title upgrade deno dependencies Upgrade Deno Dependencies to Support Deno 2.6.4 and Axum 0.8+ Jan 10, 2026
@rscarson
Copy link
Owner

rscarson commented Jan 11, 2026

First of all I appreciate the effort that went into this and I thank you for helping me bring the project up to date

People trust Rustyscript because we provide a stable API as opposed to the constant changes within deno.

For example the broadcast channel wrapper was doing some important work to bridge rust types with the broadcast channel system and removing it completely because the API changed may be shortsighted

I'm also confused by the kv changes. It is very difficult to get a read on what you actually changed because you appeared to have changed some formatting for just about every file you touched which means that I can't actually see what you have changed because it looks like you've changed everything

The reason it takes so long to update the dependency versions is so that I can keep my API stable.

@chaizhenhua
Copy link
Author

Thank you for the detailed feedback and for taking the time to review this.

Broadcast Channel

The BroadcastChannelWrapper has been preserved with full API compatibility. The underlying implementation was rewritten because deno_broadcast_channel has been merged into deno_web in the new version, but:

  • The public API remains identical: new(), send(), send_sync(), recv(), recv_sync()
  • Rust ↔ JavaScript bidirectional communication still works as before
  • All existing tests pass
  • Added IsolatedBroadcastChannel as an additional option for Rust-to-Rust only scenarios

KV Changes

The KV changes are actually a simplification - the new deno_kv version handles permissions internally, so ~40 lines of custom SqliteDbHandlerPermissions and RemoteDbHandlerPermissions implementations were removed. The KvStore and KvConfig public APIs remain unchanged.

Formatting

You're right about the formatting noise making the diff harder to review - I apologize for that. I should have kept formatting changes in a separate commit or avoided them entirely. For future PRs I'll be more careful about this.

Summary

The goals of this PR are:

  1. Upgrade Deno dependencies - deno_core from 0.355.0 to 0.376.0 along with all related deno extensions
  2. Unpin reqwest - from =0.12.8 to ^0.12.20, enabling compatibility with axum 0.8+ and other crates that depend on newer hyper/http versions

All public APIs remain backward compatible - this should be a drop-in upgrade for existing users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants