@babel/types
Advanced tools
Comparing version 7.19.3 to 7.19.4
@@ -1401,33 +1401,25 @@ "use strict"; | ||
const raw = node.value.raw; | ||
let str, | ||
containsInvalid, | ||
unterminatedCalled = false; | ||
let unterminatedCalled = false; | ||
try { | ||
const error = () => { | ||
throw new Error(); | ||
}; | ||
const error = () => { | ||
throw new Error("Internal @babel/types error."); | ||
}; | ||
({ | ||
str, | ||
containsInvalid | ||
} = (0, _helperStringParser.readStringContents)("template", raw, 0, 0, 0, { | ||
unterminated() { | ||
unterminatedCalled = true; | ||
}, | ||
const { | ||
str, | ||
firstInvalidLoc | ||
} = (0, _helperStringParser.readStringContents)("template", raw, 0, 0, 0, { | ||
unterminated() { | ||
unterminatedCalled = true; | ||
}, | ||
strictNumericEscape: error, | ||
invalidEscapeSequence: error, | ||
numericSeparatorInEscapeSequence: error, | ||
unexpectedNumericSeparator: error, | ||
invalidDigit: error, | ||
invalidCodePoint: error | ||
})); | ||
} catch (_unused) { | ||
unterminatedCalled = true; | ||
containsInvalid = true; | ||
} | ||
strictNumericEscape: error, | ||
invalidEscapeSequence: error, | ||
numericSeparatorInEscapeSequence: error, | ||
unexpectedNumericSeparator: error, | ||
invalidDigit: error, | ||
invalidCodePoint: error | ||
}); | ||
if (!unterminatedCalled) throw new Error("Invalid raw"); | ||
node.value.cooked = containsInvalid ? null : str; | ||
node.value.cooked = firstInvalidLoc ? null : str; | ||
}) | ||
@@ -1434,0 +1426,0 @@ }, |
@@ -392,3 +392,3 @@ "use strict"; | ||
defineType("TSModuleBlock", { | ||
aliases: ["Scopable", "Block", "BlockParent"], | ||
aliases: ["Scopable", "Block", "BlockParent", "FunctionParent"], | ||
visitor: ["body"], | ||
@@ -395,0 +395,0 @@ fields: { |
{ | ||
"name": "@babel/types", | ||
"version": "7.19.3", | ||
"version": "7.19.4", | ||
"description": "Babel Types is a Lodash-esque utility library for AST nodes", | ||
@@ -27,3 +27,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/helper-string-parser": "^7.18.10", | ||
"@babel/helper-string-parser": "^7.19.4", | ||
"@babel/helper-validator-identifier": "^7.19.1", | ||
@@ -33,4 +33,4 @@ "to-fast-properties": "^2.0.0" | ||
"devDependencies": { | ||
"@babel/generator": "^7.19.3", | ||
"@babel/parser": "^7.19.3", | ||
"@babel/generator": "^7.19.4", | ||
"@babel/parser": "^7.19.4", | ||
"chalk": "^4.1.0", | ||
@@ -37,0 +37,0 @@ "glob": "^7.2.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
2497028
22672