grist-widget-sdk 0.3.0 → 0.3.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # grist-widget-sdk
2
2
 
3
+ ## 0.3.14
4
+
5
+ ### Patch Changes
6
+
7
+ - ed810fd: Wired up lint (`eslint.config.js` + CI gate) and coverage reporting (`test:coverage`). Turning lint on for the first time surfaced and fixed a few real issues: a dead `try`/`catch` in the RPC-heartbeat-coalesce helper that just rethrew without doing anything (removed, matching the module's own documented "failures aren't coalesced" contract), and a handful of dead imports. No public API changes.
8
+
9
+ ## 0.3.3
10
+
11
+ ### Patch Changes
12
+
13
+ - bb1f20a: Point package metadata and documentation links at the live docs site.
14
+
15
+ Both packages' `homepage` fields pointed at `grist-widgets.com`, a domain with
16
+ no DNS record, so the Homepage link on both npm pages was dead. They now point
17
+ at `https://gristwidgets.com`.
18
+
19
+ The README links that resolved into `apps/docs/` — a directory that has been
20
+ removed from the repo — now point at the equivalent pages on the docs site, so
21
+ they keep working for anyone reading the package on npm. The same fix applies
22
+ to the template README that ships inside every scaffolded widget.
23
+
24
+ No runtime behavior changes.
25
+
3
26
  ## 0.3.0
4
27
 
5
28
  ### Minor Changes
package/README.md CHANGED
@@ -13,7 +13,7 @@ Grist’s [`grist-plugin-api.js`](https://docs.getgrist.com/grist-plugin-api.js)
13
13
  | `mapColumnNames` / tuples for writes | `mappedRecord`, `mapBack`, `table.update` |
14
14
  | No test harness | `renderWithGrist` + emulator presets |
15
15
 
16
- Full comparison: [Raw plugin API vs SDK](https://github.com/ArthurBlanchon/grist-widget-sdk/blob/main/apps/docs/guide/raw-plugin-api-vs-sdk.md) (also in the published docs site under **Guide → Raw API vs SDK**).
16
+ Full comparison: [Raw plugin API vs SDK](https://gristwidgets.com/docs/sdk/guide/raw-plugin-api-vs-sdk).
17
17
 
18
18
  ## What This Package Provides
19
19
 
@@ -174,7 +174,7 @@ Optional **`mode`**: `"schema-only"` \| `"schema+samples"` \| `"schema+data"` (h
174
174
 
175
175
  Only a full **`GristReplicaDocument`** is accepted: **`createGristEmulator({ document })`** and **`parseDocument`**. There is no legacy coercion or alternate “emulator input” type; assemble the object (or load JSON), then **`parseDocument`** if you need validation.
176
176
 
177
- The canonical design document for this shape lives at **`apps/docs/design/replica-document.md`**.
177
+ The canonical design document for this shape is [Replica document](https://gristwidgets.com/docs/sdk/design/replica-document).
178
178
  - `grist-widget-sdk/emulator/transports` — low-level `iframe` and `inline` transports if you need to wire your own host.
179
179
  - `grist-widget-sdk/emulator/devtools` — `<EmulatorInspector />` React component (table editor + event timeline + options).
180
180
  - `grist-widget-sdk/emulator/testing` — `renderWithGrist(...)`, vitest
package/dist/advanced.cjs CHANGED
@@ -1997,13 +1997,9 @@ function useRpcHeartbeatCoalesce() {
1997
1997
  const manager = useGristManagerOptional();
1998
1998
  return (0, import_react9.useCallback)(
1999
1999
  async (fn) => {
2000
- try {
2001
- const result = await fn();
2002
- manager?.recordRpcSuccess();
2003
- return result;
2004
- } catch (err) {
2005
- throw err;
2006
- }
2000
+ const result = await fn();
2001
+ manager?.recordRpcSuccess();
2002
+ return result;
2007
2003
  },
2008
2004
  [manager]
2009
2005
  );
@@ -2380,7 +2376,6 @@ async function fetchWithGristAuth(docApi, path, init) {
2380
2376
  }
2381
2377
  const isAbsolute = /^https?:\/\//i.test(path);
2382
2378
  const cleanPath = isAbsolute ? path : path.startsWith("/") ? path : `/${path}`;
2383
- const method = (init?.method ?? "GET").toUpperCase();
2384
2379
  const url = isAbsolute ? new URL(path) : new URL(`${token.baseUrl.replace(/\/$/, "")}${cleanPath}`);
2385
2380
  if (!url.searchParams.has("auth")) url.searchParams.set("auth", token.token);
2386
2381
  const headers = new Headers(init?.headers ?? {});