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

babel-plugin-assets-named-imports

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-assets-named-imports - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

CHANGELOG.md

20

index.js
const { extname } = require('path')
/**
*
* @param {Object} babel

@@ -59,3 +58,7 @@ * @param {import('@babel/types')} babel.types

const newSourcePath = generateNewSourcePath(loaderMap, specifier.local.name, sourcePath)
const newSourcePath = generateNewSourcePath(
loaderMap,
specifier.local.name,
sourcePath
)

@@ -78,5 +81,3 @@ if (newSourcePath === sourcePath) {

],
t.stringLiteral(
newSourcePath
)
t.stringLiteral(newSourcePath)
)

@@ -100,6 +101,3 @@ })

if (newSoucePath === sourcePath) {
return t.importDeclaration(
[specifier],
t.stringLiteral(sourcePath)
)
return t.importDeclaration([specifier], t.stringLiteral(sourcePath))
}

@@ -109,5 +107,3 @@

[t.importDefaultSpecifier(t.identifier(specifier.local.name))],
t.stringLiteral(
newSoucePath
)
t.stringLiteral(newSoucePath)
)

@@ -114,0 +110,0 @@ })

6

package.json

@@ -9,3 +9,3 @@ {

},
"version": "0.1.0",
"version": "0.2.0",
"main": "index.js",

@@ -18,4 +18,6 @@ "files": [

"devDependencies": {
"@babel/core": "^7.2.2",
"jest": "^23.6.0"
}
},
"gitHead": "7f96e8d8fa8b7489b7cf52ac4f57616bfbed27a5"
}
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