Skip to content

Commit 1579210

Browse files
akroshgCopilot
andcommitted
chore: bump version to 0.0.17
Keep the release gate green on Windows by using the npx .cmd shim for docs bundling and guarding Unix-only resource metrics in the streaming example. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 53a71db commit 1579210

28 files changed

Lines changed: 136 additions & 83 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ members = [
1111
resolver = "2"
1212

1313
[workspace.package]
14-
version = "0.0.16"
14+
version = "0.0.17"
1515
edition = "2021"
1616
rust-version = "1.93"
1717
authors = ["Microsoft Edge"]

crates/webui-cli/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ name = "webui"
1616
path = "src/main.rs"
1717

1818
[dependencies]
19-
microsoft-webui = { path = "../webui", version = "0.0.16", features = ["cli"] }
20-
microsoft-webui-handler = { path = "../webui-handler", version = "0.0.16" }
21-
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.16" }
22-
microsoft-webui-discovery = { path = "../webui-discovery", version = "0.0.16" }
23-
microsoft-webui-tokens = { path = "../webui-tokens", version = "0.0.16" }
24-
microsoft-webui-dev-server = { path = "../webui-dev-server", version = "0.0.16" }
19+
microsoft-webui = { path = "../webui", version = "0.0.17", features = ["cli"] }
20+
microsoft-webui-handler = { path = "../webui-handler", version = "0.0.17" }
21+
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.17" }
22+
microsoft-webui-discovery = { path = "../webui-discovery", version = "0.0.17" }
23+
microsoft-webui-tokens = { path = "../webui-tokens", version = "0.0.17" }
24+
microsoft-webui-dev-server = { path = "../webui-dev-server", version = "0.0.17" }
2525
clap = { workspace = true }
2626
anyhow = { workspace = true }
2727
console = { workspace = true }
@@ -37,7 +37,7 @@ log = { workspace = true }
3737

3838
[dev-dependencies]
3939
tempfile = { workspace = true }
40-
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.16" }
40+
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.17" }
4141

4242
[lints]
4343
workspace = true

crates/webui-expressions/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ categories = ["web-programming", "parser-implementations"]
1515
name = "webui_expressions"
1616

1717
[dependencies]
18-
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.16" }
19-
microsoft-webui-state = { path = "../webui-state", version = "0.0.16" }
18+
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.17" }
19+
microsoft-webui-state = { path = "../webui-state", version = "0.0.17" }
2020
serde_json = { workspace = true }
2121
thiserror = { workspace = true }
2222

2323
[dev-dependencies]
24-
microsoft-webui-test-utils = { path = "../webui-test-utils", version = "0.0.16" }
24+
microsoft-webui-test-utils = { path = "../webui-test-utils", version = "0.0.17" }
2525
criterion = { workspace = true }
2626

2727
[[bench]]

crates/webui-ffi/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ parser = ["dep:microsoft-webui-parser"]
2424
regenerate-header = ["dep:cbindgen"]
2525

2626
[dependencies]
27-
microsoft-webui-handler = { path = "../webui-handler", version = "0.0.16" }
28-
microsoft-webui-parser = { path = "../webui-parser", version = "0.0.16", optional = true }
29-
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.16" }
27+
microsoft-webui-handler = { path = "../webui-handler", version = "0.0.17" }
28+
microsoft-webui-parser = { path = "../webui-parser", version = "0.0.17", optional = true }
29+
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.17" }
3030
serde_json = { workspace = true }
3131

3232
[build-dependencies]

crates/webui-handler/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ categories = ["web-programming", "template-engine"]
1515
name = "webui_handler"
1616

1717
[dependencies]
18-
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.16" }
19-
microsoft-webui-expressions = { path = "../webui-expressions", version = "0.0.16" }
20-
microsoft-webui-state = { path = "../webui-state", version = "0.0.16" }
18+
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.17" }
19+
microsoft-webui-expressions = { path = "../webui-expressions", version = "0.0.17" }
20+
microsoft-webui-state = { path = "../webui-state", version = "0.0.17" }
2121
serde = { workspace = true }
2222
serde_json = { workspace = true }
2323
thiserror = { workspace = true }
2424

2525
[dev-dependencies]
26-
microsoft-webui-test-utils = { path = "../webui-test-utils", version = "0.0.16" }
26+
microsoft-webui-test-utils = { path = "../webui-test-utils", version = "0.0.17" }
2727
criterion = { workspace = true }
2828

2929
[[bench]]

crates/webui-node/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ crate-type = ["cdylib"]
1818
[dependencies]
1919
napi = { workspace = true }
2020
napi-derive = { workspace = true }
21-
microsoft-webui = { path = "../webui", version = "0.0.16" }
22-
microsoft-webui-handler = { path = "../webui-handler", version = "0.0.16" }
23-
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.16" }
21+
microsoft-webui = { path = "../webui", version = "0.0.17" }
22+
microsoft-webui-handler = { path = "../webui-handler", version = "0.0.17" }
23+
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.17" }
2424
serde_json = { workspace = true }
2525

2626
[build-dependencies]
2727
napi-build = { workspace = true }
2828

2929
[dev-dependencies]
30-
microsoft-webui-parser = { path = "../webui-parser", version = "0.0.16", default-features = false }
30+
microsoft-webui-parser = { path = "../webui-parser", version = "0.0.17", default-features = false }
3131
tempfile = { workspace = true }
3232

3333
[lints]

crates/webui-parser/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ cli = ["clap"]
2626
ignored = ["clap"]
2727

2828
[dependencies]
29-
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.16" }
29+
microsoft-webui-protocol = { path = "../webui-protocol", version = "0.0.17" }
3030
thiserror = { workspace = true }
3131
html-escape = { workspace = true }
3232
walkdir = { workspace = true, optional = true }
3333
clap = { workspace = true, optional = true }
3434
sha2 = { workspace = true }
3535

3636
[dev-dependencies]
37-
microsoft-webui-test-utils = { path = "../webui-test-utils", version = "0.0.16" }
37+
microsoft-webui-test-utils = { path = "../webui-test-utils", version = "0.0.17" }
3838
criterion = { workspace = true }
3939

4040
[[bench]]

crates/webui-press/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ name = "webui-press"
1919
path = "src/main.rs"
2020

2121
[dependencies]
22-
microsoft-webui = { path = "../webui", version = "0.0.16", features = ["cli"] }
23-
microsoft-webui-handler = { path = "../webui-handler", version = "0.0.16" }
24-
microsoft-webui-tokens = { path = "../webui-tokens", version = "0.0.16" }
22+
microsoft-webui = { path = "../webui", version = "0.0.17", features = ["cli"] }
23+
microsoft-webui-handler = { path = "../webui-handler", version = "0.0.17" }
24+
microsoft-webui-tokens = { path = "../webui-tokens", version = "0.0.17" }
2525

2626
# Markdown + syntax highlighting
2727
comrak = { workspace = true }
@@ -44,6 +44,6 @@ rayon = { workspace = true }
4444
thiserror = { workspace = true }
4545

4646
# Dev server (`webui-press serve`)
47-
microsoft-webui-dev-server = { path = "../webui-dev-server", version = "0.0.16" }
47+
microsoft-webui-dev-server = { path = "../webui-dev-server", version = "0.0.17" }
4848
actix-web = { workspace = true }
4949
tokio = { workspace = true }

crates/webui-press/src/build.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ fn bundle_components(
806806

807807
let out_file = site_dir.join("components.js");
808808

809-
let status = std::process::Command::new("npx")
809+
let status = std::process::Command::new(npx_command())
810810
.arg("esbuild")
811811
.arg("--bundle")
812812
.arg("--format=esm")
@@ -826,7 +826,7 @@ fn bundle_components(
826826
}
827827
child.wait_with_output()
828828
})
829-
.map_err(|e| Error::Build(format!("esbuild failed: {e}")))?;
829+
.map_err(|e| Error::Build(format!("npx esbuild failed: {e}")))?;
830830

831831
if !status.status.success() {
832832
let stderr = String::from_utf8_lossy(&status.stderr);
@@ -836,6 +836,16 @@ fn bundle_components(
836836
Ok(ts_files.len())
837837
}
838838

839+
#[cfg(windows)]
840+
fn npx_command() -> &'static str {
841+
"npx.cmd"
842+
}
843+
844+
#[cfg(not(windows))]
845+
fn npx_command() -> &'static str {
846+
"npx"
847+
}
848+
839849
const PRE_BLOCK_MARKER_PREFIX: &str = "<span data-webui-press-pre-block=\"";
840850
const PRE_BLOCK_MARKER_SUFFIX: &str = "\"></span>";
841851

@@ -933,6 +943,14 @@ mod tests {
933943

934944
type TestResult = std::result::Result<(), Box<dyn std::error::Error>>;
935945

946+
#[test]
947+
fn npx_command_uses_platform_executable() {
948+
#[cfg(windows)]
949+
assert_eq!(npx_command(), "npx.cmd");
950+
#[cfg(not(windows))]
951+
assert_eq!(npx_command(), "npx");
952+
}
953+
936954
// --- truncate_utf8 ---------------------------------------------------
937955

938956
#[test]

0 commit comments

Comments
 (0)