Skip to content

Commit

Permalink
fix: update jsonc-parser to 0.26 (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Oct 21, 2024
1 parent 3593ec7 commit ca59535
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ workspace = ["deno_json", "deno_semver", "package_json"]
[dependencies]
anyhow = "1.0.57"
indexmap = { version = "2", features = ["serde"] }
jsonc-parser = { version = "0.23.0", features = ["serde"], optional = true }
jsonc-parser = { version = "0.26.0", features = ["serde"], optional = true }
log = "0.4.20"
glob = { version = "0.3.1", optional = true }
ignore = { version = "0.4", optional = true }
Expand Down
7 changes: 6 additions & 1 deletion src/deno_json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use import_map::ImportMapWithDiagnostics;
use indexmap::IndexMap;
use jsonc_parser::common::Ranged;
use jsonc_parser::CollectOptions;
use jsonc_parser::CommentCollectionStrategy;
use jsonc_parser::ParseResult;
use serde::de;
use serde::de::Unexpected;
Expand Down Expand Up @@ -837,7 +838,11 @@ impl ConfigFile {
let jsonc = match jsonc_parser::parse_to_ast(
text,
&CollectOptions {
comments: need_comments_tokens,
comments: if need_comments_tokens {
CommentCollectionStrategy::Separate
} else {
CommentCollectionStrategy::Off
},
tokens: need_comments_tokens,
},
&Default::default(),
Expand Down

0 comments on commit ca59535

Please sign in to comment.