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

babel-plugin-transform-typescript-metadata

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-typescript-metadata - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

18

CHANGELOG.md

@@ -0,1 +1,19 @@

## [0.3.2](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/compare/v0.3.1...v0.3.2) (2021-03-19)
### 🛠 Improvements
* Fixed up return type to include objectpattern type ([368eb09](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/368eb09))
### 📚 Documentation
* Add documentation about webpack complains ([a397113](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/a397113))
### 🏗 Chore
* Added test for object spread argument ([d6ec125](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/d6ec125))
* Fixed missing call to ObjectSpread decorator ([ee28b83](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/commit/ee28b83))
## [0.3.1](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/compare/v0.3.0...v0.3.1) (2020-10-12)

@@ -2,0 +20,0 @@

1

lib/metadata/serializeType.js

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

if (param.type === 'Identifier') return param;
if (param.type === 'ObjectPattern') return param;
if (param.type === 'AssignmentPattern' && param.left.type === 'Identifier') return param.left;

@@ -29,0 +30,0 @@ if (param.type === 'TSParameterProperty') return getTypedNode(param.parameter);

2

lib/parameter/parameterVisitor.js

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

params.slice().forEach(function (param) {
let identifier = param.node.type === 'Identifier' ? param.node : param.node.type === 'TSParameterProperty' && param.node.parameter.type === 'Identifier' ? param.node.parameter : null;
let identifier = param.node.type === 'Identifier' || param.node.type === 'ObjectPattern' ? param.node : param.node.type === 'TSParameterProperty' && param.node.parameter.type === 'Identifier' ? param.node.parameter : null;
if (identifier == null) return;

@@ -42,0 +42,0 @@ let resultantDecorator;

{
"name": "babel-plugin-transform-typescript-metadata",
"version": "0.3.1",
"version": "0.3.2",
"description": "Babel plugin to emit decorator metadata like typescript compiler",

@@ -5,0 +5,0 @@ "main": "lib/plugin.js",

@@ -142,2 +142,7 @@ # babel-plugin-transform-typescript-metadata

- If you are using webpack and it complains about missing exports due to types
not being removed, you can switch from `import { MyType } from ...` to
`import type { MyType } from ...`. See [#46](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/issues/46) for details and
examples.
- We cannot know if type annotations are just types (i.e. `IMyInterface`) or

@@ -144,0 +149,0 @@ concrete values (like classes, etc.). In order to resolve this, we emit the

Sorry, the diff of this file is not supported yet

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