Skip to content

Commit

Permalink
fix: use expr-eval fork to fix security issue (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema authored Jan 10, 2024
1 parent 8070158 commit 7409419
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .changeset/poor-singers-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tokens-studio/sd-transforms': patch
---

Use expr-eval-fork to work around a prototype pollution vulnerability in the original package.
60 changes: 30 additions & 30 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"color2k": "^2.0.1",
"colorjs.io": "^0.4.3",
"deepmerge": "^4.3.1",
"expr-eval": "^2.0.2",
"expr-eval-fork": "^2.0.2",
"is-mergeable-object": "^1.1.1",
"postcss-calc-ast-parser": "^0.1.4",
"style-dictionary": "4.0.0-prerelease.7"
Expand Down
2 changes: 1 addition & 1 deletion src/checkAndEvaluateMath.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Parser } from 'expr-eval';
import { Parser } from 'expr-eval-fork';
import { parse, reduceExpression } from 'postcss-calc-ast-parser';

const mathChars = ['+', '-', '*', '/'];
Expand Down

0 comments on commit 7409419

Please sign in to comment.