-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add support for pnpm (#117) #120
Conversation
c177bdc
to
b47c59c
Compare
b47c59c
to
3df3708
Compare
Current status of the tests: ✅ NPM: passing
❌ YARN w/ windows or ubuntu:
A lot of the yarn failures are things like:
|
Cool thanks for looking into this. I'll do my best to take a look by this weekend. Approving CI in the meantime. My main target is supporting npm since its what ships with node. Yarn and pnpm support is definitely best effort. If this works for the most part, but a few random tests fail in yarn/pnpm mode, I don't mind adding skips in those cases, so long as the npm side doesn't loose coverage. Sometimes its just not worth someones time to figure out edge cases like that unless they are important. |
I figured as much, but I wanted to stave off possible issues in new versions not being detected :) My current approach is to confirm that a given functionality is not available in either pnpm or yarn when it fails. If the functionality is not present, then skip the tests on that package manager. Unfortunately, it's kinda tricky to confirm that; I couldn't find a good table/resource that showed which commands are different or what functionality was not present, (and the pnpm docs don't really say "we don't do this thing that npm does" for the most part... notable exception being running arbitrary 'pre' scripts, which there's a config override for) so I'm mostly having to try and reverse engineer the tests into terminal commands that I can run. I noticed with yarn that if I did stuff like Here's the most recent run (same as in the OP) https://github.com/kinland/npm-run-all2/actions/runs/6350407589 |
Ok these changes look acceptable, however the one thing I wish to change is that we should stay within the async context and not add sync io inside of the promise. I know it adds some ugly code overhead, however mixing the two can lead to confusing bugs and errors, sometimes even the fault of the runtime.
Right, this all characteristic of the "drop in replacement" marketing myth used around alternative tooling. These differences tend to get buried on purpose.
Honestly, I don't care about yarn at all. It offers no advantages over npm at this point, has wasted countless hours due to its subtle undocumented differences and is essentially abandonware now. The best thing that project could do would be to deprecate the v1 that everyone still uses and tell everyone to use berry or whatever. I'm open to removing yarn support if someone PRd it. I'll put together a patch to adjust that one thing. |
This solves the issue I reported in #117
I have another branch where I am testing an updated test action.
Some of the tests are failing with
pnpm
andyarn
because they don't have the exact feature set ofnpm
. I'm out of steam to dig deeper tonight, but if I get the test suite running fully with appropriate tests disabled, I will open a second PR (or, if you haven't had time to review this yet, I'll add to this PR).