Skip to content

feat: support export ast buffer#317

Merged
hardfist merged 11 commits intomainfrom
export-ast-buffer
Aug 31, 2025
Merged

feat: support export ast buffer#317
hardfist merged 11 commits intomainfrom
export-ast-buffer

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented Aug 29, 2025

export ast buffer so we can call js api on ast buffer to support js plugin

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 29, 2025

Deploy Preview for rslint ready!

Name Link
🔨 Latest commit fc5a08d
🔍 Latest deploy log https://app.netlify.com/projects/rslint/deploys/68b43c1ed3542f0008c36ad0
😎 Deploy Preview https://deploy-preview-317--rslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hardfist hardfist marked this pull request as ready for review August 30, 2025 07:59
Copilot AI review requested due to automatic review settings August 30, 2025 07:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for exporting AST buffer data to enable JavaScript API access for plugin support. The change allows the Go linter to serialize TypeScript AST data and send it to JavaScript consumers, facilitating JavaScript-based plugins that can operate on the parsed AST.

Key Changes:

  • Added optional includeEncodedSourceFiles parameter to lint API to control AST buffer export
  • Added encoded source file collection and serialization in the linting process
  • Created new @rslint/api package that re-exports TypeScript Go API functionality

Reviewed Changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/rslint/src/types.ts Added includeEncodedSourceFiles option and encodedSourceFiles response field
cmd/rslint/api.go Implemented source file tracking and AST encoding in lint handler
internal/api/api.go Added data structures for encoded source files support
packages/rslint-api/ New package for re-exporting TypeScript Go API
packages/rslint/tests/api.test.mjs Added test for encoded source file functionality
pnpm-workspace.yaml Added workspace packages for TypeScript Go integration
patches/typescript-go.patch Patch for TypeScript Go to export required symbols
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

cmd/rslint/api.go:1

  • Remove the extra blank lines before the sendError function comment.
package main

@hardfist hardfist merged commit 3ea3cd0 into main Aug 31, 2025
17 checks passed
@hardfist hardfist deleted the export-ast-buffer branch August 31, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants