build: upgrade tinymist-{derive,l10n,package,std}, typst-shim edition… (#1995)

… to 2024
This commit is contained in:
Myriad-Dreamin 2025-08-06 14:01:01 +08:00 committed by GitHub
parent 46e7eca2b4
commit 920a318df4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 22 additions and 22 deletions

View file

@ -6,7 +6,7 @@ use std::io::{self, Read};
use std::path::Path;
use std::sync::Arc;
use ecow::{eco_format, EcoVec};
use ecow::{EcoVec, eco_format};
use tinymist_std::{ImmutBytes, ImmutPath};
use typst::diag::{PackageError, PackageResult};
use typst::syntax::package::{PackageSpec, VersionlessPackageSpec};

View file

@ -37,7 +37,7 @@ impl<S: AsRef<str>> PackFs for HttpPack<S> {
let reader = match resp.and_then(|r| r.error_for_status()) {
Ok(response) => response,
Err(err) if matches!(err.status().map(|s| s.as_u16()), Some(404)) => {
return Err(PackageError::NotFound(spec.clone()))
return Err(PackageError::NotFound(spec.clone()));
}
Err(err) => return Err(PackageError::NetworkFailed(Some(eco_format!("{err}")))),
};

View file

@ -3,8 +3,8 @@
use std::{io::Read, path::Path};
use js_sys::Uint8Array;
use typst::diag::{eco_format, EcoString};
use wasm_bindgen::{prelude::*, JsValue};
use typst::diag::{EcoString, eco_format};
use wasm_bindgen::{JsValue, prelude::*};
use super::{PackageError, PackageRegistry, PackageSpec};

View file

@ -4,14 +4,14 @@ use std::path::Path;
use std::sync::{Arc, OnceLock};
use parking_lot::Mutex;
use reqwest::blocking::Response;
use reqwest::Certificate;
use reqwest::blocking::Response;
use tinymist_std::ImmutPath;
use typst::diag::{eco_format, EcoString, PackageResult, StrResult};
use typst::diag::{EcoString, PackageResult, StrResult, eco_format};
use typst::syntax::package::{PackageVersion, VersionlessPackageSpec};
use super::{
DummyNotifier, Notifier, PackageError, PackageRegistry, PackageSpec, DEFAULT_REGISTRY,
DEFAULT_REGISTRY, DummyNotifier, Notifier, PackageError, PackageRegistry, PackageSpec,
};
/// The http package registry for typst.ts.
@ -289,7 +289,7 @@ impl PackageStorage {
let reader = match resp.and_then(|r| r.error_for_status()) {
Ok(response) => response,
Err(err) if matches!(err.status().map(|s| s.as_u16()), Some(404)) => {
return Err(PackageError::NotFound(spec.clone()))
return Err(PackageError::NotFound(spec.clone()));
}
Err(err) => return Err(PackageError::NetworkFailed(Some(eco_format!("{err}")))),
};