@framestudio/keel-sdk 0.1.0 → 0.1.1

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
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ - **The analytics re-export is named, not a wildcard.** `export *` published
6
+ `__reset`, `__state` and `__identity` — three functions `keel-analytics` annotates
7
+ "Not part of the public API. Used by the test suite." — plus `cleanPath`, an
8
+ internal privacy helper. They appeared in autocomplete and would have become part
9
+ of this package's contract, so removing them later would break a pinned site.
10
+ Re-exported now: `init`, `track`, `page`, `captureError`, `health`, `flush`,
11
+ `resetVisitor`, `EVENTS`. A test pins both directions.
12
+
13
+ No other changes: same API, same files, same dependency.
14
+
3
15
  ## 0.1.0
4
16
 
5
17
  First release. Extracted from the hand-copied `keelClient.js` that every custom
package/README.md CHANGED
@@ -164,6 +164,11 @@ init({ token }) // page views and errors report themselves
164
164
  track('add_to_cart', { name: 'Kikoi', quantity: 1 })
165
165
  ```
166
166
 
167
+ Re-exported: `init`, `track`, `page`, `captureError`, `health`, `flush`,
168
+ `resetVisitor`, `EVENTS`. Not re-exported: `keel-analytics`' test hooks
169
+ (`__reset`, `__state`, `__identity`) or its internal helpers — a wildcard would
170
+ have published those as part of this package's contract.
171
+
167
172
  ---
168
173
 
169
174
  ## Testing
package/client.js CHANGED
@@ -20,7 +20,30 @@ import {
20
20
  * import { createClient, init, track } from '@framestudio/keel-sdk'
21
21
  */
22
22
 
23
- export * from '@framestudio/keel-analytics'
23
+ /**
24
+ * Analytics, re-exported so a site installs one package.
25
+ *
26
+ * ⚠️ NAMED, NOT `export *`. The analytics package deliberately exports three
27
+ * functions annotated "Not part of the public API. Used by the test suite."
28
+ * (`__reset`, `__state`, `__identity`), plus `cleanPath`, which is an internal
29
+ * privacy helper. A wildcard re-export published all four: they appeared in
30
+ * autocomplete and became part of THIS package's contract, so anyone using them
31
+ * would be coupled to internals neither package promised.
32
+ *
33
+ * `EVENTS` is included because it is the complete, closed vocabulary — a site
34
+ * author needs to know the valid names. `HEALTH_RESOURCES` is not, because the
35
+ * analytics README calls it "a starter set… not the catalogue".
36
+ */
37
+ export {
38
+ init,
39
+ track,
40
+ page,
41
+ captureError,
42
+ health,
43
+ flush,
44
+ resetVisitor,
45
+ EVENTS,
46
+ } from '@framestudio/keel-analytics'
24
47
 
25
48
  /** Matches the default in `@framestudio/keel-analytics`. */
26
49
  export const API_BASE = 'https://keel-api-37rh.onrender.com'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framestudio/keel-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Read a Keel shop's catalogue, settings and content through a site token. One import, no database credential in the browser.",
5
5
  "license": "MIT",
6
6
  "type": "module",