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

@compiled/babel-plugin-css-in-js

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compiled/babel-plugin-css-in-js - npm Package Compare versions

Comparing version 0.1.1-b53bef65f5525dfd06c7f9fbb2dd32f28bb8fbb5.0 to 0.2.0

8

dist/__tests__/index.test.js

@@ -22,8 +22,8 @@ "use strict";

var output = core_1.transformSync("\n import { styled } from '@compiled/css-in-js';\n\n styled.div`\n font-size: 12px;\n `;\n ", babelOpts);
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from \\\"react\\\";\n import { Style, styled } from '@compiled/css-in-js';\n\n props => <><Style hash=\\\"css-1x3e11p\\\">{[\\\".css-1x3e11p{font-size:12px;}\\\"]}</Style><div {...props} className={\\\"css-1x3e11p\\\" + (props.className ? \\\" \\\" + props.className : \\\"\\\")}></div></>;\"\n ");
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from \\\"react\\\";\n import { Style } from '@compiled/css-in-js';\n\n props => <><Style hash=\\\"css-1x3e11p\\\">{[\\\".css-1x3e11p{font-size:12px;}\\\"]}</Style><div {...props} className={\\\"css-1x3e11p\\\" + (props.className ? \\\" \\\" + props.className : \\\"\\\")}></div></>;\"\n ");
});
it('should transform css prop', function () {
var _a;
var output = core_1.transformSync("\n /** @jsx jsx */\n import { jsx } from '@compiled/css-in-js';\n\n <div css={{ fontSize: 12 }} />\n ", babelOpts);
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from \\\"react\\\";\n /** @jsx jsx */\n\n import { Style, jsx } from '@compiled/css-in-js';\n <><Style hash=\\\"css-1iqe21w\\\">{[\\\".css-1iqe21w{font-size:12px;}\\\"]}</Style><div className=\\\"css-1iqe21w\\\" /></>;\"\n ");
var output = core_1.transformSync("\n import React from 'react';\n import '@compiled/css-in-js';\n\n <div css={{ fontSize: 12 }} />\n ", babelOpts);
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from 'react';\n import { Style } from '@compiled/css-in-js';\n <><Style hash=\\\"css-1iqe21w\\\">{[\\\".css-1iqe21w{font-size:12px;}\\\"]}</Style><div className=\\\"css-1iqe21w\\\" /></>;\"\n ");
});

@@ -33,5 +33,5 @@ it('should transform classnames component', function () {

var output = core_1.transformSync("\n import { ClassNames } from '@compiled/css-in-js';\n\n <ClassNames>\n {({ css }) => <div className={css({ fontSize: 12 })} />}\n </ClassNames>\n ", babelOpts);
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import { Style, ClassNames } from '@compiled/css-in-js';\n <><Style hash=\\\"css-2lhdif\\\">{[\\\".css-1iqe21w{font-size:12px;}\\\"]}</Style><div className={\\\"css-1iqe21w\\\"} /></>;\"\n ");
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from \\\"react\\\";\n import { Style } from '@compiled/css-in-js';\n <><Style hash=\\\"css-2lhdif\\\">{[\\\".css-1iqe21w{font-size:12px;}\\\"]}</Style><div className={\\\"css-1iqe21w\\\"} /></>;\"\n ");
});
});
//# sourceMappingURL=index.test.js.map

@@ -1,1 +0,22 @@

{"name":"@compiled/babel-plugin-css-in-js","version":"0.1.1-b53bef65f5525dfd06c7f9fbb2dd32f28bb8fbb5.0","description":"The CSS in JS authoring experience you love without the runtime cost","author":"Michael Dougall","license":"Apache-2.0","main":"./dist/index.js","types":"./dist/index.d.ts","files":["dist","src"],"dependencies":{"@babel/core":"^7.9.0","@compiled/ts-transform-css-in-js":"0.1.1-b53bef65f5525dfd06c7f9fbb2dd32f28bb8fbb5.0","typescript":"^3.7.3"},"devDependencies":{"@babel/plugin-syntax-jsx":"^7.8.3","@types/babel__core":"^7.1.6"}}
{
"name": "@compiled/babel-plugin-css-in-js",
"version": "0.2.0",
"description": "The CSS in JS authoring experience you love without the runtime cost",
"author": "Michael Dougall",
"license": "Apache-2.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist",
"src"
],
"dependencies": {
"@babel/core": "^7.9.0",
"@compiled/ts-transform-css-in-js": "0.2.0",
"typescript": "^3.7.3"
},
"devDependencies": {
"@babel/plugin-syntax-jsx": "^7.8.3",
"@types/babel__core": "^7.1.6"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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