babel-plugin-emotion
Advanced tools
Comparing version 7.1.0 to 7.2.2
@@ -216,6 +216,6 @@ 'use strict'; | ||
if (moduleRoot) { | ||
var packageJsonString = _fs2.default.readFileSync((0, _path.join)(moduleRoot, 'package.json')); | ||
if (packageJsonString) { | ||
var packageJsonContent = _fs2.default.readFileSync((0, _path.join)(moduleRoot, 'package.json')); | ||
if (packageJsonContent) { | ||
try { | ||
moduleName = JSON.parse(packageJsonString).name; | ||
moduleName = JSON.parse(packageJsonContent.toString()).name; | ||
} catch (e) {} | ||
@@ -222,0 +222,0 @@ } |
@@ -5,5 +5,2 @@ 'use strict'; | ||
exports.EmotionParser = exports.processor = exports.staticProcessor = undefined; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
exports.parseCSS = parseCSS; | ||
@@ -58,3 +55,3 @@ exports.expandCSSFallbacks = expandCSSFallbacks; | ||
var root = void 0; | ||
if ((typeof css === 'undefined' ? 'undefined' : _typeof(css)) === 'object') { | ||
if (typeof css === 'object') { | ||
root = (0, _parser4.default)(css, { from: filename }); | ||
@@ -61,0 +58,0 @@ } else { |
{ | ||
"name": "babel-plugin-emotion", | ||
"version": "7.1.0", | ||
"description": "The Next Generation of CSS-in-JS ", | ||
"version": "7.2.2", | ||
"description": "A recommended babel preprocessing plugin for emotion, the The Next Generation of CSS-in-JS.", | ||
"main": "lib/index.js", | ||
@@ -18,3 +18,3 @@ "files": [ | ||
"babel-plugin-syntax-jsx": "^6.18.0", | ||
"emotion-utils": "^7.1.0", | ||
"emotion-utils": "^7.2.2", | ||
"postcss": "^6.0.9", | ||
@@ -33,6 +33,3 @@ "postcss-js": "^1.0.0", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tkh44/emotion.git" | ||
}, | ||
"repository": "https://github.com/tkh44/emotion/tree/master/packages/babel-plugin-emotion", | ||
"keywords": [ | ||
@@ -39,0 +36,0 @@ "styles", |
@@ -116,8 +116,8 @@ // @flow weak | ||
if (moduleRoot) { | ||
const packageJsonString = fs.readFileSync( | ||
const packageJsonContent = fs.readFileSync( | ||
pathJoin(moduleRoot, 'package.json') | ||
) | ||
if (packageJsonString) { | ||
if (packageJsonContent) { | ||
try { | ||
moduleName = JSON.parse(packageJsonString).name | ||
moduleName = JSON.parse(packageJsonContent.toString()).name | ||
} catch (e) {} | ||
@@ -124,0 +124,0 @@ } |
@@ -97,3 +97,3 @@ // @flow | ||
// Parser | ||
export function parse(css, opts) { | ||
export function parse(css: string, opts: Object) { | ||
let input = new Input(css, opts) | ||
@@ -100,0 +100,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
75811
2059
3
1
Updatedemotion-utils@^7.2.2