-
-
Notifications
You must be signed in to change notification settings - Fork 194
Refactor SendStream
to an ES6 class
#244
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
base: master
Are you sure you want to change the base?
Conversation
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.
I am generally 👍 on this. I want to spend a bit more time going through it in detail before I drop a ✅ since it is such a large change set.
var self = this | ||
|
||
debug('stat "%s"', path) | ||
fs.stat(path, function onstat (err, stat) { |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
var p = path + '.' + self._extensions[i++] | ||
|
||
debug('stat "%s"', p) | ||
fs.stat(p, function (err, stat) { |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
var p = join(path, self._index[i]) | ||
|
||
debug('stat "%s"', p) | ||
fs.stat(p, function (err, stat) { |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
this.stream(path, opts) | ||
} | ||
// pipe | ||
var stream = fs.createReadStream(path, options) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
user-provided value
This path depends on a
This PR refactors
SendStream
to an ES6 class, improving code organization, readability, and alignment with modern JavaScript practices. The functionality remains unchanged.