-
-
Notifications
You must be signed in to change notification settings - Fork 13
Make JS engines optional dependencies when pulling in gost-dom/browser #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request restructures JavaScript engine dependencies by moving them from the main module into separate optional sub-modules. The main go.mod removes direct dependencies on v8go and Sobek, while new go.mod files are introduced for scripting/v8engine, scripting/sobekengine, and v8browser that declare these dependencies independently. Documentation is expanded to describe the available engine options and usage instructions. The internal/test/wpt module adds a v8engine dependency. This change isolates heavy engine-specific dependencies into optional packages. Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README_SCRIPT_ENGINE.md (1)
114-114: Fix typo in link reference.The link reference should be
[Sobek]not[Sobak]to match the project name.Proposed fix
-[Sobak]: https://github.com/grafana/sobek +[Sobek]: https://github.com/grafana/sobek
| There are two script engines available: | ||
|
|
||
| - `github.com/gost-dom/browser/scripting/v8engine` - Uses V8 | ||
| - `github.com/gost-dom/browser/scripting/sobekengine` - Pure Go JavaScript engine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix trailing space.
Proposed fix
-- `github.com/gost-dom/browser/scripting/sobekengine` - Pure Go JavaScript engine
+- `github.com/gost-dom/browser/scripting/sobekengine` - Pure Go JavaScript engine📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - `github.com/gost-dom/browser/scripting/sobekengine` - Pure Go JavaScript engine | |
| - `github.com/gost-dom/browser/scripting/sobekengine` - Pure Go JavaScript engine |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
71-71: Trailing spaces
Expected: 0 or 2; Actual: 1
(MD009, no-trailing-spaces)
Right now pulling in gost-dom/browser also adds v8 engine as a dependency, which is pretty heavy. This change lets API consumer pick which JS engine to use, if any.