@cometchat/skills 4.4.0 → 4.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/skills",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -229,7 +229,7 @@ function boot() {
229
229
  if (typeof window === "undefined") {
230
230
  boot(); // server render — skip CometChat init entirely
231
231
  } else {
232
- CometChatUIKit.init(settings).then(boot).catch((e) => { console.error(e); boot(); });
232
+ (CometChatUIKit.init(settings) ?? Promise.resolve()).then(boot).catch((e) => { console.error(e); boot(); });
233
233
  }
234
234
  ```
235
235
 
@@ -673,7 +673,7 @@ const handleClose = () => console.log("closed");
673
673
  ## 10. Complete integration checklist
674
674
 
675
675
  1. Ensure `@astrojs/react` is installed: `npx astro add react`
676
- 2. Install packages: `npm install @cometchat/chat-uikit-react @cometchat/chat-sdk-javascript`
676
+ 2. Install packages: `npm install @cometchat/chat-uikit-react@^6 @cometchat/chat-sdk-javascript@^4` — **⚠️ keep the `@^6` major pin; never install bare.** v7 is on npm — a bare `npm install @cometchat/chat-uikit-react` pulls it once it's tagged `latest`, and these v6 skills break against the v7 API.
677
677
  3. Create `.env` with `PUBLIC_COMETCHAT_APP_ID`, `PUBLIC_COMETCHAT_REGION`, `PUBLIC_COMETCHAT_AUTH_KEY`
678
678
  4. Add `.env` to `.gitignore`
679
679
  5. Create `src/components/CometChatProvider.tsx` with CSS import inside it (section 3)
@@ -853,9 +853,11 @@ The UI Kit (`@cometchat/chat-uikit-react`) provides all the React components. Th
853
853
  Install with your project's package manager:
854
854
 
855
855
  ```bash
856
- npm install @cometchat/chat-uikit-react @cometchat/chat-sdk-javascript
856
+ npm install @cometchat/chat-uikit-react@^6 @cometchat/chat-sdk-javascript@^4
857
857
  ```
858
858
 
859
+ > ⚠️ **Keep the `@^6` / `@^4` major pins — never run a bare `npm install @cometchat/chat-uikit-react`.** v7 of the React UI Kit is published on npm; a bare (unpinned) install resolves to whatever is tagged `latest`, so once v7 promotes to `latest` it will pull v7 — and these skills teach the **v6** API, so the integration breaks. The `@^6` pin keeps you on the latest v6 (currently 6.5.2) regardless. Bump to `@^7` only when you've moved to the v7 skills.
860
+
859
861
  > 💡 **Cost transparency (ENG-35722) — disclose proactively when integrating into a new project:** the kit adds roughly **2.8 MB of JS** (~860 KB gzipped), **~860 KB of CSS**, and **~1.5 MB of Roboto TTF fonts** (9 weights bundled). If the customer's app already loads custom fonts, the Roboto bundle is redundant; override via the `--cometchat-font-family` CSS variable to skip preloading the kit fonts (the TTFs still ship but the browser doesn't download them unless they're actually used). For SaaS founders evaluating CometChat vs self-build, also mention:
860
862
  > - **Pricing:** https://www.cometchat.com/pricing (free tier covers small dev/test use)
861
863
  > - **Data extraction / migration:** REST API endpoints `GET /v3/users`, `GET /v3/groups`, `GET /v3/messages?conversationId=` can export everything; no proprietary lock-in
@@ -276,7 +276,7 @@ CometChatConversations, etc.
276
276
  For these, the user opting in IS consent — run the install directly:
277
277
 
278
278
  ```bash
279
- npm install @cometchat/calls-sdk-javascript
279
+ npm install @cometchat/calls-sdk-javascript@^5
280
280
  npx @cometchat/skills-cli verify --json
281
281
  ```
282
282
 
@@ -161,7 +161,7 @@ After CometChat init is configured but before mounting any kit components:
161
161
  ```ts
162
162
  // React example — in your provider
