-
Notifications
You must be signed in to change notification settings - Fork 5
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
[fix] Small fixes #114
[fix] Small fixes #114
Conversation
// Only keep JS files. | ||
.filter((f) => getType(f) === 'js')[0]; |
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.
To note: if you use filter
to then return the 1st element, you may want to use .find
instead
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.
Fair
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.
This will avoid creating a new array
@@ -22,6 +22,7 @@ import path from 'path'; | |||
const EXTENSION_RX = /\.(?!.*(?:\.|\/|\\))(\w{1,})/g; | |||
|
|||
// Will match any type of query characters. | |||
// ? or %3F or |. |
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.
what is %3F
?
Also you should remove the .
from this comment as I first understood that as "will match |.
"
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.
%3F
is ?
url encoded.
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.
You may want to write this in the comment, as otherwise it's basically just re-writing the regex but in natural language
What and why?
#112 introduced a bug in the sender of our telemetry plugin.
How?