1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00

upgrade: dprint 0.3.0-alpha.6

This commit is contained in:
Ryan Dahl 2020-02-03 15:52:32 -05:00 committed by GitHub
parent f4cc08c4fc
commit 0471243334
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 13 deletions

15
Cargo.lock generated
View file

@ -348,7 +348,7 @@ dependencies = [
"deno_typescript 0.32.0",
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"dlopen 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"dprint-plugin-typescript 0.3.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
"dprint-plugin-typescript 0.3.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fwdansi 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -454,15 +454,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "dprint-core"
version = "0.7.0-alpha.1"
version = "0.7.0-alpha.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dprint-plugin-typescript"
version = "0.3.0-alpha.4"
version = "0.3.0-alpha.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"dprint-core 0.7.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)",
"dprint-core 0.7.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
"swc_common 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"swc_ecma_ast 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2348,8 +2351,8 @@ dependencies = [
"checksum dlopen 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937"
"checksum dlopen_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581"
"checksum downcast-rs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6"
"checksum dprint-core 0.7.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7f460fbecb15f29013e41c557496f54620a44ac2e0c3554a29c3c7e28e931b70"
"checksum dprint-plugin-typescript 0.3.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6f1ff9b8a5d9c2a181559464a7425ef49f7092d62589d422597a33c14ee7d57e"
"checksum dprint-core 0.7.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c5140b812c0a8885cea8044b1e954209de1aa1cf041ea061469a941a54495a67"
"checksum dprint-plugin-typescript 0.3.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1d29851ccf578c2b03f4be4da3cdaaa47cdb9a00b99f9f38a443b6669262c399"
"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3"
"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28"

View file

@ -35,7 +35,7 @@ brotli2 = "0.3.2"
clap = "2.33.0"
dirs = "2.0.2"
dlopen = "0.1.8"
dprint-plugin-typescript = "0.3.0-alpha.4"
dprint-plugin-typescript = "=0.3.0-alpha.6"
futures = { version = "0.3.1", features = [ "compat", "io-compat" ] }
glob = "0.3.0"
http = "0.2.0"

View file

@ -27,12 +27,16 @@ fn is_supported(path: &Path) -> bool {
&& (TYPESCRIPT.is_match(&path_str) || JAVASCRIPT.is_match(&path_str))
}
fn get_config() -> dprint::Configuration {
dprint::ConfigurationBuilder::new()
fn get_config() -> dprint::configuration::Configuration {
dprint::configuration::ConfigurationBuilder::new()
.line_width(80)
.indent_width(2)
.next_control_flow_position(dprint::NextControlFlowPosition::SameLine)
.binary_expression_operator_position(dprint::OperatorPosition::SameLine)
.next_control_flow_position(
dprint::configuration::NextControlFlowPosition::SameLine,
)
.binary_expression_operator_position(
dprint::configuration::OperatorPosition::SameLine,
)
.build()
}
@ -48,7 +52,10 @@ fn get_supported_files(paths: Vec<PathBuf>) -> Vec<PathBuf> {
files_to_check
}
fn check_source_files(config: dprint::Configuration, paths: Vec<PathBuf>) {
fn check_source_files(
config: dprint::configuration::Configuration,
paths: Vec<PathBuf>,
) {
let start = Instant::now();
let mut not_formatted_files = vec![];
@ -91,7 +98,10 @@ fn check_source_files(config: dprint::Configuration, paths: Vec<PathBuf>) {
}
}
fn format_source_files(config: dprint::Configuration, paths: Vec<PathBuf>) {
fn format_source_files(
config: dprint::configuration::Configuration,
paths: Vec<PathBuf>,
) {
let start = Instant::now();
let mut not_formatted_files = vec![];