Socket
Socket
Sign inDemoInstall

postcss-load-config

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-load-config - npm Package Compare versions

Comparing version 5.1.0 to 6.0.0

11

package.json
{
"name": "postcss-load-config",
"version": "5.1.0",
"version": "6.0.0",
"description": "Autoload Config for PostCSS",

@@ -24,4 +24,3 @@ "main": "src/index.js",

"dependencies": {
"lilconfig": "^3.1.1",
"yaml": "^2.4.2"
"lilconfig": "^3.1.1"
},

@@ -31,3 +30,4 @@ "peerDependencies": {

"postcss": ">=8.0.9",
"tsx": "^4.8.1"
"tsx": "^4.8.1",
"yaml": "^2.4.2"
},

@@ -43,2 +43,5 @@ "peerDependenciesMeta": {

"optional": true
},
"yaml": {
"optional": true
}

@@ -45,0 +48,0 @@ },

@@ -86,2 +86,5 @@

> [!NOTE]
> For YAML configs, you must have [yaml](https://www.npmjs.com/package/yaml) installed as a peer dependency.
### `.postcssrc.js` or `postcss.config.js`

@@ -104,3 +107,3 @@

> [!NOTE]
> [!NOTE]
> For TypeScript configs, you must have [tsx](https://www.npmjs.com/package/tsx) or [jiti](https://www.npmjs.com/package/jiti) installed as a peer dependency.

@@ -107,0 +110,0 @@

@@ -5,3 +5,2 @@ // @ts-check

const config = require('lilconfig')
const yaml = require('yaml')

@@ -79,2 +78,17 @@ const loadOptions = require('./options.js')

let yaml
async function yamlLoader(_, content) {
if (!yaml) {
try {
yaml = await import('yaml')
} catch (e) {
/* c8 ignore start */
throw new Error(
`'yaml' is required for the YAML configuration files. Make sure it is installed\nError: ${e.message}`
)
}
}
return yaml.parse(content);
}
/** @return {import('lilconfig').Options} */

@@ -94,4 +108,4 @@ const withLoaders = (options = {}) => {

'.ts': loader,
'.yaml': (_, content) => yaml.parse(content),
'.yml': (_, content) => yaml.parse(content)
'.yaml': yamlLoader,
'.yml': yamlLoader
},

@@ -98,0 +112,0 @@ searchPlaces: [

@@ -73,3 +73,2 @@ // @ts-check

if (
// eslint-disable-next-line
!(

@@ -76,0 +75,0 @@ (typeof plugin === 'object' && Array.isArray(plugin.plugins)) ||

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