From 97cefcb2dcf4169673b9a9da2feb822bd94f8a5e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 19:12:17 +0000 Subject: [PATCH] chore(repo): version packages for rc (rc) --- .changeset/pre.json | 6 ++- examples/client-example/CHANGELOG.md | 7 ++++ examples/client-example/package.json | 2 +- examples/expo-example/CHANGELOG.md | 8 ++++ examples/expo-example/package.json | 2 +- examples/guide-example/CHANGELOG.md | 10 +++++ examples/guide-example/package.json | 2 +- .../ms-teams-connect-example/CHANGELOG.md | 8 ++++ .../ms-teams-connect-example/package.json | 4 +- examples/nextjs-app-dir-example/CHANGELOG.md | 8 ++++ examples/nextjs-app-dir-example/package.json | 2 +- examples/nextjs-example/CHANGELOG.md | 8 ++++ examples/nextjs-example/package.json | 2 +- examples/slack-connect-example/CHANGELOG.md | 8 ++++ examples/slack-connect-example/package.json | 4 +- examples/slack-kit-example/CHANGELOG.md | 8 ++++ examples/slack-kit-example/package.json | 4 +- packages/client/CHANGELOG.md | 14 +++++++ packages/client/package.json | 2 +- packages/expo/CHANGELOG.md | 39 +++++++++++++++++++ packages/expo/package.json | 2 +- packages/react-core/CHANGELOG.md | 35 +++++++++++++++++ packages/react-core/package.json | 2 +- packages/react-native/CHANGELOG.md | 38 ++++++++++++++++++ packages/react-native/package.json | 2 +- packages/react/CHANGELOG.md | 38 ++++++++++++++++++ packages/react/package.json | 2 +- yarn.lock | 8 ++-- 28 files changed, 254 insertions(+), 21 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 8fe7c7556..128707e15 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -20,5 +20,9 @@ "@knocklabs/types": "0.1.5", "@knocklabs/typescript-config": "0.0.2" }, - "changesets": [] + "changesets": [ + "knockprovider-enabled-client", + "knockprovider-enabled-prop", + "use-knock-auth-state-reactive-integrations" + ] } diff --git a/examples/client-example/CHANGELOG.md b/examples/client-example/CHANGELOG.md index 8fe499b09..1066334e7 100644 --- a/examples/client-example/CHANGELOG.md +++ b/examples/client-example/CHANGELOG.md @@ -1,5 +1,12 @@ # client-example +## 0.3.60-rc.0 + +### Patch Changes + +- Updated dependencies [d2f7948] + - @knocklabs/client@0.22.0-rc.0 + ## 0.3.59 ### Patch Changes diff --git a/examples/client-example/package.json b/examples/client-example/package.json index 1e2f8a58e..7ef35aea6 100644 --- a/examples/client-example/package.json +++ b/examples/client-example/package.json @@ -1,6 +1,6 @@ { "name": "client-example", - "version": "0.3.59", + "version": "0.3.60-rc.0", "private": true, "type": "module", "dependencies": { diff --git a/examples/expo-example/CHANGELOG.md b/examples/expo-example/CHANGELOG.md index a5c92f3f4..40bb81de5 100644 --- a/examples/expo-example/CHANGELOG.md +++ b/examples/expo-example/CHANGELOG.md @@ -1,5 +1,13 @@ # @knocklabs/expo-example +## 1.1.10-rc.0 + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/expo@0.7.0-rc.0 + ## 1.1.9 ### Patch Changes diff --git a/examples/expo-example/package.json b/examples/expo-example/package.json index 5f00f5a61..25d17e627 100644 --- a/examples/expo-example/package.json +++ b/examples/expo-example/package.json @@ -1,7 +1,7 @@ { "name": "@knocklabs/expo-example", "main": "expo-router/entry", - "version": "1.1.9", + "version": "1.1.10-rc.0", "scripts": { "start": "expo start", "android": "expo start --android", diff --git a/examples/guide-example/CHANGELOG.md b/examples/guide-example/CHANGELOG.md index 0e611f45c..dbf5c7c56 100644 --- a/examples/guide-example/CHANGELOG.md +++ b/examples/guide-example/CHANGELOG.md @@ -1,5 +1,15 @@ # guide-example +## 0.0.85-rc.0 + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/client@0.22.0-rc.0 + - @knocklabs/react@0.12.0-rc.0 + ## 0.0.84 ### Patch Changes diff --git a/examples/guide-example/package.json b/examples/guide-example/package.json index 7a3486787..0f2f429f5 100644 --- a/examples/guide-example/package.json +++ b/examples/guide-example/package.json @@ -1,7 +1,7 @@ { "name": "guide-example", "private": true, - "version": "0.0.84", + "version": "0.0.85-rc.0", "type": "module", "scripts": { "dev": "vite", diff --git a/examples/ms-teams-connect-example/CHANGELOG.md b/examples/ms-teams-connect-example/CHANGELOG.md index 4f444cee3..31f1be10b 100644 --- a/examples/ms-teams-connect-example/CHANGELOG.md +++ b/examples/ms-teams-connect-example/CHANGELOG.md @@ -1,5 +1,13 @@ # ms-teams-connect-example +## 0.0.72-rc.0 + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/react@0.12.0-rc.0 + ## 0.0.71 ### Patch Changes diff --git a/examples/ms-teams-connect-example/package.json b/examples/ms-teams-connect-example/package.json index 673f24b4e..363ccbc2d 100644 --- a/examples/ms-teams-connect-example/package.json +++ b/examples/ms-teams-connect-example/package.json @@ -1,6 +1,6 @@ { "name": "ms-teams-connect-example", - "version": "0.0.71", + "version": "0.0.72-rc.0", "private": true, "scripts": { "dev": "next dev", @@ -11,7 +11,7 @@ "format:check": "prettier \"**/*.{js,ts,tsx}\" --check" }, "dependencies": { - "@knocklabs/react": "0.11.24", + "@knocklabs/react": "0.12.0-rc.0", "jsonwebtoken": "^9.0.3", "next": "15.3.6", "react": "^19.2.7", diff --git a/examples/nextjs-app-dir-example/CHANGELOG.md b/examples/nextjs-app-dir-example/CHANGELOG.md index c028a4167..34a37c4b1 100644 --- a/examples/nextjs-app-dir-example/CHANGELOG.md +++ b/examples/nextjs-app-dir-example/CHANGELOG.md @@ -1,5 +1,13 @@ # nextjs-app-dir-example +## 0.0.71-rc.0 + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/react@0.12.0-rc.0 + ## 0.0.70 ### Patch Changes diff --git a/examples/nextjs-app-dir-example/package.json b/examples/nextjs-app-dir-example/package.json index 3ff763732..56f1385ad 100644 --- a/examples/nextjs-app-dir-example/package.json +++ b/examples/nextjs-app-dir-example/package.json @@ -1,6 +1,6 @@ { "name": "nextjs-app-dir-example", - "version": "0.0.70", + "version": "0.0.71-rc.0", "private": true, "scripts": { "dev": "next dev --turbopack", diff --git a/examples/nextjs-example/CHANGELOG.md b/examples/nextjs-example/CHANGELOG.md index 5515939b0..3dadf918e 100644 --- a/examples/nextjs-example/CHANGELOG.md +++ b/examples/nextjs-example/CHANGELOG.md @@ -1,5 +1,13 @@ # nextjs-example +## 1.2.37-rc.0 + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/react@0.12.0-rc.0 + ## 1.2.36 ### Patch Changes diff --git a/examples/nextjs-example/package.json b/examples/nextjs-example/package.json index d33c0028a..e7c236184 100644 --- a/examples/nextjs-example/package.json +++ b/examples/nextjs-example/package.json @@ -1,6 +1,6 @@ { "name": "nextjs-example", - "version": "1.2.36", + "version": "1.2.37-rc.0", "private": true, "scripts": { "dev": "next dev", diff --git a/examples/slack-connect-example/CHANGELOG.md b/examples/slack-connect-example/CHANGELOG.md index fbd624c30..8f27933c1 100644 --- a/examples/slack-connect-example/CHANGELOG.md +++ b/examples/slack-connect-example/CHANGELOG.md @@ -1,5 +1,13 @@ # slack-connect-example +## 0.3.71-rc.0 + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/react@0.12.0-rc.0 + ## 0.3.70 ### Patch Changes diff --git a/examples/slack-connect-example/package.json b/examples/slack-connect-example/package.json index 49654e97a..be312f441 100644 --- a/examples/slack-connect-example/package.json +++ b/examples/slack-connect-example/package.json @@ -1,6 +1,6 @@ { "name": "slack-connect-example", - "version": "0.3.70", + "version": "0.3.71-rc.0", "private": true, "scripts": { "dev": "next dev", @@ -11,7 +11,7 @@ "format:check": "prettier \"**/*.{js,ts,tsx}\" --check" }, "dependencies": { - "@knocklabs/react": "0.11.24", + "@knocklabs/react": "0.12.0-rc.0", "jsonwebtoken": "^9.0.3", "next": "15.3.6", "react": "^19.2.7", diff --git a/examples/slack-kit-example/CHANGELOG.md b/examples/slack-kit-example/CHANGELOG.md index ebbdc044f..b58622f9f 100644 --- a/examples/slack-kit-example/CHANGELOG.md +++ b/examples/slack-kit-example/CHANGELOG.md @@ -1,5 +1,13 @@ # slack-kit-example +## 0.4.69-rc.0 + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/react@0.12.0-rc.0 + ## 0.4.68 ### Patch Changes diff --git a/examples/slack-kit-example/package.json b/examples/slack-kit-example/package.json index f02a9c1fe..26bf30463 100644 --- a/examples/slack-kit-example/package.json +++ b/examples/slack-kit-example/package.json @@ -1,6 +1,6 @@ { "name": "slack-kit-example", - "version": "0.4.68", + "version": "0.4.69-rc.0", "private": true, "scripts": { "dev": "next dev", @@ -12,7 +12,7 @@ }, "dependencies": { "@knocklabs/node": "^1.30.0", - "@knocklabs/react": "0.11.24", + "@knocklabs/react": "0.12.0-rc.0", "jsonwebtoken": "^9.0.3", "next": "15.3.6", "react": "^19.2.7", diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index 9306c8cc4..a6aa73b51 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.22.0-rc.0 + +### Minor Changes + +- d2f7948: Make the client do nothing (instead of throwing or making requests) when there's no signed-in user, and add tools to manage sign-in state. + + - New `Knock.logout()` clears the user and disconnects everything: the websocket, the token-refresh timer, and the page-visibility listener. + - New `knock.authStatus` (`"authenticated"` or `"unauthenticated"`) and a subscribable `knock.authStore` to check or react to whether a user is signed in. + - With no signed-in user, these now do nothing instead of throwing or calling the API: + - Feed `markAs*` / `markAll*` / `fetchNextPage` (they also skip the optimistic UI update). + - Guides `fetch` / `subscribe` and the step actions. These previously threw, which could crash the app when Guides rendered before a user was set. + - Slack/MS Teams `authCheck` (returns "not connected"), `getChannels` / `getTeams` (return empty), and `messages.batchUpdateStatuses` (returns `[]`). + - Fixes two Guide bugs: real-time updates broke after a re-login (a stale socket reference), and the `history` patch used for location tracking broke when a Guide provider remounted. + ## 0.21.15 ### Patch Changes diff --git a/packages/client/package.json b/packages/client/package.json index a730f1910..04816641e 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@knocklabs/client", - "version": "0.21.15", + "version": "0.22.0-rc.0", "description": "The clientside library for interacting with Knock", "homepage": "https://github.com/knocklabs/javascript/tree/main/packages/client", "author": "@knocklabs", diff --git a/packages/expo/CHANGELOG.md b/packages/expo/CHANGELOG.md index 98c0fb841..fea7b9f1f 100644 --- a/packages/expo/CHANGELOG.md +++ b/packages/expo/CHANGELOG.md @@ -1,5 +1,44 @@ # @knocklabs/expo +## 0.7.0-rc.0 + +### Minor Changes + +- d2f7948: Add an `enabled` prop to `KnockProvider` (and an `enabled` option to `useAuthenticatedKnockClient`). + + When `enabled` is `false`, the provider still renders its children but the Knock client sits idle: no identify call, no API requests, no websocket. Set it to `true` and it connects like a login; set it back to `false` and it disconnects and clears its data like a logout. It defaults to `true`, so existing code is unaffected. + + Use this instead of conditionally mounting `KnockProvider`, for example to wait for a user token that loads asynchronously: + + ```tsx + + ``` + + Also fixed: + + - `useFeedSettings` no longer calls `GET /v1/users/undefined/feeds/.../settings` when there's no user. + - `KnockProvider` now disconnects its client (websocket, token-refresh timer, listener) when it unmounts, instead of leaving them running. + +- d2f7948: Add `useKnockAuthState()` and make Slack, MS Teams, and Expo respond to sign-in changes. + + - New `useKnockAuthState(knock)` hook re-renders when the user signs in, signs out, or switches. + - Slack and MS Teams connection status now re-checks when the user changes, instead of checking once and sticking with that result. + - Expo waits for a signed-in user before registering for push notifications, so logged-out users don't see the OS permission prompt. A notification tapped while logged out no longer tries to update its status. + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/client@0.22.0-rc.0 + - @knocklabs/react-core@0.14.0-rc.0 + - @knocklabs/react-native@0.10.0-rc.0 + ## 0.6.9 ### Patch Changes diff --git a/packages/expo/package.json b/packages/expo/package.json index 4b116d4bf..9e605c08e 100644 --- a/packages/expo/package.json +++ b/packages/expo/package.json @@ -1,6 +1,6 @@ { "name": "@knocklabs/expo", - "version": "0.6.9", + "version": "0.7.0-rc.0", "author": "@knocklabs", "license": "MIT", "main": "dist/cjs/index.js", diff --git a/packages/react-core/CHANGELOG.md b/packages/react-core/CHANGELOG.md index 2e4639f1b..9128659c6 100644 --- a/packages/react-core/CHANGELOG.md +++ b/packages/react-core/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## 0.14.0-rc.0 + +### Minor Changes + +- d2f7948: Add an `enabled` prop to `KnockProvider` (and an `enabled` option to `useAuthenticatedKnockClient`). + + When `enabled` is `false`, the provider still renders its children but the Knock client sits idle: no identify call, no API requests, no websocket. Set it to `true` and it connects like a login; set it back to `false` and it disconnects and clears its data like a logout. It defaults to `true`, so existing code is unaffected. + + Use this instead of conditionally mounting `KnockProvider`, for example to wait for a user token that loads asynchronously: + + ```tsx + + ``` + + Also fixed: + + - `useFeedSettings` no longer calls `GET /v1/users/undefined/feeds/.../settings` when there's no user. + - `KnockProvider` now disconnects its client (websocket, token-refresh timer, listener) when it unmounts, instead of leaving them running. + +- d2f7948: Add `useKnockAuthState()` and make Slack, MS Teams, and Expo respond to sign-in changes. + + - New `useKnockAuthState(knock)` hook re-renders when the user signs in, signs out, or switches. + - Slack and MS Teams connection status now re-checks when the user changes, instead of checking once and sticking with that result. + - Expo waits for a signed-in user before registering for push notifications, so logged-out users don't see the OS permission prompt. A notification tapped while logged out no longer tries to update its status. + +### Patch Changes + +- Updated dependencies [d2f7948] + - @knocklabs/client@0.22.0-rc.0 + ## 0.13.16 ### Patch Changes diff --git a/packages/react-core/package.json b/packages/react-core/package.json index 474ccc3a3..589e2b139 100644 --- a/packages/react-core/package.json +++ b/packages/react-core/package.json @@ -2,7 +2,7 @@ "name": "@knocklabs/react-core", "description": "A set of React components to build notification experiences powered by Knock", "author": "@knocklabs", - "version": "0.13.16", + "version": "0.14.0-rc.0", "license": "MIT", "main": "dist/cjs/index.js", "module": "dist/esm/index.mjs", diff --git a/packages/react-native/CHANGELOG.md b/packages/react-native/CHANGELOG.md index 3af2ad85d..34a96d5ef 100644 --- a/packages/react-native/CHANGELOG.md +++ b/packages/react-native/CHANGELOG.md @@ -1,5 +1,43 @@ # Changelog +## 0.10.0-rc.0 + +### Minor Changes + +- d2f7948: Add an `enabled` prop to `KnockProvider` (and an `enabled` option to `useAuthenticatedKnockClient`). + + When `enabled` is `false`, the provider still renders its children but the Knock client sits idle: no identify call, no API requests, no websocket. Set it to `true` and it connects like a login; set it back to `false` and it disconnects and clears its data like a logout. It defaults to `true`, so existing code is unaffected. + + Use this instead of conditionally mounting `KnockProvider`, for example to wait for a user token that loads asynchronously: + + ```tsx + + ``` + + Also fixed: + + - `useFeedSettings` no longer calls `GET /v1/users/undefined/feeds/.../settings` when there's no user. + - `KnockProvider` now disconnects its client (websocket, token-refresh timer, listener) when it unmounts, instead of leaving them running. + +- d2f7948: Add `useKnockAuthState()` and make Slack, MS Teams, and Expo respond to sign-in changes. + + - New `useKnockAuthState(knock)` hook re-renders when the user signs in, signs out, or switches. + - Slack and MS Teams connection status now re-checks when the user changes, instead of checking once and sticking with that result. + - Expo waits for a signed-in user before registering for push notifications, so logged-out users don't see the OS permission prompt. A notification tapped while logged out no longer tries to update its status. + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/client@0.22.0-rc.0 + - @knocklabs/react-core@0.14.0-rc.0 + ## 0.9.9 ### Patch Changes diff --git a/packages/react-native/package.json b/packages/react-native/package.json index b1242d55c..0ef075924 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "@knocklabs/react-native", - "version": "0.9.9", + "version": "0.10.0-rc.0", "author": "@knocklabs", "license": "MIT", "main": "dist/cjs/index.js", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index a10e0f201..198dcb4e8 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,43 @@ # Changelog +## 0.12.0-rc.0 + +### Minor Changes + +- d2f7948: Add an `enabled` prop to `KnockProvider` (and an `enabled` option to `useAuthenticatedKnockClient`). + + When `enabled` is `false`, the provider still renders its children but the Knock client sits idle: no identify call, no API requests, no websocket. Set it to `true` and it connects like a login; set it back to `false` and it disconnects and clears its data like a logout. It defaults to `true`, so existing code is unaffected. + + Use this instead of conditionally mounting `KnockProvider`, for example to wait for a user token that loads asynchronously: + + ```tsx + + ``` + + Also fixed: + + - `useFeedSettings` no longer calls `GET /v1/users/undefined/feeds/.../settings` when there's no user. + - `KnockProvider` now disconnects its client (websocket, token-refresh timer, listener) when it unmounts, instead of leaving them running. + +- d2f7948: Add `useKnockAuthState()` and make Slack, MS Teams, and Expo respond to sign-in changes. + + - New `useKnockAuthState(knock)` hook re-renders when the user signs in, signs out, or switches. + - Slack and MS Teams connection status now re-checks when the user changes, instead of checking once and sticking with that result. + - Expo waits for a signed-in user before registering for push notifications, so logged-out users don't see the OS permission prompt. A notification tapped while logged out no longer tries to update its status. + +### Patch Changes + +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] +- Updated dependencies [d2f7948] + - @knocklabs/client@0.22.0-rc.0 + - @knocklabs/react-core@0.14.0-rc.0 + ## 0.11.24 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 946390ad9..a69ec9b0b 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -2,7 +2,7 @@ "name": "@knocklabs/react", "description": "A set of React components to build notification experiences powered by Knock", "author": "@knocklabs", - "version": "0.11.24", + "version": "0.12.0-rc.0", "license": "MIT", "main": "dist/cjs/index.js", "module": "dist/esm/index.mjs", diff --git a/yarn.lock b/yarn.lock index 60320e3f7..97c300c44 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5102,7 +5102,7 @@ __metadata: languageName: unknown linkType: soft -"@knocklabs/react@npm:0.11.24, @knocklabs/react@workspace:*, @knocklabs/react@workspace:^, @knocklabs/react@workspace:packages/react": +"@knocklabs/react@npm:0.12.0-rc.0, @knocklabs/react@workspace:*, @knocklabs/react@workspace:^, @knocklabs/react@workspace:packages/react": version: 0.0.0-use.local resolution: "@knocklabs/react@workspace:packages/react" dependencies: @@ -17080,7 +17080,7 @@ __metadata: version: 0.0.0-use.local resolution: "ms-teams-connect-example@workspace:examples/ms-teams-connect-example" dependencies: - "@knocklabs/react": "npm:0.11.24" + "@knocklabs/react": "npm:0.12.0-rc.0" "@types/jsonwebtoken": "npm:^9.0.10" "@types/node": "npm:^24" "@types/react": "npm:^19.2.17" @@ -19974,7 +19974,7 @@ __metadata: version: 0.0.0-use.local resolution: "slack-connect-example@workspace:examples/slack-connect-example" dependencies: - "@knocklabs/react": "npm:0.11.24" + "@knocklabs/react": "npm:0.12.0-rc.0" "@types/jsonwebtoken": "npm:^9.0.10" "@types/node": "npm:^24" "@types/react": "npm:^19.2.17" @@ -19994,7 +19994,7 @@ __metadata: resolution: "slack-kit-example@workspace:examples/slack-kit-example" dependencies: "@knocklabs/node": "npm:^1.30.0" - "@knocklabs/react": "npm:0.11.24" + "@knocklabs/react": "npm:0.12.0-rc.0" "@tailwindcss/postcss": "npm:^4.3.0" "@types/node": "npm:^24" "@types/react": "npm:^19.2.17"