[No QA] fix: Remove runPrettier.sh wrapper and disable experimental CLI cache#83374
Conversation
The runPrettier.sh wrapper was created to clear a poisoned prettier cache on failure and retry. However, the experimental CLI's cache can become silently stale without triggering a failure, making this approach unreliable. Replace the wrapper with a direct prettier invocation using --no-cache to avoid cache-related issues entirely. - Replace ./scripts/runPrettier.sh with direct prettier command - Add --no-cache to all prettier invocations (npm scripts and hooks) - Delete the now-unused runPrettier.sh script Co-authored-by: Rory Abraham <roryabraham@users.noreply.github.com>
|
npm has a |
|
@hoangzinh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@hoangzinh I don't think this needs C+ review |
|
The failing Root cause: Evidence that it's unrelated:
Fix for the mock (separate from this PR): Change line 1 of import {PERMISSIONS} from 'react-native-permissions/dist/commonjs/permissions';
import {RESULTS} from 'react-native-permissions/dist/commonjs/results'; |
…CacheWrapper Co-authored-by: Rory Abraham <roryabraham@users.noreply.github.com>
|
@hoangzinh @roryabraham One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Fixed the failing Root cause: The The other failing check ( |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.26-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.3.26-8 🚀
|
Explanation of Change
The
scripts/runPrettier.shwrapper was created to clear a poisoned prettier cache on failure and retry. However, the experimental CLI (--experimental-cli) enables caching by default (unlike the legacy CLI which defaults to no cache), and a poisoned cache doesn't cause prettier to fail —--writealways exits 0. This means the wrapper's retry logic never actually triggers for the cache staleness issue it was designed to handle.This PR removes the wrapper script entirely and invokes prettier directly with
--no-cacheto avoid cache-related issues. All prettier invocations (npm run prettier,prettier-changed,prettier-watch, and the Claude Code post-tool-use hook) are updated consistently.Fixed Issues
$ #83352
PROPOSAL: #83352 (comment)
Tests
npm run prettierand verify it invokes prettier directly (no shell script wrapper)npm run prettier -- --log-level errorand verify it passes extra args correctlyscripts/runPrettier.shno longer existsnpm run prettier -- --log-level errorwhich now goes directly to prettier)Offline tests
N/A — this is a developer tooling change, not a runtime change.
QA Steps
[No QA] — this change only affects developer tooling (prettier formatting scripts) and CI workflows. There are no runtime code changes.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — tooling-only change, no UI impact.
Android: mWeb Chrome
N/A — tooling-only change, no UI impact.
iOS: Native
N/A — tooling-only change, no UI impact.
iOS: mWeb Safari
N/A — tooling-only change, no UI impact.
MacOS: Chrome / Safari
N/A — tooling-only change, no UI impact.