-
Notifications
You must be signed in to change notification settings - Fork 71
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
Use @antfu/ni
to support pnpm
for Storybook build
#789
Conversation
AP-2652 Support pnpm in our CLI
WhatWhen running patch builds we run yarn or npm on the user's behalf. This ticket pertains to running WhyUsers who are running HowWe'd probably just need to replace or rewrite the |
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.
Largely looks good to me. Few notes to help improve understanding.
Also, looking at the larger picturr of pnpm support, shouldn't we also add the pnpm lockfile as file that TurboSnap bails on?
fac43da
to
8a4df55
Compare
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.
LGTM. We'll follow up with PNPM + TurboSnap.
This has been released as 7.0.0-canary.0 available under the Before we can release this as final, we should ask some customers to give it a try, and do extensive QA on it ourselves. Perhaps the Storybook team could use it. |
Hi! How can we help to test if pnpm works? If I install the canary version the build step of chromatic-cli still uses npm. |
6721fc6
to
54d4958
Compare
@antfu/ni
to resolve build command@antfu/ni
support pnpm for storybook build
@antfu/ni
support pnpm for storybook build@antfu/ni
to support pnpm for storybook build
@antfu/ni
to support pnpm for storybook build@antfu/ni
to support pnpm
for storybook build
@antfu/ni
to support pnpm
for storybook build@antfu/ni
to support pnpm
for Storybook build
Released as |
@glancel Could you give |
@ghengeveld It works great! I haven't tested the Github Action yet but the rest works great without any additional configuration!! Thanks a lot |
@ghengeveld I'm trying to use the github action but I get the chromaui/action-next do not exist: name: 'Chromatic'
on:
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- 'main'
env:
NODE_VERSION: "18.x"
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Install dependencies
run: pnpm install
- name: Publish to Chromatic
uses: chromaui/action-next
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} Do you happen to know why this is happening? |
I think you needed |
hey @thafryer , is there any status update about this topic? We are actually hitting a blocker by Chromatic not supporting TurboSnap in our current pnpm setup :( |
Rather than rolling our own package manager script runner logic, use
@antfu/ni
to handle it for us. This adds support for pnpm and Bun, sinceni
supports those too.Note: an enhancement would be to upgrade Execa to the same version
ni
uses, but I did not go down that road yet because it upgraded to ESM and therefore isn't compatible with our current Jest config. I'd love to fix that but it would be a larger undertaking.