postcss-load-config
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -5,2 +5,10 @@ # Changelog | ||
## [2.1.1](https://github.com/michael-ciniawsky/postcss-load-config/compare/v2.1.0...v2.1.1) (2020-09-17) | ||
### Bug Fixes | ||
* **plugins:** fix PostCSS 8 plugin support ([#177](https://github.com/michael-ciniawsky/postcss-load-config/issues/202)) | ||
## [2.1.0](https://github.com/michael-ciniawsky/postcss-load-config/compare/v2.0.0...v2.1.0) (2019-06-10) | ||
@@ -7,0 +15,0 @@ |
{ | ||
"name": "postcss-load-config", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Autoload Config for PostCSS", | ||
@@ -12,9 +12,2 @@ "main": "src/index.js", | ||
}, | ||
"scripts": { | ||
"lint": "standard --env jest", | ||
"test": "jest --verbose --coverage", | ||
"docs": "jsdoc2md src/*.js > DOCS.md", | ||
"clean": "npx rimraf ./coverage", | ||
"release": "standard-version" | ||
}, | ||
"dependencies": { | ||
@@ -24,13 +17,2 @@ "cosmiconfig": "^5.0.0", | ||
}, | ||
"devDependencies": { | ||
"cssnano": "^4.0.0", | ||
"jest": "^24.0.0", | ||
"jsdoc-to-markdown": "^5.0.0", | ||
"postcss": "^7.0.0", | ||
"postcss-import": "^12.0.0", | ||
"postcss-nested": "^4.0.0", | ||
"standard": "^12.0.0", | ||
"standard-version": "6.0.0", | ||
"sugarss": "^2.0.0" | ||
}, | ||
"keywords": [ | ||
@@ -37,0 +19,0 @@ "postcss", |
@@ -36,3 +36,3 @@ [![npm][npm]][npm-url] | ||
Create a **`postcss`** section in your projects **`package.json`** | ||
Create a **`postcss`** section in your project's **`package.json`** | ||
@@ -39,0 +39,0 @@ ``` |
@@ -125,3 +125,3 @@ 'use strict' | ||
* @module postcss-load-config | ||
* @version 2.0.0 | ||
* @version 2.1.0 | ||
* | ||
@@ -128,0 +128,0 @@ * @requires comsiconfig |
@@ -59,6 +59,2 @@ 'use strict' | ||
plugins.forEach((plugin, i) => { | ||
if (plugin.postcss) { | ||
plugin = plugin.postcss | ||
} | ||
if (plugin.default) { | ||
@@ -68,6 +64,15 @@ plugin = plugin.default | ||
if (plugin.postcss === true) { | ||
plugin = plugin() | ||
} else if (plugin.postcss) { | ||
plugin = plugin.postcss | ||
} | ||
if ( | ||
// eslint-disable-next-line | ||
!(typeof plugin === 'object' && Array.isArray(plugin.plugins) || | ||
typeof plugin === 'function') | ||
!( | ||
(typeof plugin === 'object' && Array.isArray(plugin.plugins)) || | ||
(typeof plugin === 'object' && plugin.postcssPlugin) || | ||
(typeof plugin === 'function') | ||
) | ||
) { | ||
@@ -74,0 +79,0 @@ throw new TypeError(`Invalid PostCSS Plugin found at: plugins[${i}]\n\n(@${file})`) |
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
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
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
0
227
21015
1