Commit Graph

104 Commits

Author SHA1 Message Date
filipenevola
39e57ecd79 Bump package versions for the official 1.10 release. 🎉 2020-03-12 14:29:56 -03:00
filipenevola
12ee7d37af Bump package versions for 1.10.0-rc.5 release 2020-03-11 23:02:39 -03:00
filipenevola
5e5c75b36b Bump package versions for 1.10-rc.4 release 2020-03-06 13:10:35 -04:00
filipenevola
5404d065e9 Bump package versions for 1.10-rc.3 release 2020-03-02 15:39:38 -04:00
filipenevola
e898ab9b98 Bump package versions for 1.10-rc.2 release 2020-02-28 16:13:02 -04:00
Ben Newman
5a182b515e Bump package versions for 1.10-rc.1 release. 2020-02-27 16:47:11 -05:00
Ben Newman
edc7180382 Bump package versions for 1.10-rc.0 release. 🎉 2020-02-26 15:52:12 -05:00
Ben Newman
93e9f96124 Two stray -beta110.11 version updates.
These versions were included in the 1.10-beta.11 release, but accidentally
not committed with the other version bumps.
2020-02-26 15:38:16 -05:00
Ben Newman
a467255d9c Use IPC message to handle .reload command in meteor shell.
I considered using a nonzero process.exit code, but I didn't want to run
any risk of reusing a meaningful code, and the accepted range of codes
unfortunately does not include parseInt("reload", 36), or 1657112629.

Should fix #10934.
2020-02-26 12:13:48 -05:00
Christian Klaussner
c9fb850b75 Don't use deprecated REPLServer.rli property. (#10888)
This property is deprecated since Node.js 12.
https://github.com/nodejs/node/pull/26260
2020-01-30 10:29:53 -05:00
Ben Newman
37eb174612 Bump package versions for the official 1.8 release. :feelsgood: 2018-10-05 17:29:17 -04:00
Ben Newman
8ddd2f3eae Bump package versions for 1.8-rc.17 release. 2018-10-03 15:15:55 -04:00
Ben Newman
24e1c9f2e7 Bump package versions for 1.8-rc.16 release. 2018-09-18 17:27:34 -04:00
Ben Newman
6020a7c181 Bump package versions for 1.8-rc.15 release. 2018-09-18 14:47:52 -04:00
Ben Newman
1320cdb455 Bump package versions for 1.8-rc.14 release. 2018-09-13 12:46:10 -04:00
Ben Newman
bb72ba969f Bump package versions for 1.8-rc.13 release. 2018-09-13 12:04:36 -04:00
Ben Newman
b5208c7786 Bump package versions for 1.7.1-rc.12 release. 2018-09-12 12:56:21 -04:00
Ben Newman
210d1ac514 Bump package versions for 1.7.1-rc.11 release. 2018-09-11 14:02:00 -04:00
Ben Newman
3d4fb7a8ad Bump package versions for 1.7.1-rc.10 release. 2018-09-11 10:24:58 -04:00
Ben Newman
203829c4f8 Bump package versions for 1.7.1-rc.9 release. 2018-09-10 17:05:14 -04:00
Ben Newman
6134251621 Bump package versions for 1.7.1-rc.8 release. 2018-09-07 10:51:48 -04:00
Ben Newman
b1e44642fe Bump package versions for 1.7.1-rc.7 release. 2018-09-05 21:37:38 -04:00
Ben Newman
6bf22e668f Set cache directory correctly for meteor shell compilation.
Fixes #10189.
2018-09-05 14:32:08 -04:00
Ben Newman
c6bc841386 Bump package patch versions for minimongo and shell-server changes. 2017-12-02 17:49:56 -05:00
Jesse Rosenberger
aec76b766c Only import start from repl instead of the entire module.
It was previously necessary to have more from the `repl` module, but
it's sufficient to just have `start` now since we wrap the default
`eval`.
2017-11-30 19:57:00 +02:00
Jesse Rosenberger
0df8a5a516 Ensure that require and module are always set.
I previously had thought that a duplicate call to `setRequireAndModule`
encountered in code-path would no longer be necessary after some
consolidation in previous steps of this re-factor, but the test failure
seen here made it clear what was happening:

https://circleci.com/gh/meteor/meteor/12445

Specifically, if a module was imported in a piped command (that is to say,
when no TTY is present and the `evaluateAndExit` code-path is taken), as so:

    echo 'import { Meteor } from "meteor/meteor"' | meteor shell

...the `module` and `require` symbols were not set.  Conveniently, this is
the environment in effect when the `meteor self-test` suite is ran since
they do not have a TTY.

This moves the `setAndRequire` from the "interactive-only" function into
the general REPL setup and further harmonizes the code.
2017-11-28 18:35:04 +02:00
Jesse Rosenberger
724a801d70 Remove unnecessary setting of repl.context.
This is superfluous residue that I inadvertently created when splitting the
existing `startREPL` function into `setupREPL` and `enableInteractiveMode`.

The context is already set in `setupREPL` (to the exact same value as
here) by the time that this occurrence in `enableInteractiveMode` is called.
2017-11-28 18:31:26 +02:00
Jesse Rosenberger
c8b5f42d05 Modernization of shell-server package. 2017-11-28 16:58:11 +02:00
Jesse Rosenberger
e0682c553d Wrap default repl "eval" function, rather than duplicating logic.
Addresses feedback from @benjamn.

