Skip to content

Commit

Permalink
Merge pull request #22 from statsig-io/436sha
Browse files Browse the repository at this point in the history
patch sha256 library bug in dependency
  • Loading branch information
tore-statsig authored Aug 28, 2023
2 parents 87a2d20 + e431a33 commit f4b550b
Show file tree
Hide file tree
Showing 6 changed files with 725 additions and 18 deletions.
15 changes: 2 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "statsig-js",
"version": "4.36.0",
"version": "4.36.1",
"description": "Statsig JavaScript client SDK for single user environments.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -61,7 +61,6 @@
"webpack-cli": "^4.10.0"
},
"dependencies": {
"js-sha256": "^0.9.0",
"uuid": "^8.3.2"
},
"importSort": {
Expand Down
2 changes: 1 addition & 1 deletion src/SDKVersion.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated by genversion.
export const version = '4.36.0'
export const version = '4.36.1'
4 changes: 2 additions & 2 deletions src/utils/Hashing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { sha256 } from 'js-sha256';
import { StatsigUser } from '../StatsigUser';
import { Base64 } from './Base64';
import { sha256create } from './js-sha256';

const hashLookupTable: Record<string, string> = {};

Expand Down Expand Up @@ -30,7 +30,7 @@ export function sha256Hash(value: string): string {
return seen;
}

const buffer = sha256.create().update(value).arrayBuffer();
const buffer = sha256create().update(value).arrayBuffer();
const hash = Base64.encodeArrayBuffer(buffer);
hashLookupTable[value] = hash;
return hash;
Expand Down
Loading

0 comments on commit f4b550b

Please sign in to comment.