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

css-prefers-color-scheme

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-prefers-color-scheme - npm Package Compare versions

Comparing version 3.1.1 to 4.0.0

9

CHANGELOG.md
# Changes to Prefers Color Scheme
### 4.0.0 (May 24, 2019)
- Updated: `postcss` to 7.0.16 (patch)
- Updated: Node 8+ compatibility (major)
### 3.1.1 (November 10, 2018)
- Updated: Project organization. No functional changes.
### 3.1.0 (November 10, 2018)

@@ -4,0 +13,0 @@

6

cli.js

@@ -70,3 +70,3 @@ #!/usr/bin/env node

function readFile(pathname) {
function readFile (pathname) {
return new Promise((resolve, reject) => {

@@ -83,3 +83,3 @@ fs.readFile(pathname, 'utf8', (error, data) => {

function writeFile(pathname, data) {
function writeFile (pathname, data) {
return new Promise((resolve, reject) => {

@@ -96,3 +96,3 @@ fs.writeFile(pathname, data, (error, content) => {

function getStdin() {
function getStdin () {
return new Promise(resolve => {

@@ -99,0 +99,0 @@ let data = '';

{
"name": "css-prefers-color-scheme",
"version": "3.1.1",
"version": "4.0.0",
"description": "Use light and dark color schemes in all browsers",

@@ -30,36 +30,46 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>",

"build:browser": "npm run build:browser:dist && npm run build:browser:min",
"build:browser:dist": "cross-env NODE_ENV=browser rollup -c .rollup.js --silent",
"build:browser:min": "cross-env NODE_ENV=browser:min rollup -c .rollup.js --silent",
"build:node": "rollup -c .rollup.js --silent",
"build:postcss": "cross-env NODE_ENV=postcss rollup -c .rollup.js --silent",
"build:browser:dist": "cross-env NODE_ENV=browser rollup --config .rollup.js --silent",
"build:browser:min": "cross-env NODE_ENV=browser:min rollup --config .rollup.js --silent",
"build:node": "rollup --config .rollup.js --silent",
"build:postcss": "cross-env NODE_ENV=postcss rollup --config .rollup.js --silent",
"prepublishOnly": "npm test",
"pretest": "npm run build",
"test": "npm run test:js && npm run test:tape",
"test:js": "eslint src/*.js --cache --ignore-path .gitignore --quiet",
"test:tape": "postcss-tape --plugin=postcss.js"
"test:js": "eslint src/{*,**/*}.js --cache --ignore-path .gitignore --quiet",
"test:tape": "postcss-tape --plugin postcss.js"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"dependencies": {
"postcss": "^7.0.5"
"postcss": "^7.0.16"
},
"devDependencies": {
"@babel/core": "^7.1.5",
"@babel/preset-env": "^7.1.5",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"babel-eslint": "^10.0.1",
"cross-env": "^5.2.0",
"eslint": "^5.9.0",
"eslint-config-dev": "^2.0.0",
"get-stdin": "^6.0.0",
"postcss-tape": "^2.2.0",
"eslint": "^5.16.0",
"get-stdin": "^7.0.0",
"postcss-tape": "^5.0.0",
"pre-commit": "^1.2.2",
"rollup": "^0.67.0",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-terser": "^3.0.0",
"uglify-js": "^3.4.9"
"rollup": "^1.12.3",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-terser": "^5.0.0",
"uglify-js": "^3.5.15"
},
"eslintConfig": {
"extends": "dev",
"parser": "babel-eslint"
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"impliedStrict": true,
"sourceType": "module"
},
"root": true
},

@@ -66,0 +76,0 @@ "keywords": [

@@ -1,6 +0,4 @@

'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var postcss = _interopDefault(require('postcss'));
var postcss$1 = _interopDefault(require('postcss'));

@@ -17,7 +15,9 @@ const mediaRegExp = /^media$/i;

var postcss$1 = postcss.plugin('postcss-prefers-color-scheme', opts => {
var postcss = postcss$1.plugin('postcss-prefers-color-scheme', opts => {
const preserve = 'preserve' in Object(opts) ? opts.preserve : true;
return root => {
root.walkAtRules(mediaRegExp, atRule => {
const params = atRule.params;
const {
params
} = atRule;
const altParams = params.replace(prefersInterfaceRegExp, prefersInterfaceReplacer);

@@ -38,2 +38,3 @@

module.exports = postcss$1;
module.exports = postcss;
//# sourceMappingURL=postcss.js.map

Sorry, the diff of this file is not supported yet

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