build: Update pnpm to v9 (#1309)

* build: Update pnpm to v9

* update actions

* remove last actions-rs usage

* clippy

* clippy again

* revert default feature
pull/1310/head
Fabian-Lars 1 year ago committed by GitHub
parent ecda84f8d5
commit 0d4d029011
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -33,20 +33,20 @@ jobs:
audit-js: audit-js:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Cache pnpm modules - name: Cache pnpm modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: | restore-keys: |
${{ runner.os }}- ${{ runner.os }}-
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: "lts/*" node-version: "lts/*"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
with: with:
version: 8.x.x version: 9.x.x
run_install: true run_install: true
- name: audit - name: audit
run: pnpm audit run: pnpm audit

@ -33,7 +33,7 @@ jobs:
audit-rust: audit-rust:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: rustsec/audit-check@v1 - uses: rustsec/audit-check@v1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

@ -20,7 +20,7 @@ jobs:
outputs: outputs:
packages: ${{ steps.filter.outputs.changes }} packages: ${{ steps.filter.outputs.changes }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: dorny/paths-filter@v2 - uses: dorny/paths-filter@v2
id: filter id: filter
with: with:
@ -121,21 +121,21 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Cache pnpm modules - name: Cache pnpm modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: | restore-keys: |
${{ runner.os }}- ${{ runner.os }}-
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: "lts/*" node-version: "lts/*"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
with: with:
version: 8.x.x version: 9.x.x
run_install: true run_install: true
- name: build api - name: build api

@ -15,7 +15,7 @@ jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: dorny/paths-filter@v2 - uses: dorny/paths-filter@v2
id: filter id: filter
with: with:

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 # required for use of git history fetch-depth: 0 # required for use of git history
- name: covector status - name: covector status

@ -19,18 +19,18 @@ jobs:
successfulPublish: ${{ steps.covector.outputs.successfulPublish }} successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 # required for use of git history fetch-depth: 0 # required for use of git history
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: "lts/*" node-version: "lts/*"
registry-url: "https://registry.npmjs.org" registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
with: with:
version: 8.x.x version: 9.x.x
run_install: true run_install: true
- name: install webkit2gtk and libudev for [authenticator] - name: install webkit2gtk and libudev for [authenticator]

@ -19,18 +19,18 @@ jobs:
successfulPublish: ${{ steps.covector.outputs.successfulPublish }} successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 # required for use of git history fetch-depth: 0 # required for use of git history
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: "lts/*" node-version: "lts/*"
registry-url: "https://registry.npmjs.org" registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
with: with:
version: 8.x.x version: 9.x.x
run_install: true run_install: true
- name: install webkit2gtk and libudev for [authenticator] - name: install webkit2gtk and libudev for [authenticator]

@ -30,20 +30,18 @@ jobs:
platform: [ubuntu-latest, macos-latest, windows-latest] platform: [ubuntu-latest, macos-latest, windows-latest]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: install stable - name: install stable
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: install Linux dependencies - name: install Linux dependencies
if: matrix.platform == 'ubuntu-latest' if: matrix.platform == 'ubuntu-latest'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2 sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev libfuse2
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2

@ -36,40 +36,40 @@ jobs:
eslint: eslint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Cache pnpm modules - name: Cache pnpm modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: | restore-keys: |
${{ runner.os }}- ${{ runner.os }}-
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: "lts/*" node-version: "lts/*"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
with: with:
version: 8.x.x version: 9.x.x
run_install: true run_install: true
- name: eslint - name: eslint
run: pnpm lint run: pnpm lint
prettier: prettier:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Cache pnpm modules - name: Cache pnpm modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: | restore-keys: |
${{ runner.os }}- ${{ runner.os }}-
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: "lts/*" node-version: "lts/*"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
with: with:
version: 8.x.x version: 9.x.x
run_install: true run_install: true
- name: prettier check - name: prettier check
run: pnpm format-check run: pnpm format-check

@ -36,7 +36,7 @@ jobs:
outputs: outputs:
packages: ${{ steps.filter.outputs.changes }} packages: ${{ steps.filter.outputs.changes }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: dorny/paths-filter@v2 - uses: dorny/paths-filter@v2
id: filter id: filter
with: with:
@ -127,7 +127,7 @@ jobs:
package: ${{ fromJSON(needs.changes.outputs.packages) }} package: ${{ fromJSON(needs.changes.outputs.packages) }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: install webkit2gtk and libudev for [authenticator] - name: install webkit2gtk and libudev for [authenticator]
run: | run: |
@ -161,7 +161,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Install rustfmt with nightly toolchain - name: Install rustfmt with nightly toolchain
uses: dtolnay/rust-toolchain@nightly uses: dtolnay/rust-toolchain@nightly

@ -19,26 +19,26 @@ jobs:
sync-to-mirrors: sync-to-mirrors:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Fetch git tags - name: Fetch git tags
run: git fetch origin 'refs/tags/*:refs/tags/*' run: git fetch origin 'refs/tags/*:refs/tags/*'
- name: Cache pnpm modules - name: Cache pnpm modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.pnpm-store path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: | restore-keys: |
${{ runner.os }}- ${{ runner.os }}-
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: "lts/*" node-version: "lts/*"
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v4
with: with:
version: 8.x.x version: 9.x.x
run_install: true run_install: true
- name: Build packages - name: Build packages

@ -38,7 +38,7 @@ jobs:
outputs: outputs:
packages: ${{ steps.filter.outputs.changes }} packages: ${{ steps.filter.outputs.changes }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: dorny/paths-filter@v2 - uses: dorny/paths-filter@v2
id: filter id: filter
with: with:
@ -165,7 +165,7 @@ jobs:
runs-on: ${{ matrix.platform.os }} runs-on: ${{ matrix.platform.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: install webkit2gtk and libudev for [authenticator] - name: install webkit2gtk and libudev for [authenticator]
if: contains(matrix.platform.target, 'unknown-linux') if: contains(matrix.platform.target, 'unknown-linux')

10
Cargo.lock generated

@ -230,7 +230,7 @@ checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1"
[[package]] [[package]]
name = "api" name = "api"
version = "2.0.0-beta.7" version = "2.0.0-beta.8"
dependencies = [ dependencies = [
"log", "log",
"serde", "serde",
@ -6180,7 +6180,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-deep-link" name = "tauri-plugin-deep-link"
version = "2.0.0-beta.4" version = "2.0.0-beta.5"
dependencies = [ dependencies = [
"dunce", "dunce",
"log", "log",
@ -6367,7 +6367,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-positioner" name = "tauri-plugin-positioner"
version = "2.0.0-beta.4" version = "2.0.0-beta.5"
dependencies = [ dependencies = [
"log", "log",
"serde", "serde",
@ -6388,7 +6388,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-shell" name = "tauri-plugin-shell"
version = "2.0.0-beta.4" version = "2.0.0-beta.5"
dependencies = [ dependencies = [
"encoding_rs", "encoding_rs",
"log", "log",
@ -6532,7 +6532,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-window-state" name = "tauri-plugin-window-state"
version = "2.0.0-beta.6" version = "2.0.0-beta.7"
dependencies = [ dependencies = [
"bitflags 2.4.2", "bitflags 2.4.2",
"log", "log",

@ -32,7 +32,7 @@
"@sveltejs/vite-plugin-svelte": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tauri-apps/cli": "2.0.0-beta.16", "@tauri-apps/cli": "2.0.0-beta.16",
"@unocss/extractor-svelte": "^0.59.0", "@unocss/extractor-svelte": "^0.59.0",
"internal-ip": "^8.0.0", "internal-ip": "7.0.0",
"svelte": "^4.2.8", "svelte": "^4.2.8",
"unocss": "^0.59.0", "unocss": "^0.59.0",
"vite": "^5.0.13" "vite": "^5.0.13"

@ -33,7 +33,7 @@
"optionator": ">=0.9.3" "optionator": ">=0.9.3"
}, },
"engines": { "engines": {
"pnpm": "^8.0.0" "pnpm": "^9.0.0"
}, },
"pnpm": { "pnpm": {
"auditConfig": { "auditConfig": {

@ -23,7 +23,7 @@ struct Http<R: Runtime> {
app: AppHandle<R>, app: AppHandle<R>,
} }
trait HttpExt<R: Runtime> { /* trait HttpExt<R: Runtime> {
fn http(&self) -> &Http<R>; fn http(&self) -> &Http<R>;
} }
@ -31,7 +31,7 @@ impl<R: Runtime, T: Manager<R>> HttpExt<R> for T {
fn http(&self) -> &Http<R> { fn http(&self) -> &Http<R> {
self.state::<Http<R>>().inner() self.state::<Http<R>>().inner()
} }
} } */
pub fn init<R: Runtime>() -> TauriPlugin<R> { pub fn init<R: Runtime>() -> TauriPlugin<R> {
Builder::<R>::new("http") Builder::<R>::new("http")

@ -48,7 +48,7 @@ pub enum Hint {
/// * <https://developer.gnome.org/notification-spec/#categories> /// * <https://developer.gnome.org/notification-spec/#categories>
Category(String), Category(String),
/// Name of the DesktopEntry representing the calling application. In case of "firefox.desktop" /// Name of the `DesktopEntry` representing the calling application. In case of "firefox.desktop"
/// use "firefox". May be used to retrieve the correct icon. /// use "firefox". May be used to retrieve the correct icon.
DesktopEntry(String), DesktopEntry(String),
@ -91,7 +91,7 @@ pub enum Hint {
/// A custom numerical (integer) hint /// A custom numerical (integer) hint
CustomInt(String, i32), CustomInt(String, i32),
/// Only used by this NotificationServer implementation /// Only used by this `NotificationServer` implementation
Invalid // TODO find a better solution to this Invalid // TODO find a better solution to this
} }
@ -154,7 +154,7 @@ fn test_hints_to_map() {
// custom value should only be there once if the names are identical // custom value should only be there once if the names are identical
let n1 = super::Notification::new() let n1 = Notification::new()
.hint(Hint::Custom("foo".into(), "bar1".into())) .hint(Hint::Custom("foo".into(), "bar1".into()))
.hint(Hint::Custom("foo".into(), "bar2".into())) .hint(Hint::Custom("foo".into(), "bar2".into()))
.hint(Hint::Custom("f00".into(), "bar3".into())) .hint(Hint::Custom("f00".into(), "bar3".into()))

@ -1,17 +1,16 @@
#![allow(dead_code)] #![allow(dead_code)]
pub const ACTION_ICONS: &str = "action-icons"; pub const ACTION_ICONS: &str = "action-icons";
pub const CATEGORY: &str = "category"; pub const CATEGORY: &str = "category";
pub const DESKTOP_ENTRY: &str = "desktop-entry"; pub const DESKTOP_ENTRY: &str = "desktop-entry";
pub const IMAGE_PATH: &str = "image-path"; pub const IMAGE_PATH: &str = "image-path";
pub const RESIDENT: &str = "resident"; pub const RESIDENT: &str = "resident";
pub const SOUND_FILE: &str = "sound-file"; pub const SOUND_FILE: &str = "sound-file";
pub const SOUND_NAME: &str = "sound-name"; pub const SOUND_NAME: &str = "sound-name";
pub const SUPPRESS_SOUND: &str = "suppress-sound"; pub const SUPPRESS_SOUND: &str = "suppress-sound";
pub const TRANSIENT: &str = "transient"; pub const TRANSIENT: &str = "transient";
pub const X: &str = "x"; pub const X: &str = "x";
pub const Y: &str = "y"; pub const Y: &str = "y";
pub const URGENCY: &str = "urgency"; pub const URGENCY: &str = "urgency";
pub const INVALID: &str = "invalid";
pub const INVALID: &str = "invalid";

@ -1,12 +1,11 @@
#![cfg(all(test, unix, not(target_os = "macos")))] #![cfg(all(test, unix, not(target_os = "macos")))]
use dbus::arg::messageitem::MessageItem as Item;
use ctor::ctor; use ctor::ctor;
use dbus::arg::messageitem::MessageItem as Item;
use super::*; use self::Hint;
use self::Hint as Hint;
use super::Urgency::*; use super::Urgency::*;
use super::*;
#[ctor] #[ctor]
fn init_color_backtrace() { fn init_color_backtrace() {
@ -61,12 +60,14 @@ fn imagedata_hint_to_item() {
Item::Bool(false), Item::Bool(false),
Item::Int32(8), Item::Int32(8),
Item::Int32(3), Item::Int32(3),
Item::Array(dbus::MessageItemArray::new(vec![ Item::Array(
Item::Byte(0), dbus::MessageItemArray::new(
Item::Byte(0), vec![Item::Byte(0), Item::Byte(0), Item::Byte(0)],
Item::Byte(0), "ay".into(),
],"ay".into()).unwrap()) )
])))) .unwrap(),
),
])))),
); );
assert_eq!(item, test_item); assert_eq!(item, test_item);
} }

@ -116,7 +116,7 @@ impl Notification {
/// # Platform Support /// # Platform Support
/// Please note that this method has no effect on macOS. Here you can only set the application via [`set_application()`](fn.set_application.html) /// Please note that this method has no effect on macOS. Here you can only set the application via [`set_application()`](fn.set_application.html)
pub fn appname(&mut self, appname: &str) -> &mut Notification { pub fn appname(&mut self, appname: &str) -> &mut Notification {
self.appname = appname.to_owned(); appname.clone_into(&mut self.appname);
self self
} }
@ -124,7 +124,7 @@ impl Notification {
/// ///
/// Often acts as title of the notification. For more elaborate content use the `body` field. /// Often acts as title of the notification. For more elaborate content use the `body` field.
pub fn summary(&mut self, summary: &str) -> &mut Notification { pub fn summary(&mut self, summary: &str) -> &mut Notification {
self.summary = summary.to_owned(); summary.clone_into(&mut self.summary);
self self
} }
@ -195,7 +195,7 @@ impl Notification {
/// Each line should be treated as a paragraph. /// Each line should be treated as a paragraph.
/// Simple html markup should be supported, depending on the server implementation. /// Simple html markup should be supported, depending on the server implementation.
pub fn body(&mut self, body: &str) -> &mut Notification { pub fn body(&mut self, body: &str) -> &mut Notification {
self.body = body.to_owned(); body.clone_into(&mut self.body);
self self
} }
@ -208,7 +208,7 @@ impl Notification {
/// # Platform support /// # Platform support
/// macOS does not have support manually setting the icon. However you can pretend to be another app using [`set_application()`](fn.set_application.html) /// macOS does not have support manually setting the icon. However you can pretend to be another app using [`set_application()`](fn.set_application.html)
pub fn icon(&mut self, icon: &str) -> &mut Notification { pub fn icon(&mut self, icon: &str) -> &mut Notification {
self.icon = icon.to_owned(); icon.clone_into(&mut self.icon);
self self
} }
@ -390,8 +390,8 @@ impl Notification {
#[cfg(feature = "async")] #[cfg(feature = "async")]
// #[cfg(test)] // #[cfg(test)]
pub async fn show_async_at_bus(&self, sub_bus: &str) -> Result<xdg::NotificationHandle> { pub async fn show_async_at_bus(&self, sub_bus: &str) -> Result<xdg::NotificationHandle> {
let bus = super::xdg::NotificationBus::custom(sub_bus).ok_or("invalid subpath")?; let bus = xdg::NotificationBus::custom(sub_bus).ok_or("invalid subpath")?;
super::xdg::show_notification_async_at_bus(self, bus).await xdg::show_notification_async_at_bus(self, bus).await
} }
/// Sends Notification to `NSUserNotificationCenter`. /// Sends Notification to `NSUserNotificationCenter`.

@ -95,7 +95,7 @@ impl<R: Runtime> StoreBuilder<R> {
/// # Ok(()) /// # Ok(())
/// # } /// # }
pub fn defaults(mut self, defaults: HashMap<String, JsonValue>) -> Self { pub fn defaults(mut self, defaults: HashMap<String, JsonValue>) -> Self {
self.cache = defaults.clone(); self.cache.clone_from(&defaults);
self.defaults = Some(defaults); self.defaults = Some(defaults);
self self
} }
@ -263,7 +263,7 @@ impl<R: Runtime> Store<R> {
); );
} }
} }
self.cache = defaults.clone(); self.cache.clone_from(defaults);
} }
Ok(()) Ok(())
} else { } else {

@ -65,10 +65,10 @@ pub(crate) async fn check<R: Runtime>(
let mut metadata = Metadata::default(); let mut metadata = Metadata::default();
if let Some(update) = update { if let Some(update) = update {
metadata.available = true; metadata.available = true;
metadata.current_version = update.current_version.clone(); metadata.current_version.clone_from(&update.current_version);
metadata.version = update.version.clone(); metadata.version.clone_from(&update.version);
metadata.date = update.date.map(|d| d.to_string()); metadata.date = update.date.map(|d| d.to_string());
metadata.body = update.body.clone(); metadata.body.clone_from(&update.body);
metadata.rid = Some(webview.resources_table().add(update)); metadata.rid = Some(webview.resources_table().add(update));
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save