Skip to content

feat: Download and override private packages for Firefox code review - #507

Merged
aklinker1 merged 19 commits into
mainfrom
private-packages-2
Mar 1, 2024
Merged

aklinker1 merged 19 commits into
mainfrom
private-packages-2

Conversation

@aklinker1

@aklinker1 aklinker1 commented Feb 29, 2024 •

Copy link
Copy Markdown
Member

List package names in your wxt.config.ts, and WXT will download them and include them in the sources ZIP when running wxt zip -b firefox.

wxt/demo/wxt.config.ts

Lines 18 to 20 in d4867c1

zip: {
downloadPackages: ['sass'],
},

For this to work, regardless of the project's package manager in use, NPM must be installed and .npmrc must include registry auth tokens. npm pack <package-name> is always used to download the tarball, even if you use bun/pnpm/yarn.

Will also add overrides/resolutions to your package.json (in the ZIP, not the one on disk) so the downloaded modules are used instead of the local ones. Also supports if multiple versions of a dependency need downloaded.

This replaces #223, and closes #185.

Todo

  • Download and update resolutions
  • Support multiple versions of a downloaded package
  • Add E2E test
  • Try and move local_modules to .wxt/local_modules

@aklinker1 aklinker1 self-assigned this Feb 29, 2024
@netlify

netlify Bot commented Feb 29, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit c9da90d
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/65e1fe962146b100081ba849
😎 Deploy Preview https://deploy-preview-507--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov

codecov Bot commented Mar 1, 2024 •

Copy link
Copy Markdown

Codecov Report

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

Project coverage is 86.37%. Comparing base (b754435) to head (c9da90d).

Files Patch % Lines
src/core/package-managers/bun.ts 29.62% 19 Missing ⚠️
src/core/package-managers/types.ts 0.00% 5 Missing and 1 partial ⚠️
src/core/package-managers/yarn.ts 96.29% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #507      +/-   ##
==========================================
+ Coverage   85.92%   86.37%   +0.44%     
==========================================
  Files         106      111       +5     
  Lines        8429     8775     +346     
  Branches      817      862      +45     
==========================================
+ Hits         7243     7579     +336     
- Misses       1173     1182       +9     
- Partials       13       14       +1     

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

@aklinker1
aklinker1 marked this pull request as ready for review March 1, 2024 14:44
@aklinker1
aklinker1 merged commit 9ff90d0 into main Mar 1, 2024
@aklinker1
aklinker1 deleted the private-packages-2 branch March 1, 2024 16:17
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