chore(es/preset-env): Upgrade browserslist-rs (#2889)

This commit is contained in:
Pig Fang 2021-11-29 15:48:07 +08:00 committed by GitHub
parent 3d75b9a968
commit af216c1014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 16 deletions

49
Cargo.lock generated
View File

@ -258,11 +258,14 @@ dependencies = [
[[package]]
name = "browserslist-rs"
version = "0.2.0"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa428c5a7369965603314e5fbfa5ae1755159bce2c35880d80ea84a866213b20"
checksum = "e04119af2f8e4d2e4e7bbe95e43a341f3c282da3b42d01ad89b2ba6d178c940e"
dependencies = [
"anyhow",
"chrono",
"curl",
"either",
"itertools",
"js-sys",
"once_cell",
@ -496,6 +499,36 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
[[package]]
name = "curl"
version = "0.4.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bc6d233563261f8db6ffb83bbaad5a73837a6e6b28868e926337ebbdece0be3"
dependencies = [
"curl-sys",
"libc",
"openssl-probe",
"openssl-sys",
"schannel",
"socket2",
"winapi",
]
[[package]]
name = "curl-sys"
version = "0.4.51+curl-7.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d130987e6a6a34fe0889e1083022fa48cd90e6709a84be3fb8dd95801de5af20"
dependencies = [
"cc",
"libc",
"libz-sys",
"openssl-sys",
"pkg-config",
"vcpkg",
"winapi",
]
[[package]]
name = "darling"
version = "0.10.2"
@ -1049,6 +1082,18 @@ dependencies = [
"winapi",
]
[[package]]
name = "libz-sys"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "lock_api"
version = "0.1.5"

View File

@ -12,7 +12,7 @@ version = "0.67.1"
[dependencies]
ahash = "0.7.4"
anyhow = "1"
browserslist-rs = "=0.2.0"
browserslist-rs = "=0.3.2"
dashmap = "4.0.2"
indexmap = "1.6.2"
once_cell = "1.2.0"

View File

@ -590,13 +590,8 @@ impl Query {
where
T: AsRef<str>,
{
let distribs = browserslist::resolve(
s,
&browserslist::Opts {
mobile_to_desktop: false,
ignore_unknown_versions: true,
},
)
let distribs =
browserslist::resolve(s, browserslist::Opts::new().ignore_unknown_versions(true))
.with_context(|| {
format!(
"failed to resolve browserslist query: {:?}",