build(rust): update deps

This commit is contained in:
Amaan Qureshi 2026-02-10 02:20:53 -05:00 committed by Amaan Qureshi
parent ebd2a56b5d
commit b8fcf27661
11 changed files with 48 additions and 48 deletions

BIN
Cargo.lock generated

Binary file not shown.

View file

@ -80,8 +80,8 @@ overflow-checks = true
ansi_colours = "1.2.3"
anstyle = "1.0.13"
anyhow = "1.0.101"
bstr = "1.12.0"
cc = "1.2.56"
bstr = "1.12.1"
cc = "1.2.56"
clap = { features = [
"cargo",
"derive",
@ -93,23 +93,23 @@ clap = { features = [
clap_complete = "4.5.66"
clap_complete_nushell = "4.5.10"
crc32fast = "1.5.0"
ctor = "0.2.9"
ctrlc = { features = [ "termination" ], version = "3.5.2" }
dialoguer = { features = [ "fuzzy-select" ], version = "0.11.0" }
ctor = "0.6.3"
ctrlc = { features = [ "termination" ], version = "3.5.2" }
dialoguer = { features = [ "fuzzy-select" ], version = "0.12.0" }
etcetera = "0.11.0"
fs4 = "0.12.0"
fs4 = "0.13.0"
glob = "0.3.3"
heck = "0.5.0"
html-escape = "0.2.13"
indexmap = "2.12.1"
indoc = "2.0.6"
indexmap = "2.13.0"
indoc = "2.0.7"
libloading = "0.9.0"
log = { features = [ "std" ], version = "0.4.28" }
memchr = "2.7.6"
log = { features = [ "std" ], version = "0.4.29" }
memchr = "2.8.0"
once_cell = "1.21.3"
pretty_assertions = "1.4.1"
rand = "0.8.5"
regex = "1.12.3"
rand = "0.10.0"
regex = "1.12.3"
regex-syntax = "0.8.9"
rustc-hash = "2.1.1"
schemars = "1.2.1"
@ -119,14 +119,14 @@ serde_json = { features = [ "preserve_order" ], version = "1.0.149" }
similar = "2.7.0"
smallbitvec = "2.6.0"
streaming-iterator = "0.1.9"
tempfile = "3.23.0"
tempfile = "3.25.0"
thiserror = "2.0.18"
tiny_http = "0.12.0"
topological-sort = "0.2.2"
unindent = "0.2.4"
walkdir = "2.5.0"
wasmparser = "0.243.0"
webbrowser = "1.0.5"
wasmparser = "0.244.0"
webbrowser = "1.1.0"
tree-sitter = { path = "./lib", version = "0.27.0" }
tree-sitter-config = { path = "./crates/config", version = "0.27.0" }

View file

@ -6,7 +6,7 @@ use std::{
};
use log::{error, info};
use rand::Rng;
use rand::RngExt;
use regex::Regex;
use tree_sitter::{Language, Parser};
@ -63,8 +63,8 @@ fn regex_env_var(name: &'static str) -> Option<Regex> {
#[must_use]
pub fn new_seed() -> usize {
int_env_var("TREE_SITTER_SEED").unwrap_or_else(|| {
let mut rng = rand::thread_rng();
let seed = rng.r#gen::<usize>();
let mut rng = rand::rng();
let seed = rng.random_range(0..=usize::MAX);
info!("Seed: {seed}");
seed
})

View file

@ -1,7 +1,4 @@
use rand::{
distributions::Alphanumeric,
prelude::{Rng, SeedableRng, StdRng},
};
use rand::{RngExt, SeedableRng, distr::Alphanumeric, rngs::StdRng};
const OPERATORS: &[char] = &[
'+', '-', '<', '>', '(', ')', '*', '/', '&', '|', '!', ',', '.', '%',
@ -16,7 +13,7 @@ impl Rand {
}
pub fn unsigned(&mut self, max: usize) -> usize {
self.0.gen_range(0..=max)
self.0.random_range(0..=max)
}
pub fn words(&mut self, max_count: usize) -> Vec<u8> {

View file

@ -1447,7 +1447,7 @@ fn generate_file(
}
if filename == "build.zig.zon" {
let id = thread_rng().gen_range(1u32..0xFFFF_FFFFu32);
let id = rand::rng().random_range(1u32..0xFFFF_FFFFu32);
let checksum = crc32(format!("tree_sitter_{language_name}").as_bytes());
replacement = replacement.replace(
PARSER_FINGERPRINT_PLACEHOLDER,

View file

@ -806,7 +806,7 @@ impl Init {
let enabled = MultiSelect::new()
.with_prompt("Bindings")
.items_checked(&languages)
.items_checked(languages.iter().copied())
.interact()?
.into_iter()
.map(|i| languages[i].0);
@ -880,7 +880,7 @@ impl Init {
let idx = FuzzySelect::with_theme(&ColorfulTheme::default())
.with_prompt("Which field would you like to change?")
.items(&choices)
.items(choices)
.interact()?;
set_choice!(choices[idx]);

View file

@ -1,6 +1,6 @@
use std::{cmp::Ordering, fmt::Write, ops::Range};
use rand::prelude::Rng;
use rand::{Rng, RngExt};
use streaming_iterator::{IntoStreamingIterator, StreamingIterator};
use tree_sitter::{
Language, Node, Parser, Point, Query, QueryCapture, QueryCursor, QueryMatch, Tree, TreeCursor,
@ -31,11 +31,11 @@ impl Pattern {
// Descend to the node at a random byte offset and depth.
let mut max_depth = 0;
let byte_offset = rng.gen_range(0..cursor.node().end_byte());
let byte_offset = rng.random_range(0..cursor.node().end_byte());
while cursor.goto_first_child_for_byte(byte_offset).is_some() {
max_depth += 1;
}
let depth = rng.gen_range(0..=max_depth);
let depth = rng.random_range(0..=max_depth);
for _ in 0..depth {
cursor.goto_parent();
}
@ -45,7 +45,7 @@ impl Pattern {
let pattern_start = cursor.node().start_position();
let mut roots = vec![Self::random_pattern_for_node(&mut cursor, rng)];
while roots.len() < 5 && cursor.goto_next_sibling() {
if rng.gen_bool(0.2) {
if rng.random_bool(0.2) {
roots.push(Self::random_pattern_for_node(&mut cursor, rng));
}
}
@ -79,22 +79,22 @@ impl Pattern {
let node = cursor.node();
// Sometimes specify the node's type, sometimes use a wildcard.
let (kind, named) = if rng.gen_bool(0.9) {
let (kind, named) = if rng.random_bool(0.9) {
(Some(node.kind()), node.is_named())
} else {
(Some("_"), node.is_named() && rng.gen_bool(0.8))
(Some("_"), node.is_named() && rng.random_bool(0.8))
};
// Sometimes specify the node's field.
let field = if rng.gen_bool(0.75) {
let field = if rng.random_bool(0.75) {
cursor.field_name()
} else {
None
};
// Sometimes capture the node.
let capture = if rng.gen_bool(0.7) {
Some(CAPTURE_NAMES[rng.gen_range(0..CAPTURE_NAMES.len())].to_string())
let capture = if rng.random_bool(0.7) {
Some(CAPTURE_NAMES[rng.random_range(0..CAPTURE_NAMES.len())].to_string())
} else {
None
};
@ -102,9 +102,9 @@ impl Pattern {
// Walk the children and include child patterns for some of them.
let mut children = Vec::new();
if named && cursor.goto_first_child() {
let max_children = rng.gen_range(0..4);
let max_children = rng.random_range(0..4);
while cursor.goto_next_sibling() {
if rng.gen_bool(0.6) {
if rng.random_bool(0.6) {
let child_ast = Self::random_pattern_for_node(cursor, rng);
children.push(child_ast);
if children.len() >= max_children {

View file

@ -83,14 +83,17 @@ pub fn compile_language_to_wasm(
let wasm_bytes = fs::read(&output_filename)?;
let parser = Parser::new(0);
for payload in parser.parse_all(&wasm_bytes) {
if let wasmparser::Payload::ImportSection(imports) = payload? {
for import in imports {
let import = import?.name;
if !builtin_symbols.contains(&import)
&& !stdlib_symbols.contains(&import)
&& !dylink_symbols.contains(&import)
{
missing_symbols.push(import);
if let wasmparser::Payload::ImportSection(reader) = payload? {
for imports in reader {
for import in imports? {
let (_, import) = import?;
let name = import.name;
if !builtin_symbols.contains(&name)
&& !stdlib_symbols.contains(&name)
&& !dylink_symbols.contains(&name)
{
missing_symbols.push(name);
}
}
}
}

View file

@ -25,7 +25,7 @@ load = [ "dep:semver" ]
qjs-rt = [ "load", "rquickjs", "pathdiff" ]
[dependencies]
bitflags = "2.9.4"
bitflags = "2.10.0"
dunce = "1.0.5"
indexmap.workspace = true
indoc.workspace = true

View file

@ -22,7 +22,7 @@ clap.workspace = true
etcetera.workspace = true
indoc.workspace = true
notify = "8.2.0"
notify-debouncer-full = "0.6.0"
notify-debouncer-full = "0.7.0"
regex.workspace = true
schemars.workspace = true
semver.workspace = true

View file

@ -731,7 +731,7 @@ unsafe extern "C" {
unsafe extern "C" {
#[doc = " Advance to the next match of the currently running query.\n\n If there is a match, write it to `*match` and return `true`.\n Otherwise, return `false`."]
pub fn ts_query_cursor_next_match(self_: *mut TSQueryCursor, match_: *mut TSQueryMatch)
-> bool;
-> bool;
}
unsafe extern "C" {
pub fn ts_query_cursor_remove_match(self_: *mut TSQueryCursor, match_id: u32);