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

babel-plugin-system-import-transformer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-system-import-transformer - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

11

dist/moduleImportHelper.js

@@ -16,6 +16,11 @@ 'use strict';

function isExternalModuleImport(importPath) {
return importPath.indexOf('/') === -1;
function isRelativeImport(importPath) {
// https://nodejs.org/api/modules.html#modules_all_together
return importPath.startsWith('./') || importPath.startsWith('/') || importPath.startsWith('../');
}
function isNodeModuleImport(importPath) {
return importPath.indexOf('/') === -1 || !isRelativeImport(importPath);
}
function getImportPath(file, relativeImportPath) {

@@ -30,3 +35,3 @@ var filename = file.opts.filename;

// check if it is a relative path or a module name
var importedModulePath = isExternalModuleImport(importPath) ? importPath : getImportPath(file, importPath);
var importedModulePath = isNodeModuleImport(importPath) ? importPath : getImportPath(file, importPath);

@@ -33,0 +38,0 @@ // Use the getModuleName()

{
"name": "babel-plugin-system-import-transformer",
"version": "2.2.0",
"version": "2.2.1",
"description": "Babel plugin that replaces System.import with the equivalent UMD pattern",

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

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