-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
chore: fix package preview #11542
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
chore: fix package preview #11542
Conversation
WalkthroughRemoved pnpm preparation from the PR preview GitHub Actions workflow. Updated package.json: conditioned Husky install for non-CI via is-ci, removed the --pnpm flag from the preview publish script, and added is-ci as a devDependency. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant GH as GitHub Actions (preview.yml)
participant Build as Build Step
participant Rel as Release Preview
Dev->>GH: Open PR / push
GH->>Build: Run build
note over GH,Build: Previously: pnpm prep step ran here (removed)
Build-->>GH: Build artifacts
GH->>Rel: Publish preview (uses configured package manager)
Rel-->>GH: Preview release completed
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a2fdb10 to
324dd0f
Compare
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @alumni is this PR still valid?
|
I didn't manage to fix the issues with package preview yet. Will try to come back when I have some time, if not I'll decline it. |
d7b5e34 to
b4ef7ad
Compare
b4ef7ad to
d4c35d3
Compare
commit: |
|
@gioboa @naorpeled I finally figured it out, the explanation is in the PR description. Basically |
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you help @alumni
|
🔥 |
Description of change
Fix
pkg-pr-newfailing because ofhusky.When using
npm,packis a protected command that cannot be changed. If you add a script calledpack, you can run it only withnpm run pack.The built-in
npm packcommand will invoke thepreparescript, which in our case was setting uphusky. Buthuskyfails to be setup because there's no.gitfolder in<root>/build/package, wherenpm packwas being executed.With
pnpmit was working becausepnpm packwill run thepackscript if it is defined instead of thepackcommand, so thepreparescript was not run.Pull-Request Checklist
masterbranchFixes #00000