| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This wouldn't be necessary.
Sorry, something went wrong.
There was a problem hiding this comment.
Do you mean the comment, or the 'foo' dep too?
Sorry, something went wrong.
There was a problem hiding this comment.
The “foo” dep… and as a result the comment too.
Sorry, something went wrong.
There was a problem hiding this comment.
nit: I don't think we ever use the $e convention. err is fine.
Sorry, something went wrong.
There was a problem hiding this comment.
Damn, sorry, too much PHP lately I think...
Sorry, something went wrong.
There was a problem hiding this comment.
To avoid comparing things to the empty string this could be refactored as:
let path;
try {
path = require.resolve(m);
} catch (err) {
continue;
}
assert.notStrictEqual(path, m);Nice trick with require.resolve though :)
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks! Correcting ASAP.
All credit should go to @Trott though ;)
Sorry, something went wrong.
|
Done! Thanks! |
Sorry, something went wrong.
There was a problem hiding this comment.
Two small nits:
Sorry, something went wrong.
There was a problem hiding this comment.
True! It's done
Sorry, something went wrong.
There was a problem hiding this comment.
Nit: Maybe restore the error message checking in the catch block?
assert.ok(err.toString().startsWith('Error: Cannot find module ')`
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for doing this!
Sorry, something went wrong.
Sorry, something went wrong.
Test test-require-deps-deprecation.js was failing when user already had node installed with acorn in require.resolve range. Modified test to acknowledge the possibility and throw only if acorn is found in the deps directory. Fixes: nodejs#17148 Refs: nodejs#17148 (comment)
|
Done! Thanks! |
Sorry, something went wrong.
There was a problem hiding this comment.
Missing period
Sorry, something went wrong.
There was a problem hiding this comment.
I’d still like to see a continue here to avoid unneeded assertion in the following line.
Sorry, something went wrong.
Fix following review. Reinstated assertion on error message, and corrected comment. Leaving continu to break loop and avoid unneeded assertions. Fixes: nodejs#17148 Refs: nodejs#17148 (comment)
|
Sorry for the delay, I was traveling! |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. Thanks for staying with this through the back and forth. I think the comment doesn't disappear as it is technically on a line that still exists in its entirety.
Sorry, something went wrong.
Sorry, something went wrong.
|
Are these tests know to be this long/to fail, or is there some thing I can fix on my end? |
Sorry, something went wrong.
|
CI failures are unrelated. |
Sorry, something went wrong.
Sorry, something went wrong.
Test test-require-deps-deprecation.js was failing when user already had node installed with acorn in require.resolve range. Modified test to acknowledge the possibility and throw only if acorn is found in the deps directory. PR-URL: #17848 Fixes: #17148 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
This does not land cleanly on v9.x, could it be backported? |
Sorry, something went wrong.
|
If it's something I can do myself, I'll gladly give it a try! |
Sorry, something went wrong.
|
@Tiriel thanks! The goal would be to checkout a new branch based on upstream/v9.x-staging and one of:
See https://github.com/nodejs/node/blob/master/doc/guides/backporting-to-release-lines.md for the full guide. |
Sorry, something went wrong.
|
Thanks, I was precisely reading this guide and following it 😄 I'll try these solutions in this order. |
Sorry, something went wrong.
Test test-require-deps-deprecation.js was failing when user already had node installed with acorn in require.resolve range. Modified test to acknowledge the possibility and throw only if acorn is found in the deps directory. Also changed the deprecation test for v9.x: common.expectWarning was failing because the required deps now throw ReferenceErrors when not properly called internally in the right order. PR-URL: nodejs#17848 Fixes: nodejs#17148 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Test test-require-deps-deprecation.js was failing when user already had node installed with acorn in require.resolve range. Modified test to acknowledge the possibility and throw only if acorn is found in the deps directory. Also changed the deprecation test for v9.x: common.expectWarning was failing because the required deps now throw ReferenceErrors when not properly called internally in the right order. Bacport-PR-URL: #18077 PR-URL: #17848 Fixes: #17148 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Merry christmas!
Test test-require-deps-deprecation.js was failing when user already had node
installed with acorn in require.resolve range.
Modified test to acknowledge the possibility and throw only if acorn is
found in the deps directory.
Fixes: #17148
Refs: #17148 (comment)
Checklist
Affected core subsystem(s)
test