@pandacss/postcss 2.0.0-beta.6 → 2.0.0-beta.7

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.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/index.ts
2
2
  var _compiler = require('@pandacss/compiler');
3
+ var _compilershared = require('@pandacss/compiler-shared');
3
4
  var _path = require('path');
4
5
  var PLUGIN_NAME = "pandacss";
5
6
  var driverStates = /* @__PURE__ */ new Map();
@@ -127,18 +128,13 @@ function withPluginMetadata(message, parent) {
127
128
  parent
128
129
  };
129
130
  }
130
- function formatDiagnostic(diagnostic) {
131
- const file = diagnostic.file ? `${diagnostic.file}` : "";
132
- const location = diagnostic.location ? `:${diagnostic.location.start.line}:${diagnostic.location.start.column}` : diagnostic.span ? `:${diagnostic.span.start}` : "";
133
- return `${diagnostic.severity} ${diagnostic.code} ${file}${location} ${diagnostic.message}`.replace(/\s+/g, " ");
134
- }
135
131
  function emitDiagnostics(root, result, diagnostics) {
136
132
  const error = diagnostics.find((diagnostic) => diagnostic.severity === "error");
137
133
  if (error) {
138
- throw root.error(formatDiagnostic(error), { plugin: PLUGIN_NAME });
134
+ throw root.error(_compilershared.formatDiagnostic.call(void 0, error), { plugin: PLUGIN_NAME });
139
135
  }
140
136
  for (const diagnostic of diagnostics) {
141
- result.warn(formatDiagnostic(diagnostic), { plugin: PLUGIN_NAME });
137
+ result.warn(_compilershared.formatDiagnostic.call(void 0, diagnostic), { plugin: PLUGIN_NAME });
142
138
  }
143
139
  }
144
140
 
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // src/index.ts
2
2
  import { createNodeDriver } from "@pandacss/compiler";
3
+ import { formatDiagnostic } from "@pandacss/compiler-shared";
3
4
  import { extname, normalize, resolve } from "path";
4
5
  var PLUGIN_NAME = "pandacss";
5
6
  var driverStates = /* @__PURE__ */ new Map();
@@ -127,11 +128,6 @@ function withPluginMetadata(message, parent) {
127
128
  parent
128
129
  };
129
130
  }
130
- function formatDiagnostic(diagnostic) {
131
- const file = diagnostic.file ? `${diagnostic.file}` : "";
132
- const location = diagnostic.location ? `:${diagnostic.location.start.line}:${diagnostic.location.start.column}` : diagnostic.span ? `:${diagnostic.span.start}` : "";
133
- return `${diagnostic.severity} ${diagnostic.code} ${file}${location} ${diagnostic.message}`.replace(/\s+/g, " ");
134
- }
135
131
  function emitDiagnostics(root, result, diagnostics) {
136
132
  const error = diagnostics.find((diagnostic) => diagnostic.severity === "error");
137
133
  if (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/postcss",
3
- "version": "2.0.0-beta.6",
3
+ "version": "2.0.0-beta.7",
4
4
  "description": "PostCSS plugin for Panda CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,8 +30,8 @@
30
30
  "dist"
31
31
  ],
32
32
  "dependencies": {
33
- "@pandacss/compiler": "2.0.0-beta.6",
34
- "@pandacss/compiler-shared": "2.0.0-beta.6"
33
+ "@pandacss/compiler": "2.0.0-beta.7",
34
+ "@pandacss/compiler-shared": "2.0.0-beta.7"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "postcss": ">=8"