babel-plugin-transform-decorators
Advanced tools
Comparing version 7.0.0-alpha.20 to 7.0.0-beta.0
@@ -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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13060
169
110
+ Addedbabel-code-frame@7.0.0-beta.0(transitive)
+ Addedbabel-helper-function-name@7.0.0-beta.0(transitive)
+ Addedbabel-helper-get-function-arity@7.0.0-beta.0(transitive)
+ Addedbabel-messages@7.0.0-beta.0(transitive)
+ Addedbabel-plugin-syntax-decorators@7.0.0-beta.0(transitive)
+ Addedbabel-template@7.0.0-beta.0(transitive)
+ Addedbabel-traverse@7.0.0-beta.0(transitive)
+ Addedbabel-types@7.0.0-beta.0(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addedms@2.1.3(transitive)
- Removedbabel-code-frame@7.0.0-alpha.20(transitive)
- Removedbabel-helper-function-name@7.0.0-alpha.20(transitive)
- Removedbabel-helper-get-function-arity@7.0.0-alpha.20(transitive)
- Removedbabel-messages@7.0.0-alpha.20(transitive)
- Removedbabel-plugin-syntax-decorators@7.0.0-alpha.20(transitive)
- Removedbabel-template@7.0.0-alpha.20(transitive)
- Removedbabel-traverse@7.0.0-alpha.20(transitive)
- Removedbabel-types@7.0.0-alpha.20(transitive)
- Removeddebug@2.6.9(transitive)
- Removedms@2.0.0(transitive)
Updatedbabel-template@7.0.0-beta.0