Update package versions and modify OS plugin (#1514)

* Update package versions and modify OS plugin

The version numbers for multiple packages have been updated in Cargo.lock. Additionally, changes were made in the OS plugin, specifically in the `index.ts` file where asynchronous function calls have been transformed into synchronous ones.

* Update package versions in Cargo.lock

Several packages in Cargo.lock have been updated to new versions. This includes "hyper", "hyper-util", "open", "serde_json", and "zerocopy" packages. Each package has had its version, checksum, and associated dependencies adjusted to reflect the latest release.

* Update OS sync functions in documentation examples

The documentation examples for `platform`, `arch`, `type`, `family`, `version`, and `exe_extension` functions have been updated. The changes are intended to better illustrate that these functions are synchronous.
This commit is contained in:
Fynn Tang
2024-07-04 05:35:25 +08:00
committed by GitHub
parent 8f6d341e45
commit 40ef9a818f
3 changed files with 53 additions and 47 deletions
+6 -6
View File
@@ -70,7 +70,7 @@ function eol(): string {
* @example
* ```typescript
* import { platform } from '@tauri-apps/plugin-os';
* const platformName = await platform();
* const platformName = platform();
* ```
*
* @since 2.0.0
@@ -85,7 +85,7 @@ function platform(): Platform {
* @example
* ```typescript
* import { version } from '@tauri-apps/plugin-os';
* const osVersion = await version();
* const osVersion = version();
* ```
*
* @since 2.0.0
@@ -101,7 +101,7 @@ type Family = "unix" | "windows";
* @example
* ```typescript
* import { family } from '@tauri-apps/plugin-os';
* const family = await family();
* const family = family();
* ```
*
* @since 2.0.0
@@ -115,7 +115,7 @@ function family(): Family {
* @example
* ```typescript
* import { type } from '@tauri-apps/plugin-os';
* const osType = await type();
* const osType = type();
* ```
*
* @since 2.0.0
@@ -130,7 +130,7 @@ function type(): OsType {
* @example
* ```typescript
* import { arch } from '@tauri-apps/plugin-os';
* const archName = await arch();
* const archName = arch();
* ```
*
* @since 2.0.0
@@ -144,7 +144,7 @@ function arch(): Arch {
* @example
* ```typescript
* import { exeExtension } from '@tauri-apps/plugin-os';
* const exeExt = await exeExtension();
* const exeExt = exeExtension();
* ```
*
* @since 2.0.0