Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"oxfmt": "^0.61.0",
"oxlint": "^1.76.0",
"oxlint-tsgolint": "^7.0.2001",
"tsdown": "^0.22.3",
"tsdown": "^0.22.14",
"typescript": "^7.0.2",
"vitest": "^4.1.10"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/oxc-unshadowed-visitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"prepublishOnly": "pnpm run build"
},
"devDependencies": {
"@oxc-project/types": "^0.138.0",
"oxc-parser": "^0.138.0",
"oxc-walker": "^1.0.0",
"@oxc-project/types": "^0.142.0",
"oxc-parser": "^0.142.0",
"oxc-walker": "^1.1.1",
"rolldown": "catalog:"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/styled-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.13",
"lightningcss": "^1.33.0",
"oxc-walker": "^1.0.0",
"oxc-walker": "^1.1.1",
"rolldown-string": "^0.3.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,21 @@ const Test10 = () => /* @__PURE__ */ jsxs("div", {
})]
});
const Test11 = ({ color }) => {
const items = Array.from({ length: 5 }).map((item, i) => /* @__PURE__ */ jsxs("li", {
className: _JSXStyle.dynamic([["08e051f98bc93b44", [color]]]) + " item",
children: [
/* @__PURE__ */ jsx(_JSXStyle, {
id: "08e051f98bc93b44",
dynamic: [color],
children: `.item.__jsx-style-dynamic-selector{color:${color}}`
}),
"Item #",
i + 1
]
}, i));
return /* @__PURE__ */ jsx("ul", {
className: "items",
children: Array.from({ length: 5 }).map((item, i) => /* @__PURE__ */ jsxs("li", {
className: _JSXStyle.dynamic([["08e051f98bc93b44", [color]]]) + " item",
children: [
/* @__PURE__ */ jsx(_JSXStyle, {
id: "08e051f98bc93b44",
dynamic: [color],
children: `.item.__jsx-style-dynamic-selector{color:${color}}`
}),
"Item #",
i + 1
]
}, i))
children: items
});
};
//#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import styles from "./styles2";
import { jsx, jsxs } from "react/jsx-runtime";
//#region virtual:entry.jsx
var virtual_entry_default = ({ level = 1 }) => {
return /* @__PURE__ */ jsxs(`h${level}`, {
const Element = `h${level}`;
return /* @__PURE__ */ jsxs(Element, {
className: `jsx-${styles.__hash} root`,
children: [/* @__PURE__ */ jsx("p", {
className: `jsx-${styles.__hash}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import _JSXStyle from "styled-jsx/style";
import { jsx, jsxs } from "react/jsx-runtime";
//#region virtual:entry.jsx
var virtual_entry_default = ({ level = 1 }) => {
return /* @__PURE__ */ jsxs(`h${level}`, {
const Element = `h${level}`;
return /* @__PURE__ */ jsxs(Element, {
className: "jsx-b6ec9074c87ab384 root",
children: [/* @__PURE__ */ jsx("p", {
className: "jsx-b6ec9074c87ab384",
Expand Down
6 changes: 3 additions & 3 deletions packages/transform-imports/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function processImportDeclaration(
for (const spec of specifiers) {
if (spec.type === 'ImportSpecifier') {
const imported = getName(spec.imported)
const local = getName(spec.local)
const local = spec.local.name
const transformedPath = resolveTransformPath(config.transform, imported, matches)

if (config.skipDefaultConversion) {
Expand All @@ -142,14 +142,14 @@ function processImportDeclaration(
}
} else if (spec.type === 'ImportDefaultSpecifier') {
if (config.handleDefaultImport) {
const local = getName(spec.local)
const local = spec.local.name
const transformedPath = resolveTransformPath(config.transform, local, matches)
newImports.push(`import ${local} from "${transformedPath}";`)
}
// Non-handled defaults in mixed imports are dropped
} else if (spec.type === 'ImportNamespaceSpecifier') {
if (config.handleNamespaceImport) {
const local = getName(spec.local)
const local = spec.local.name
const transformedPath = resolveTransformPath(config.transform, local, matches)
newImports.push(`import * as ${local} from "${transformedPath}";`)
}
Expand Down
Loading