@waler/sdk 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -197,6 +197,33 @@ globals it does not own inside your app.
|
|
|
197
197
|
Everything is typed. `ReadyPayload`, `ShellContext`, `SdkError`, `Capability`,
|
|
198
198
|
`SdkEventMap` and the rest are exported from the package root.
|
|
199
199
|
|
|
200
|
+
## Versioning and compatibility
|
|
201
|
+
|
|
202
|
+
This package follows semver. A breaking change is a major, and what it replaces
|
|
203
|
+
is deprecated first: the old member keeps working and the docs say what to use
|
|
204
|
+
instead, until the major removes it. Pin what you install and upgrade when it
|
|
205
|
+
suits you.
|
|
206
|
+
|
|
207
|
+
That covers the package. It does not cover the shell, and the difference is the
|
|
208
|
+
one thing worth understanding here.
|
|
209
|
+
|
|
210
|
+
**Your app does not choose which shell loads it.** The shell is an installed
|
|
211
|
+
application that may be older than your app, and several ages of it are in use at
|
|
212
|
+
the same time. So a version comparison cannot help you — the shell is not a
|
|
213
|
+
dependency you picked, it is the thing you are running inside of.
|
|
214
|
+
|
|
215
|
+
Ask what it can do, never how old it is:
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
if (Waler.capabilities.has('scanBarcode')) await Waler.scanBarcode()
|
|
219
|
+
else showManualEntryField()
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The bridge is built so that this always has an answer. A method the shell does
|
|
223
|
+
not know rejects with `UNSUPPORTED` instead of hanging, and an error code this
|
|
224
|
+
package does not know reaches your `catch` unchanged. Neither is a promise about
|
|
225
|
+
a period of time; both are how the bridge behaves, in every version.
|
|
226
|
+
|
|
200
227
|
## Requirements
|
|
201
228
|
|
|
202
229
|
Any browser the shell supports. Node 20+ if you import it in a build step.
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Kept in step with package.json by `pnpm version-packages`. */
|
|
2
|
-
export declare const SDK_VERSION = "0.1.
|
|
2
|
+
export declare const SDK_VERSION = "0.1.2";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Kept in step with package.json by `pnpm version-packages`. */
|
|
2
|
-
export const SDK_VERSION = '0.1.
|
|
2
|
+
export const SDK_VERSION = '0.1.2';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waler/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The surface a Waler app talks to the shell through.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"check:origins": "pnpm build && node tools/origin-check/serve.ts",
|
|
62
62
|
"check:package": "pnpm build && publint && attw --pack . --profile esm-only",
|
|
63
63
|
"verify:tarball": "node tools/verify-tarball.ts",
|
|
64
|
+
"check:changeset": "node tools/check-changeset.ts",
|
|
64
65
|
"changeset": "changeset",
|
|
65
66
|
"version-packages": "changeset version && node tools/sync-version.ts && prettier --write package.json CHANGELOG.md src/version.ts",
|
|
66
67
|
"release": "pnpm check:package && changeset publish"
|