bump goja - #7467
Conversation
WalkthroughAll Changesgoja/goja_nodejs Module Migration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/js/global/scripts_test.go (1)
11-28:⚠️ Potential issue | 🔴 CriticalFix undefined variable
defaultImportsbefore tests can run.The test file has a compilation error at line 12:
defaultImportsis assigned but never declared. This needs to be either declared as a package-level variable, imported from another package, or handled differently in the test setup. This prevents the code from building and must be resolved.Additionally, verify that all old import paths have been fully replaced across the codebase. Some files may still be using the legacy
github.com/Mzack9999/imports that need updating as part of this migration.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/js/global/scripts_test.go` around lines 11 - 28, The TestScriptsRuntime function references an undefined variable defaultImports at the beginning of the function. Declare defaultImports as either a package-level variable before the TestScriptsRuntime function definition or as a local variable within the test function using the proper Go syntax (either var defaultImports = "" at the package level or defaultImports := "" within the function). This will resolve the compilation error and allow the test to build and run successfully.Source: Coding guidelines
🧹 Nitpick comments (1)
go.mod (1)
103-104: ⚡ Quick winConsider using tagged releases instead of pseudo-versions.
The pseudo-versions
v0.0.0-20260618133720-acb73e419534andv0.0.0-20260618132410-8519f75f703dreference specific commits rather than stable tagged releases. For production dependencies, tagged semantic versions are preferred for stability and reproducibility.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@go.mod` around lines 103 - 104, Replace the pseudo-version references for the dependencies github.com/projectdiscovery/goja and github.com/projectdiscovery/goja_nodejs with proper tagged semantic versions. Check the repositories for available stable releases and update the version strings in go.mod from the current commit-based pseudo-versions to the latest stable tagged release versions to ensure better stability and reproducibility for production dependencies.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@pkg/js/global/scripts_test.go`:
- Around line 11-28: The TestScriptsRuntime function references an undefined
variable defaultImports at the beginning of the function. Declare defaultImports
as either a package-level variable before the TestScriptsRuntime function
definition or as a local variable within the test function using the proper Go
syntax (either var defaultImports = "" at the package level or defaultImports :=
"" within the function). This will resolve the compilation error and allow the
test to build and run successfully.
---
Nitpick comments:
In `@go.mod`:
- Around line 103-104: Replace the pseudo-version references for the
dependencies github.com/projectdiscovery/goja and
github.com/projectdiscovery/goja_nodejs with proper tagged semantic versions.
Check the repositories for available stable releases and update the version
strings in go.mod from the current commit-based pseudo-versions to the latest
stable tagged release versions to ensure better stability and reproducibility
for production dependencies.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f46c57c8-ea98-42e3-9be5-2b27b86974c5
⛔ Files ignored due to path filters (30)
go.sumis excluded by!**/*.sumpkg/js/generated/go/libbytes/bytes.gois excluded by!**/generated/**pkg/js/generated/go/libdcerpc/dcerpc.gois excluded by!**/generated/**pkg/js/generated/go/libdcom/dcom.gois excluded by!**/generated/**pkg/js/generated/go/libfs/fs.gois excluded by!**/generated/**pkg/js/generated/go/libgoconsole/goconsole.gois excluded by!**/generated/**pkg/js/generated/go/libikev2/ikev2.gois excluded by!**/generated/**pkg/js/generated/go/libkerberos/kerberos.gois excluded by!**/generated/**pkg/js/generated/go/libkrbforge/krbforge.gois excluded by!**/generated/**pkg/js/generated/go/libkrbroast/krbroast.gois excluded by!**/generated/**pkg/js/generated/go/libldap/ldap.gois excluded by!**/generated/**pkg/js/generated/go/libmssql/mssql.gois excluded by!**/generated/**pkg/js/generated/go/libmysql/mysql.gois excluded by!**/generated/**pkg/js/generated/go/libnet/net.gois excluded by!**/generated/**pkg/js/generated/go/liboracle/oracle.gois excluded by!**/generated/**pkg/js/generated/go/libpop3/pop3.gois excluded by!**/generated/**pkg/js/generated/go/libpostgres/postgres.gois excluded by!**/generated/**pkg/js/generated/go/librdp/rdp.gois excluded by!**/generated/**pkg/js/generated/go/libredis/redis.gois excluded by!**/generated/**pkg/js/generated/go/librsync/rsync.gois excluded by!**/generated/**pkg/js/generated/go/libscmr/scmr.gois excluded by!**/generated/**pkg/js/generated/go/libsecretsdump/secretsdump.gois excluded by!**/generated/**pkg/js/generated/go/libsmb/smb.gois excluded by!**/generated/**pkg/js/generated/go/libsmtp/smtp.gois excluded by!**/generated/**pkg/js/generated/go/libssh/ssh.gois excluded by!**/generated/**pkg/js/generated/go/libstructs/structs.gois excluded by!**/generated/**pkg/js/generated/go/libtelnet/telnet.gois excluded by!**/generated/**pkg/js/generated/go/libtsch/tsch.gois excluded by!**/generated/**pkg/js/generated/go/libvnc/vnc.gois excluded by!**/generated/**pkg/js/generated/go/libwmi/wmi.gois excluded by!**/generated/**
📒 Files selected for processing (35)
go.modpkg/js/compiler/compiler.gopkg/js/compiler/compiler_test.gopkg/js/compiler/non-pool.gopkg/js/compiler/pool.gopkg/js/compiler/session.gopkg/js/global/helpers.gopkg/js/global/scripts.gopkg/js/global/scripts_test.gopkg/js/gojs/gojs.gopkg/js/gojs/set.gopkg/js/libs/bytes/buffer.gopkg/js/libs/dcerpc/dcerpc.gopkg/js/libs/dcom/dcom.gopkg/js/libs/goconsole/log.gopkg/js/libs/kerberos/kerberosx.gopkg/js/libs/krbroast/krbroast.gopkg/js/libs/ldap/ldap.gopkg/js/libs/scmr/scmr.gopkg/js/libs/secretsdump/secretsdump.gopkg/js/libs/smtp/smtp.gopkg/js/libs/tsch/tsch.gopkg/js/libs/wmi/wmi.gopkg/js/libs/wmi/wmi_test.gopkg/js/utils/nucleijs.gopkg/js/utils/nucleijs_test.gopkg/protocols/code/code.gopkg/protocols/code/helpers.gopkg/protocols/common/protocolstate/js.gopkg/protocols/javascript/js.gopkg/tmplexec/exec.gopkg/tmplexec/flow/builtin/dedupe.gopkg/tmplexec/flow/flow_executor.gopkg/tmplexec/flow/flow_internal.gopkg/tmplexec/flow/vm.go
|
Reviewed this PR. Assessment: Implementation looks solid and follows project conventions. Clean code quality. Approved ✅ |
bumping goja version
Summary by CodeRabbit