New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-demand-importer

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-demand-importer - npm Package Compare versions

Comparing version 1.0.2 to 1.0.4

.github/workflows/npm-publish.yml

2

package.json
{
"name": "babel-plugin-demand-importer",
"version": "1.0.2",
"version": "1.0.4",
"description": "",

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

@@ -9,14 +9,6 @@ const types = require('babel-types');

if (opts.libraryName == node.source.value && !types.isImportDeclaration(specifiers[0])) {
let libraryDirectory = opts.libraryDirectory;
let libraryDirectory = (opts.libraryDirectory || '').split('/').filter((v) => v).join('/');
if (libraryDirectory) {
if (libraryDirectory.startsWith('/')) {
libraryDirectory = libraryDirectory.replace(/^\//, '');
}
if (!libraryDirectory.endsWith('/')) {
libraryDirectory += '/';
}
libraryDirectory += '/';
}
if (libraryDirectory === '/') {
libraryDirectory = '';
}
let newImport = specifiers.map((specifier) => {

@@ -23,0 +15,0 @@ return types.importDeclaration(

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