Skip to content

Commit

Permalink
Merge branch 'tauri-apps:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hixio-mh authored Oct 28, 2023
2 parents 9983303 + b89de9f commit e8c91a9
Show file tree
Hide file tree
Showing 205 changed files with 7,409 additions and 6,154 deletions.
5 changes: 5 additions & 0 deletions .changes/android-onresume.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri': 'patch:enhance'
---

Add support for onResume and onPause events in android plugins.
5 changes: 5 additions & 0 deletions .changes/android-plugin-get-config-typed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:breaking
---

The Android `PluginManager.loadConfig` now takes a third parameter to define the class type of the config object.
15 changes: 15 additions & 0 deletions .changes/bump-1.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"tauri": 'patch:enhance'
"tauri-bundler": 'patch:enhance'
"tauri-build": 'patch:enhance'
"tauri-codegen": 'patch:enhance'
"tauri-macros": 'patch:enhance'
"tauri-utils": 'patch:enhance'
"tauri-runtime": 'patch:enhance'
"tauri-runtime-wry": 'patch:enhance'
"tauri-cli": 'patch:enhance'
"@tauri-apps/cli": 'patch:enhance'
"@tauri-apps/api": 'patch:enhance'
---

Pull changes from Tauri 1.5 release.
4 changes: 2 additions & 2 deletions .changes/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"gitSiteUrl": "https://www.github.com/tauri-apps/tauri/",
"timeout": 3600000,
"changeTags": {
"feat": "New Features",
"enhance": "Enhancements",
Expand Down Expand Up @@ -271,7 +270,8 @@
},
"tauri-driver": {
"path": "./tooling/webdriver",
"manager": "rust"
"manager": "rust",
"postversion": "cargo check"
}
}
}
5 changes: 5 additions & 0 deletions .changes/fix-clearmocks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tauri-apps/api": 'patch:bug'
---

No longer crashing in tests without mocks when `clearMocks` is defined in `afterEach` hook.
7 changes: 7 additions & 0 deletions .changes/gtk018.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"tauri-runtime": 'minor:deps'
"tauri-runtime-wry": 'minor:deps'
"tauri": 'minor:deps'
---

Upgrade `gtk` to 0.18.
5 changes: 5 additions & 0 deletions .changes/mobile-plugin-resolve-object.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:enhance
---

Mobile plugins can now resolve using an arbitrary object instead of using the `JSObject` class via `Invoke.resolve` on iOS and `Invoke.resolveObject` on Android.
5 changes: 5 additions & 0 deletions .changes/mobile-plugin-typed-invoke-args.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:breaking
---

Mobile plugins now have access to a parser for the invoke arguments instead of relying on the `Invoke#get${TYPE}` methods.
5 changes: 5 additions & 0 deletions .changes/nsis-german.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri-bundler': 'patch:enhance'
---

Added German language support to the NSIS bundler.
6 changes: 6 additions & 0 deletions .changes/on-page-load-hook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-runtime": patch:feat
"tauri-runtime-wry": patch:feat
---

Added `on_page_load` hook for `PendingWindow`.
6 changes: 6 additions & 0 deletions .changes/refactor-on-page-load.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri": patch:breaking
---

Added `WindowBuilder::on_page_load` and refactored the `Builder::on_page_load` handler to take references.
The page load hook is now triggered for load started and finished events, to determine what triggered it see `PageLoadPayload::event`.
12 changes: 12 additions & 0 deletions .changes/tauri-event-system-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'tauri': 'major:breaking'
---

The event system APIS on Rust is recieving a few changes for consistency and quality of life improvements:

- Renamed `Manager::emit_all` to just `Manager::emit` and will now both trigger the events on JS side as well as Rust.
- Removed `Manager::trigger_global`, use `Manager::emit`
- Added `Manager::emit_filter`.
- Removed `Window::emit`, and moved the implementation to `Manager::emit`.
- Removed `Window::emit_and_trigger` and `Window::trigger`, use `Window::emit` instead.
- Changed `Window::emit_to` to only trigger the target window listeners so it won't be catched by `Manager::listen_global`
6 changes: 6 additions & 0 deletions .changes/update-mobile-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:breaking
"@tauri-apps/cli": patch:breaking
---

Updated the mobile plugin templates following the tauri v2.0.0-alpha.17 changes.
9 changes: 9 additions & 0 deletions .changes/windows-rs-0.51.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"tauri": "patch:deps"
"tauri-runtime": "patch:deps"
"tauri-runtime-wry": "patch:deps"
"tauri-utils": "patch:deps"
---

Update `windows` to version `0.51` and `webview2-com` to version `0.27`

6 changes: 6 additions & 0 deletions .changes/wry-0.34.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri": patch:deps
"tauri-runtime-wry": patch:deps
---

