From f97f7ce200f8b51d0c362a2b8257ca15a58ecc45 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 16 Jan 2024 19:11:26 +0300 Subject: [PATCH] fix: compatibility with updated cosmiconfig --- src/utils.js | 1 + test/__snapshots__/postcssOptions.test.js.snap | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 33dd43f0..6f7d7014 100644 --- a/src/utils.js +++ b/src/utils.js @@ -147,6 +147,7 @@ async function loadConfig(loaderContext, config, postcssOptions) { loaders[".ts"] = tsLoader; const explorer = cosmiconfig(moduleName, { + searchStrategy: "global", searchPlaces, loaders, }); diff --git a/test/__snapshots__/postcssOptions.test.js.snap b/test/__snapshots__/postcssOptions.test.js.snap index 43ea173f..15d0c976 100644 --- a/test/__snapshots__/postcssOptions.test.js.snap +++ b/test/__snapshots__/postcssOptions.test.js.snap @@ -536,7 +536,7 @@ exports[`"postcssOptions" option should work with the "config" options with "pac exports[`"postcssOptions" option should work with the "config" options with "package.json" configuration: warnings 1`] = `[]`; exports[`"postcssOptions" option should work with the "config" options with "true" value: css 1`] = ` -"a { color: black } +"a { color: rgba(0, 0, 0, 1.0) } .foo { float: right; @@ -1468,7 +1468,7 @@ exports[`"postcssOptions" option should work with the "syntax" option with "Stri exports[`"postcssOptions" option should work with the "syntax" option with "String" value: warnings 1`] = `[]`; exports[`"postcssOptions" option should work without the specified values in the "postcssOptions" option: css 1`] = ` -"a { color: black } +"a { color: rgba(0, 0, 0, 1.0) } .foo { float: right;