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

babel-plugin-add-import-extension

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-add-import-extension - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

10

package.json
{
"name": "babel-plugin-add-import-extension",
"version": "1.3.0",
"version": "1.3.1",
"description": "A babel plugin to add extension on project modules imports",

@@ -17,3 +17,3 @@ "main": "src/plugin.js",

"import",
"export",
"export",
"transform",

@@ -29,6 +29,6 @@ "extension"

"devDependencies": {
"@babel/core": "^7.8.0",
"@babel/helper-plugin-utils": "^7.8.0",
"jest": "^24.9.0"
"@babel/core": "^7.9.0",
"@babel/helper-plugin-utils": "^7.8.3",
"jest": "^25.1.0"
}
}

@@ -36,11 +36,11 @@ const babel = require('@babel/core')

test.each`
type | statements | extension | replace
${'default extension to import'} | ${importStatements} | ${undefined} | ${undefined}
${'custom extension to import'} | ${importStatements} | ${'jsx'} | ${undefined}
${'default extension to export'} | ${exportStatements} | ${undefined} | ${undefined}
${'custom extension to export'} | ${exportStatements} | ${'jsx'} | ${undefined}
type | statements | extension | replace
${'default extension to import'} | ${importStatements} | ${undefined} | ${undefined}
${'custom extension to import'} | ${importStatements} | ${'jsx'} | ${undefined}
${'default extension to export'} | ${exportStatements} | ${undefined} | ${undefined}
${'custom extension to export'} | ${exportStatements} | ${'jsx'} | ${undefined}
${'replace default extension to import'} | ${importStatements} | ${undefined} | ${true}
${'replace custom extension to import'} | ${importStatements} | ${'jsx'} | ${true}
${'replace custom extension to import'} | ${importStatements} | ${'jsx'} | ${true}
${'replace default extension to export'} | ${exportStatements} | ${undefined} | ${true}
${'replace custom extension to export'} | ${exportStatements} | ${'jsx'} | ${true}
${'replace custom extension to export'} | ${exportStatements} | ${'jsx'} | ${true}
`('should add the $type statements', ({ statements, extension, replace }) => {

@@ -47,0 +47,0 @@ const { code } = babel.transformSync(statements, {

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