Skip to content

Commit 9f2631c

Browse files
committed
Merge upstream v0.11.1
2 parents f50ee28 + 5011510 commit 9f2631c

File tree

1,994 files changed

+19544
-18936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,994 files changed

+19544
-18936
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request, merge_group]
44
env:
55
RUSTFLAGS: "-Dwarnings"
66
RUSTDOCFLAGS: "-Dwarnings"
7+
TYPST_TESTS_EXTENDED: true
78

89
jobs:
910
# This allows us to have one branch protection rule for the full test matrix.
@@ -29,16 +30,19 @@ jobs:
2930
runs-on: ${{ matrix.os }}
3031
steps:
3132
- uses: actions/checkout@v4
32-
- uses: dtolnay/rust-toolchain@stable
33+
- uses: dtolnay/rust-toolchain@1.77.0
3334
- uses: Swatinem/rust-cache@v2
35+
- run: cargo test --workspace --no-run
3436
- run: cargo test --workspace --no-fail-fast
3537

3638
checks:
3739
name: Check clippy, formatting, and documentation
3840
runs-on: ubuntu-latest
3941
steps:
4042
- uses: actions/checkout@v4
41-
- uses: dtolnay/rust-toolchain@stable
43+
- uses: dtolnay/[email protected]
44+
with:
45+
components: clippy, rustfmt
4246
- uses: Swatinem/rust-cache@v2
4347
- run: cargo clippy --workspace --all-targets --all-features
4448
- run: cargo fmt --check --all
@@ -62,5 +66,5 @@ jobs:
6266
with:
6367
toolchain: nightly-2023-09-13
6468
- uses: Swatinem/rust-cache@v2
65-
- run: cargo install cargo-fuzz
69+
- run: cargo install --locked cargo-fuzz@0.12.0
6670
- run: cd tests/fuzz && cargo fuzz build --dev

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
steps:
3939
- uses: actions/checkout@v4
40-
- uses: dtolnay/rust-toolchain@stable
40+
- uses: dtolnay/rust-toolchain@1.77.0
4141
with:
4242
target: ${{ matrix.target }}
4343

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ desktop.ini
66
.DS_Store
77

88
# Tests and benchmarks
9-
tests/png
10-
tests/pdf
11-
tests/svg
12-
tests/target
13-
tests/typ/**/*.pdf
9+
tests/store
10+
tests/suite/**/*.pdf
1411
tests/fuzz/target
1512
tests/fuzz/corpus
1613
tests/fuzz/artifacts
@@ -23,6 +20,7 @@ tarpaulin-report.html
2320

2421
# Node
2522
node_modules
23+
tools/test-helper/dist
2624
package-lock.json
2725

2826
# Nix

Cargo.lock

Lines changed: 31 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default-members = ["crates/typst-cli"]
44
resolver = "2"
55

66
[workspace.package]
7-
version = "0.11.0"
7+
version = "0.11.1"
88
rust-version = "1.74" # also change in ci.yml
99
authors = ["The Typst Project Developers"]
1010
edition = "2021"
@@ -16,17 +16,17 @@ keywords = ["typst"]
1616
readme = "README.md"
1717

