fix(@pandacss/extractor): add endLineNumber/endColumn to panda debug
#3408
+1,252
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
*.ast.jsonshould includeendColumnandendLine#3407📝 Description
Add
endLineNumberandendColumnfields to the AST JSON output generated bypanda debugcommand. This provides complete position information for detected CSS usage locationsin source files.
⛳️ Current behavior (updates)
The
*.ast.jsonfiles generated bypanda debugcurrently include only start position information:line: Start line numbercolumn: Start column numberThis incomplete position data makes it difficult to anlyze the AST.
🚀 New behavior
The AST JSON output now includes complete position information:
line: Start line numbercolumn: Start column numberendLineNumber: End line number ✨ NEWendColumn: End column number ✨ NEWExample output:
{ "box": { "type": "map", "node": "JsxSelfClosingElement", "line": 1, "column": 1, "endLineNumber": 1, "endColumn": 29, "value": { "color": { "line": 1, "column": 17, "endLineNumber": 1, "endColumn": 26, "value": "red.200" } } } }💣 Is this a breaking change (Yes/No): No
This is a non-breaking change. It only adds new fields to the JSON output while preserving all existing fields. Any tools currently reading the AST JSON will continue to work
unchanged, and can optionally use the new fields.
📝 Additional Information