Skip to content

feat: Download private packages when zipping sources - #223

Closed
aklinker1 wants to merge 7 commits into
mainfrom
private-packages
Closed

aklinker1 wants to merge 7 commits into
mainfrom
private-packages

Conversation

@aklinker1

@aklinker1 aklinker1 commented Nov 8, 2023 •

Copy link
Copy Markdown
Member

This closes #185. It only adds support for npm, pnpm, and bun. Yarn doesn't seem to expose the URLs of package tarballs, so it can't be accomplished with the same list command as the others. There are other approaches (like parsing the yarn.lock file), but I won't try them out now.

  • Find private packages
  • Download private packages
  • Add version resolutions to package.json inside ZIP
  • E2E tests

@aklinker1 aklinker1 self-assigned this Nov 8, 2023
@netlify

netlify Bot commented Nov 8, 2023 •

Copy link
Copy Markdown

❌ Deploy Preview for creative-fairy-df92c4 failed.

Name Link
🔨 Latest commit 3764cfa
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/65df943f9a779d00081eee85

@codecov

codecov Bot commented Nov 8, 2023 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 68.12500% with 102 lines in your changes are missing coverage. Please review.

Project coverage is 64.37%. Comparing base (45b7d7c) to head (1880c37).
Report is 1 commits behind head on main.

❗ Current head 1880c37 differs from pull request most recent head 3764cfa. Consider uploading reports for the commit 3764cfa to get more accurate results

Files Patch % Lines
src/core/zip.ts 24.32% 56 Missing ⚠️
src/core/utils/private-packages.ts 81.01% 15 Missing ⚠️
src/core/utils/package-manager/index.ts 60.60% 13 Missing ⚠️
src/core/utils/package-manager/yarn.ts 33.33% 10 Missing ⚠️
src/core/utils/package-manager/bun.ts 45.45% 6 Missing ⚠️
src/core/utils/package-manager/pnpm.ts 95.55% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #223       +/-   ##
===========================================
- Coverage   86.18%   64.37%   -21.82%     
===========================================
  Files         105       82       -23     
  Lines        8312     6195     -2117     
  Branches      814      496      -318     
===========================================
- Hits         7164     3988     -3176     
- Misses       1135     2170     +1035     
- Partials       13       37       +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

].flat();
},

addResolutions(packageJson, entries) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Add unit tests for all addResolutions

@aklinker1

Copy link
Copy Markdown
Member Author

Looks like npm pack <module-name> can be used to download a module, so that simplifies things quite a bit

@aklinker1

Copy link
Copy Markdown
Member Author

Closing in favor of #507

@aklinker1 aklinker1 closed this Feb 29, 2024
@aklinker1
aklinker1 deleted the private-packages branch April 13, 2026 05:26
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.

Download private packages for Firefox code review

1 participant