@usebruno/js 0.9.4 → 0.10.1

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/utils.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usebruno/js",
3
- "version": "0.9.4",
3
+ "version": "0.10.1",
4
4
  "license": "MIT",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -8,7 +8,7 @@
8
8
  "package.json"
9
9
  ],
10
10
  "peerDependencies": {
11
- "vm2": "^3.9.13"
11
+ "@n8n/vm2": "^3.9.23"
12
12
  },
13
13
  "scripts": {
14
14
  "test": "jest --testPathIgnorePatterns test.js"
package/src/utils.js CHANGED
@@ -92,7 +92,12 @@ const evaluateJsTemplateLiteral = (templateLiteral, context) => {
92
92
  }
93
93
 
94
94
  if (!isNaN(templateLiteral)) {
95
- return Number(templateLiteral);
95
+ const number = Number(templateLiteral);
96
+ // Check if the number is too high. Too high number might get altered, see #1000
97
+ if (number > Number.MAX_SAFE_INTEGER) {
98
+ return templateLiteral;
99
+ }
100
+ return number;
96
101
  }
97
102
 
98
103
  templateLiteral = '`' + templateLiteral + '`';