-
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
Js package optimizaitons #1429
Js package optimizaitons #1429
Conversation
var options = { setupTimeout: "1s", myOption: "test" }; | ||
exports.options = options; |
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.
I once knew why this is required ... but not anymore I will need to go figure it out again :(
It has something to do with the way we bind exports
, but I decided to figure it out later
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.
okay so if you just do:
export.options = {}
you don't have any local variable options
, but you should be able to just use exports.options
but there was a bug #1430 .
I can rebase only the fix on top of new-schedulers/master ? if we aren't going to merge this soon
@@ -466,8 +468,8 @@ func TestRunnerIntegrationImports(t *testing.T) { | |||
name, data := name, data | |||
t.Run(name, func(t *testing.T) { | |||
r1, err := getSimpleRunner(data.filename, fmt.Sprintf(` | |||
import hi from "%s"; | |||
export default function() { | |||
var hi = require("%s").default; |
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.
I need to look into this ...
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.
okay so ... basically setting default
to something only works if babel helps us otherwise we should just say exports = "hi!"
if we wont' be using babel.
much better explanation here. I don't think we need to do anything until we start supporting import/export ouself or through goja :D
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.
So this should save at least a minute+ on test
in CircleCI? 👍
my local testing was from 300s->160s and from 360s->176s (depending on the machine). Both with |
this should again lower the amount of time test take for close to zero additional scripting.
d35c151
to
3d55b1d
Compare
closes #1426