GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — repl: fix require('3rdparty') regression by bnoordhuis · Pull Request #4215 · nodejs/node

Conversation

@bnoordhuis

@bnoordhuis bnoordhuis commented Dec 9, 2015

Copy link
Copy Markdown
Member

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/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bnoordhuis bnoordhuis added the repl Issues and PRs related to the REPL subsystem. label Dec 9, 2015
@bnoordhuis bnoordhuis mentioned this pull request Dec 9, 2015
v5.2.0: require doesn't work in REPL #4208
Closed
silverwind
silverwind reviewed Dec 9, 2015
View reviewed changes
Comment thread test/parallel/test-repl-require.js Outdated

@silverwind silverwind Dec 9, 2015

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@silverwind

silverwind commented Dec 9, 2015

Copy link
Copy Markdown
Contributor

LGTM.

The repl/node_modules lookup I mentioned earlier is already present in <5.2 so i'm fine with keeping it, whatever its purpose might be :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind silverwind added the relnotes label Dec 9, 2015
@silverwind

silverwind commented Dec 9, 2015

Copy link
Copy Markdown
Contributor

@nodejs/release we should follow up with a quick patch release once this has landed, as the bug made the REPL pretty much unuseable.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis
repl: fix require('3rdparty') regression
213ede6
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 <[email protected]>
@bnoordhuis
bnoordhuis force-pushed the fix4208 branch from 308f01a to 213ede6 Compare December 9, 2015 22:30
@bnoordhuis bnoordhuis closed this Dec 9, 2015
@bnoordhuis
bnoordhuis deleted the fix4208 branch December 9, 2015 22:31
@bnoordhuis
bnoordhuis merged commit 213ede6 into nodejs:master Dec 9, 2015
@bnoordhuis

bnoordhuis commented Dec 9, 2015

Copy link
Copy Markdown
Member Author

Landed with the suggested style fix-up in 213ede6. Thanks for the review, @silverwind.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis bnoordhuis added the land-on-v5.x label Dec 9, 2015
@bnoordhuis bnoordhuis mentioned this pull request Dec 9, 2015
module,repl: remove repl require() hack #4026
Merged
@evanlucas evanlucas mentioned this pull request Dec 11, 2015
[5.2.0] REPL - module.paths empty #4240
Closed
@cjihrig cjihrig mentioned this pull request Dec 12, 2015
REPL requires fail on package resolve #4257
Closed
@MylesBorins MylesBorins added the lts-watch-v4.x label Dec 15, 2015
This was referenced Dec 15, 2015
v5.3.0 Release Proposal (Stable) #4281
Closed
repl: attach location info to syntax errors #4013
Merged
bnoordhuis added a commit that referenced this pull request Dec 15, 2015
@bnoordhuis @cjihrig
repl: fix require('3rdparty') regression
1999fdc
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 <[email protected]>
cjihrig added a commit that referenced this pull request Dec 15, 2015
@cjihrig
2015-12-15, Version 5.3.0 (Stable)
ea5f3ab
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
cjihrig added a commit that referenced this pull request Dec 16, 2015
@cjihrig
2015-12-16, Version 5.3.0 (Stable)
b21110f
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
cjihrig added a commit that referenced this pull request Dec 16, 2015
@cjihrig
2015-12-16, Version 5.3.0 (Stable)
e5774c9
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
@ljharb ljharb mentioned this pull request Dec 16, 2015
Release a v5.2.1? #4316
Closed
@rvagg rvagg mentioned this pull request Dec 17, 2015
Release 4.2.4 Planning #4321
Closed
@reqshark reqshark mentioned this pull request Dec 19, 2015
requires not working on node v5.2.0 JustinTulloss/zeromq.node#481
Closed
This was referenced Dec 29, 2015
child_process.flushStdio: resume _consuming streams #4071
Closed
Repl Changes to LTS blocked #4472
Closed
cjihrig pushed a commit to cjihrig/node that referenced this pull request Jan 7, 2016
@bnoordhuis @cjihrig
repl: fix require('3rdparty') regression
82c9778
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 <[email protected]>
@MylesBorins MylesBorins removed the lts-watch-v4.x label Jan 7, 2016
@MylesBorins

MylesBorins commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

@Fishrock123 I'm removing the land-on-v5.x label as it landed in v5.3.0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MylesBorins MylesBorins removed the land-on-v5.x label Jan 7, 2016
@Fishrock123

Fishrock123 commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

@thealphanerd I don't really pay attention to that anyways. The dont-land-on label(s) are much better for Stable branches since we basically just land everything that applies and isn't breaking and doesn't have that label.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MylesBorins MylesBorins added the land-on-v4.x label Jan 13, 2016
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
@bnoordhuis Myles Borins
repl: fix require('3rdparty') regression
41882e4
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 <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jan 19, 2016
V4.2.5 proposal #4768
Merged
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
@bnoordhuis Michael Scovetta
repl: fix require('3rdparty') regression
17d505d
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 <[email protected]>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
@cjihrig Michael Scovetta
2015-12-16, Version 5.3.0 (Stable)
c74c53a
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

repl Issues and PRs related to the REPL subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@bnoordhuis @silverwind @MylesBorins @Fishrock123
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.