Updated to [email protected], removing the `dox` feature flag.
2 changes: 1 addition & 1 deletion .docker/cross/aarch64.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive

COPY common.sh lib.sh /
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Ru
You can build the Rust documentation locally running the following script:

```bash
$ RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --open
$ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open
```

### Developing the JS API
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- cron: '0 0 * * *'
push:
paths:
- '.github/workflows/audit.yml'
- '**/Cargo.lock'
- '**/Cargo.toml'
- '**/package.json'
Expand All @@ -25,14 +26,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: rust audit
uses: actions-rs/audit-check@v1
uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

audit-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: yarn audit
- name: audit workspace
run: yarn audit
- name: audit @tauri-apps/api
working-directory: tooling/api
run: yarn audit
- name: audit @tauri-apps/cli
working-directory: tooling/cli/node
run: yarn audit
27 changes: 16 additions & 11 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
- dev
- 1.x
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/bench.yml'

env:
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
LC_ALL: en_US.UTF-8 # This prevents strace from changing it's number format to use commas.
LC_ALL: en_US.UTF-8 # This prevents strace from changing its number format to use commas.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -27,23 +30,22 @@ jobs:
matrix:
rust: [nightly]
platform:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }

runs-on: ${{ matrix.platform.os }}

steps:
- uses: actions/checkout@v4
- name: install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1

- name: install Rust ${{ matrix.rust }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
override: true
default: true
components: rust-src
target: ${{ matrix.platform.target }}
targets: ${{ matrix.platform.target }}

- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: x64
Expand All @@ -52,9 +54,12 @@ jobs:
run: |
python -m pip install --upgrade pip
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev xvfb
wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb
sudo dpkg -i hyperfine_1.11.0_amd64.deb
sudo apt-get install -y --no-install-recommends \
libwebkit2gtk-4.1-dev libayatana-appindicator3-dev \
xvfb \
at-spi2-core
wget https://github.com/sharkdp/hyperfine/releases/download/v1.18.0/hyperfine_1.18.0_amd64.deb
sudo dpkg -i hyperfine_1.18.0_amd64.deb
pip install memory_profiler
- uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-change-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v2
id: filter
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/check-generated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ jobs:
api: ${{ steps.filter.outputs.api }}
schema: ${{ steps.filter.outputs.schema }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
api:
- 'tooling/api/src/**'
- 'tooling/api/docs/js-api.json'
- 'core/tauri/scripts/bundle.global.js'
schema:
- 'core/tauri-utils/src/config.rs'
Expand All @@ -44,28 +43,23 @@ jobs:
needs: changes
if: needs.changes.outputs.api == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: build api
working-directory: tooling/api
run: yarn && yarn build
- name: check api
run: |
git restore tooling/api/docs/js-api.json
./.scripts/ci/has-diff.sh
run: ./.scripts/ci/has-diff.sh

schema:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.schema == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

- name: install Linux dependencies
run: |
Expand All @@ -77,10 +71,7 @@ jobs:
workspaces: core -> ../target

- name: generate schema.json
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path ./core/tauri-config-schema/Cargo.toml
run: cargo build --manifest-path ./core/tauri-config-schema/Cargo.toml

- name: check schema
run: ./.scripts/ci/has-diff.sh
23 changes: 9 additions & 14 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
uses: dtolnay/rust-toolchain@stable

- name: install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
Expand All @@ -39,10 +39,7 @@ jobs:
tooling/cli
- name: build CLI
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path ./tooling/cli/Cargo.toml
run: cargo build --manifest-path ./tooling/cli/Cargo.toml

- name: run integration tests
run: cargo test --test '*' -- --ignored
Expand All @@ -69,7 +66,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -115,15 +112,13 @@ jobs:
repository: tauri-apps/tauri-docs
event-type: update-docs

- name: Get `@tauri-apps/cli` release id
id: cliReleaseId
- name: Process covector output
id: covectorOutput
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli')
run: |
echo '${{ toJSON(steps.covector.outputs) }}' > output.json
id=$(jq '.["-tauri-apps-cli-releaseId"]' < output.json)
rm output.json
id=$(node .scripts/covector/parse-output.js '${{ toJSON(steps.covector.outputs) }}' "-tauri-apps-cli-releaseId")
echo "cliReleaseId=$id" >> "$GITHUB_OUTPUT"
- name: Trigger `@tauri-apps/cli` publishing workflow
Expand All @@ -135,7 +130,7 @@ jobs:
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
repository: tauri-apps/tauri
event-type: publish-js-cli
client-payload: '{"releaseId": "${{ steps.cliReleaseId.outputs.cliReleaseId }}" }'
client-payload: '{"releaseId": "${{ steps.covectorOutput.outputs.cliReleaseId }}" }'

- name: Trigger `tauri-cli` publishing workflow
if: |
Expand Down
Loading

0 comments on commit e8c91a9

Please sign in to comment.