chore: standardize pnpm commands#591
Conversation
WalkthroughDockerfile build process updated to invoke Vite through Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Review: chore: standardize pnpm commands
README.md changes ✅
All pnpm run <script> → pnpm <script> changes are correct. pnpm run and pnpm are equivalent for running scripts — the shorthand is idiomatic pnpm.
Dockerfile — npx vite build → pnpm dlx vite build ❌
Dockerfile:34 — This change introduces a subtle but real bug.
npx and pnpm dlx are not equivalent when the package is already installed locally:
npx vite build— checksnode_modules/.binfirst, finds the locally installedvite@^7.1.3(pinned bypnpm-lock.yamlviapnpm install --frozen-lockfile), and runs it. Deterministic.pnpm dlx vite build— downloads the latestvitefrom the registry into a temp directory and runs it, ignoring the locally installed version. Non-deterministic. Could pull a breaking major version in the future.
The correct pnpm equivalent of npx <local-package> is pnpm exec, not pnpm dlx:
pnpm build:worker && pnpm exec vite buildOr even simpler — just use the build script which already does vite build:
pnpm build(Though note pnpm build also runs git-info and build:worker, so you'd drop the separate pnpm build:worker call. The Dockerfile already writes _gitCommit.ts manually, so using pnpm build directly would run git-info redundantly but harmlessly.)
TL;DR: Change pnpm dlx vite build → pnpm exec vite build to preserve the current behavior of using the lockfile-pinned vite version.
🤖 Reviewed by Arkana
c96728a to
8b03450
Compare
Deploying tmp-boltz-upstream-mainnet-arkade-wallet with
|
| Latest commit: |
8b03450
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f6dc5248.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev |
| Branch Preview URL: | https://standardize-pnpm.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev |
There was a problem hiding this comment.
Previous feedback addressed: pnpm dlx vite build → pnpm exec vite build ✅
All changes look correct:
- Dockerfile:34:
pnpm exec vite buildcorrectly uses the lockfile-pinned vite. Good. - README.md: All
pnpm run <script>→pnpm <script>shorthand changes are idiomatic and equivalent.
LGTM.
🤖 Reviewed by Arkana
Deploying wallet-mutinynet with
|
| Latest commit: |
8b03450
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4f096975.arkade-wallet.pages.dev |
| Branch Preview URL: | https://standardize-pnpm.arkade-wallet.pages.dev |
Deploying wallet-bitcoin with
|
| Latest commit: |
8b03450
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6d204043.wallet-bitcoin.pages.dev |
| Branch Preview URL: | https://standardize-pnpm.wallet-bitcoin.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Around line 114-116: The README mentions a non-existent "pnpm regtest" script;
update the docs to reference the actual npm scripts (regtest:start,
regtest:setup, regtest:stop, regtest:clean) or add a top-level "regtest" script
in package.json that chains the appropriate commands (e.g., run regtest:setup
then regtest:start) so the examples work; also remove the stray blockquote
marker causing the MD028 warning (remove the leading ">" on the affected line)
and apply the same fixes to the other occurrence of the same section.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9314d54e-499f-4882-906f-23bb36e0cc6b
📒 Files selected for processing (2)
DockerfileREADME.md
| ### `pnpm regtest` | ||
|
|
||
| Starts the regtest environment and sets up the arkd instance.\ |
There was a problem hiding this comment.
pnpm regtest is not a defined script in this repo.
Line 114 and Line 131 document pnpm regtest, but package.json defines only regtest:start, regtest:setup, regtest:stop, and regtest:clean. This will fail for readers. This section also has the MD028 blockquote warning (Line 132).
Suggested README fix
-### `pnpm regtest`
+### `pnpm regtest:start && pnpm regtest:setup`
Starts the regtest environment and sets up the arkd instance.\
Requires Docker to be installed and [Nigiri](https://nigiri.vulpem.com/) to be running with `--ln` flag.
@@
> note: e2e tests require a regtest environment to be running.
-> `pnpm regtest` to start and setup the regtest environment.
-
+> `pnpm regtest:start && pnpm regtest:setup` to start and setup the regtest environment.
+>
> note: e2e tests use playwright for ui testing, you may need to run
> `pnpm exec playwright install` once to download new browsers.Also applies to: 130-134
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 114 - 116, The README mentions a non-existent "pnpm
regtest" script; update the docs to reference the actual npm scripts
(regtest:start, regtest:setup, regtest:stop, regtest:clean) or add a top-level
"regtest" script in package.json that chains the appropriate commands (e.g., run
regtest:setup then regtest:start) so the examples work; also remove the stray
blockquote marker causing the MD028 warning (remove the leading ">" on the
affected line) and apply the same fixes to the other occurrence of the same
section.
| ### `pnpm run regtest` | ||
| ### `pnpm regtest` | ||
|
|
||
| Starts the regtest environment and sets up the arkd instance.\ |
There was a problem hiding this comment.
hi @gringokiwi, since you're already updating the docs here, would it be worth adding git submodule update --init --recursive right before the pnpm regtest setups? I noticed on a fresh clone that pnpm run regtest:start fails silently without it. just a thought to save new users some debugging.
Summary by CodeRabbit
Documentation
Chores