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
Support for import followed by other statements in scripts piped to meteor shell
#8833
Conversation
@atd: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
Just noting that the test failure appears related to the change (and isn't just an unrelated fluke). |
meteor shell
scriptsmeteor shell
// If repl didn't start, `require` and `module` are not visible | ||
// in the vm context | ||
repl.require = require; | ||
repl.module = module; |
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.
These are the require
and module
variables available globally in the shell-server.js
module. Instead, I think we should be defining a module for the REPL using meteorInstall
so that we can use the resulting require
and module
parameters, as we do here.
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.
And of course now would be a great time to move the code that creates the REPL module into a helper function, since it's now used twice.
I canceled and rescheduled the most recent test run because it failed with a segmentation fault here, which is probably not your fault. |
The prevented to run certain commands in scripts, like `import { Foo } from './bar'` See meteor#8823
I have extracted the function and ended up using the |
The test failure seems entirely unrelated, though it has happened more than once now. I'm going to merge this anyway, in order to get it into the first 1.5.1 release candidate. If that test keeps failing, we can keep debugging it on the |
Fixes #8823