-
Notifications
You must be signed in to change notification settings - Fork 30k
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
repl: fix require('3rdparty') regression #4215
Conversation
conn.write('require("baz")\n.exit\n'); | ||
}); | ||
|
||
var answer = ''; |
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.
Tiny nit: while answer
gets hoisted, It'd be more clear if you move this above the server.listen
block.
LGTM. The |
@nodejs/release we should follow up with a quick patch release once this has landed, as the bug made the REPL pretty much unuseable. |
Fix module loading of third-party modules in the REPL by inheriting module.paths from the REPL's parent module. Commit ee72ee7 ("module,repl: remove repl require() hack") introduced a regression where require() of modules in node_modules directories no longer worked in the REPL (and fortunately only in the REPL.) It turns out we didn't have test coverage for that but we do now. Fixes: nodejs#4208 PR-URL: nodejs#4215 Reviewed-By: Roman Reiss <me@silverwind.io>
Landed with the suggested style fix-up in 213ede6. Thanks for the review, @silverwind. |
Fix module loading of third-party modules in the REPL by inheriting module.paths from the REPL's parent module. Commit ee72ee7 ("module,repl: remove repl require() hack") introduced a regression where require() of modules in node_modules directories no longer worked in the REPL (and fortunately only in the REPL.) It turns out we didn't have test coverage for that but we do now. Fixes: #4208 PR-URL: #4215 Reviewed-By: Roman Reiss <me@silverwind.io>
Notable changes: * domains: - Fix handling of uncaught exceptions. (Julien Gilli) #3654. * https: - Added support for disabling session caching. (Fedor Indutny) #4252. * repl: - Allow third party modules to be imported using require(). This corrects a regression from 5.2.0. (Ben Noordhuis) #4215. * deps: - Upgrade libuv to 1.8.0. (Saúl Ibarra Corretgé) #4276. PR-URL: #4281
Notable changes: * buffer: - Buffer.prototype.includes() has been added to keep parity with TypedArrays. (Alexander Martin) #3567. * domains: - Fix handling of uncaught exceptions. (Julien Gilli) #3654. * https: - Added support for disabling session caching. (Fedor Indutny) #4252. * repl: - Allow third party modules to be imported using require(). This corrects a regression from 5.2.0. (Ben Noordhuis) #4215. * deps: - Upgrade libuv to 1.8.0. (Saúl Ibarra Corretgé) #4276. PR-URL: #4281
Notable changes: * buffer: - Buffer.prototype.includes() has been added to keep parity with TypedArrays. (Alexander Martin) #3567. * domains: - Fix handling of uncaught exceptions. (Julien Gilli) #3654. * https: - Added support for disabling session caching. (Fedor Indutny) #4252. * repl: - Allow third party modules to be imported using require(). This corrects a regression from 5.2.0. (Ben Noordhuis) #4215. * deps: - Upgrade libuv to 1.8.0. (Saúl Ibarra Corretgé) #4276. PR-URL: #4281 Conflicts: src/node_version.h
Fix module loading of third-party modules in the REPL by inheriting module.paths from the REPL's parent module. Commit ee72ee7 ("module,repl: remove repl require() hack") introduced a regression where require() of modules in node_modules directories no longer worked in the REPL (and fortunately only in the REPL.) It turns out we didn't have test coverage for that but we do now. Fixes: nodejs#4208 PR-URL: nodejs#4215 Reviewed-By: Roman Reiss <me@silverwind.io>
@Fishrock123 I'm removing the land-on-v5.x label as it landed in v5.3.0 |
@thealphanerd I don't really pay attention to that anyways. The |
Fix module loading of third-party modules in the REPL by inheriting module.paths from the REPL's parent module. Commit ee72ee7 ("module,repl: remove repl require() hack") introduced a regression where require() of modules in node_modules directories no longer worked in the REPL (and fortunately only in the REPL.) It turns out we didn't have test coverage for that but we do now. Fixes: #4208 PR-URL: #4215 Reviewed-By: Roman Reiss <me@silverwind.io>
Fix module loading of third-party modules in the REPL by inheriting module.paths from the REPL's parent module. Commit ee72ee7 ("module,repl: remove repl require() hack") introduced a regression where require() of modules in node_modules directories no longer worked in the REPL (and fortunately only in the REPL.) It turns out we didn't have test coverage for that but we do now. Fixes: nodejs#4208 PR-URL: nodejs#4215 Reviewed-By: Roman Reiss <me@silverwind.io>
Notable changes: * buffer: - Buffer.prototype.includes() has been added to keep parity with TypedArrays. (Alexander Martin) nodejs#3567. * domains: - Fix handling of uncaught exceptions. (Julien Gilli) nodejs#3654. * https: - Added support for disabling session caching. (Fedor Indutny) nodejs#4252. * repl: - Allow third party modules to be imported using require(). This corrects a regression from 5.2.0. (Ben Noordhuis) nodejs#4215. * deps: - Upgrade libuv to 1.8.0. (Saúl Ibarra Corretgé) nodejs#4276. PR-URL: nodejs#4281 Conflicts: src/node_version.h
Fix module loading of third-party modules in the REPL by inheriting
module.paths from the REPL's parent module.
Commit ee72ee7 ("module,repl: remove repl require() hack") introduced
a regression where require() of modules in node_modules directories
no longer worked in the REPL (and fortunately only in the REPL.)
It turns out we didn't have test coverage for that but we do now.
Fixes: #4208
R=@silverwind?
CI: https://ci.nodejs.org/job/node-test-pull-request/969/