@knocklabs/expo 0.4.8 → 0.5.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # @knocklabs/expo
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ddd7981]
8
+ - Updated dependencies [7f8bdfe]
9
+ - @knocklabs/client@0.21.1
10
+ - @knocklabs/react-core@0.13.1
11
+ - @knocklabs/react-native@0.8.1
12
+
13
+ ## 0.5.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 2af3f5e: Initialize feeds in `"compact"` mode by default
18
+
19
+ The feed client can now be initialized with a `mode` option, set to either `"compact"` or `"rich"`. When `mode` is `"compact"`, the following restrictions will apply when the feed is fetched:
20
+
21
+ - The `activities` and `total_activities` fields will _not_ be present on feed items
22
+ - The `data` field will _not_ include nested arrays and objects
23
+ - The `actors` field will only have up to one actor
24
+
25
+ **By default, feeds are initialized in `"compact"` mode. If you need to access `activities`, `total_activities`, the complete `data`, or the complete array of `actors`, you must initialize your feed in `"rich"` mode.**
26
+
27
+ If you are using the feed client via `@knocklabs/client` directly:
28
+
29
+ ```js
30
+ const knockFeed = knockClient.feeds.initialize(
31
+ process.env.KNOCK_FEED_CHANNEL_ID,
32
+ { mode: "rich" },
33
+ );
34
+ ```
35
+
36
+ If you are using `<KnockFeedProvider>` via `@knocklabs/react`, `@knocklabs/react-native`, or `@knocklabs/expo`:
37
+
38
+ ```tsx
39
+ <KnockFeedProvider
40
+ feedId={process.env.KNOCK_FEED_CHANNEL_ID}
41
+ defaultFeedOptions={{ mode: "rich" }}
42
+ />
43
+ ```
44
+
45
+ If you are using the `useNotifications` hook via `@knocklabs/react-core`:
46
+
47
+ ```js
48
+ const feedClient = useNotifications(
49
+ knockClient,
50
+ process.env.KNOCK_FEED_CHANNEL_ID,
51
+ { mode: "rich" },
52
+ );
53
+ ```
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [2af3f5e]
58
+ - @knocklabs/client@0.21.0
59
+ - @knocklabs/react-core@0.13.0
60
+ - @knocklabs/react-native@0.8.0
61
+
3
62
  ## 0.4.8
4
63
 
5
64
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knocklabs/expo",
3
- "version": "0.4.8",
3
+ "version": "0.5.1",
4
4
  "author": "@knocklabs",
5
5
  "license": "MIT",
6
6
  "main": "dist/cjs/index.js",
@@ -51,9 +51,9 @@
51
51
  "react-native": "*"
52
52
  },
53
53
  "dependencies": {
54
- "@knocklabs/client": "^0.20.4",
55
- "@knocklabs/react-core": "^0.12.5",
56
- "@knocklabs/react-native": "^0.7.7",
54
+ "@knocklabs/client": "^0.21.1",
55
+ "@knocklabs/react-core": "^0.13.1",
56
+ "@knocklabs/react-native": "^0.8.1",
57
57
  "react-native-gesture-handler": "^2.27.1",
58
58
  "react-native-render-html": "^6.3.4",
59
59
  "react-native-svg": "^15.12.0"
@@ -82,6 +82,6 @@
82
82
  "vite": "^5.4.19",
83
83
  "vite-plugin-dts": "^4.5.0",
84
84
  "vite-plugin-no-bundle": "^4.0.0",
85
- "vitest": "^3.1.1"
85
+ "vitest": "^3.2.4"
86
86
  }
87
87
  }