Socket
Socket
Sign inDemoInstall

@babel/types

Package Overview
Dependencies
3
Maintainers
4
Versions
160
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.18.9 to 7.18.10

37

lib/definitions/core.js

@@ -14,2 +14,4 @@ "use strict";

var _helperStringParser = require("@babel/helper-string-parser");
var _constants = require("../constants");

@@ -1390,3 +1392,3 @@

value: {
validate: (0, _utils.assertShape)({
validate: (0, _utils.chain)((0, _utils.assertShape)({
raw: {

@@ -1399,2 +1401,35 @@ validate: (0, _utils.assertValueType)("string")

}
}), function templateElementCookedValidator(node) {
const raw = node.value.raw;
let str,
containsInvalid,
unterminatedCalled = false;
try {
const error = () => {
throw new Error();
};
({
str,
containsInvalid
} = (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;
}
if (!unterminatedCalled) throw new Error("Invalid raw");
node.value.cooked = containsInvalid ? null : str;
})

@@ -1401,0 +1436,0 @@ },

9

package.json
{
"name": "@babel/types",
"version": "7.18.9",
"version": "7.18.10",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",

@@ -27,2 +27,3 @@ "author": "The Babel Team (https://babel.dev/team)",

"dependencies": {
"@babel/helper-string-parser": "^7.18.10",
"@babel/helper-validator-identifier": "^7.18.6",

@@ -32,6 +33,6 @@ "to-fast-properties": "^2.0.0"

"devDependencies": {
"@babel/generator": "^7.18.9",
"@babel/parser": "^7.18.9",
"@babel/generator": "^7.18.10",
"@babel/parser": "^7.18.10",
"chalk": "^4.1.0",
"glob": "^7.1.7"
"glob": "^7.2.0"
},

@@ -38,0 +39,0 @@ "engines": {

@@ -11,3 +11,6 @@ export default function stringifyValidator(validator, nodePrefix) {

if (validator.chainOf) {
return stringifyValidator(validator.chainOf[1], nodePrefix);
const ret = stringifyValidator(validator.chainOf[1], nodePrefix);
return Array.isArray(ret) && ret.length === 1 && ret[0] === "any"
? stringifyValidator(validator.chainOf[0], nodePrefix)
: ret;
}

@@ -14,0 +17,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc