From c623b767d4b9f4968692fe5c9173d2c6be6f47d6 Mon Sep 17 00:00:00 2001 From: Wenzhuo Liu Date: Mon, 25 Mar 2024 21:31:10 +0800 Subject: [PATCH] chore: bump to 0.11.3 and fix vscode build script (#279) * chore: bump to 0.11.3 and fix vscode build script * bump ts to 0.5.0-rc2 --- .vscode/tasks.json | 5 +++-- Cargo.lock | 18 +++++++++--------- Cargo.toml | 8 ++++---- addons/frontend/package.json | 4 ++-- addons/frontend/yarn.lock | 18 +++++++++--------- addons/typst-dom/package.json | 8 ++++---- addons/typst-dom/yarn.lock | 18 +++++++++--------- addons/vscode/CHANGELOG.md | 4 ++++ addons/vscode/README.md | 4 ++++ addons/vscode/package.json | 2 +- src/compiler.rs | 4 +--- src/main.rs | 4 ++-- 12 files changed, 52 insertions(+), 45 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 4c03a2a..e7c91d1 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -28,9 +28,10 @@ }, { "label": "Build Binary", - "type": "cargo", - "command": "build", + "type": "shell", + "command": "cargo", "args": [ + "build", "--profile=release" ], "problemMatcher": [ diff --git a/Cargo.lock b/Cargo.lock index 1d329de..2764821 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2533,9 +2533,9 @@ dependencies = [ [[package]] name = "reflexo" -version = "0.4.2-rc9" +version = "0.5.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bf3d6c80be65ec408823031e560758c1de427601d61a82fdea0d0ecb7794f4" +checksum = "247ea8050cb5c88b41a68b3269f5a2eb7ebff55851a564d96b035643418346e6" dependencies = [ "base64 0.22.0", "bitvec", @@ -3683,7 +3683,7 @@ dependencies = [ [[package]] name = "typst-preview" -version = "0.11.2" +version = "0.11.3" dependencies = [ "anyhow", "await-tree", @@ -3745,9 +3745,9 @@ dependencies = [ [[package]] name = "typst-ts-compiler" -version = "0.4.2-rc9" +version = "0.5.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478dbcd334466a939420fa9e9429e0ecaa8ec8c5a943e74862b2b46b364e2938" +checksum = "c18cf7d96c0c558901b3f7e3f5200ecb7e3d7d3dcc5a1222e94bc875237ff352" dependencies = [ "append-only-vec", "base64 0.22.0", @@ -3784,9 +3784,9 @@ dependencies = [ [[package]] name = "typst-ts-core" -version = "0.4.2-rc9" +version = "0.5.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d109fb49a9ffa1d9f7126b317313d29257ec0d34ae7a34c65d16ed1fea2b448" +checksum = "a69135c380eb60efa4aeabd986d27d82ecd1b4c843fd3393992b449409317847" dependencies = [ "base64 0.22.0", "base64-serde", @@ -3822,9 +3822,9 @@ dependencies = [ [[package]] name = "typst-ts-svg-exporter" -version = "0.4.2-rc9" +version = "0.5.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f909564a69478f3e244ddc4380dc337f74edfa5d4ce7551ddfedc6f5d32f48b6" +checksum = "b6063f63c8e3ba3d4d7f4cb1a8fd96b096e8e713f24783278fea98dac0746966" dependencies = [ "base64 0.22.0", "comemo", diff --git a/Cargo.toml b/Cargo.toml index 499dfd2..d1fe5d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "typst-preview" description = "A previewer for the Typst typesetting system." license = "MIT" repository = "https://github.com/Enter-tainer/typst-preview" -version = "0.11.2" +version = "0.11.3" authors = ["The Typst Project Developers"] edition = "2021" build = "build.rs" @@ -22,12 +22,12 @@ doc = false [dependencies] typst = "0.11.0" typst-assets = { version = "0.11.0", features = ["fonts"] } -typst-ts-svg-exporter = { version = "0.4.2-rc9" } -typst-ts-core = { version = "0.4.2-rc9", default-features = false, features = [ +typst-ts-svg-exporter = { version = "0.5.0-rc2" } +typst-ts-core = { version = "0.5.0-rc2", default-features = false, features = [ "flat-vector", "vector-bbox", ] } -typst-ts-compiler = { version = "0.4.2-rc9", optional = true } +typst-ts-compiler = { version = "0.5.0-rc2", optional = true } comemo = "0.4" elsa = "1.10" memmap2 = "0.9.4" diff --git a/addons/frontend/package.json b/addons/frontend/package.json index 934494d..c8f214c 100644 --- a/addons/frontend/package.json +++ b/addons/frontend/package.json @@ -13,8 +13,8 @@ "unlink:local": "yarn unlink @myriaddreamin/typst.ts @myriaddreamin/typst-ts-renderer" }, "dependencies": { - "@myriaddreamin/typst-ts-renderer": "0.4.2-rc9", - "@myriaddreamin/typst.ts": "0.4.2-rc9", + "@myriaddreamin/typst-ts-renderer": "0.4.2-rc10", + "@myriaddreamin/typst.ts": "0.4.2-rc10", "typst-dom": "link:../typst-dom", "rxjs": "^7.8.1" }, diff --git a/addons/frontend/yarn.lock b/addons/frontend/yarn.lock index 71683ac..86ce022 100644 --- a/addons/frontend/yarn.lock +++ b/addons/frontend/yarn.lock @@ -117,15 +117,15 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@myriaddreamin/typst-ts-renderer@0.4.2-rc9": - version "0.4.2-rc9" - resolved "https://registry.yarnpkg.com/@myriaddreamin/typst-ts-renderer/-/typst-ts-renderer-0.4.2-rc9.tgz#5a4b2f6f4fb75db125937baa24dacee7e9247c9f" - integrity sha512-ZP3Uve5g77y2Rq45YJCL1JsqLKbBMalJlhqOWKHqeDXrsJyMbskOgypAFnSdXo1tssYZFnlQpS5ICrDlmBnnFQ== - -"@myriaddreamin/typst.ts@0.4.2-rc9": - version "0.4.2-rc9" - resolved "https://registry.yarnpkg.com/@myriaddreamin/typst.ts/-/typst.ts-0.4.2-rc9.tgz#77bfe15954f319d5467206cad759c86a1b10a9a8" - integrity sha512-PcAiojDzvhyI9IIHTWM0/CKMEiRnWJf5JxFCWwKMLsMuxz1K/+18KZR7zn8T31cm9xIqb9U8mQGxQILgFh0lEg== +"@myriaddreamin/typst-ts-renderer@0.4.2-rc10": + version "0.4.2-rc10" + resolved "https://registry.yarnpkg.com/@myriaddreamin/typst-ts-renderer/-/typst-ts-renderer-0.4.2-rc10.tgz#bc546c042c60c97025509b171be6ba047583be73" + integrity sha512-WGkYeyXXGNeL4VWYzsW+S/9b0W7mvTr7bTjt/ZQHOs/FyOl8q2S6QivqlzKTutdXzGZ+5EB8SA86757hYtkDFA== + +"@myriaddreamin/typst.ts@0.4.2-rc10": + version "0.4.2-rc10" + resolved "https://registry.yarnpkg.com/@myriaddreamin/typst.ts/-/typst.ts-0.4.2-rc10.tgz#b4714914428bdd6540d7b178b4f1342e5cd19509" + integrity sha512-cgBcX961mBnUHVFTcbffhm7V6Am3RGD3Rwm/UsDBSwMrsTC1Qde4qVfsg5o2vKjA/idAff3Uf0D3mo0bcsicjw== dependencies: idb "^7.1.1" diff --git a/addons/typst-dom/package.json b/addons/typst-dom/package.json index a0ee5f8..b607a99 100644 --- a/addons/typst-dom/package.json +++ b/addons/typst-dom/package.json @@ -13,12 +13,12 @@ "unlink:local": "yarn unlink @myriaddreamin/typst.ts @myriaddreamin/typst-ts-renderer" }, "peerDependencies": { - "@myriaddreamin/typst-ts-renderer": "0.4.2-rc9", - "@myriaddreamin/typst.ts": "0.4.2-rc9" + "@myriaddreamin/typst-ts-renderer": "0.4.2-rc10", + "@myriaddreamin/typst.ts": "0.4.2-rc10" }, "devDependencies": { - "@myriaddreamin/typst-ts-renderer": "0.4.2-rc9", - "@myriaddreamin/typst.ts": "0.4.2-rc9", + "@myriaddreamin/typst-ts-renderer": "0.4.2-rc10", + "@myriaddreamin/typst.ts": "0.4.2-rc10", "typescript": "^5.0.2", "vite": "^4.3.9", "vite-plugin-singlefile": "^0.13.5", diff --git a/addons/typst-dom/yarn.lock b/addons/typst-dom/yarn.lock index 8807897..67449ee 100644 --- a/addons/typst-dom/yarn.lock +++ b/addons/typst-dom/yarn.lock @@ -124,15 +124,15 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@myriaddreamin/typst-ts-renderer@0.4.2-rc9": - version "0.4.2-rc9" - resolved "https://registry.yarnpkg.com/@myriaddreamin/typst-ts-renderer/-/typst-ts-renderer-0.4.2-rc9.tgz#5a4b2f6f4fb75db125937baa24dacee7e9247c9f" - integrity sha512-ZP3Uve5g77y2Rq45YJCL1JsqLKbBMalJlhqOWKHqeDXrsJyMbskOgypAFnSdXo1tssYZFnlQpS5ICrDlmBnnFQ== - -"@myriaddreamin/typst.ts@0.4.2-rc9": - version "0.4.2-rc9" - resolved "https://registry.yarnpkg.com/@myriaddreamin/typst.ts/-/typst.ts-0.4.2-rc9.tgz#77bfe15954f319d5467206cad759c86a1b10a9a8" - integrity sha512-PcAiojDzvhyI9IIHTWM0/CKMEiRnWJf5JxFCWwKMLsMuxz1K/+18KZR7zn8T31cm9xIqb9U8mQGxQILgFh0lEg== +"@myriaddreamin/typst-ts-renderer@0.4.2-rc10": + version "0.4.2-rc10" + resolved "https://registry.yarnpkg.com/@myriaddreamin/typst-ts-renderer/-/typst-ts-renderer-0.4.2-rc10.tgz#bc546c042c60c97025509b171be6ba047583be73" + integrity sha512-WGkYeyXXGNeL4VWYzsW+S/9b0W7mvTr7bTjt/ZQHOs/FyOl8q2S6QivqlzKTutdXzGZ+5EB8SA86757hYtkDFA== + +"@myriaddreamin/typst.ts@0.4.2-rc10": + version "0.4.2-rc10" + resolved "https://registry.yarnpkg.com/@myriaddreamin/typst.ts/-/typst.ts-0.4.2-rc10.tgz#b4714914428bdd6540d7b178b4f1342e5cd19509" + integrity sha512-cgBcX961mBnUHVFTcbffhm7V6Am3RGD3Rwm/UsDBSwMrsTC1Qde4qVfsg5o2vKjA/idAff3Uf0D3mo0bcsicjw== dependencies: idb "^7.1.1" diff --git a/addons/vscode/CHANGELOG.md b/addons/vscode/CHANGELOG.md index 1677a58..9e59abc 100644 --- a/addons/vscode/CHANGELOG.md +++ b/addons/vscode/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to the "typst-preview" extension will be documented in this Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. +## v0.11.3 - [2024-03-25] + +- Bump to typst.ts 0.5.0-rc1 + ## v0.11.2 - [2024-03-21] - Fix: diff --git a/addons/vscode/README.md b/addons/vscode/README.md index 936befe..19aa223 100644 --- a/addons/vscode/README.md +++ b/addons/vscode/README.md @@ -38,6 +38,10 @@ This project is not affiliated with, created by, or endorsed by Typst the brand. ## Release Notes +### v0.11.3 - [2024-03-25] + +- Bump to typst.ts 0.5.0-rc1 + ### v0.11.2 - [2024-03-21] - Fix: diff --git a/addons/vscode/package.json b/addons/vscode/package.json index f761e83..4eb270d 100644 --- a/addons/vscode/package.json +++ b/addons/vscode/package.json @@ -8,7 +8,7 @@ "type": "git", "url": "https://github.com/Enter-tainer/typst-preview" }, - "version": "0.11.2", + "version": "0.11.3", "engines": { "vscode": "^1.77.0" }, diff --git a/src/compiler.rs b/src/compiler.rs index e7026ee..8f8f703 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -77,11 +77,9 @@ impl CompileServer { // editor_conn_sender: mpsc::UnboundedSender, ) -> Self { // CompileExporter + DynamicLayoutCompiler + WatchDriver - let root = compiler_driver.world.root.clone(); - // let r = renderer_sender.clone(); let driver = CompileExporter::new(compiler_driver); let driver = Reporter { inner: driver, cb }; - let inner = CompileActor::new(driver, root.as_ref().to_owned()).with_watch(true); + let inner = CompileActor::new(driver).with_watch(true); Self { inner, diff --git a/src/main.rs b/src/main.rs index 173f644..4059a82 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use log::{error, info}; use typst_ts_compiler::service::CompileDriver; use typst_ts_compiler::TypstSystemWorld; -use typst_ts_core::config::CompileOpts; +use typst_ts_core::config::{compiler::EntryOpts, CompileOpts}; use crate::compiler::CompileServer; @@ -108,7 +108,7 @@ async fn main() { let compiler_driver = { let world = TypstSystemWorld::new(CompileOpts { - root_dir: root.clone(), + entry: EntryOpts::new_rooted(root.clone(), Some(entry.clone())), font_paths: arguments.font_paths.clone(), with_embedded_fonts: typst_assets::fonts().map(Cow::Borrowed).collect(), ..CompileOpts::default()