Skip to content

Commit 0b11655

Browse files
authored
fix: JSX transforms issue with favicon links
## Context We do several [transformations](https://github.com/redwoodjs/sdk/blob/b839158d5f89eee392a4ab39041e7ebfb0b5eb49/docs/architecture/documentTransforms.md) to the jsx for `Document`s , using ts-morph. ## Problem We had some transformation being done for nodes already removed from the ast, causing ts-morph to throw an error. ## Solution Do several passes: first collect all the info we need, then do the modifications after. By not mixing collection and modification, we avoid ending up accessing removed nodes.
1 parent 2bab283 commit 0b11655

File tree

5 files changed

+718
-219
lines changed

5 files changed

+718
-219
lines changed

pnpm-lock.yaml

Lines changed: 127 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@
154154
"wrangler": "^4.20.5"
155155
},
156156
"peerDependencies": {
157-
"vite": "^6.2.6",
158157
"react": ">=19.2.0-0 <20",
159158
"react-dom": ">=19.2.0-0 <20",
160-
"react-server-dom-webpack": ">=19.2.0-0 <20"
159+
"react-server-dom-webpack": ">=19.2.0-0 <20",
160+
"vite": "^6.2.6"
161161
},
162162
"optionalDependencies": {
163163
"react": "19.2.0-canary-39cad7af-20250411",
@@ -178,9 +178,11 @@
178178
"packageManager": "pnpm@9.14.4+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab",
179179
"devDependencies": {
180180
"@types/debug": "^4.1.12",
181+
"@types/js-beautify": "^1.14.3",
181182
"@types/lodash": "^4.17.16",
182183
"@types/node": "^22.14.0",
183184
"@types/proper-lockfile": "^4.1.4",
185+
"js-beautify": "^1.15.4",
184186
"semver": "^7.7.1",
185187
"tsx": "^4.19.4",
186188
"typescript": "^5.8.3",

0 commit comments

Comments
 (0)