Skip to content

Commit

Permalink
fix(Dependencies): Install lz-string from the NPM registry instead of…
Browse files Browse the repository at this point in the history
… the GitHub repo

Please take a look at #20 for the corresponding conversation

Closes #20
  • Loading branch information
bjoluc committed Nov 22, 2021
1 parent f576c3f commit f6c8d09
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
3 changes: 2 additions & 1 deletion main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"immer": "^9.0.6",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"lz-string": "github:pieroxy/lz-string#b2e0b27",
"lz-string": "^1.4.4",
"nookies": "^2.5.2",
"type-fest": "^2.5.4"
},
Expand All @@ -56,6 +56,7 @@
"@size-limit/preset-small-lib": "^5.0.3",
"@types/jest": "^27.0.3",
"@types/lodash": "^4.14.177",
"@types/lz-string": "^1.3.34",
"@types/node": "^16.11.9",
"@types/set-cookie-parser": "^2.4.1",
"next": "^12.0.4",
Expand Down
4 changes: 3 additions & 1 deletion main/src/cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export class StateCookies {
}

private static _decodeState(state: string, compressed: boolean) {
return JSON.parse((compressed ? decompressFromEncodedURIComponent : decodeURIComponent)(state));
return JSON.parse(
(compressed ? decompressFromEncodedURIComponent : decodeURIComponent)(state)!
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion main/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"include": ["src", "types"],
"compilerOptions": {
"module": "esnext",
"target": "esnext", // TODO Why is this required for the tests to work?
"target": "esnext",
"lib": ["dom", "esnext"],
"importHelpers": true,
// output .d.ts declaration files for consumers
Expand Down
27 changes: 21 additions & 6 deletions package-lock.json

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

0 comments on commit f6c8d09

Please sign in to comment.