Skip to content

Commit

Permalink
update deps 2023-12-02 (#142)
Browse files Browse the repository at this point in the history
* update vl-convert-pdf deps

* Update deno

* Update pyo3

* license
  • Loading branch information
jonmmease authored Dec 2, 2023
1 parent 4887a5b commit 3c8610c
Show file tree
Hide file tree
Showing 10 changed files with 1,470 additions and 3,302 deletions.
1,903 changes: 672 additions & 1,231 deletions Cargo.lock

Large diffs are not rendered by default.

708 changes: 194 additions & 514 deletions thirdparty_rust.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions vl-convert-pdf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ description = "Crate to convert SVG to PDF with embedded text"
keywords = ["SVG", "PDF"]

[dependencies]
svg2pdf = "0.9.0"
pdf-writer = "0.9.1"
svg2pdf = "0.9.1"
pdf-writer = "0.9.2"
usvg = "0.36.0"
anyhow = "1.0.71"
ttf-parser = "0.20.0"
subsetter = "0.1.1"
miniz_oxide = "0.7.1"
siphasher = "1.0.0"
itertools = "0.11.0"
itertools = "0.12.0"
unicode-bidi = "0.3.13"
4 changes: 2 additions & 2 deletions vl-convert-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ crate-type = ["cdylib"]

[dependencies]
vl-convert-rs = { path = "../vl-convert-rs", version= "1.0.1-rc1" }
pyo3 = { version = "0.19.0", features = ["extension-module", "anyhow", "abi3-py37"] }
pyo3 = { version = "0.20.0", features = ["extension-module", "anyhow", "abi3-py37"] }
lazy_static = "1.4.0"
futures = "0.3.28"
pythonize = "0.19.0"
pythonize = "0.20.0"
tokio = { version= "1.32" }

708 changes: 194 additions & 514 deletions vl-convert-python/thirdparty_rust.yaml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions vl-convert-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ keywords = ["Visualization", "Vega", "Vega-Lite"]
[dependencies]
vl-convert-pdf = {path= "../vl-convert-pdf", version= "1.0.1-rc1" }

# Deno 1.37.2. Before updating deno_runtime/deno_core, see note in DEVELOP.md
deno_runtime = "0.129.0"
deno_core = "0.222.0"
deno_emit = "0.31.1"
deno_graph = "0.59.1"
# Deno 1.38.4. Before updating deno_runtime/deno_core, see note in DEVELOP.md
deno_runtime = "0.134.0"
deno_core = "0.232.0"
deno_emit = "0.31.4"
deno_graph = "0.61.1"
serde_json = {version="1.0.106", features=["preserve_order"]}
serde = {version="1.0.188", features=["derive"]}
futures = "0.3.28"
Expand Down
9 changes: 7 additions & 2 deletions vl-convert-rs/src/converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use deno_runtime::deno_core::anyhow::bail;
use deno_runtime::deno_core::error::AnyError;
use deno_runtime::deno_core::{serde_v8, v8, Extension};

use deno_core::{op, ModuleCode, Op};
use deno_core::{op2, ModuleCode, Op};
use deno_runtime::deno_broadcast_channel::InMemoryBroadcastChannel;
use deno_runtime::deno_core;
use deno_runtime::deno_web::BlobStore;
Expand All @@ -41,6 +41,8 @@ use image::io::Reader as ImageReader;

use crate::text::{op_text_width, FONT_DB, USVG_OPTIONS};

deno_core::extension!(vl_convert_converter_runtime, ops = [op_get_json_arg]);

lazy_static! {
pub static ref TOKIO_RUNTIME: tokio::runtime::Runtime =
tokio::runtime::Builder::new_current_thread()
Expand Down Expand Up @@ -223,7 +225,8 @@ fn set_json_arg(arg: serde_json::Value) -> Result<i32, AnyError> {
Ok(id)
}

#[op]
#[op2]
#[string]
fn op_get_json_arg(arg_id: i32) -> Result<String, AnyError> {
match JSON_ARGS.lock() {
Ok(mut guard) => {
Expand Down Expand Up @@ -511,6 +514,7 @@ function vegaLiteToScenegraph_{ver_name}(vlSpec, config, theme, warnings, allowe
bootstrap: Default::default(),
extensions: vec![ext],
startup_snapshot: None,
skip_op_registration: false,
create_params: None,
unsafely_ignore_certificate_errors: None,
root_cert_store_provider: None,
Expand All @@ -533,6 +537,7 @@ function vegaLiteToScenegraph_{ver_name}(vlSpec, config, theme, warnings, allowe
should_wait_for_inspector_session: false,
fs: Arc::new(RealFs),
feature_checker: Arc::new(Default::default()),
strace_ops: None,
};

let main_module =
Expand Down
8 changes: 5 additions & 3 deletions vl-convert-rs/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ use crate::anyhow;
use crate::anyhow::{anyhow, bail};
use crate::image_loading::custom_string_resolver;
use deno_core::error::AnyError;
use deno_core::op;
use deno_core::op2;
use serde::Deserialize;
use serde_json::Value;
use std::collections::HashSet;
use std::sync::Mutex;
use usvg::fontdb::Database;
use usvg::{ImageHrefResolver, TreeParsing, TreeTextToPath};

deno_core::extension!(vl_convert_text_runtime, ops = [op_text_width]);

lazy_static! {
pub static ref USVG_OPTIONS: Mutex<usvg::Options> = Mutex::new(init_usvg_options());
pub static ref FONT_DB: Mutex<Database> = Mutex::new(init_font_db());
Expand Down Expand Up @@ -179,8 +181,8 @@ impl TextInfo {
}
}

#[op]
pub fn op_text_width(text_info_str: String) -> Result<f64, AnyError> {
#[op2(fast)]
pub fn op_text_width(#[string] text_info_str: String) -> Result<f64, AnyError> {
let text_info = match serde_json::from_str::<TextInfo>(&text_info_str) {
Ok(text_info) => text_info,
Err(err) => bail!("Failed to deserialize text info: {}", err.to_string()),
Expand Down
708 changes: 194 additions & 514 deletions vl-convert-rs/thirdparty_rust.yaml

Large diffs are not rendered by default.

708 changes: 194 additions & 514 deletions vl-convert/thirdparty_rust.yaml

Large diffs are not rendered by default.

0 comments on commit 3c8610c

Please sign in to comment.