Socket
Socket
Sign inDemoInstall

@babel/template

Package Overview
Dependencies
Maintainers
6
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/template - npm Package Compare versions

Comparing version 7.10.1 to 7.10.3

2

lib/options.js

@@ -20,3 +20,3 @@ "use strict";

return {
parser: Object.assign(Object.assign({}, a.parser), b.parser),
parser: Object.assign({}, a.parser, b.parser),
placeholderWhitelist,

@@ -23,0 +23,0 @@ placeholderPattern,

@@ -21,3 +21,2 @@ "use strict";

function parseAndBuildMetadata(formatter, code, opts) {
const ast = parseWithCodeFrame(code, opts.parser);
const {

@@ -29,2 +28,3 @@ placeholderWhitelist,

} = opts;
const ast = parseWithCodeFrame(code, opts.parser, syntacticPlaceholders);
t.removePropertiesDeep(ast, {

@@ -152,9 +152,15 @@ preserveComments

function parseWithCodeFrame(code, parserOpts) {
parserOpts = Object.assign(Object.assign({
function parseWithCodeFrame(code, parserOpts, syntacticPlaceholders) {
const plugins = (parserOpts.plugins || []).slice();
if (syntacticPlaceholders !== false) {
plugins.push("placeholders");
}
parserOpts = Object.assign({
allowReturnOutsideFunction: true,
allowSuperOutsideMethod: true,
sourceType: "module"
}, parserOpts), {}, {
plugins: (parserOpts.plugins || []).concat("placeholders")
}, parserOpts, {
plugins
});

@@ -161,0 +167,0 @@

{
"name": "@babel/template",
"version": "7.10.1",
"version": "7.10.3",
"description": "Generate an AST from a string template.",

@@ -18,7 +18,7 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

"dependencies": {
"@babel/code-frame": "^7.10.1",
"@babel/parser": "^7.10.1",
"@babel/types": "^7.10.1"
"@babel/code-frame": "^7.10.3",
"@babel/parser": "^7.10.3",
"@babel/types": "^7.10.3"
},
"gitHead": "88f57a7ea659d25232bf62de1efceb5d6299b8cf"
"gitHead": "2787ee2f967b6d8e1121fca00a8d578d75449a53"
}
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