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

babel-plugin-jsdoc-closure

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-jsdoc-closure - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

6

index.js

@@ -7,3 +7,7 @@ const parseComment = require('comment-parser');

function parseModules(type) {
return type.match(/module\:[^ \|\}\>,=\n]+/g);
return type.match(/module\:[^ \|\}\>\),=\n]+/g).map(match => {
// Strip incomplete type applications (e.g. `.<T`) from comment-parser.
//TODO Fix this with a custom parser instead.
return match.replace(/\.?\<.*$/, '');
});
}

@@ -10,0 +14,0 @@

2

package.json
{
"name": "babel-plugin-jsdoc-closure",
"version": "1.3.0",
"version": "1.3.1",
"description": "Transpiles JSDoc types from namepaths to types for Closure Compiler",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -81,2 +81,16 @@ const babel = require('babel-core');

it('transforms a type with type application of module paths', function() {
test(
'/** @module module2/types */\n' +
'/** @type {module:types~foo.<module:types~bar>} */\n' +
'let foo;\n',
'/** @module module2/types */\n' +
'/** @type {_types_foo.<_types_bar>} */\n' +
'let foo;' + '\n' +
'const _types_foo = require(\'../types\').foo;\n' +
'const _types_bar = require(\'../types\').bar;',
'./test/module2/types.js'
);
});
it('resolves path correctly for index.js files', function() {

@@ -83,0 +97,0 @@ test(

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