-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Refactor + chore cleanup #322
Open
lukekarrys
wants to merge
9
commits into
isaacs:main
Choose a base branch
from
lukekarrys:lk/refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lukekarrys
force-pushed
the
lk/refactor
branch
from
October 10, 2024 19:45
d1a59d7
to
ed1719a
Compare
This removes the need for checking test only environs in the bin script.
This removes the need for a separate platform.js file and test environ.
This refactors the `src/rimraf-*` files to use `fixEPERM` and `ignoreENOENT` everywhere possible. The biggest churn here is updating the test files to correctly mock the necessary FS functions that are now spread across multiple files.
lukekarrys
force-pushed
the
lk/refactor
branch
from
October 10, 2024 21:56
ed1719a
to
9e6fc9b
Compare
This was referenced Oct 10, 2024
lukekarrys
commented
Oct 11, 2024
const [major = 0, minor = 0] = process.version | ||
.replace(/^v/, '') | ||
.split('.') | ||
.map(v => parseInt(v, 10)) |
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.
@isaacs is it worth removing this version check is use-native
now that v14.14.0
is no longer supported by engines
?
cagmz
reviewed
Oct 24, 2024
if (isNaN(v)) { | ||
throw new Error('wat?', { cause: { list, v } }) | ||
} | ||
return sqrt(variance(list)) |
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.
Suggested change
return sqrt(variance(list)) | |
return sqrt(v) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Includes commits from #319 and #320 so I could benchmark this more easily.
I've spent some time experimenting with ways to fix #303 and ended up with a pile of refactor/chore commits that I think are useful in general.
The goal of this PR is to not make any behavior changes or regress performance, and also to allow for an easier and more comprehensive fix to #303.
I did benchmark this PR on my machine and it stayed mostly the same with a few % speedup in some rimraf functions:
Here's a high level overview of the changes:
t.intercept
across all the tests to remove the need for test only environs in the source