Skip to content

Commit f2a9b17

Browse files
authored
Merge pull request #386 from SteveL-MSFT/update-tree-sitter
update tree-sitter to 0.22
2 parents b44699e + 581ea8d commit f2a9b17

File tree

8 files changed

+468
-29
lines changed

8 files changed

+468
-29
lines changed

dsc_lib/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ version = "3.0.0-preview.7"
44
edition = "2021"
55

66
[dependencies]
7-
base64 = "0.21"
7+
base64 = "0.22"
8+
chrono = "0.4.26"
89
derive_builder ="0.20"
910
indicatif = { version = "0.17" }
1011
jsonschema = "0.17"
1112
num-traits = "0.2"
1213
regex = "1.7"
13-
reqwest = { version = "0.11", features = ["blocking"] }
14+
reqwest = { version = "0.12", features = ["blocking"] }
1415
schemars = { version = "0.8.12", features = ["preserve_order"] }
1516
serde = { version = "1.0", features = ["derive"] }
1617
serde_json = { version = "1.0", features = ["preserve_order"] }
1718
serde_yaml = { version = "0.9.3" }
1819
thiserror = "1.0"
19-
chrono = "0.4.26"
2020
security_context_lib = { path = "../security_context_lib" }
2121
tracing = "0.1.37"
2222
tracing-indicatif = { version = "0.3.6" }
23-
tree-sitter = "0.20"
23+
tree-sitter = "0.22"
2424
tree-sitter-dscexpression = { path = "../tree-sitter-dscexpression" }
2525

2626
[dev-dependencies]

dsc_lib/src/dscresources/dscresource.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ pub trait Invoke {
130130
fn test(&self, expected: &str) -> Result<TestResult, DscError>;
131131

132132
/// Invoke the delete operation on the resource.
133-
///
133+
///
134134
/// # Arguments
135-
///
135+
///
136136
/// * `filter` - The filter as JSON to apply to the resource.
137-
///
137+
///
138138
/// # Errors
139-
///
139+
///
140140
/// This function will return an error if the underlying resource fails.
141141
fn delete(&self, filter: &str) -> Result<(), DscError>;
142142

@@ -256,7 +256,7 @@ impl Invoke for DscResource {
256256
let resource_manifest = import_manifest(manifest.clone())?;
257257
command_resource::invoke_delete(&resource_manifest, &self.directory, filter)
258258
},
259-
}
259+
}
260260
}
261261

262262
fn validate(&self, config: &str) -> Result<ValidateResult, DscError> {

dsc_lib/src/dscresources/resource_manifest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub enum Kind {
1515
Resource,
1616
}
1717

18-
1918
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
2019
#[serde(deny_unknown_fields)]
2120
pub struct ResourceManifest {
@@ -28,7 +27,7 @@ pub struct ResourceManifest {
2827
/// The kind of resource.
2928
#[serde(skip_serializing_if = "Option::is_none")]
3029
pub kind: Option<Kind>,
31-
/// The version of the resource.
30+
/// The version of the resource using semantic versioning.
3231
pub version: String,
3332
/// The description of the resource.
3433
pub description: Option<String>,

dsc_lib/src/parser/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl Statement {
2626
/// This function will return an error if the underlying parser fails to initialize.
2727
pub fn new() -> Result<Self, DscError> {
2828
let mut parser = Parser::new();
29-
parser.set_language(tree_sitter_dscexpression::language())?;
29+
parser.set_language(&tree_sitter_dscexpression::language())?;
3030
let function_dispatcher = FunctionDispatcher::new();
3131
Ok(Self {
3232
parser,

tree-sitter-dscexpression/.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Rust artifacts
2+
Cargo.lock
3+
target/
4+
5+
# Node artifacts
6+
build/
7+
prebuilds/
8+
node_modules/
9+
*.tgz
10+
11+
# Swift artifacts
12+
.build/
13+
14+
# Go artifacts
15+
go.sum
16+
_obj/
17+
18+
# Python artifacts
19+
.venv/
20+
dist/
21+
*.egg-info
22+
*.whl
23+
24+
# C artifacts
25+
*.a
26+
*.so
27+
*.so.*
28+
*.dylib
29+
*.dll
30+
*.pc
31+
32+
# Example dirs
33+
/examples/*/
34+
35+
# Grammar volatiles
36+
*.wasm
37+
*.obj
38+
*.o

tree-sitter-dscexpression/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tree-sitter-dscexpression"
33
description = "DSCExpression grammar for the tree-sitter parsing library"
4-
version = "0.0.1"
4+
version = "0.1.0"
55
keywords = ["incremental", "parsing", "DSCExpression"]
66
categories = ["parsing", "text-editors"]
77
repository = "https://github.com/powershell/dsc"
@@ -20,7 +20,7 @@ include = [
2020
path = "bindings/rust/lib.rs"
2121

2222
[dependencies]
23-
tree-sitter = "0.20"
23+
tree-sitter = "0.22"
2424

2525
[build-dependencies]
2626
cc = "1.0"

0 commit comments

Comments
 (0)