Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/types

Package Overview
Dependencies
Maintainers
4
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/types - npm Package Compare versions

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc