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

babel-plugin-emotion

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-emotion - npm Package Compare versions

Comparing version 9.2.6 to 9.2.8

11

dist/index.js

@@ -605,2 +605,3 @@ 'use strict';

var warnedAboutExtractStatic = false;
function index (babel) {

@@ -721,2 +722,11 @@ var t = babel.types;

state.cssPropIdentifiers = [];
if (state.opts.extractStatic && !warnedAboutExtractStatic) {
console.warn('extractStatic is deprecated and will be removed in emotion@10. We recommend disabling extractStatic or using other libraries like linaria or css-literal-loader'); // lots of cli tools write to the same line so
// this moves to the next line so the warning doesn't get removed
console.log('');
warnedAboutExtractStatic = true;
}
state.extractStatic = // path.hub.file.opts.filename !== 'unknown' ||

@@ -883,2 +893,1 @@ state.opts.extractStatic;

exports.default = index;
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "babel-plugin-emotion",
"version": "9.2.6",
"version": "9.2.8",
"description": "A recommended babel preprocessing plugin for emotion, The Next Generation of CSS-in-JS.",

@@ -16,3 +16,3 @@ "main": "dist/index.js",

"@emotion/memoize": "^0.6.1",
"@emotion/stylis": "^0.6.10",
"@emotion/stylis": "^0.7.0",
"babel-core": "^6.26.3",

@@ -19,0 +19,0 @@ "babel-plugin-macros": "^2.0.0",

@@ -63,3 +63,3 @@ # babel-plugin-emotion

<tr>
<td>Static Extraction</td>
<td>Static Extraction (deprecated)</td>
<td align="center"></td>

@@ -127,3 +127,5 @@ <td align="center">✅</td>

```
or if you prefer npm
```bash

@@ -162,3 +164,3 @@ npm install --save-dev babel-plugin-emotion

"extractStatic": false,
"outputDir": '',
"outputDir": "",
"importedNames": {

@@ -190,5 +192,3 @@ "styled": "styled",

"development": {
"plugins": [
["emotion", { "sourceMap": true, "autoLabel": true }]
]
"plugins": [["emotion", { "sourceMap": true, "autoLabel": true }]]
}

@@ -234,6 +234,6 @@ }

```javascript
var _css = require('emotion').css;
var _ref = { background: 'brown' };
var _css = require('emotion').css
var _ref = { background: 'brown' }
const Sample = () => <div className={_css(_ref)} />;
const Sample = () => <div className={_css(_ref)} />
```

@@ -288,2 +288,3 @@

Allowed values:
* `[local]` - the name of the variable the result of the `css` or `styled` expression is assigned to.

@@ -309,3 +310,6 @@ * `[filename]` - name of the file (without extension) where `css` or `styled` expression is located.

```javascript
const brownStyles = /*#__PURE__*/ css({ color: 'brown' }, 'label:BrownView--brownStyles;')
const brownStyles = /*#__PURE__*/ css(
{ color: 'brown' },
'label:BrownView--brownStyles;'
)
```

@@ -357,2 +361,6 @@

> Note:
>
> extractStatic is deprecated and will be removed in emotion@10. We recommend disabling extractStatic or using other libraries like [linaria](https://github.com/callstack-io/linaria) or [css-literal-loader](https://github.com/4Catalyzer/css-literal-loader)
This option enables the following:

@@ -395,3 +403,3 @@

```jsx
['emotion', 'react-emotion', 'preact-emotion']
;['emotion', 'react-emotion', 'preact-emotion']
```

@@ -424,3 +432,2 @@

## Babel Macros

@@ -432,11 +439,5 @@

import styled from 'react-emotion/macro'
import {
css,
keyframes,
injectGlobal,
flush,
hydrate
} from 'emotion/macro'
import { css, keyframes, injectGlobal, flush, hydrate } from 'emotion/macro'
```
[create-react-app issue discussing macros](https://github.com/facebookincubator/create-react-app/issues/2730).

@@ -413,2 +413,4 @@ // @flow

let warnedAboutExtractStatic = false
export default function(babel: Babel) {

@@ -521,2 +523,11 @@ const { types: t } = babel

state.cssPropIdentifiers = []
if (state.opts.extractStatic && !warnedAboutExtractStatic) {
console.warn(
'extractStatic is deprecated and will be removed in emotion@10. We recommend disabling extractStatic or using other libraries like linaria or css-literal-loader'
)
// lots of cli tools write to the same line so
// this moves to the next line so the warning doesn't get removed
console.log('')
warnedAboutExtractStatic = true
}
state.extractStatic =

@@ -523,0 +534,0 @@ // path.hub.file.opts.filename !== 'unknown' ||

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