Socket
Socket
Sign inDemoInstall

@babel/plugin-proposal-decorators

Package Overview
Dependencies
Maintainers
4
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-proposal-decorators - npm Package Compare versions

Comparing version 7.1.0 to 7.1.1

10

lib/transformer.js

@@ -45,4 +45,8 @@ "use strict";

function value(body, params = []) {
return _core().types.objectMethod("method", _core().types.identifier("value"), params, body);
function value(body, params = [], async, generator) {
const method = _core().types.objectMethod("method", _core().types.identifier("value"), params, body);
method.async = !!async;
method.generator = !!generator;
return method;
}

@@ -110,3 +114,3 @@

}, true).replace();
const properties = [prop("kind", _core().types.stringLiteral(isMethod ? node.kind : "field")), prop("decorators", takeDecorators(path)), prop("static", node.static && _core().types.booleanLiteral(true)), prop("key", getKey(node)), isMethod ? value(node.body, node.params) : node.value ? value(_core().template.ast`{ return ${node.value} }`) : prop("value", scope.buildUndefinedNode())].filter(Boolean);
const properties = [prop("kind", _core().types.stringLiteral(isMethod ? node.kind : "field")), prop("decorators", takeDecorators(path)), prop("static", node.static && _core().types.booleanLiteral(true)), prop("key", getKey(node)), isMethod ? value(node.body, node.params, node.async, node.generator) : node.value ? value(_core().template.ast`{ return ${node.value} }`) : prop("value", scope.buildUndefinedNode())].filter(Boolean);
return _core().types.objectExpression(properties);

@@ -113,0 +117,0 @@ }

{
"name": "@babel/plugin-proposal-decorators",
"version": "7.1.0",
"version": "7.1.1",
"author": "Logan Smyth <loganfsmyth@gmail.com>",

@@ -5,0 +5,0 @@ "license": "MIT",

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