163
163
  useEffect(() => {
164
- CometChatUIKit.init(settings).then(() => {
164
+ CometChatUIKit.init(settings)?.then(() => {
165
165
  CometChatLocalize.init({ language: getUserLocale(), fallbackLanguage: "en" });
166
166
  // Now mount kit components
167
167
  });
@@ -54,8 +54,8 @@ Ground truth: `docs/ui-kit/react-native/react-native-cli-integration.mdx`, `appl
54
54
 
55
55
  ```bash
56
56
  # Core SDK + UI Kit
57
- npm install @cometchat/chat-sdk-react-native
58
- npm install @cometchat/chat-uikit-react-native
57
+ npm install @cometchat/chat-sdk-react-native@^4
58
+ npm install @cometchat/chat-uikit-react-native@^5
59
59
 
60
60
  # Natively-linked deps used by the kit + sample apps. (datetimepicker isn't a
61
61
  # declared kit peer, but every shipped sample installs it — keep it for parity.)
@@ -283,7 +283,7 @@ Without this guard, undefined env values produce opaque `TypeError: undefined is
283
283
  ### Bare RN CLI
284
284
 
285
285
  ```bash
286
- npm install @cometchat/chat-sdk-react-native @cometchat/calls-sdk-react-native
286
+ npm install @cometchat/chat-sdk-react-native@^4 @cometchat/calls-sdk-react-native@^5
287
287
  npm install react-native-callkeep react-native-voip-push-notification @react-native-firebase/app @react-native-firebase/messaging
288
288
  npm install react-native-webrtc # Calls SDK peer dep
289
289
  npm install react-native-gesture-handler react-native-reanimated # already installed if using UI Kit
@@ -467,7 +467,7 @@ npm install \
467
467
  Expo adds `expo-av` / `expo-image-picker` depending on which features you enable. Calls require the separate package PLUS the WebRTC native peers AND the polyfill peers the calls-sdk imports but doesn't declare:
468
468
 
469
469
  ```bash
470
- npm install @cometchat/calls-sdk-react-native \
470
+ npm install @cometchat/calls-sdk-react-native@^5 \
471
471
  @react-native-community/netinfo \
472
472
  react-native-callstats \
473
473
  react-native-webrtc \
@@ -64,8 +64,8 @@ The UI Kit has a long peer-dep tail. Install them all in one shot so Expo's reso
64
64
 
65
65
  ```bash
66
66
  # Core SDK + UI Kit
67
- npm install @cometchat/chat-sdk-react-native
68
- npm install @cometchat/chat-uikit-react-native
67
+ npm install @cometchat/chat-sdk-react-native@^4
68
+ npm install @cometchat/chat-uikit-react-native@^5
69
69
 
70
70
  # Required peer deps (all natively-linked)
71
71
  npx expo install \
@@ -99,7 +99,7 @@ npx expo install \
99
99
  If the user's flow includes voice / video calls (the `cometchat-native-features` skill's § Calls gates this):
100
100
 
101
101
  ```bash
102
- npm install @cometchat/calls-sdk-react-native \
102
+ npm install @cometchat/calls-sdk-react-native@^5 \
103
103
  react-native-url-polyfill \
104
104
  react-native-performance \
105
105
  valibot
@@ -136,7 +136,7 @@ Calls are the biggest "add a feature" step. They require the separate `@cometcha
136
136
  **Expo (managed workflow)**:
137
137
 
138
138
  ```bash
139
- npm install @cometchat/calls-sdk-react-native
139
+ npm install @cometchat/calls-sdk-react-native@^5
140
140
  npx expo install \
141
141
  @react-native-community/netinfo \
142
142
  react-native-background-timer \
@@ -426,10 +426,10 @@ If the user is upgrading from `@cometchat/chat-uikit-react-native@4`, these are
426
426
 
427
427
  ```bash
428
428
  # 1. Update the main kit
429
- npm install @cometchat/chat-uikit-react-native@latest
429
+ npm install @cometchat/chat-uikit-react-native@^5
430
430
 
431
431
  # 2. Install the full peer-dep set (v5 doesn't auto-install them like v4 did)
432
- npm install @cometchat/chat-sdk-react-native \
432
+ npm install @cometchat/chat-sdk-react-native@^4 \
433
433
  @react-native-async-storage/async-storage \
434
434
  @react-native-clipboard/clipboard \
435
435
  @react-native-community/datetimepicker \
@@ -850,7 +850,7 @@ If the project has a custom `pages/_document.tsx` for font preloading or third-p
850
850
 
851
851
  ## 12. Complete integration checklist (App Router)
852
852
 
853
- 1. Install packages: `npm install @cometchat/chat-uikit-react @cometchat/chat-sdk-javascript`
853
+ 1. Install packages: `npm install @cometchat/chat-uikit-react@^6 @cometchat/chat-sdk-javascript@^4` — **⚠️ keep the `@^6` major pin; never install bare.** v7 is on npm — a bare `npm install @cometchat/chat-uikit-react` pulls it once it's tagged `latest`, and these v6 skills break against the v7 API.
854
854
  2. Create `.env.local` with `NEXT_PUBLIC_COMETCHAT_APP_ID`, `NEXT_PUBLIC_COMETCHAT_REGION`, `NEXT_PUBLIC_COMETCHAT_AUTH_KEY`
855
855
  3. Import `@cometchat/chat-uikit-react/css-variables.css` in `app/globals.css`
856
856
  4. Create `app/providers/CometChatProvider.tsx` with `"use client"` (section 3)
@@ -861,7 +861,7 @@ If the project has a custom `pages/_document.tsx` for font preloading or third-p
861
861
 
862
862
  ## 13. Complete integration checklist (Pages Router)
863
863
 
864
- 1. Install packages: `npm install @cometchat/chat-uikit-react @cometchat/chat-sdk-javascript`
864
+ 1. Install packages: `npm install @cometchat/chat-uikit-react@^6 @cometchat/chat-sdk-javascript@^4` — **⚠️ keep the `@^6` major pin; never install bare.** v7 is on npm — a bare `npm install @cometchat/chat-uikit-react` pulls it once it's tagged `latest`, and these v6 skills break against the v7 API.
865
865
  2. Create `.env.local` with `NEXT_PUBLIC_COMETCHAT_APP_ID`, `NEXT_PUBLIC_COMETCHAT_REGION`, `NEXT_PUBLIC_COMETCHAT_AUTH_KEY`
866
866
  3. Import `@cometchat/chat-uikit-react/css-variables.css` in `pages/_app.tsx`
867
867
  4. Create `components/CometChatProvider.tsx` (section 3 code, without `"use client"`)
@@ -602,7 +602,7 @@ export default defineConfig({
602
602
 
603
603
  When integrating CometChat into a React (Vite/CRA) project, follow these steps in order:
604
604
 
605
- 1. Install packages: `npm install @cometchat/chat-uikit-react @cometchat/chat-sdk-javascript`
605
+ 1. Install packages: `npm install @cometchat/chat-uikit-react@^6 @cometchat/chat-sdk-javascript@^4` — **⚠️ keep the `@^6` major pin; never install bare.** v7 is on npm — a bare `npm install @cometchat/chat-uikit-react` pulls it once it's tagged `latest`, and these v6 skills break against the v7 API.
606
606
  2. Create `.env` with `VITE_COMETCHAT_APP_ID`, `VITE_COMETCHAT_REGION`, `VITE_COMETCHAT_AUTH_KEY`
607
607
  3. Add `.env` to `.gitignore` if not already there
608
608
  4. Import `@cometchat/chat-uikit-react/css-variables.css` in `src/main.tsx`
@@ -703,7 +703,7 @@ Do not mix v6 and v7 patterns. Detect the mode (section 1) and use the correct p
703
703
 
704
704
  ## 8. Complete integration checklist (v6 library mode)
705
705
 
706
- 1. Install packages: `npm install @cometchat/chat-uikit-react @cometchat/chat-sdk-javascript`
706
+ 1. Install packages: `npm install @cometchat/chat-uikit-react@^6 @cometchat/chat-sdk-javascript@^4` — **⚠️ keep the `@^6` major pin; never install bare.** v7 is on npm — a bare `npm install @cometchat/chat-uikit-react` pulls it once it's tagged `latest`, and these v6 skills break against the v7 API.
707
707
  2. Create `.env` with `VITE_COMETCHAT_APP_ID`, `VITE_COMETCHAT_REGION`, `VITE_COMETCHAT_AUTH_KEY`
708
708
  3. Add `.env` to `.gitignore`
709
709
  4. Import `@cometchat/chat-uikit-react/css-variables.css` in `src/main.tsx`
@@ -715,7 +715,7 @@ Do not mix v6 and v7 patterns. Detect the mode (section 1) and use the correct p
715
715
 
716
716
  ## 9. Complete integration checklist (v7 framework mode)
717
717
 
718
- 1. Install packages: `npm install @cometchat/chat-uikit-react @cometchat/chat-sdk-javascript`
718
+ 1. Install packages: `npm install @cometchat/chat-uikit-react@^6 @cometchat/chat-sdk-javascript@^4` — **⚠️ keep the `@^6` major pin; never install bare.** v7 is on npm — a bare `npm install @cometchat/chat-uikit-react` pulls it once it's tagged `latest`, and these v6 skills break against the v7 API.
719
719
  2. Create `.env` with `VITE_COMETCHAT_APP_ID`, `VITE_COMETCHAT_REGION`, `VITE_COMETCHAT_AUTH_KEY`
720
720
  3. Add `.env` to `.gitignore`
721
721
  4. Import `@cometchat/chat-uikit-react/css-variables.css` in `app/root.tsx`