From 76c550a64879fec703beec33fea1a5bc654e7f94 Mon Sep 17 00:00:00 2001 From: wusyong Date: Tue, 10 Jan 2023 15:16:07 +0000 Subject: [PATCH 1/2] publish new versions --- .changes/android-env-vars.md | 5 ---- .changes/android-initialization-scripts.md | 5 ---- .changes/avoid-redundant-clone.md | 5 ---- ...custom_protocol_handler_response_to_cow.md | 5 ---- .changes/check-for-empty-init-scripts.md | 5 ---- .changes/document-title-changed-handler.md | 5 ---- .changes/eval-race-condition.md | 5 ---- .changes/improve-panic.md | 5 ---- .changes/load_url_with_headers.md | 5 ---- ...navigation-delegate-class-name-conflict.md | 5 ---- .changes/rerun-build-script-android.md | 5 ---- .changes/webview2-theme.md | 5 ---- CHANGELOG.md | 28 +++++++++++++++++++ Cargo.toml | 2 +- 14 files changed, 29 insertions(+), 61 deletions(-) delete mode 100644 .changes/android-env-vars.md delete mode 100644 .changes/android-initialization-scripts.md delete mode 100644 .changes/avoid-redundant-clone.md delete mode 100644 .changes/change_custom_protocol_handler_response_to_cow.md delete mode 100644 .changes/check-for-empty-init-scripts.md delete mode 100644 .changes/document-title-changed-handler.md delete mode 100644 .changes/eval-race-condition.md delete mode 100644 .changes/improve-panic.md delete mode 100644 .changes/load_url_with_headers.md delete mode 100644 .changes/navigation-delegate-class-name-conflict.md delete mode 100644 .changes/rerun-build-script-android.md delete mode 100644 .changes/webview2-theme.md diff --git a/.changes/android-env-vars.md b/.changes/android-env-vars.md deleted file mode 100644 index 57bb96e37..000000000 --- a/.changes/android-env-vars.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": minor ---- - -Changed env vars used when building for Android; changed `WRY_ANDROID_REVERSED_DOMAIN` to `WRY_ANDROID_PACKAGE` and `WRY_ANDROID_APP_NAME_SNAKE_CASE` to `WRY_ANDROID_LIBRARY`. \ No newline at end of file diff --git a/.changes/android-initialization-scripts.md b/.changes/android-initialization-scripts.md deleted file mode 100644 index c7b8ed377..000000000 --- a/.changes/android-initialization-scripts.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": patch ---- - -Fixes Android initialization scripts order. diff --git a/.changes/avoid-redundant-clone.md b/.changes/avoid-redundant-clone.md deleted file mode 100644 index d57e72135..000000000 --- a/.changes/avoid-redundant-clone.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": patch ---- - -Remove redundant `.clone()` calls and avoid unnecessary heap allocations. diff --git a/.changes/change_custom_protocol_handler_response_to_cow.md b/.changes/change_custom_protocol_handler_response_to_cow.md deleted file mode 100644 index 54daf2e43..000000000 --- a/.changes/change_custom_protocol_handler_response_to_cow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": "minor" ---- - -Change return type of [custom protocol handlers](https://docs.rs/wry/latest/wry/webview/struct.WebViewBuilder.html#method.with_custom_protocol) from `Result>>` to `Result>>`. This allows the handlers to return static resources without heap allocations. This is effective when you embed some large files like bundled JavaScript source as `&'static [u8]` using [`include_bytes!`](https://doc.rust-lang.org/std/macro.include_bytes.html). diff --git a/.changes/check-for-empty-init-scripts.md b/.changes/check-for-empty-init-scripts.md deleted file mode 100644 index 309f107d7..000000000 --- a/.changes/check-for-empty-init-scripts.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": "patch" ---- - -Ensures that the script passed to `.with_initialization_script("here")` is not empty. \ No newline at end of file diff --git a/.changes/document-title-changed-handler.md b/.changes/document-title-changed-handler.md deleted file mode 100644 index 24ab9f183..000000000 --- a/.changes/document-title-changed-handler.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": "minor" ---- - -Add APIs to process webview document title change. \ No newline at end of file diff --git a/.changes/eval-race-condition.md b/.changes/eval-race-condition.md deleted file mode 100644 index 053c2e866..000000000 --- a/.changes/eval-race-condition.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": patch ---- - -Evaluate scripts after the page load starts on Linux and macOS. diff --git a/.changes/improve-panic.md b/.changes/improve-panic.md deleted file mode 100644 index 2ab08c13f..000000000 --- a/.changes/improve-panic.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": patch ---- - -Improve panic error messages on the build script. diff --git a/.changes/load_url_with_headers.md b/.changes/load_url_with_headers.md deleted file mode 100644 index 6854e72ec..000000000 --- a/.changes/load_url_with_headers.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": "patch" ---- - -Add `WebViewBuilder::with_url_and_headers` and `WebView::load_url_with_headers` to navigate to urls with headers. diff --git a/.changes/navigation-delegate-class-name-conflict.md b/.changes/navigation-delegate-class-name-conflict.md deleted file mode 100644 index 1b8f1aeb2..000000000 --- a/.changes/navigation-delegate-class-name-conflict.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": patch ---- - -Change class declare name from `UIViewController` to `WryNavigationDelegate` to avoid class name conflict on iOS. diff --git a/.changes/rerun-build-script-android.md b/.changes/rerun-build-script-android.md deleted file mode 100644 index dad1e1714..000000000 --- a/.changes/rerun-build-script-android.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": patch ---- - -Rerun build script if the `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` directory changes. diff --git a/.changes/webview2-theme.md b/.changes/webview2-theme.md deleted file mode 100644 index 485f3f1e8..000000000 --- a/.changes/webview2-theme.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wry": "patch" ---- - -On Windows, Add `WebviewBuilderExtWindows::with_theme` and `WebviewExtWindows::set_theme` to change webview2 theme. \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index edf9aff12..9e44755b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## \[0.24.0] + +- Changed env vars used when building for Android; changed `WRY_ANDROID_REVERSED_DOMAIN` to `WRY_ANDROID_PACKAGE` and `WRY_ANDROID_APP_NAME_SNAKE_CASE` to `WRY_ANDROID_LIBRARY`. + - [dfe6a5e](https://github.com/tauri-apps/wry/commit/dfe6a5e78acca05d9e0808c8f4ed974a8657b847) refactor: improve android env vars naming ([#829](https://github.com/tauri-apps/wry/pull/829)) on 2022-12-30 +- Fixes Android initialization scripts order. + - [7f819c0](https://github.com/tauri-apps/wry/commit/7f819c0ec3d3aaaf582d9eecde09f5e539c45743) fix(android): initialization scripts order ([#808](https://github.com/tauri-apps/wry/pull/808)) on 2022-12-12 +- Remove redundant `.clone()` calls and avoid unnecessary heap allocations. + - [45f2b21](https://github.com/tauri-apps/wry/commit/45f2b2127e73718b71f349eae1847d1764c748f5) perf: remove redundant `.clone()` calls and avoid unnecessary heap allocations ([#812](https://github.com/tauri-apps/wry/pull/812)) on 2022-12-14 +- Change return type of [custom protocol handlers](https://docs.rs/wry/latest/wry/webview/struct.WebViewBuilder.html#method.with_custom_protocol) from `Result>>` to `Result>>`. This allows the handlers to return static resources without heap allocations. This is effective when you embed some large files like bundled JavaScript source as `&'static [u8]` using [`include_bytes!`](https://doc.rust-lang.org/std/macro.include_bytes.html). + - [ddd3461](https://github.com/tauri-apps/wry/commit/ddd34614be8a0ba826eff8acbf4b06710ce2ba65) perf: Change return type of custom protocol handler from `Vec` to `Cow<'static, [u8]>`, closes [#796](https://github.com/tauri-apps/wry/pull/796) ([#797](https://github.com/tauri-apps/wry/pull/797)) on 2022-12-12 +- Ensures that the script passed to `.with_initialization_script("here")` is not empty. + - [ceb209e](https://github.com/tauri-apps/wry/commit/ceb209eddc20d284be748ee382ba8aef7686863b) fix empty string bug (fix: [#833](https://github.com/tauri-apps/wry/pull/833)) ([#836](https://github.com/tauri-apps/wry/pull/836)) on 2023-01-08 +- Add APIs to process webview document title change. + - [14a0ee3](https://github.com/tauri-apps/wry/commit/14a0ee323e8e596f45d4a57d2d86abcf0a848bc8) feat: add document title changed handler, closes [#804](https://github.com/tauri-apps/wry/pull/804) ([#825](https://github.com/tauri-apps/wry/pull/825)) on 2022-12-30 +- Evaluate scripts after the page load starts on Linux and macOS. + - [ca7c8e4](https://github.com/tauri-apps/wry/commit/ca7c8e44832b3236f08022f7ea3469be9a65aa3f) fix(unix): race condition on script eval ([#815](https://github.com/tauri-apps/wry/pull/815)) on 2022-12-14 +- Improve panic error messages on the build script. + - [5b9f21d](https://github.com/tauri-apps/wry/commit/5b9f21d38974881c2d6f4456990f5863484e7382) feat: improve build script panic messages ([#807](https://github.com/tauri-apps/wry/pull/807)) on 2022-12-12 +- Add `WebViewBuilder::with_url_and_headers` and `WebView::load_url_with_headers` to navigate to urls with headers. + - [8ae93b9](https://github.com/tauri-apps/wry/commit/8ae93b9c76b2efe14e93febd009e31fc459275a8) feat: add headers when loading URLs, closes [#816](https://github.com/tauri-apps/wry/pull/816) ([#826](https://github.com/tauri-apps/wry/pull/826)) on 2023-01-01 + - [e246bd1](https://github.com/tauri-apps/wry/commit/e246bd164eb9df1b0e48123a542bbd240958c9db) chore: update headers change file on 2023-01-01 +- Change class declare name from `UIViewController` to `WryNavigationDelegate` to avoid class name conflict on iOS. + - [fca42a0](https://github.com/tauri-apps/wry/commit/fca42a0730e75a142f7f354c6ac3f6d6a0f4711f) fix(ios): navigation delegate class name conflict ([#824](https://github.com/tauri-apps/wry/pull/824)) on 2022-12-27 +- Rerun build script if the `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` directory changes. + - [1cf92e2](https://github.com/tauri-apps/wry/commit/1cf92e2b68b1d9109de3924a3cd1fd10cb8c7c17) feat(build): rerun if kotlin out directory changes ([#839](https://github.com/tauri-apps/wry/pull/839)) on 2023-01-10 +- On Windows, Add `WebviewBuilderExtWindows::with_theme` and `WebviewExtWindows::set_theme` to change webview2 theme. + - [563a497](https://github.com/tauri-apps/wry/commit/563a497d7f842c760ad05a0017059e7781c2b810) feat(webview2): add theme API, closes [#806](https://github.com/tauri-apps/wry/pull/806) ([#809](https://github.com/tauri-apps/wry/pull/809)) on 2022-12-13 + ## \[0.23.4] - Fixes Android initialization scripts order. diff --git a/Cargo.toml b/Cargo.toml index bfa30c27d..7f8551e03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ workspace = { } [package] name = "wry" -version = "0.23.4" +version = "0.24.0" authors = [ "Tauri Programme within The Commons Conservancy" ] edition = "2021" license = "Apache-2.0 OR MIT" From 06ab6548825038006807fb1d7ff58beb77c2160b Mon Sep 17 00:00:00 2001 From: "Ngo Iok Ui (Wu Yu Wei)" Date: Wed, 11 Jan 2023 13:52:32 +0800 Subject: [PATCH 2/2] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7f8551e03..982de7f3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ serde = { version = "1.0", features = [ "derive" ] } serde_json = "1.0" thiserror = "1.0" url = "2.3" -tao = { git = "https://github.com/tauri-apps/tao", branch = "dev", default-features = false, features = [ "serde" ] } +tao = { version = "0.15.9", default-features = false, features = [ "serde" ] } http = "0.2.8" [dev-dependencies]