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

pretty-lights

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-lights - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

17

babel/babel-utils.js

@@ -8,24 +8,7 @@ "use strict";

exports.omit = omit;
Object.defineProperty(exports, "getIdentifierName", {
enumerable: true,
get: function () {
return _babelUtils.getLabelFromPath;
}
});
Object.defineProperty(exports, "appendStringToExpressions", {
enumerable: true,
get: function () {
return _babelUtils.appendStringToExpressions;
}
});
var _path = _interopRequireDefault(require("path"));
var _babelUtils = require("@emotion/babel-utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// @flow
// import type { BabelPath, EmotionBabelPluginPass } from './index'
// import type { Types, Identifier } from 'babel-flow-types'
function getLabel(identifierName, autoLabel, labelFormat, filename) {

@@ -32,0 +15,0 @@ if (!identifierName || !autoLabel) return null; // Valid Characters in CSS Class Names Selecter

13

babel/index.js

@@ -28,3 +28,2 @@ "use strict";

// import type { Node, Identifier, BabelPluginPass, Types, Babel } from 'babel-flow-types';
// export type BabelPath = any;

@@ -64,3 +63,3 @@ function hashArray(arr) {

try {
const identifierName = (0, _babelUtils2.getIdentifierName)(path, t);
const identifierName = (0, _babelUtils.getLabelFromPath)(path, t);

@@ -83,3 +82,3 @@ if (!removePath) {

path.replaceWith(t.callExpression(identifier, (0, _babelUtils2.appendStringToExpressions)((0, _babelUtils.getExpressionsFromTemplateLiteral)(path.node.quasi, t), stringToAppend, t)));
path.replaceWith(t.callExpression(identifier, (0, _babelUtils.appendStringToExpressions)((0, _babelUtils.getExpressionsFromTemplateLiteral)(path.node.quasi, t), stringToAppend, t)));

@@ -154,3 +153,3 @@ if (state.opts.hoist) {

const restArgs = args.slice(2);
const identifierName = (0, _babelUtils2.getIdentifierName)(path, t);
const identifierName = (0, _babelUtils.getLabelFromPath)(path, t);
const targetProperty = buildTargetObjectProperty(path, state, t);

@@ -173,3 +172,3 @@ path.addComment('leading', '#__PURE__');

const styledCall = t.isStringLiteral(tag) && !isCallExpression && tag.value[0] !== tag.value[0].toLowerCase() ? t.memberExpression(identifier, t.identifier(tag.value)) : t.callExpression(identifier, [tag, finalOptions, ...restArgs]);
return t.callExpression(styledCall, (0, _babelUtils2.appendStringToExpressions)((0, _babelUtils.getExpressionsFromTemplateLiteral)(path.node.quasi, t), stringToAppend, t));
return t.callExpression(styledCall, (0, _babelUtils.appendStringToExpressions)((0, _babelUtils.getExpressionsFromTemplateLiteral)(path.node.quasi, t), stringToAppend, t));
}

@@ -179,3 +178,3 @@

const targetProperty = buildTargetObjectProperty(path, state, t);
const identifierName = (0, _babelUtils2.getIdentifierName)(path, t);
const identifierName = (0, _babelUtils.getLabelFromPath)(path, t);
const tag = t.isCallExpression(path.node.callee) ? path.node.callee.arguments[0] : t.stringLiteral(path.node.callee.property.name);

@@ -380,3 +379,3 @@ const isCallExpression = t.isCallExpression(path.node.callee);

path.addComment('leading', '#__PURE__');
const label = (0, _babelUtils2.getLabel)((0, _babelUtils2.getIdentifierName)(path, t), state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);
const label = (0, _babelUtils2.getLabel)((0, _babelUtils.getLabelFromPath)(path, t), state.opts.autoLabel, state.opts.labelFormat, state.file.opts.filename);

@@ -383,0 +382,0 @@ if (label) {

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

const emotion = process.env.NODE_ENV === 'test' ? require('../src') : require('../lib');
const emotion = process.env.PRETTY_LIGHTS_TEST ? require('../src') : require('../lib');
module.exports = createSerializer(emotion);
{
"name": "pretty-lights",
"version": "0.0.6",
"version": "0.0.7",
"description": "CSS-in-JS with a reliable API",

@@ -38,4 +38,8 @@ "main": "lib/pretty-lights.js",

"@emotion/weak-memoize": "0.2.4",
"chalk": "2.4.2",
"convert-source-map": "1.6.0",
"css": "2.2.4",
"find-root": "1.1.0",
"hoist-non-react-statics": "3.3.0",
"hoist-non-react-statics": "^3.3.0",
"source-map": "0.7.3",
"stylis": "^3.5.4",

@@ -46,4 +50,4 @@ "stylis-rule-sheet": "^0.0.10"

"prop-types": "^15.7.2",
"react": "^16.3.2",
"react-dom": "^16.3.2"
"react": "^16.8.6",
"react-dom": "^16.8.6"
},

@@ -59,5 +63,2 @@ "devDependencies": {

"babel-plugin-codegen": "3.0.0",
"chalk": "2.4.2",
"convert-source-map": "1.6.0",
"css": "2.2.4",
"cssjanus": "1.3.2",

@@ -87,7 +88,6 @@ "enzyme": "3.10.0",

"prop-types": "^15.7.2",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-test-renderer": "16.10.2",
"rimraf": "3.0.0",
"source-map": "0.7.3",
"touch": "3.1.0"

@@ -103,4 +103,4 @@ },

"prepare": "npm run build",
"test": "npm run build:dev && jest",
"test-update": "npm run build:dev && jest -u",
"test": "npm run build:dev && PRETTY_LIGHTS_TEST=1 jest",
"test-update": "npm run build:dev && PRETTY_LIGHTS_TEST=1 jest -u",
"lint": "eslint .",

@@ -107,0 +107,0 @@ "lint-fix": "eslint . --fix"

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