Skip to content

test: invalid package.json causes error when require()ing in directory - #10044

Closed
samshull wants to merge 1 commit into
nodejs:masterfrom
samshull:error-require
Closed

test: invalid package.json causes error when require()ing in directory#10044
samshull wants to merge 1 commit into
nodejs:masterfrom
samshull:error-require

Conversation

@samshull

Copy link
Copy Markdown
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

Requiring a file from a directory that contains an invalid package.json
file should throw an error.

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@imyllerimyller added the module Issues and PRs related to the module subsystem. label Dec 1, 2016
@TrottTrott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Dec 2, 2016

@TrottTrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI is ✅ . Might be slightly better if the RegExp used ^ and $ to match the whole message, but I'm fine with this as is.

@Trott

Trott commented Dec 2, 2016

Copy link
Copy Markdown
Member

@cjihrigcjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to test the entire error message here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the benefit of full text message checking?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We treat changes to error messages as breaking changes. So, it's a good way to detect if anything changes.

@jasnelljasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit but LGTM

Requiring a file from a directory that contains an invalid package.json
file should throw an error.
@Trott

Trott commented Dec 7, 2016

Copy link
Copy Markdown
Member

I made the RegExp more strict. CI: https://ci.nodejs.org/job/node-test-pull-request/5282/

@italoacasas

Copy link
Copy Markdown

Landed in: 4f486aa

Thanks for the contribution

addaleax pushed a commit that referenced this pull request Dec 8, 2016
Requiring a file from a directory that contains an invalid package.json
file should throw an error.
PR-URL: #10044
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@italoacasasitaloacasas mentioned this pull request Dec 15, 2016
targos pushed a commit that referenced this pull request Dec 26, 2016
Requiring a file from a directory that contains an invalid package.json
file should throw an error.
PR-URL: #10044
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Dec 27, 2016
targos pushed a commit that referenced this pull request Dec 28, 2016
Requiring a file from a directory that contains an invalid package.json
file should throw an error.
PR-URL: #10044
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jan 23, 2017
Requiring a file from a directory that contains an invalid package.json
file should throw an error.
PR-URL: #10044
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
Requiring a file from a directory that contains an invalid package.json
file should throw an error.
PR-URL: #10044
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
Requiring a file from a directory that contains an invalid package.json
file should throw an error.
PR-URL: #10044
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
AdamMajer added a commit to AdamMajer/node that referenced this pull request Feb 28, 2020
OpenSSL 1.1.1d does not ship with getrandom syscall being
predefined on all architectures. So when NodeJS is run with glibc
prior to 2.25, where getentropy is unavailable, and the getrandom
syscall is unknown, it will fail. PPC64LE or s390 are affected
by lack of this definition.
Original commit message.
commit 4dcb150ea30f9bbfa7946e6b39c30a86aca5ed02
Author: Kurt Roeckx <kurt@roeckx.be>
Date: Sat Sep 28 14:59:32 2019 +0200
Add defines for __NR_getrandom for all Linux architectures
Fixes: nodejs#10015
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
GH: nodejs#10044Fixes: nodejs#31671
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.moduleIssues and PRs related to the module subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@samshull@Trott@italoacasas@jasnell@cjihrig@MylesBorins@imyller@targos@nodejs-github-bot