Socket
Socket
Sign inDemoInstall

@babel/helper-module-transforms

Package Overview
Dependencies
Maintainers
5
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-module-transforms - npm Package Compare versions

Comparing version 7.1.0 to 7.2.2

18

lib/normalize-and-load-metadata.js

@@ -33,9 +33,3 @@ "use strict";

function hasExports(metadata) {
const {
local,
source
} = metadata;
return local.size > 0 || Array.from(source).some(([, meta]) => {
return meta.reexports.size > 0 || meta.reexportNamespace.size > 0 || !!meta.reexportAll;
});
return metadata.hasExports;
}

@@ -60,3 +54,4 @@

local,
source
source,
hasExports
} = getModuleMetadata(programPath, {

@@ -83,2 +78,3 @@ loose,

exportNameListName: null,
hasExports,
local,

@@ -118,2 +114,3 @@ source

let hasExports = false;
programPath.get("body").forEach(child => {

@@ -161,2 +158,3 @@ if (child.isImportDeclaration()) {

} else if (child.isExportAllDeclaration()) {
hasExports = true;
const data = getData(child.node.source);

@@ -168,2 +166,3 @@ if (!data.loc) data.loc = child.node.loc;

} else if (child.isExportNamedDeclaration() && child.node.source) {
hasExports = true;
const data = getData(child.node.source);

@@ -184,2 +183,4 @@ if (!data.loc) data.loc = child.node.loc;

});
} else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) {
hasExports = true;
}

@@ -231,2 +232,3 @@ });

return {
hasExports,
local: localData,

@@ -233,0 +235,0 @@ source: sourceData

{
"name": "@babel/helper-module-transforms",
"version": "7.1.0",
"version": "7.2.2",
"description": "Babel helper functions for implementing ES6 module transformations",

@@ -17,6 +17,6 @@ "author": "Logan Smyth <loganfsmyth@gmail.com>",

"@babel/helper-split-export-declaration": "^7.0.0",
"@babel/template": "^7.1.0",
"@babel/types": "^7.0.0",
"@babel/template": "^7.2.2",
"@babel/types": "^7.2.2",
"lodash": "^4.17.10"
}
}
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