1818
[workspace.dependencies]
19-
typst = { path = "crates/typst", version = "0.11.0" }
20-
typst-cli = { path = "crates/typst-cli", version = "0.11.0" }
21-
typst-ide = { path = "crates/typst-ide", version = "0.11.0" }
22-
typst-macros = { path = "crates/typst-macros", version = "0.11.0" }
23-
typst-pdf = { path = "crates/typst-pdf", version = "0.11.0" }
24-
typst-render = { path = "crates/typst-render", version = "0.11.0" }
25-
typst-svg = { path = "crates/typst-svg", version = "0.11.0" }
26-
typst-syntax = { path = "crates/typst-syntax", version = "0.11.0" }
27-
typst-timing = { path = "crates/typst-timing", version = "0.11.0" }
28-
typst-assets = "0.11.0"
29-
typst-dev-assets = { git = "https://github.com/typst/typst-dev-assets", tag = "v0.11.0" }
19+
typst = { path = "crates/typst", version = "0.11.1" }
20+
typst-cli = { path = "crates/typst-cli", version = "0.11.1" }
21+
typst-ide = { path = "crates/typst-ide", version = "0.11.1" }
22+
typst-macros = { path = "crates/typst-macros", version = "0.11.1" }
23+
typst-pdf = { path = "crates/typst-pdf", version = "0.11.1" }
24+
typst-render = { path = "crates/typst-render", version = "0.11.1" }
25+
typst-svg = { path = "crates/typst-svg", version = "0.11.1" }
26+
typst-syntax = { path = "crates/typst-syntax", version = "0.11.1" }
27+
typst-timing = { path = "crates/typst-timing", version = "0.11.1" }
28+
typst-assets = "0.11.1"
29+
typst-dev-assets = { git = "https://github.com/typst/typst-dev-assets", tag = "v0.11.1" }
3030
az = "1.2"
3131
base64 = "0.22"
3232
bitflags = { version = "2", features = ["serde"] }
@@ -47,7 +47,7 @@ env_proxy = "0.4"
4747
flate2 = "1"
4848
fontdb = { version = "0.16", default-features = false }
4949
fs_extra = "1.3"
50-
hayagriva = "0.5.2"
50+
hayagriva = "0.5.3"
5151
heck = "0.4"
5252
hypher = "0.1.4"
5353
icu_properties = { version = "1.4", features = ["serde"] }
@@ -94,6 +94,7 @@ semver = "1"
9494
serde = { version = "1.0.184", features = ["derive"] }
9595
serde_json = "1"
9696
serde_yaml = "0.9"
97+
shell-escape = "0.1.5"
9798
siphasher = "1"
9899
smallvec = { version = "1.11.1", features = ["union", "const_generics", "const_new"] }
99100
stacker = "0.1.15"

crates/typst-cli/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ readme = { workspace = true }
1515
[[bin]]
1616
name = "typst"
1717
path = "src/main.rs"
18-
test = false
19-
doctest = false
20-
bench = false
2118
doc = false
2219

2320
[dependencies]
@@ -51,6 +48,7 @@ semver = { workspace = true }
5148
serde = { workspace = true }
5249
serde_json = { workspace = true }
5350
serde_yaml = { workspace = true }
51+
shell-escape = { workspace = true }
5452
tar = { workspace = true }
5553
tempfile = { workspace = true }
5654
toml = { workspace = true }

crates/typst-cli/src/init.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,19 @@ fn print_summary(
104104
out.set_color(&gray)?;
105105
write!(out, "> ")?;
106106
out.reset()?;
107-
writeln!(out, "cd {}", project_dir.display())?;
107+
writeln!(
108+
out,
109+
"cd {}",
110+
shell_escape::escape(project_dir.display().to_string().into()),
111+
)?;
108112
out.set_color(&gray)?;
109113
write!(out, "> ")?;
110114
out.reset()?;
111-
writeln!(out, "typst watch {}", template.entrypoint)?;
115+
writeln!(
116+
out,
117+
"typst watch {}",
118+
shell_escape::escape(template.entrypoint.to_string().into()),
119+
)?;
112120
writeln!(out)?;
113121
Ok(())
114122
}

crates/typst-cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use crate::timings::Timer;
2626

2727
thread_local! {
2828
/// The CLI's exit code.
29-
static EXIT: Cell<ExitCode> = Cell::new(ExitCode::SUCCESS);
29+
static EXIT: Cell<ExitCode> = const { Cell::new(ExitCode::SUCCESS) };
3030
}
3131

3232
/// The parsed commandline arguments.

crates/typst-cli/src/world.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ struct FileSlot {
226226
}
227227

228228
impl FileSlot {
229-
/// Create a new path slot.
229+
/// Create a new file slot.
230230
fn new(id: FileId) -> Self {
231231
Self { id, file: SlotCell::new(), source: SlotCell::new() }
232232
}

crates/typst-ide/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ categories = { workspace = true }
1212
keywords = { workspace = true }
1313
readme = { workspace = true }
1414

15-
[lib]
16-
test = false
17-
doctest = false
18-
bench = false
19-
2015
[dependencies]
2116
typst = { workspace = true }
2217
comemo = { workspace = true }
@@ -26,5 +21,10 @@ log = { workspace = true }
2621
serde = { workspace = true }
2722
unscanny = { workspace = true }
2823

24+
[dev-dependencies]
25+
typst-assets = { workspace = true }
26+
typst-dev-assets = { workspace = true }
27+
once_cell = { workspace = true }
28+
2929
[lints]
3030
workspace = true

0 commit comments

Comments
 (0)