Skip to content
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

Merged
merged 5 commits into from
Nov 27, 2024
Merged

[fix] Small fixes #114

merged 5 commits into from
Nov 27, 2024

Conversation

yoannmoinet
Copy link
Member

What and why?

#112 introduced a bug in the sender of our telemetry plugin.

How?

  • Transform set into array right before sending metrics to DD.
  • Add some comments here and there.
  • Narrow down the entry filepath detection on xspack's build-report.

@yoannmoinet yoannmoinet marked this pull request as ready for review November 27, 2024 16:30
@yoannmoinet yoannmoinet requested a review from a team as a code owner November 27, 2024 16:30
@yoannmoinet yoannmoinet requested review from elbywan and Ayc0 and removed request for a team November 27, 2024 16:30
Comment on lines 371 to 372
// Only keep JS files.
.filter((f) => getType(f) === 'js')[0];
Copy link
Collaborator

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair

Copy link
Collaborator

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 |.
Copy link
Collaborator

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 |."

Copy link
Member Author

Choose a reason for hiding this comment

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

%3F is ? url encoded.

Copy link
Collaborator

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

@yoannmoinet yoannmoinet merged commit 8bbfb7c into master Nov 27, 2024
4 checks passed
@yoannmoinet yoannmoinet deleted the yoann/small-fixes branch November 27, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants