@echoxyz/sonar-core 0.1.1 → 0.1.3

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,17 @@
1
1
  # @echoxyz/sonar-core
2
2
 
3
+ ## 0.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - f04cb72: Add globalThis fetch, export type
8
+
9
+ ## 0.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 4907b74: Remove unused dependency
14
+
3
15
  ## 0.1.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -176,7 +176,9 @@ var SonarClient = class {
176
176
  var _a, _b, _c;
177
177
  this.apiURL = args.apiURL;
178
178
  this.auth = ((_a = args.opts) == null ? void 0 : _a.auth) ?? new AuthSession({ storage: createWebStorage() });
179
- const fetchImpl = ((_b = args.opts) == null ? void 0 : _b.fetch) ?? globalThis.fetch;
179
+ const fetchImpl = ((_b = args.opts) == null ? void 0 : _b.fetch) ?? globalThis.fetch ?? (() => {
180
+ throw new Error("No fetch available");
181
+ });
180
182
  if (!fetchImpl) {
181
183
  throw new Error("A fetch implementation must be provided");
182
184
  }
package/dist/index.js CHANGED
@@ -140,7 +140,9 @@ var SonarClient = class {
140
140
  var _a, _b, _c;
141
141
  this.apiURL = args.apiURL;
142
142
  this.auth = ((_a = args.opts) == null ? void 0 : _a.auth) ?? new AuthSession({ storage: createWebStorage() });
143
- const fetchImpl = ((_b = args.opts) == null ? void 0 : _b.fetch) ?? globalThis.fetch;
143
+ const fetchImpl = ((_b = args.opts) == null ? void 0 : _b.fetch) ?? globalThis.fetch ?? (() => {
144
+ throw new Error("No fetch available");
145
+ });
144
146
  if (!fetchImpl) {
145
147
  throw new Error("A fetch implementation must be provided");
146
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echoxyz/sonar-core",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -29,9 +29,6 @@
29
29
  "README.md",
30
30
  "package.json"
31
31
  ],
32
- "dependencies": {
33
- "jose": "^6.1.0"
34
- },
35
32
  "scripts": {
36
33
  "build": "tsup src/index.ts --format esm,cjs --dts",
37
34
  "dev": "tsup src/index.ts --format esm,cjs --dts --watch",