unjs / nypm

๐ŸŒˆ Unified Package Manager for Node.js and Bun
MIT License
437 stars 13 forks source link

feat: add option to install dependencies with a frozen lockfile #121

Closed RyanClementsHax closed 1 week ago

RyanClementsHax commented 3 months ago

๐Ÿ”— Linked issue

Closes #115

โ“ Type of change

๐Ÿ“š Description

Closes #115

๐Ÿ“ Checklist

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.

Project coverage is 72.51%. Comparing base (660392f) to head (8c6b5f3). Report is 25 commits behind head on main.

Files Patch % Lines
src/cli.ts 0.00% 4 Missing :warning:

:exclamation: There is a different number of reports uploaded between BASE (660392f) and HEAD (8c6b5f3). Click for more details.

HEAD has 1 upload less than BASE | Flag | BASE (660392f) | HEAD (8c6b5f3) | |------|------|------| ||3|2|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #121 +/- ## ========================================== - Coverage 82.17% 72.51% -9.66% ========================================== Files 6 6 Lines 516 655 +139 Branches 71 85 +14 ========================================== + Hits 424 475 +51 - Misses 91 177 +86 - Partials 1 3 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

RyanClementsHax commented 3 months ago

The root error in CI seems to be this failing test that only failed on windows. The second test that failed errored because it depended on this test succeeding.

   โฏ test/api-workspace.test.ts > api > yarn-classic-workspace > adds dependency to the workspace root
     โ†’ Command failed with exit code 1: corepack yarn -W add pathe
Internal Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\runneradmin\AppData\Local\node\corepack\yarn\1.22.19\lib'

I checked locally on my windows machine if this was a reproducible problem and it doesn't seem to be. The internet seems to consider this error as ephemeral and solved by deleting node_modules and reinstalling.

I'm inclined to rerun the action because of this and the install command isn't run on the workspace fixtures. What do you think @pi0?

Also, I'd be happy to add install tests to the workspace tests. Given their lack, I wanted to see what the reasoning was for there not being any before adding them.