@knime/hub-features 1.22.0 → 1.22.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,20 @@
1
1
  # @knime/hub-features
2
2
 
3
+ ## 1.22.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b27134e: Resolve ignored audit issue (DOMPurify)
8
+ - Updated dependencies [b27134e]
9
+ - @knime/utils@1.10.1
10
+ - @knime/components@1.45.8
11
+
12
+ ## 1.22.1
13
+
14
+ ### Patch Changes
15
+
16
+ - d0c7524: KDS-659: avoid instanceof; it fails with mulitple ofetch versions
17
+
3
18
  ## 1.22.0
4
19
 
5
20
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/hub-features",
3
- "version": "1.22.0",
3
+ "version": "1.22.2",
4
4
  "description": "Vue components & composables for shared hub features",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,9 +36,9 @@
36
36
  "lodash-es": "4.17.23",
37
37
  "ofetch": "^1.4.1",
38
38
  "typescript": "^5.9.3",
39
- "@knime/components": "1.45.7",
39
+ "@knime/components": "1.45.8",
40
40
  "@knime/styles": "1.15.0",
41
- "@knime/utils": "1.10.0"
41
+ "@knime/utils": "1.10.1"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "consola": "3.x",
@@ -41,12 +41,22 @@ const toToast = ({
41
41
  };
42
42
  };
43
43
 
44
+ const isFetchError = (error: unknown): error is FetchError => {
45
+ return (
46
+ error !== null &&
47
+ typeof error === "object" &&
48
+ "response" in error &&
49
+ "statusCode" in error &&
50
+ "data" in error
51
+ );
52
+ };
53
+
44
54
  /**
45
55
  * Parse an ofetch's `FetchError` to an `RFCError`.
46
56
  * When parsing is not possible it returns undefined.
47
57
  */
48
58
  const tryParse = (error: unknown): RFCError | undefined => {
49
- if (!(error instanceof FetchError)) {
59
+ if (!isFetchError(error)) {
50
60
  return undefined;
51
61
  }
52
62