babel-plugin-emotion
Advanced tools
Comparing version 10.0.13 to 10.0.14
# babel-plugin-emotion | ||
## 10.0.14 | ||
### Patch Changes | ||
- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pulls/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool | ||
## 10.0.13 | ||
@@ -4,0 +10,0 @@ |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _interopDefault(ex) { | ||
return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex; | ||
} | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var nodePath = _interopDefault(require('path')); | ||
var sourceMap = require('source-map'); | ||
var convert = _interopDefault(require('convert-source-map')); | ||
var findRoot = _interopDefault(require('find-root')); | ||
var memoize = _interopDefault(require('@emotion/memoize')); | ||
var hashString = _interopDefault(require('@emotion/hash')); | ||
var escapeRegexp = _interopDefault(require('escape-string-regexp')); | ||
var serialize = require('@emotion/serialize'); | ||
var helperModuleImports = require('@babel/helper-module-imports'); | ||
var babelPluginMacros = require('babel-plugin-macros'); | ||
var babelPluginMacros = require('babel-plugin-macros'); // babel-plugin-styled-components | ||
// babel-plugin-styled-components | ||
// https://github.com/styled-components/babel-plugin-styled-components/blob/8d44acc36f067d60d4e09f9c22ff89695bc332d2/src/minify/index.js | ||
var multilineCommentRegex = /\/\*[^!](.|[\r\n])*?\*\//g; | ||
@@ -69,3 +56,2 @@ var lineCommentStart = /\/\//g; | ||
}; | ||
var compressSymbols = function compressSymbols(code) { | ||
@@ -87,3 +73,2 @@ return code.split(symbolRegex).reduce(function (str, fragment, index) { | ||
var isLineComment = function isLineComment(line) { | ||
@@ -94,3 +79,2 @@ return line.trim().startsWith('//'); | ||
var linebreakRegex = /[\r\n]\s*/g; | ||
var minify = function minify(code) { | ||
@@ -211,3 +195,2 @@ var newCode = code.replace(multilineCommentRegex, '\n') // Remove multiline comments | ||
} | ||
var pascalCaseRegex = /^[A-Z][A-Za-z]+/; | ||
@@ -288,3 +271,3 @@ | ||
var declaratorName = getDeclaratorName(path, t); // if the name starts with _ it was probably generated by babel so we should ignore it | ||
var declaratorName = getDeclaratorName(path); // if the name starts with _ it was probably generated by babel so we should ignore it | ||
@@ -312,3 +295,2 @@ if (declaratorName.charAt(0) === '_') { | ||
} | ||
function getSourceMap(offset, state) { | ||
@@ -377,6 +359,7 @@ var generator = makeSourceMapGenerator(state.file); | ||
return stableClassName; | ||
} // it's meant to simplify the most common cases so i don't want to make it especially complex | ||
} | ||
// it's meant to simplify the most common cases so i don't want to make it especially complex | ||
// also, this will be unnecessary when prepack is ready | ||
function simplifyObject(node, t) { | ||
@@ -431,3 +414,2 @@ var finalString = ''; | ||
}; | ||
var joinStringLiterals = function joinStringLiterals(expressions, t) { | ||
@@ -541,3 +523,3 @@ return expressions.reduce(function (finalExpressions, currentExpression, i) { | ||
var getStyledOptions = function getStyledOptions(t, path, state) { | ||
var properties = [t.objectProperty(t.identifier('target'), t.stringLiteral(getTargetClassName(state, t)))]; | ||
var properties = [t.objectProperty(t.identifier('target'), t.stringLiteral(getTargetClassName(state)))]; | ||
var label = getLabelFromPath(path, state, t); | ||
@@ -755,3 +737,2 @@ | ||
}; | ||
var cssMacro = babelPluginMacros.createMacro(function (_ref2) { | ||
@@ -797,2 +778,3 @@ var references = _ref2.references, | ||
}); | ||
var webStyledMacro = createStyledMacro({ | ||
@@ -857,3 +839,3 @@ importPath: '@emotion/styled-base', | ||
function index(babel) { | ||
function index (babel) { | ||
var t = babel.types; | ||
@@ -860,0 +842,0 @@ return { |
@@ -119,3 +119,3 @@ "use strict"; | ||
} | ||
var declaratorName = getDeclaratorName(path, t); | ||
var declaratorName = getDeclaratorName(path); | ||
return "_" === declaratorName.charAt(0) ? "" : declaratorName; | ||
@@ -245,3 +245,3 @@ } | ||
}, getStyledOptions = function(t, path, state) { | ||
var properties = [ t.objectProperty(t.identifier("target"), t.stringLiteral(getTargetClassName(state, t))) ], label = getLabelFromPath(path, state, t); | ||
var properties = [ t.objectProperty(t.identifier("target"), t.stringLiteral(getTargetClassName(state))) ], label = getLabelFromPath(path, state, t); | ||
label && properties.push(t.objectProperty(t.identifier("label"), t.stringLiteral(label))); | ||
@@ -248,0 +248,0 @@ var args = path.node.arguments, optionsArgument = args.length >= 2 ? args[1] : null; |
{ | ||
"name": "babel-plugin-emotion", | ||
"version": "10.0.13", | ||
"version": "10.0.14", | ||
"description": "A recommended babel preprocessing plugin for emotion, The Next Generation of CSS-in-JS.", | ||
@@ -13,5 +13,5 @@ "main": "dist/babel-plugin-emotion.cjs.js", | ||
"@babel/helper-module-imports": "^7.0.0", | ||
"@emotion/hash": "0.7.1", | ||
"@emotion/memoize": "0.7.1", | ||
"@emotion/serialize": "^0.11.6", | ||
"@emotion/hash": "0.7.2", | ||
"@emotion/memoize": "0.7.2", | ||
"@emotion/serialize": "^0.11.8", | ||
"babel-plugin-macros": "^2.0.0", | ||
@@ -18,0 +18,0 @@ "babel-plugin-syntax-jsx": "^6.18.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98517
2286
+ Added@emotion/hash@0.7.2(transitive)
+ Added@emotion/memoize@0.7.2(transitive)
- Removed@emotion/hash@0.7.1(transitive)
- Removed@emotion/memoize@0.7.1(transitive)
Updated@emotion/hash@0.7.2
Updated@emotion/memoize@0.7.2
Updated@emotion/serialize@^0.11.8