firstly 0.10.1 → 0.10.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # firstly
2
2
 
3
+ ## 0.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#366](https://github.com/jycouet/firstly/pull/366) [`2c661f6`](https://github.com/jycouet/firstly/commit/2c661f6474b8614733e5494e7deda3cd069aed9c) Thanks [@jycouet](https://github.com/jycouet)! - `ff` handles: read failed writes through `errorMessage()`. Remult rejects with a plain object, not
8
+ an `Error`, so `handle.error` used to end up as the string `[object Object]` on a 403.
9
+
3
10
  ## 0.10.1
4
11
 
5
12
  ### Patch Changes
@@ -1,4 +1,5 @@
1
1
  import { repo as remultRepo, } from 'remult';
2
+ import { errorMessage } from '../core/helper.js';
2
3
  import { dialog } from './dialog.svelte.js';
3
4
  /** Classify a thrown read error into an {@link FF_Issue} (best-effort status sniffing). */
4
5
  function toIssue(e) {
@@ -70,7 +71,7 @@ class FF_RepoHandle {
70
71
  this.#fireItems();
71
72
  },
72
73
  error: (e) => {
73
- this.error = e instanceof Error ? e.message : String(e);
74
+ this.error = errorMessage(e);
74
75
  this.loading.init = false;
75
76
  this.#fireIssue(toIssue(e));
76
77
  },
@@ -144,7 +145,7 @@ class FF_RepoHandle {
144
145
  }
145
146
  catch (e) {
146
147
  if (seq === this.#seq) {
147
- this.error = e instanceof Error ? e.message : String(e);
148
+ this.error = errorMessage(e);
148
149
  this.#fireIssue(toIssue(e));
149
150
  }
150
151
  }
@@ -280,7 +281,7 @@ class FF_RepoHandle {
280
281
  return res;
281
282
  }
282
283
  catch (e) {
283
- this.error = e instanceof Error ? e.message : String(e);
284
+ this.error = errorMessage(e);
284
285
  throw e;
285
286
  }
286
287
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firstly",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "type": "module",
5
5
  "description": "Firstly, an opinionated Remult setup!",
6
6
  "bin": {
@@ -42,8 +42,8 @@
42
42
  "cron": "4.4.0",
43
43
  "esm-env": "1.2.2",
44
44
  "nodemailer": "8.0.5",
45
- "svelte-sonner": "1.1.1",
46
- "tailwind-merge": "3.6.0",
45
+ "svelte-sonner": "1.2.1",
46
+ "tailwind-merge": "3.7.0",
47
47
  "tailwindcss": "4.3.0",
48
48
  "vite-plugin-kit-routes": "1.0.6",
49
49
  "vite-plugin-stripper": "0.10.4"