Skip to content

Commit 02b6985

Browse files
committed
feat: update dependencies and apply clippy warnings
replace jest with vitest
1 parent 2dcb981 commit 02b6985

File tree

14 files changed

+1250
-3443
lines changed

14 files changed

+1250
-3443
lines changed

Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ build = true
1616
crate-type = ["cdylib", "rlib"]
1717

1818
[dependencies]
19-
indexmap = "^1.9.1"
19+
indexmap = "^2.12.0"
2020
lazy_static = "^1.4.0"
21-
logos = "^0.12.1"
22-
num-derive = "^0.3.3"
21+
logos = "^0.15.1"
22+
num-derive = "^0.4.2"
2323
num-traits = "^0.2.15"
24-
rowan = "^0.15.10"
25-
serde-wasm-bindgen = "^0.5.0"
24+
rowan = "^0.16.1"
25+
serde-wasm-bindgen = "^0.6.5"
2626
text-size = "^1.1.0"
27-
thiserror = "^1.0.35"
27+
thiserror = "^2.0.17"
2828
tsify = "0.4.3"
29-
unicode-width = "0.1.10"
29+
unicode-width = "^0.2.2"
3030
wasm-bindgen = "^0.2.86"
3131

3232
[dependencies.serde]
@@ -40,12 +40,12 @@ path = "./crates/source_gen"
4040
path = "./crates/definitions"
4141

4242
[dev-dependencies]
43-
datatest-stable = "^0.1.3"
43+
datatest-stable = "^0.3.3"
4444
expect-test = "^1.4.0"
45-
heck = "0.4.1"
45+
heck = "^0.5.0"
4646
pretty_assertions = "^1.3.0"
47-
proc-macro2 = "1.0.57"
48-
quote = "1"
47+
proc-macro2 = "^1.0.57"
48+
quote = "^1"
4949

5050
[profile.release]
5151
lto = true

DEVELOPMENT.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,3 @@ cargo doc --document-private-items
113113
It is endorsed to install the `wasm-opt` tool from the
114114
[`binaryen`](https://github.com/WebAssembly/binaryen) project,
115115
which `wasm-pack` will automatically use to optimize the generated WASM code.
116-
117-

crates/definitions/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
heck = "0.5.0"
10-
proc-macro2 = "1.0.86"
11-
quote = "1.0.36"
9+
heck = "^0.5.0"
10+
proc-macro2 = "^1.0.86"
11+
quote = "^1.0.36"

crates/definitions/src/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ pub const SYNTAX_NODES: &'_ [SyntaxNode<'_>] = &[
466466
S!("element_spec", "A node that contains an element_spec"),
467467
S!("else_expression", "A node containing an else expression"),
468468
S!("error", "An error token with a cause"),
469-
S!("exclam", "An exclamation mark `!`"),
469+
S!("exclam", "An exclamation mark `!`"),
470470
S!("execute_immediate_stmt", "A node that contains a full EXECUTE IMMEDIATE statement"),
471471
S!("exit_stmt", "A node that contains a full EXIT statement"),
472472
S!("expression", "Holds a generic SQL logic/arithmetic expression"),
@@ -475,7 +475,7 @@ pub const SYNTAX_NODES: &'_ [SyntaxNode<'_>] = &[
475475
S!("for_loop", "A node containing a FOR LOOP"),
476476
S!("func_decl_in_type", "A node containing a func_decl_in_type"),
477477
S!("function", "A node that marks a full CREATE [..] FUNCTION block"),
478-
S!("function_header", "A node that marks a FUNCTION header with params and return type"),
478+
S!("function_header", "A node that marks a FUNCTION header with params and return type"),
479479
S!("function_invocation", "An invocation of a function, from the identifier and the opening bracket to the closing bracket"),
480480
S!("hier_ids", "A node containing hier_ids"),
481481
S!("function_spec", "A node containing a function_spec"),

crates/definitions/src/token.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! Generates the [`crate::TokenKind`] enum
66
77
use heck::ToUpperCamelCase;
8-
use proc_macro2::{Ident, Literal, Punct, Spacing, TokenStream};
8+
use proc_macro2::{Ident, Literal, TokenStream};
99
use quote::__private::ext::RepToTokensExt;
1010
use quote::{format_ident, quote};
1111

@@ -62,11 +62,8 @@ impl Token<'_> {
6262
let char = self.shorthand.next().unwrap();
6363
quote! {#char}
6464
} else {
65-
let char = self
66-
.shorthand
67-
.chars()
68-
.map(|c| Punct::new(c, Spacing::Joint));
69-
quote! { #(#char)* }
65+
let tokens: TokenStream = self.shorthand.parse().unwrap();
66+
quote! { #tokens }
7067
}
7168
};
7269
let variant = self.to_ident();

crates/source_gen/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
logos = "0.14.0"
10-
num-derive = "0.4.2"
11-
num-traits = "0.2.19"
12-
rowan = "0.15.15"
9+
logos = "^0.15.0"
10+
num-derive = "^0.4.2"
11+
num-traits = "^0.2.19"
12+
rowan = "^0.16.1"
1313

1414
[build-dependencies]
1515
definitions = { path = "../definitions" }
16-
quote = "1.0.36"
17-
heck = "0.5.0"
18-
proc-macro2 = "1.0.86"
16+
quote = "^1.0.36"
17+
heck = "^0.5.0"
18+
proc-macro2 = "^1.0.86"

src/ast/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ macro_rules! typed_syntax_token {
8585
// Needed so that submodules can import [`typed_syntax_node`] and
8686
// [`typed_syntax_token`]
8787
/// as `super::typed_syntax_{node,token}`.
88-
pub(crate) use {typed_syntax, typed_syntax_node, typed_syntax_token};
88+
pub(crate) use {typed_syntax, typed_syntax_node};
8989

9090
/// Represents a interface for typed AST tokens, akin to [`AstNode`].
9191
pub trait AstToken {

src/grammar/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fn parse_param(p: &mut Parser) {
110110
///
111111
/// * `p`: The parser struct
112112
/// * `expected_components`: A range of the minimum and maximum expected components that should be present in the identifier.
113-
/// To allow an optional identifier, pass a range starting with `0`.
113+
/// To allow an optional identifier, pass a range starting with `0`.
114114
///
115115
/// returns: ()
116116
///

tests/parser.rs

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,10 @@ fn test_parse_coverage(path: &Path) -> datatest_stable::Result<()> {
3636
Ok(())
3737
}
3838

39-
datatest_stable::harness!(
40-
test_parse_coverage,
41-
"tests/procedure",
42-
r"^(.*).ora\.sql$",
43-
test_parse_coverage,
44-
"tests/function",
45-
r"^(.*)\.sql$",
46-
test_parse_coverage,
47-
"tests/dql",
48-
r"(.*)\.sql$",
49-
test_parse_coverage,
50-
"tests/trigger",
51-
r"(.*)\.sql$",
52-
test_parse_coverage,
53-
"tests/view",
54-
r"(.*)\.sql$"
55-
);
39+
datatest_stable::harness! {
40+
{ test = test_parse_coverage, root = "tests/procedure", pattern = r"^(.*).ora\.sql$" },
41+
{ test = test_parse_coverage, root = "tests/function", pattern = r"^(.*)\.sql$" },
42+
{ test = test_parse_coverage, root = "tests/dql", pattern = r"(.*)\.sql$" },
43+
{ test = test_parse_coverage, root = "tests/trigger", pattern = r"(.*)\.sql$" },
44+
{ test = test_parse_coverage, root = "tests/view", pattern = r"(.*)\.sql$" },
45+
}

tests/typescript/jest.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)