Repository navigation
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
|
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 |
|
🔥 |
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