@launchdarkly/node-server-sdk-dynamodb 5.0.7 → 5.0.9

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
@@ -30,6 +30,18 @@
30
30
  * devDependencies
31
31
  * @launchdarkly/node-server-sdk bumped from 8.1.2 to 8.2.0
32
32
 
33
+ ### Dependencies
34
+
35
+ * The following workspace dependencies were updated
36
+ * devDependencies
37
+ * @launchdarkly/node-server-sdk bumped from 8.2.0 to 8.2.1
38
+
39
+ ### Dependencies
40
+
41
+ * The following workspace dependencies were updated
42
+ * devDependencies
43
+ * @launchdarkly/node-server-sdk bumped from 8.2.1 to 8.2.2
44
+
33
45
  ## [5.0.6](https://github.com/launchdarkly/js-core/compare/node-server-sdk-dynamodb-v5.0.5...node-server-sdk-dynamodb-v5.0.6) (2023-08-10)
34
46
 
35
47
 
package/README.md CHANGED
@@ -27,7 +27,7 @@ Refer to [Using DynamoDB as a persistent feature store](https://docs.launchdarkl
27
27
 
28
28
  2. Install this package with `npm` or `yarn`:
29
29
 
30
- `npm install launchdarkly-node-server-sdk-dynamodb --save`
30
+ `npm install @launchdarkly/node-server-sdk-dynamodb --save`
31
31
 
32
32
  3. If your application does not already have its own dependency on the `@aws-sdk/client-dynamodb` package, and if it will _not_ be running in AWS Lambda, add `@aws-sdk/client-dynamodb` as well:
33
33
 
@@ -38,13 +38,13 @@ The `launchdarkly-node-server-sdk-dynamodb` package does not provide `@aws-sdk/c
38
38
  4. Import the package:
39
39
 
40
40
  ```typescript
41
- const { DynamoDBFeatureStoreFactory } = require('launchdarkly-node-server-sdk-dynamodb');
41
+ const { DynamoDBFeatureStore } = require('launchdarkly-node-server-sdk-dynamodb');
42
42
  ```
43
43
 
44
44
  5. When configuring your SDK client, add the DynamoDB feature store:
45
45
 
46
46
  ```typescript
47
- const store = DynamoDBFeatureStoreFactory('YOUR TABLE NAME');
47
+ const store = DynamoDBFeatureStore('YOUR TABLE NAME');
48
48
  const config = { featureStore: store };
49
49
  const client = LaunchDarkly.init('YOUR SDK KEY', config);
50
50
  ```
@@ -52,14 +52,14 @@ const client = LaunchDarkly.init('YOUR SDK KEY', config);
52
52
  By default, the DynamoDB client will try to get your AWS credentials and region name from environment variables and/or local configuration files, as described in the AWS SDK documentation. You can also specify any valid [DynamoDB client options](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property) like this:
53
53
 
54
54
  ```typescript
55
- const dynamoDBOptions = { accessKeyId: 'YOUR KEY', secretAccessKey: 'YOUR SECRET' };
56
- const store = DynamoDBFeatureStoreFactory('YOUR TABLE NAME', { clientOptions: dynamoDBOptions });
55
+ const dynamoDBOptions = { credentials: { accessKeyId: 'YOUR KEY', secretAccessKey: 'YOUR SECRET' }};
56
+ const store = DynamoDBFeatureStore('YOUR TABLE NAME', { clientOptions: dynamoDBOptions });
57
57
  ```
58
58
 
59
59
  Alternatively, if you already have a fully configured DynamoDB client object, you can tell LaunchDarkly to use that:
60
60
 
61
61
  ```typescript
62
- const store = DynamoDBFeatureStoreFactory('YOUR TABLE NAME', {
62
+ const store = DynamoDBFeatureStore('YOUR TABLE NAME', {
63
63
  dynamoDBClient: myDynamoDBClientInstance,
64
64
  });
65
65
  ```
@@ -74,7 +74,7 @@ const client = LaunchDarkly.init('YOUR SDK KEY', config);
74
74
  7. If the same DynamoDB table is being shared by SDK clients for different LaunchDarkly environments, set the `prefix` option to a different short string for each one to keep the keys from colliding:
75
75
 
76
76
  ```typescript
77
- const store = DynamoDBFeatureStoreFactory('YOUR TABLE NAME', { prefix: 'env1' });
77
+ const store = DynamoDBFeatureStore('YOUR TABLE NAME', { prefix: 'env1' });
78
78
  ```
79
79
 
80
80
  ## Caching behavior
@@ -82,7 +82,7 @@ const store = DynamoDBFeatureStoreFactory('YOUR TABLE NAME', { prefix: 'env1' })
82
82
  To reduce traffic to DynamoDB, there is an optional in-memory cache that retains the last known data for a configurable amount of time. This is on by default; to turn it off (and guarantee that the latest feature flag data will always be retrieved from DynamoDB for every flag evaluation), configure the store as follows:
83
83
 
84
84
  ```typescript
85
- const factory = DynamoDBFeatureStoreFactory({ cacheTTL: 0 });
85
+ const factory = DynamoDBFeatureStore({ cacheTTL: 0 });
86
86
  ```
87
87
 
88
88
  ## Contributing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/node-server-sdk-dynamodb",
3
- "version": "5.0.7",
3
+ "version": "5.0.9",
4
4
  "description": "DynamoDB-backed feature store for the LaunchDarkly Server-Side SDK for Node.js",
5
5
  "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/store/node-server-sdk-dynamodb",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@aws-sdk/client-dynamodb": "3.348.0",
39
- "@launchdarkly/node-server-sdk": "8.2.0",
39
+ "@launchdarkly/node-server-sdk": "8.2.2",
40
40
  "@trivago/prettier-plugin-sort-imports": "^4.1.1",
41
41
  "@types/jest": "^29.4.0",
42
42
  "@typescript-eslint/eslint-plugin": "^6.1.0",