@pandacss/postcss 0.34.3 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -4,6 +4,7 @@ interface PluginOptions {
4
4
  configPath?: string;
5
5
  cwd?: string;
6
6
  logfile?: string;
7
+ allow?: RegExp[];
7
8
  }
8
9
  declare const loadConfig: () => any;
9
10
  declare const pandacss: PluginCreator<PluginOptions>;
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ interface PluginOptions {
4
4
  configPath?: string;
5
5
  cwd?: string;
6
6
  logfile?: string;
7
+ allow?: RegExp[];
7
8
  }
8
9
  declare const loadConfig: () => any;
9
10
  declare const pandacss: PluginCreator<PluginOptions>;
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ var loadConfig = () => interopDefault(customRequire("@pandacss/postcss"));
45
45
  var stream;
46
46
  var builder = new import_node.Builder();
47
47
  var pandacss = (options = {}) => {
48
- const { configPath, cwd, logfile } = options;
48
+ const { configPath, cwd, logfile, allow } = options;
49
49
  if (!stream && logfile) {
50
50
  stream = (0, import_node.setLogStream)({ cwd, logfile });
51
51
  }
@@ -54,7 +54,7 @@ var pandacss = (options = {}) => {
54
54
  plugins: [
55
55
  async function(root, result) {
56
56
  const fileName = result.opts.from;
57
- const skip = shouldSkip(fileName);
57
+ const skip = shouldSkip(fileName, allow);
58
58
  if (skip)
59
59
  return;
60
60
  await builder.setup({ configPath, cwd });
@@ -86,11 +86,13 @@ function isValidCss(file) {
86
86
  const [filePath] = file.split("?");
87
87
  return import_path.default.extname(filePath) === ".css";
88
88
  }
89
- var shouldSkip = (fileName) => {
89
+ var shouldSkip = (fileName, allow) => {
90
90
  if (!fileName)
91
91
  return true;
92
92
  if (!isValidCss(fileName))
93
93
  return true;
94
+ if (allow?.some((p) => p.test(fileName)))
95
+ return false;
94
96
  return nodeModulesRegex.test(fileName);
95
97
  };
96
98
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ var loadConfig = () => interopDefault(customRequire("@pandacss/postcss"));
16
16
  var stream;
17
17
  var builder = new Builder();
18
18
  var pandacss = (options = {}) => {
19
- const { configPath, cwd, logfile } = options;
19
+ const { configPath, cwd, logfile, allow } = options;
20
20
  if (!stream && logfile) {
21
21
  stream = setLogStream({ cwd, logfile });
22
22
  }
@@ -25,7 +25,7 @@ var pandacss = (options = {}) => {
25
25
  plugins: [
26
26
  async function(root, result) {
27
27
  const fileName = result.opts.from;
28
- const skip = shouldSkip(fileName);
28
+ const skip = shouldSkip(fileName, allow);
29
29
  if (skip)
30
30
  return;
31
31
  await builder.setup({ configPath, cwd });
@@ -57,11 +57,13 @@ function isValidCss(file) {
57
57
  const [filePath] = file.split("?");
58
58
  return path2.extname(filePath) === ".css";
59
59
  }
60
- var shouldSkip = (fileName) => {
60
+ var shouldSkip = (fileName, allow) => {
61
61
  if (!fileName)
62
62
  return true;
63
63
  if (!isValidCss(fileName))
64
64
  return true;
65
+ if (allow?.some((p) => p.test(fileName)))
66
+ return false;
65
67
  return nodeModulesRegex.test(fileName);
66
68
  };
67
69
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/postcss",
3
- "version": "0.34.3",
3
+ "version": "0.36.0",
4
4
  "description": "PostCSS integration for Panda CSS",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -33,10 +33,10 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "postcss": "8.4.35",
36
- "@pandacss/node": "0.34.3"
36
+ "@pandacss/node": "0.36.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@pandacss/logger": "0.34.3"
39
+ "@pandacss/logger": "0.36.0"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",