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

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

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

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

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

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

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

@ -30,20 +30,18 @@ jobs:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- 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: |
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

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

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

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

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

10
Cargo.lock generated

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

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

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

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

@ -48,7 +48,7 @@ pub enum Hint {
/// * <https://developer.gnome.org/notification-spec/#categories>
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.
DesktopEntry(String),
@ -91,7 +91,7 @@ pub enum Hint {
/// A custom numerical (integer) hint
CustomInt(String, i32),
/// Only used by this NotificationServer implementation
/// Only used by this `NotificationServer` implementation
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
let n1 = super::Notification::new()
let n1 = Notification::new()
.hint(Hint::Custom("foo".into(), "bar1".into()))
.hint(Hint::Custom("foo".into(), "bar2".into()))
.hint(Hint::Custom("f00".into(), "bar3".into()))

@ -1,17 +1,16 @@
#![allow(dead_code)]
pub const ACTION_ICONS: &str = "action-icons";
pub const CATEGORY: &str = "category";
pub const DESKTOP_ENTRY: &str = "desktop-entry";
pub const IMAGE_PATH: &str = "image-path";
pub const RESIDENT: &str = "resident";
pub const SOUND_FILE: &str = "sound-file";
pub const SOUND_NAME: &str = "sound-name";
pub const SUPPRESS_SOUND: &str = "suppress-sound";
pub const TRANSIENT: &str = "transient";
pub const X: &str = "x";
pub const Y: &str = "y";
pub const URGENCY: &str = "urgency";
pub const ACTION_ICONS: &str = "action-icons";
pub const CATEGORY: &str = "category";
pub const DESKTOP_ENTRY: &str = "desktop-entry";
pub const IMAGE_PATH: &str = "image-path";
pub const RESIDENT: &str = "resident";
pub const SOUND_FILE: &str = "sound-file";
pub const SOUND_NAME: &str = "sound-name";
pub const SUPPRESS_SOUND: &str = "suppress-sound";
pub const TRANSIENT: &str = "transient";
pub const X: &str = "x";
pub const Y: &str = "y";
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")))]
use dbus::arg::messageitem::MessageItem as Item;
use ctor::ctor;
use dbus::arg::messageitem::MessageItem as Item;
use super::*;
use self::Hint as Hint;
use self::Hint;
use super::Urgency::*;
use super::*;
#[ctor]
fn init_color_backtrace() {
@ -61,12 +60,14 @@ fn imagedata_hint_to_item() {
Item::Bool(false),
Item::Int32(8),
Item::Int32(3),
Item::Array(dbus::MessageItemArray::new(vec![
Item::Byte(0),
Item::Byte(0),
Item::Byte(0),
],"ay".into()).unwrap())
]))))
Item::Array(
dbus::MessageItemArray::new(
vec![Item::Byte(0), Item::Byte(0), Item::Byte(0)],
"ay".into(),
)
.unwrap(),
),
])))),
);
assert_eq!(item, test_item);
}

@ -116,7 +116,7 @@ impl Notification {
/// # 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)
pub fn appname(&mut self, appname: &str) -> &mut Notification {
self.appname = appname.to_owned();
appname.clone_into(&mut self.appname);
self
}
@ -124,7 +124,7 @@ impl Notification {
///
/// Often acts as title of the notification. For more elaborate content use the `body` field.
pub fn summary(&mut self, summary: &str) -> &mut Notification {
self.summary = summary.to_owned();
summary.clone_into(&mut self.summary);
self
}
@ -195,7 +195,7 @@ impl Notification {
/// Each line should be treated as a paragraph.
/// Simple html markup should be supported, depending on the server implementation.
pub fn body(&mut self, body: &str) -> &mut Notification {
self.body = body.to_owned();
body.clone_into(&mut self.body);
self
}
@ -208,7 +208,7 @@ impl Notification {
/// # 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)
pub fn icon(&mut self, icon: &str) -> &mut Notification {
self.icon = icon.to_owned();
icon.clone_into(&mut self.icon);
self
}
@ -390,8 +390,8 @@ impl Notification {
#[cfg(feature = "async")]
// #[cfg(test)]
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")?;
super::xdg::show_notification_async_at_bus(self, bus).await
let bus = xdg::NotificationBus::custom(sub_bus).ok_or("invalid subpath")?;
xdg::show_notification_async_at_bus(self, bus).await
}
/// Sends Notification to `NSUserNotificationCenter`.

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

@ -65,10 +65,10 @@ pub(crate) async fn check<R: Runtime>(
let mut metadata = Metadata::default();
if let Some(update) = update {
metadata.available = true;
metadata.current_version = update.current_version.clone();
metadata.version = update.version.clone();
metadata.current_version.clone_from(&update.current_version);
metadata.version.clone_from(&update.version);
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));
}

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