Skip to content

Commit

Permalink
Generate separate (vs. inline) source map files (#78)
Browse files Browse the repository at this point in the history
* include typescript with source maps

* bump common version

* don't use inline maps

* anticipate correct version for common repo

* install updated common with yarn

* include ts in dist after all

* include typescript source

* use the released common repo

* specify exact version of common repo

* update yarn.lock
  • Loading branch information
aarsilv authored Jun 11, 2024
1 parent 025f80d commit 5b8af87
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 23 deletions.
3 changes: 2 additions & 1 deletion docs/js-client-sdk.chromestorageengine._constructor_.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Constructs a new instance of the `ChromeStorageEngine` class
**Signature:**

```typescript
constructor(storageArea: chrome.storage.StorageArea);
constructor(storageArea: chrome.storage.StorageArea, storageKeySuffix: string);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| storageArea | chrome.storage.StorageArea | |
| storageKeySuffix | string | |

4 changes: 3 additions & 1 deletion docs/js-client-sdk.chromestorageengine.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Chrome storage implementation of a string-valued store for storing a configurati

This serializes the entire configuration object into a string and then stores it to a single key within the object for another single top-level key. Same with metadata about the store (e.g., when it was last updated).

Note: this behaves a bit differently than local storage as the chrome storage API gets and sets subsets of key-value pairs, so we have to dereference or re-specify the key.

**Signature:**

```typescript
Expand All @@ -19,7 +21,7 @@ export declare class ChromeStorageEngine implements IStringStorageEngine
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(storageArea)](./js-client-sdk.chromestorageengine._constructor_.md) | | Constructs a new instance of the <code>ChromeStorageEngine</code> class |
| [(constructor)(storageArea, storageKeySuffix)](./js-client-sdk.chromestorageengine._constructor_.md) | | Constructs a new instance of the <code>ChromeStorageEngine</code> class |
## Properties
Expand Down
4 changes: 2 additions & 2 deletions docs/js-client-sdk.eppojsclient.getbooleanassignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Signature:**

```typescript
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: boolean): boolean;
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: boolean): boolean;
```

## Parameters
Expand All @@ -16,7 +16,7 @@ getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Rec
| --- | --- | --- |
| flagKey | string | |
| subjectKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | |
| subjectAttributes | Record&lt;string, AttributeType&gt; | |
| defaultValue | boolean | |

**Returns:**
Expand Down
2 changes: 1 addition & 1 deletion docs/js-client-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

| Class | Description |
| --- | --- |
| [ChromeStorageEngine](./js-client-sdk.chromestorageengine.md) | <p>Chrome storage implementation of a string-valued store for storing a configuration and its metadata.</p><p>This serializes the entire configuration object into a string and then stores it to a single key within the object for another single top-level key. Same with metadata about the store (e.g., when it was last updated).</p> |
| [ChromeStorageEngine](./js-client-sdk.chromestorageengine.md) | <p>Chrome storage implementation of a string-valued store for storing a configuration and its metadata.</p><p>This serializes the entire configuration object into a string and then stores it to a single key within the object for another single top-level key. Same with metadata about the store (e.g., when it was last updated).</p><p>Note: this behaves a bit differently than local storage as the chrome storage API gets and sets subsets of key-value pairs, so we have to dereference or re-specify the key.</p> |
| [EppoJSClient](./js-client-sdk.eppojsclient.md) | Client for assigning experiment variations. |

## Functions
Expand Down
4 changes: 2 additions & 2 deletions js-client-sdk.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { IEppoClient } from '@eppo/js-client-sdk-common';
//
// @public
export class ChromeStorageEngine implements IStringStorageEngine {
constructor(storageArea: chrome.storage.StorageArea);
constructor(storageArea: chrome.storage.StorageArea, storageKeySuffix: string);
// (undocumented)
getContentsJsonString: () => Promise<string | null>;
// (undocumented)
Expand All @@ -34,7 +34,7 @@ export class EppoJSClient extends EppoClient {
// @deprecated (undocumented)
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: boolean): boolean;
// (undocumented)
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: boolean): boolean;
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: boolean): boolean;
// (undocumented)
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, AttributeType>, defaultValue: number): number;
// (undocumented)
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "@eppo/js-client-sdk",
"version": "3.1.1",
"version": "3.1.2",
"description": "Eppo SDK for client-side JavaScript applications",
"main": "dist/index.js",
"files": [
"/dist"
"/dist",
"/src",
"!*.spec.ts"
],
"typings": "dist/js-client-sdk.d.ts",
"scripts": {
Expand Down Expand Up @@ -57,6 +59,6 @@
"webpack-cli": "^4.10.0"
},
"dependencies": {
"@eppo/js-client-sdk-common": "3.1.0"
"@eppo/js-client-sdk-common": "3.2.2"
}
}
3 changes: 1 addition & 2 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
IAsyncStore,
} from '@eppo/js-client-sdk-common';
import * as td from 'testdouble';
import { encode } from 'universal-base64';

const { POLL_INTERVAL_MS, POLL_JITTER_PCT } = constants;

Expand Down Expand Up @@ -219,7 +218,7 @@ describe('EppoJSClient E2E test', () => {
{
attribute: md5Hash('appVersion'),
operator: md5Hash('GT'),
value: encode('10'),
value: base64Encode('10'),
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class EppoJSClient extends EppoClient {
public getBooleanAssignment(
flagKey: string,
subjectKey: string,
subjectAttributes: Record<string, any>,
subjectAttributes: Record<string, AttributeType>,
defaultValue: boolean,
): boolean {
EppoJSClient.getAssignmentInitializationCheck();
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');

const TerserPlugin = require('terser-webpack-plugin');
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -380,15 +380,15 @@
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==

"@eppo/js-client-sdk-common@3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@eppo/js-client-sdk-common/-/js-client-sdk-common-3.1.0.tgz#3958fa591d8e5b4026b1e58de86eb9865a2751e7"
integrity sha512-r/zHyE60QlIBEq91o/0PQud0fbLKqN1s8FDvN9OWjYEJx8XAUyYAx+rivAGycxwqU76TV1y8EUCOMFYvAVR1Jg==
"@eppo/js-client-sdk-common@3.2.2":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@eppo/js-client-sdk-common/-/js-client-sdk-common-3.2.2.tgz#70693343feaf4e5b9c7fefe5108ab6d8b5318d8f"
integrity sha512-cCqgvwVcaa0L7PJ1KrOoedfTQiJzVYv+u0o35lyiBBPhTxGgNpgAjiKwrnugh8OcEzh+63185SHCyBP9a5MU+g==
dependencies:
js-base64 "^3.7.7"
md5 "^2.3.0"
pino "^8.19.0"
semver "^7.5.4"
universal-base64 "^2.1.0"

"@eslint/eslintrc@^1.3.0":
version "1.3.0"
Expand Down Expand Up @@ -3293,6 +3293,11 @@ jju@~1.4.0:
resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a"
integrity sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==

js-base64@^3.7.7:
version "3.7.7"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.7.tgz#e51b84bf78fbf5702b9541e2cb7bfcb893b43e79"
integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==

js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
Expand Down Expand Up @@ -4671,11 +4676,6 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"

universal-base64@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/universal-base64/-/universal-base64-2.1.0.tgz#511af92b3a07340fc2647036045aadb3bedcc320"
integrity sha512-WeOkACVnIXJZr/qlv7++Rl1zuZOHN96v2yS5oleUuv8eJOs5j9M5U3xQEIoWqn1OzIuIcgw0fswxWnUVGDfW6g==

universalify@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
Expand Down

0 comments on commit 5b8af87

Please sign in to comment.