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

babel-plugin-transform-decorators

Package Overview
Dependencies
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-decorators - npm Package Compare versions

Comparing version 7.0.0-alpha.20 to 7.0.0-beta.0

2

lib/index.js

@@ -192,4 +192,4 @@ "use strict";

var buildGetObjectInitializer = (0, _babelTemplate2.default)("\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n");
var buildInitializerWarningHelper = (0, _babelTemplate2.default)("\n function NAME(descriptor, context){\n throw new Error(\n 'Decorating class property failed. Please ensure that ' +\n 'transform-class-properties is enabled.'\n );\n }\n");
var buildInitializerWarningHelper = (0, _babelTemplate2.default)("\n function NAME(descriptor, context){\n throw new Error(\n 'Decorating class property failed. Please ensure that ' +\n 'transform-class-properties is enabled and set to use loose mode. ' +\n 'To use transform-class-properties in spec mode with decorators, wait for ' +\n 'the next major version of decorators in stage 2.'\n );\n }\n");
var buildInitializerDefineProperty = (0, _babelTemplate2.default)("\n function NAME(target, property, descriptor, context){\n if (!descriptor) return;\n\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n });\n }\n");
var buildApplyDecoratedDescriptor = (0, _babelTemplate2.default)("\n function NAME(target, property, decorators, descriptor, context){\n var desc = {};\n Object['ke' + 'ys'](descriptor).forEach(function(key){\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer){\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function(desc, decorator){\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0){\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0){\n // This is a hack to avoid this being processed by 'transform-runtime'.\n // See issue #9.\n Object['define' + 'Property'](target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n");
{
"name": "babel-plugin-transform-decorators",
"version": "7.0.0-alpha.20",
"version": "7.0.0-beta.0",
"author": "Logan Smyth <loganfsmyth@gmail.com>",

@@ -15,8 +15,8 @@ "license": "MIT",

"dependencies": {
"babel-plugin-syntax-decorators": "7.0.0-alpha.20",
"babel-template": "7.0.0-alpha.20"
"babel-plugin-syntax-decorators": "7.0.0-beta.0",
"babel-template": "7.0.0-beta.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "7.0.0-alpha.20"
"babel-helper-plugin-test-runner": "7.0.0-beta.0"
}
}

@@ -69,2 +69,4 @@ # babel-plugin-transform-decorators

Currently, `transform-class-properties` must be used in `loose` mode to support the `transform-decorators`. To use `transform-class-properties` in spec mode with decorators, wait for the next major version of decorators (Stage 2).
Wrong:

@@ -87,3 +89,3 @@

"transform-decorators",
"transform-class-properties"
["transform-class-properties", { "loose" : true }]
]

@@ -90,0 +92,0 @@ }

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