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

css-has-pseudo

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-has-pseudo - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

4

CHANGELOG.md
# Changes to CSS Has Pseudo
### 0.9.0 (November 26, 2018)
- Improved CLI usage
### 0.8.0 (November 26, 2018)

@@ -4,0 +8,0 @@

23

cli.js

@@ -48,8 +48,2 @@ #!/usr/bin/env node

if (process.argv.length < 3) {
console.log(['CSS Has Pseudo\n', ' Transforms CSS with :has {}\n', 'Usage:\n', ' css-has-pseudo source.css transformed.css', ' css-has-pseudo --in=source.css --out=transformed.css --opts={}', ' echo "body:has(:focus) {}" | css-has-pseudo\n'].join('\n'));
process.exit(0);
} // get process and plugin options from the command line
const fileRegExp = /^[\w\/.]+$/;

@@ -81,2 +75,7 @@ const argRegExp = /^--(\w+)=("|')?(.+)\2$/;

(argo.from === '<stdin>' ? getStdin() : readFile(argo.from)).then(css => {
if (argo.from === '<stdin>' && !css) {
console.log(['CSS Has Pseudo\n', ' Transforms CSS with :has {}\n', 'Usage:\n', ' css-has-pseudo source.css transformed.css', ' css-has-pseudo --from=source.css --to=transformed.css --opts={}', ' echo "body:has(:focus) {}" | css-has-pseudo\n'].join('\n'));
process.exit(0);
}
const pluginOpts = JSON.parse(argo.opts.replace(relaxedJsonPropRegExp, '"$2": ').replace(relaxedJsonValueRegExp, '$1"$2"$3'));

@@ -96,2 +95,12 @@ const processOptions = Object.assign({

}
}).catch(error => {
if (Object(error).name === 'CssSyntaxError') {
throw new Error(`PostCSS had trouble reading the file (${error.reason} on line ${error.line}, column ${error.column}).`);
}
if (Object(error).errno === -2) {
throw new Error(`Sorry, "${error.path}" could not be read.`);
}
throw error;
}).then(result => {

@@ -101,3 +110,3 @@ console.log(result);

}, error => {
console.error(error);
console.error(Object(error).message || 'Something bad happened and we don’t even know what it was.');
process.exit(1);

@@ -104,0 +113,0 @@ });

{
"name": "css-has-pseudo",
"version": "0.8.0",
"version": "0.9.0",
"description": "Style elements relative to other elements in CSS",

@@ -5,0 +5,0 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>",

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