feat: refactor database dialect handling and add stubs for unsupported features

This commit is contained in:
krau
2025-12-18 17:42:20 +08:00
parent 0af049a507
commit 52eead3bf5
18 changed files with 197 additions and 34 deletions

View File

@@ -1,3 +1,5 @@
//go:build !no_jsparser
package js
import (

View File

@@ -1,3 +1,5 @@
//go:build !no_jsparser && !no_playwright
package js
import (

View File

@@ -1,4 +1,4 @@
//go:build no_playwright
//go:build no_playwright && !no_jsparser
package js

View File

@@ -1,3 +1,5 @@
//go:build !no_jsparser
package js
import (

16
parsers/js/js_stub.go Normal file
View File

@@ -0,0 +1,16 @@
//go:build no_jsparser
package js
import (
"context"
"errors"
)
func LoadPlugins(ctx context.Context, dir string) error {
return errors.New("JS parser plugins are not supported in this build")
}
func AddPlugin(ctx context.Context, code string, name string) error {
return errors.New("JS parser plugins are not supported in this build")
}

View File

@@ -1,3 +1,5 @@
//go:build !no_jsparser
package js
import "github.com/blang/semver"