@unocss/transformer-attributify-jsx 66.6.7 → 66.6.8

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -2
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ async function attributifyJsxOxcResolver(params) {
16
16
  const { code, id, uno, isBlocked } = params;
17
17
  const tasks = [];
18
18
  const ast = parseSync(id, code.toString(), { sourceType: "module" });
19
- if (ast.errors?.length) throw new Error(`Oxc parse errors:\n${ast.errors.join("\n")}`);
19
+ if (ast.errors?.length) throw new Error(`Oxc parse errors:\n${ast.errors.map((err) => err.codeframe ?? err.helpMessage ?? err.message).join("\n")}`);
20
20
  walk(ast.program, { enter(node) {
21
21
  if (node.type !== "JSXAttribute") return;
22
22
  if (node.value === null) {
@@ -104,7 +104,7 @@ function transformerAttributifyJsx(options = {}) {
104
104
  try {
105
105
  await attributifyJsxOxcResolver(params);
106
106
  } catch (error) {
107
- console.warn(`[@unocss/transformer-attributify-jsx]: Oxc resolver failed for "${id}", falling back to regex resolver:`, error);
107
+ console.warn(`[@unocss/transformer-attributify-jsx]: Oxc resolver failed for "${id}", falling back to regex resolver:\n`, error);
108
108
  await attributifyJsxRegexResolver(params);
109
109
  }
110
110
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/transformer-attributify-jsx",
3
3
  "type": "module",
4
- "version": "66.6.7",
4
+ "version": "66.6.8",
5
5
  "description": "Support valueless attributify in JSX/TSX.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -29,9 +29,9 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "oxc-parser": "^0.115.0",
32
+ "oxc-parser": "^0.124.0",
33
33
  "oxc-walker": "^0.7.0",
34
- "@unocss/core": "66.6.7"
34
+ "@unocss/core": "66.6.8"
35
35
  },
36
36
  "devDependencies": {
37
37
  "magic-string": "^0.30.21"