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

babel-plugin-module-provider

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-module-provider - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

package.json
{
"name": "babel-plugin-module-provider",
"version": "1.0.0",
"version": "1.1.0",
"description": "Imports modules for every file.",

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

@@ -40,2 +40,23 @@ import {transform} from 'babel-core'

it ('should add multiple default import statements', done => {
const modules = {
'a': 'a',
'b': 'b',
'c': 'c'
}
const actual = compile('const hello ="hello"', modules)
const expected = `
import a from "a";
import b from "b";
import c from "c";
const hello = "hello";
`
assertSame(actual, expected)
done()
})
it('should add non default import', done => {

@@ -98,4 +119,21 @@

done()
})
it('should add default and non-default statements', done => {
const modules = {
"@cycle/core": "Cycle",
"@cycle/dom": ["makeDOMDriver, h, svg"]
}
const actual = compile('const hello = "hello"', modules)
const expected = `
import Cycle from "@cycle/core";
import {makeDOMDriver, h, svg} from "@cycle/dom";
const hello = "hello";
`
assertSame(actual, expected)
done()
})
})
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