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

babel-plugin-transform-cx-imports

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-cx-imports - npm Package Compare versions

Comparing version 16.12.1 to 16.12.2

3

index.js

@@ -40,2 +40,5 @@ "use strict";

}
else {
throw new Error(`Cx import ${s.imported.name} not found in package ${remainder}.`)
}
});

@@ -42,0 +45,0 @@

7

package.json
{
"name": "babel-plugin-transform-cx-imports",
"version": "16.12.1",
"version": "16.12.2",
"description": "Rewrite imports from Cx for simplicity and optimal output size.",

@@ -10,7 +10,4 @@ "repository": "https://github.com/codaxy/cx",

"dependencies": {
"babel-plugin-syntax-jsx": "^6.3.13"
"babel-plugin-syntax-jsx": "^6.18.0"
},
"peerDependencies": {
"cx-core": "*"
},
"devDependencies": {

@@ -17,0 +14,0 @@ "babel-core": "^6.4.5",

@@ -59,3 +59,3 @@ "use strict";

assert.equal(unwrap(output), 'import { TextField } from "cx-core/src/ui/form/TextField.js"');
assert.equal(unwrap(output), 'import { TextField } from "cx-core/src/widgets/form/TextField.js"');
});

@@ -72,6 +72,20 @@

assert.deepEqual(lines(output), [
'import { TextField } from "cx-core/src/ui/form/TextField.js";',
'import "cx-core/src/ui/form/TextField.scss"'
'import { TextField } from "cx-core/src/widgets/form/TextField.js";',
'import "cx-core/src/widgets/form/TextField.scss"'
]);
});
it("imports multiple things from source", function () {
let code = `import { Text, TextField } from "cx/widgets"`;
let output = babel.transform(code, {
plugins: [[plugin, { useSrc: true }]]
}).code;
assert.deepEqual(lines(output), [
'import { Text } from "cx-core/src/ui/Text.js";',
'import { TextField } from "cx-core/src/widgets/form/TextField.js"'
]);
});
});
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