@fastly/js-compute
Advanced tools
Comparing version 1.5.0 to 1.5.1
# Changelog | ||
## [1.5.1](https://github.com/fastly/js-compute-runtime/compare/v1.5.0...v1.5.1) (2023-03-10) | ||
### Bug Fixes | ||
* handle fallthrough of regex parser bugs ([#447](https://github.com/fastly/js-compute-runtime/issues/447)) ([8f38980](https://github.com/fastly/js-compute-runtime/commit/8f389805d6a88e476f0281df974cb971d7e78896)) | ||
## [1.5.0](https://github.com/fastly/js-compute-runtime/compare/v1.4.2...v1.5.0) (2023-03-10) | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "@fastly/js-compute", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": "16 - 19", |
@@ -19,3 +19,10 @@ import Parser, { Query } from "tree-sitter"; | ||
// transpile unicode property escapes | ||
const patternTranspiled = regexpuc(pattern, flags, { unicodePropertyEscapes: 'transform' }); | ||
let patternTranspiled; | ||
try { | ||
patternTranspiled = regexpuc(pattern, flags, { unicodePropertyEscapes: 'transform' }); | ||
} catch { | ||
// swallow regex parse errors here to instead throw them at the engine level | ||
// this then also avoids regex parser bugs being thrown unnecessarily | ||
patternTranspiled = pattern; | ||
} | ||
regexLiterals.push({ | ||
@@ -22,0 +29,0 @@ patternStart: m.captures[0].node.startIndex, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21678433
3069