Extract `dev clean` logic to a service file
WHY are these changes introduced?
To improve error handling when stopping app previews and to refactor the dev clean functionality into a service.
WHAT is this pull request doing?
- Extracts the app preview cleanup logic from the
DevCleancommand into a new service functiondevClean - Adds proper error handling for the
devSessionDeleteAPI call - Improves the success message formatting with proper command styling
How to test your changes?
- Create an app preview with
shopify app dev - Run
shopify app dev cleanto stop the preview - Verify that the success message is properly formatted
- Try to reproduce an error scenario (if possible) to verify the error handling works correctly
Measuring impact
How do we know this change was effective? Please choose one:
- [x] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
Checklist
- [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
- [x] I've considered possible documentation changes
-
#5757
π (View in Graphite)
-
main
This stack of pull requests is managed by Graphite. Learn more about stacking.
Coverage report
St.:grey_question: |
Category | Percentage | Covered / Total |
|---|---|---|---|
| π‘ | Statements | 76.65% (+0.03% πΌ) |
9596/12519 |
| π‘ | Branches | 71.9% (+0.02% πΌ) |
4731/6580 |
| π‘ | Functions | 76.57% (+0.01% πΌ) |
2487/3248 |
| π‘ | Lines | 77.16% (+0.03% πΌ) |
9068/11752 |
Show new covered files π£
St.:grey_question: |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| π’ | ... / dev-clean.ts |
100% | 100% | 100% | 100% |
Show files with reduced coverage π»
St.:grey_question: |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| π’ | ... / Dev.tsx |
93.02% (+0.08% πΌ) |
77.59% (-0.99% π») |
90.91% | 93.83% (+0.08% πΌ) |
| π’ | ... / ConcurrentOutput.tsx |
98.36% (-1.64% π») |
88% (-4% π») |
100% | 98.33% (-1.67% π») |
Test suite run success
2254 tests passing in 983 suites.
Report generated by π§ͺjest coverage report action from 9d52719b0de9e8f1427947adf2683b335188cd0b
We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.
[!CAUTION] DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.