-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Switch to our fork of goja - sobek #3775
Conversation
if options == nil || common.IsNullish(options) || | ||
options.Get("mode") == nil || sobek.IsUndefined(options.Get("mode")) { |
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.
This unfortunately becomes 121 symbols and also both cases hit the "is interface nil?" trap so ... yeah. This is the best I can do without having to add a lot mroe code.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3775 +/- ##
=======================================
Coverage 70.86% 70.86%
=======================================
Files 291 291
Lines 21226 21227 +1
=======================================
+ Hits 15042 15043 +1
Misses 5219 5219
Partials 965 965
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Am I getting it right? Isn't anything else than s/goja/sobek/
, right?
Technically it is ... as I am leaving the parser and ast packages from goja in js/compiler. Otherwise it needs a lot more aliases, which won't matter for any other codebase - no extension ever uses those. And also I replace Both of those will be updated in the future - one of them when we move actually to a fork, the others when we have time as part of cleaning. But I didn't want to figure out all the cases for each comment individually. |
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.
All the replacements looks good, and I have also confirmed that the only remaining uses of github.com/dop251/goja
are for goja/parser
and goja/file
, expected as described in the issue.
So, I guess I could say it looks good, as far as I can tell 😄
Hey! While working on another PR/branch, I realized that for ongoing changes, it's pretty easy to forget about goja imports, as we'll keep the dependency for a while. Do you think worths adding a temporary linter that forbids those imports? |
What?
Move to sobek from goja - currently only aliasing types over from goja.
Why?
This is part of #3772 and #3773.
The PR also doesn't try to fix every other reference of goja - a bunch of them are docs that will break at this point, and will likely need to be updated over time. Likely after sobek is an actual fork of goja.
This is marked as breaking change mostly because I do expect it will still break something, even if not for most users.
Checklist
make lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)