| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
CI: https://ci.nodejs.org/job/node-test-pull-request/12288/ |
Sorry, something went wrong.
| fs.exists = function(path, callback) { | ||
| if (handleError((path = getPathFromURL(path)), cb)) | ||
| return; | ||
| if (typeof path !== 'string' && !(path instanceof Buffer)) { |
There was a problem hiding this comment.
Should these type checks be placed at the beginning of these methods?
Sorry, something went wrong.
There was a problem hiding this comment.
@starkwang No because the check must happen after getPathFromURL(path) is called. The path may be a string, a Buffer, or a URL-like object.
Sorry, something went wrong.
|
New ARM CI: https://ci.nodejs.org/job/node-test-commit-arm-fanned/13629/ |
Sorry, something went wrong.
|
This is not semver-major itself, it just fixes regressions in #17667 which is semver-major. So added dont land labels instead. |
Sorry, something went wrong.
|
:/ ... ah, right, technically speaking the previous behavior is "throwing old-style type errors", so this is still semver-major. @nodejs/tsc this needs one more TSC approval to land, please review |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
fs
Refs: #17667
#17667 didn't include the path validation of these methods in JS land, so passing undefined as paths to them would go straight to assertions, which caused CITGM regression https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1165/ . This PR fixes that by adding those validations back.