Skip to content
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 Pnpm support (follow-up of #162) #165

Merged
merged 16 commits into from
Sep 5, 2024
Merged

Add Pnpm support (follow-up of #162) #165

merged 16 commits into from
Sep 5, 2024

Conversation

cezaraugusto
Copy link
Member

@cezaraugusto cezaraugusto commented Sep 2, 2024

Follow-up PR of #162 after feedback reported in #162 (comment).

Screenshot 2024-09-03 at 00 20 34

@cezaraugusto cezaraugusto changed the title Add Pnpm (follow-up) Add Pnpm support (follow-up of #162) Sep 2, 2024
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
programs/develop/webpack/lib/utils.ts 60.00% 6 Missing ⚠️
Files with missing lines Coverage Δ
programs/develop/webpack/lib/utils.ts 67.91% <60.00%> (+4.34%) ⬆️

Copy link

pkg-pr-new bot commented Sep 2, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/extension-js/extension.js/extension@165
pnpm add https://pkg.pr.new/extension-js/extension.js/extension-develop@165
pnpm add https://pkg.pr.new/extension-js/extension.js/extension-create@165

commit: 9aaf238

@cezaraugusto cezaraugusto force-pushed the pnpm-support-2 branch 2 times, most recently from 9821ab0 to bea25c7 Compare September 3, 2024 03:25
@cezaraugusto cezaraugusto self-assigned this Sep 3, 2024
@cezaraugusto cezaraugusto marked this pull request as ready for review September 3, 2024 03:56
@cezaraugusto
Copy link
Member Author

@karlhorky can you please confirm if v2.0.0-alpha.18 works? that's what i run in the screenshot above

pnpx extension@2.0.0-alpha.18 create my-extension --template content-react

@karlhorky
Copy link

karlhorky commented Sep 3, 2024

@cezaraugusto if you can, as I mentioned in problems 2 and 3 make sure to also try pnpm tsc (to run the TypeScript compiler), both before and after adding a usage of the chrome global in background.ts

@cezaraugusto cezaraugusto force-pushed the pnpm-support-2 branch 2 times, most recently from dfd7bc3 to fc3944a Compare September 4, 2024 18:05
install-scripts.ts Fixed Show fixed Hide fixed
@cezaraugusto
Copy link
Member Author

cezaraugusto commented Sep 4, 2024

@karlhorky thanks for figuring out the issues! I went over your comment and recorded a video with a working sample. When you get a chance please let me know if it works for you too!

pnpx extension@2.0.0-alpha.22 create my-extension --template=content-react

issue147

@karlhorky
Copy link

karlhorky commented Sep 5, 2024

Nice!! Video looks mostly good, I noticed 2 things:

A) There was no testing of point 3 - using the chrome global in background.ts. here I added chrome.action.onClicked.addListener(() => {}) to background.ts and then ran pnpm tsc again, would be good to get that checked as well (maybe it's already working)
B) in the extension-env.d.ts, there are paths to ./node_modules/extension/... - I think you can use extension/... with those, without ./node_modules

@cezaraugusto
Copy link
Member Author

@karlhorky sure! made a sample extension here https://github.com/cezaraugusto/sample-background-action-type. Below is the recording.

issue147-2.mp4

cc @OSpoon if you get a chance to review this one as well

@karlhorky
Copy link

@cezaraugusto great, thanks! Added a GitHub Actions CI workflow to run pnpm tsc here:

@cezaraugusto
Copy link
Member Author

@karlhorky thanks for taking the time to follow up on this. the project has a lot of moving pieces, so it’s great to have your help. looking forward to your next contribution!

@cezaraugusto cezaraugusto merged commit 3d10394 into main Sep 5, 2024
13 of 14 checks passed
@cezaraugusto cezaraugusto deleted the pnpm-support-2 branch September 5, 2024 16:57
@karlhorky
Copy link

Thanks to you too! Great job 🙌

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.

2 participants