-
Notifications
You must be signed in to change notification settings - Fork 45
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
chore: support tests on win32 #408
base: main
Are you sure you want to change the base?
Conversation
There were significant changes between 18.0.6 and 19.0.1 which I did not have on my system (I should have rebased before). Moving to draft until I resolve those. |
If you remove this line and run Fun fact: that flag was first added to template-oss because of this repo. |
This is quite a big undertaking. Even if we only get partway there it'll be worth landing changes that get us closer. If we can't get tests 100% working in windows we won't be able to enable them in CI, but it'll still be worth "moving the needle" a bit to get closer. |
The const me = t.testdir({
repo: {},
cache: {},
}) to the end of the test file in:
|
The missing coverage in file.js is something we'll need to dig into a little deeper. If there is missing coverage in windows that means we are likely missing something, and the code needs to be cleaned up in some way. Can you explain this one in more depth? What code path is missed? What ends up happening in windows when that function runs? |
This is a decent way to fix the EBUSY errors in Windows when using a tap that uses libtap https://github.com/isaacs/rimraf/blob/main/libtap-settings.js Getting pacote onto the latest tap is one of our follow-up tasks for npm 11. |
Thanks for all the feedback. Looks like It seems If this PR becomes too much, I will split it up. |
Just a heads up that we're landing a breaking change soon. So far it doesn't look like this PR will merge conflict with it, but if it does and you want help sorting it out let us know. |
This was driving me nuts but here's an interesting find: AFAICT, tests based on I think I skipped the |
The
pacote
tests don't run on Windows (surprisingly). Ergo, Windows is not included in ci.This PR ports the test cases to
win32
... almost 😃helpers/clean-snapshots.js
{VAR}
instead of${VAR}
as placeholdersscript.js
intohelpers/script-mode.js
(see below)Tests
node: 20.15.1
npm: 10.8.2
win: 10.0.19045.0
Just one failure in
git.js
. The two skips are the helpers (see above).Coverage
Almost complete
Open Issues
script.js
On my Windows 10,
script.js
is set to0o666
which stands for standard r/w access but is not executable. This difference is also responsible for the missing line in coverage offile.js
. Should this be mocked to match Unix0o111
? How?I want to avoid this change in
lib\util\npm.js
(the only one outside of/test/
). Is there a better way? How do other npm modules handle this on Windows?There's one case that I can't solve in
git.js
. Any ideas?