@supashiphq/react-sdk 0.8.0 → 1.0.0
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/README.md +9 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ function App() {
|
|
|
28
28
|
return (
|
|
29
29
|
<SupaProvider
|
|
30
30
|
config={{
|
|
31
|
-
|
|
31
|
+
sdkKey: 'your-sdk-key',
|
|
32
32
|
environment: 'production',
|
|
33
33
|
features,
|
|
34
34
|
context: {
|
|
@@ -120,7 +120,7 @@ The provider component that makes feature flags available to your React componen
|
|
|
120
120
|
import { createFeatures } from '@supashiphq/react-sdk'
|
|
121
121
|
|
|
122
122
|
const config = {
|
|
123
|
-
|
|
123
|
+
sdkKey: 'your-sdk-key',
|
|
124
124
|
environment: 'production',
|
|
125
125
|
features: createFeatures({
|
|
126
126
|
// Required: define all feature flags with fallback values
|
|
@@ -458,7 +458,7 @@ function App() {
|
|
|
458
458
|
return (
|
|
459
459
|
<SupaProvider
|
|
460
460
|
config={{
|
|
461
|
-
|
|
461
|
+
sdkKey: 'your-sdk-key',
|
|
462
462
|
features: FEATURE_FLAGS,
|
|
463
463
|
context: {
|
|
464
464
|
userId: user?.id,
|
|
@@ -542,7 +542,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
542
542
|
return (
|
|
543
543
|
<SupaProvider
|
|
544
544
|
config={{
|
|
545
|
-
|
|
545
|
+
sdkKey: process.env.NEXT_PUBLIC_SUPASHIP_SDK_KEY!,
|
|
546
546
|
environment: process.env.NODE_ENV!,
|
|
547
547
|
features: FEATURE_FLAGS,
|
|
548
548
|
}}
|
|
@@ -591,7 +591,7 @@ export default function App({ Component, pageProps }: AppProps) {
|
|
|
591
591
|
return (
|
|
592
592
|
<SupaProvider
|
|
593
593
|
config={{
|
|
594
|
-
|
|
594
|
+
sdkKey: process.env.NEXT_PUBLIC_SUPASHIP_SDK_KEY!,
|
|
595
595
|
environment: process.env.NODE_ENV!,
|
|
596
596
|
features: FEATURE_FLAGS,
|
|
597
597
|
}}
|
|
@@ -617,9 +617,9 @@ function App() {
|
|
|
617
617
|
return (
|
|
618
618
|
<SupaProvider
|
|
619
619
|
config={{
|
|
620
|
-
|
|
620
|
+
sdkKey: import.meta.env.VITE_SUPASHIP_SDK_KEY, // Vite
|
|
621
621
|
// or
|
|
622
|
-
|
|
622
|
+
sdkKey: process.env.REACT_APP_SUPASHIP_SDK_KEY, // CRA
|
|
623
623
|
environment: import.meta.env.MODE,
|
|
624
624
|
features: FEATURE_FLAGS,
|
|
625
625
|
}}
|
|
@@ -669,7 +669,7 @@ export function TestProviders({ children, features = {} as FeaturesWithFallbacks
|
|
|
669
669
|
return (
|
|
670
670
|
<SupaProvider
|
|
671
671
|
config={{
|
|
672
|
-
|
|
672
|
+
sdkKey: 'test-key',
|
|
673
673
|
environment: 'test',
|
|
674
674
|
features,
|
|
675
675
|
context: {},
|
|
@@ -762,7 +762,7 @@ function App() {
|
|
|
762
762
|
|
|
763
763
|
#### Features Not Loading
|
|
764
764
|
|
|
765
|
-
- **Check
|
|
765
|
+
- **Check SDK key:** Verify your SDK key is correct
|
|
766
766
|
- **Check network:** Open browser dev tools and check network requests
|
|
767
767
|
- **Check features config:** Ensure features are defined in the config
|
|
768
768
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supashiphq/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Supaship SDK for React",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"react-dom": ">=16.8.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@supashiphq/javascript-sdk": "^0.
|
|
42
|
+
"@supashiphq/javascript-sdk": "^1.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@jest/globals": "^30.0.0",
|