Rather than copying the `IsRecoverableError` and `isCodeRecoverable`
methods from the Node.js `repl` module source (in order to capture
so-called "Recoverable" errors), wrap the default "eval" function with
our relatively thin logic, thus avoiding the need to continually update
the definition of what's "recoverable" as Node's implementation evolves.
2017-11-28 16:55:27 +02:00
Jesse Rosenberger
15b24ff6d1 Again, correct the context of _ within meteor shell.
A truthy `useGlobal` option when calling Node's `repl.start()` will use
the `global` context, which will allow global Meteor variables (such as
the global `_` provided by the `underscore`) to be available in the context
of the REPL shell.  This sounds desirable, and in fact, the original
implementation set it as such, only to be later changed to `false` in
https://github.com/meteor/meteor/commit/7c7e52f2d2, specifically to
avoid the undesirable behavior of Node REPL stomping on the global `_`
variable with its own special-meaning `_` variable which is set to the
value of the most recently eval'd expression.

This was once again changed to `true` to fix the lost tab-completion
functionality, thanks to https://github.com/meteor/meteor/commit/2443d83226,
which also implelented special mutator on `_` to avoid breaking
it.  As it's probably clear now, this has been a struggle, and because
of Node using its own `Object.defineProperty('_', ...)` as of Node.js 6
(in https://github.com/nodejs/node/pull/5535/files), this problem has
surfaced again, as reported in https://github.com/meteor/meteor/issues/9276.

This changes the behavior to another implementation which starts with
`useGlobal` set to `false`, but then sets the context immediately to
`global`, which seems to avoid the problem.

It's possible that another option might be to set explicitly set the
`underscoreAssigned` attribute on the `repl` after starting it, however
since that's an internal, undocumented property, it might be best to avoid.

This does maintain the existing behavior of our special
double-underscore variable, in order to get the value of the last
REPL expression, in the same manner as `_` would in a normal REPL, by
accessing the internal `last` property.  Since this is also undocumented
(on our end), this seemed reasonable.
2017-11-22 01:12:22 +02:00
Jesse Rosenberger
545a7e1df2 Stop stripping parens from ES classes used in the REPL.
As Node.js 8 natively supports ECMAScript classes, this code shouldn't
be necessary anymore.
2017-11-21 22:28:40 +02:00
Jesse Rosenberger
5849af067b Use the (now) repl-exported Recoverable error.
In order to catch so-called "recoverable" REPL errors (for example,
commands in the process of being inputted which are syntax errors until
they are completed/recovered), it had previously been necessary to
intentionally cause such an error and save the error's prototype for
future use.

Node 6 changed this by exporting the Error directly from the `repl`
module, and this commit represents the changes necessary to remove that
(now unnecessary) behavior.

This also takes the opportunity to update the `isRecoverableError` (and
related) functions which had previously been borrowed from the `repl`
module source, to their newer versions.
2017-11-21 22:28:40 +02:00
Jesse Rosenberger
83eba20918 Remove unused _inTemplateLiteral stored on repl instance. 2017-11-21 22:28:40 +02:00
Ben Newman
0bff81f0b4 Bump package versions for the official 1.6 release. 2017-10-27 13:00:43 -04:00
Ben Newman
b63ab27986 Bump package versions for 1.6-rc.18 release. 2017-10-26 11:37:15 -04:00
Ben Newman
24c80da9ef Bump package versions for 1.6-rc.17 release. 2017-10-24 18:45:30 -04:00
Ben Newman
d317c29319 Bump package versions for 1.6-rc.16 release. 2017-10-20 16:13:31 -04:00
Ben Newman
6d528e334f Bump package versions for 1.6-rc.15 release. 2017-10-18 21:52:17 -04:00
Ben Newman
22930e876e Bump package versions for 1.6-rc.14 release. 2017-10-17 16:29:44 -04:00
Ben Newman
e2db34bdc5 Bump package versions for 1.6-rc.13 release. 2017-10-16 16:04:42 -04:00
Ben Newman
5a8c0f2743 Bump package versions for 1.6-rc.12 release. 2017-10-16 14:07:19 -04:00
Ben Newman
2777f5f6f7 Bump package versions for 1.6-rc.11 release. 2017-10-16 10:00:45 -04:00
Ben Newman
c476188cc6 Bump package versions for 1.6-rc.10 release. 2017-10-14 15:00:41 -04:00
Ben Newman
5d7058dc17 Bump package versions for 1.6-rc.9 release. 2017-10-13 13:54:47 -04:00
Ben Newman
fdaa0f5145 Bump package versions for 1.6-rc.8 release. 2017-10-12 17:42:21 -04:00
Ben Newman
3b93934217 Bump package versions for 1.6-rc.7 release. 2017-10-12 11:23:36 -04:00
Ben Newman
40ecbb27f2 Bump package versions for 1.6-rc.6 release. 2017-10-10 10:05:36 -04:00
Ben Newman
0c7f4b89a7 Bump package versions for 1.6-rc.5 release. 2017-10-08 20:04:53 -04:00
Ben Newman
25e0a54d4e Bump package versions for 1.6-rc.4 release. 2017-10-08 14:37:19 -04:00
Ben Newman
158b6ceb7e Bump package versions for 1.6-rc.3 release. 2017-10-03 12:13:43 -04:00