mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-24 21:19:37 +00:00
build: upgrade tinymist-{derive,l10n,package,std}, typst-shim edition… (#1995)
… to 2024
This commit is contained in:
parent
46e7eca2b4
commit
920a318df4
18 changed files with 22 additions and 22 deletions
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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}")))),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
||||
|
|
|
|||
|
|
@ -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}")))),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue