Skip to content

Commit 7c35c8f

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
remove dependency on node
1 parent 1be3a25 commit 7c35c8f

File tree

15 files changed

+26
-1615
lines changed

15 files changed

+26
-1615
lines changed

dsc/Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dsc/src/subcommand.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ pub fn resource(subcommand: &ResourceSubCommand, stdin: &Option<String>) {
498498
fn list_resources(dsc: &mut DscManager, resource_name: &Option<String>, adapter_name: &Option<String>, description: &Option<String>, tags: &Option<Vec<String>>, format: &Option<OutputFormat>) {
499499
let mut write_table = false;
500500
let mut table = Table::new(&["Type", "Kind", "Version", "Caps", "RequireAdapter", "Description"]);
501-
if format.is_none() && io::stdin().is_terminal() {
501+
if format.is_none() && io::stdout().is_terminal() {
502502
// write as table if format is not specified and interactive
503503
write_table = true;
504504
}
@@ -580,7 +580,7 @@ fn list_resources(dsc: &mut DscManager, resource_name: &Option<String>, adapter_
580580
};
581581
write_output(&json, format);
582582
// insert newline separating instances if writing to console
583-
if io::stdin().is_terminal() { println!(); }
583+
if io::stdout().is_terminal() { println!(); }
584584
}
585585
}
586586

dsc/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub fn write_output(json: &str, format: &Option<OutputFormat>) {
194194
let mut is_json = true;
195195
let mut output_format = format.clone();
196196
let mut syntax_color = false;
197-
if std::io::stdin().is_terminal() {
197+
if std::io::stdout().is_terminal() {
198198
syntax_color = true;
199199
if output_format.is_none() {
200200
output_format = Some(OutputFormat::Yaml);

dsc_lib/Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.into())?;
3030
let function_dispatcher = FunctionDispatcher::new();
3131
Ok(Self {
3232
parser,

tools/test_group_resource/Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tree-sitter-dscexpression/.npmrc

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

tree-sitter-dscexpression/Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tree-sitter-dscexpression/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ path = "bindings/rust/lib.rs"
2121

2222
[dependencies]
2323
tree-sitter = "0.24.3"
24+
tree-sitter-language = "0.1.2"
2425

2526
[build-dependencies]
26-
cc = "1.1"
27+
cc = "1.1.29"

tree-sitter-dscexpression/binding.gyp

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

0 commit comments

Comments
 (0)