Skip to content

Commit 40ef9a8

Browse files
authored
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.
1 parent 8f6d341 commit 40ef9a8

File tree

3 files changed

+53
-47
lines changed

3 files changed

+53
-47
lines changed

.changes/os-sync-functions-doc.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"os-js": "patch"
3+
---
4+
5+
**Changed:** `platform`, `arch`, `type`, `family`, `version` and `exe_extension` functions in the documentation examples to better reflect that these functions are synchronous.
6+

Cargo.lock

Lines changed: 41 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/os/guest-js/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function eol(): string {
7070
* @example
7171
* ```typescript
7272
* import { platform } from '@tauri-apps/plugin-os';
73-
* const platformName = await platform();
73+
* const platformName = platform();
7474
* ```
7575
*
7676
* @since 2.0.0
@@ -85,7 +85,7 @@ function platform(): Platform {
8585
* @example
8686
* ```typescript
8787
* import { version } from '@tauri-apps/plugin-os';
88-
* const osVersion = await version();
88+
* const osVersion = version();
8989
* ```
9090
*
9191
* @since 2.0.0
@@ -101,7 +101,7 @@ type Family = "unix" | "windows";
101101
* @example
102102
* ```typescript
103103
* import { family } from '@tauri-apps/plugin-os';
104-
* const family = await family();
104+
* const family = family();
105105
* ```
106106
*
107107
* @since 2.0.0
@@ -115,7 +115,7 @@ function family(): Family {
115115
* @example
116116
* ```typescript
117117
* import { type } from '@tauri-apps/plugin-os';
118-
* const osType = await type();
118+
* const osType = type();
119119
* ```
120120
*
121121
* @since 2.0.0
@@ -130,7 +130,7 @@ function type(): OsType {
130130
* @example
131131
* ```typescript
132132
* import { arch } from '@tauri-apps/plugin-os';
133-
* const archName = await arch();
133+
* const archName = arch();
134134
* ```
135135
*
136136
* @since 2.0.0
@@ -144,7 +144,7 @@ function arch(): Arch {
144144
* @example
145145
* ```typescript
146146
* import { exeExtension } from '@tauri-apps/plugin-os';
147-
* const exeExt = await exeExtension();
147+
* const exeExt = exeExtension();
148148
* ```
149149
*
150150
* @since 2.0.0

0 commit comments

Comments
 (0)