Closed karreiro closed 1 week ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π‘ | Statements | 72.12% (+0.08% πΌ) |
8390/11633 |
π‘ | Branches | 68.56% (+0.06% πΌ) |
4059/5920 |
π‘ | Functions | 71.43% (+0.06% πΌ) |
2198/3077 |
π‘ | Lines | 72.53% (+0.08% πΌ) |
7935/10941 |
1901 tests passing in 867 suites.
Report generated by π§ͺjest coverage report action from 45e9fa7a1c44c4701d7aaae4d6d4a348429d7774
/snapit
π«°β¨ Thanks @frandiox! Your snapshot has been published to npm.
Test the snapshot by intalling your package globally:
pnpm i -g @shopify/cli@0.0.0-snapshot-20241106120425
After installing, validate the version by running just
shopify
in your terminal If the versions don't match, you might have multiple global instances installed. Usewhich shopify
to find out which one you are running and uninstall it.
@Shopify/app-inner-loop Could you please take a look at this one to unblock merge? π
(I just rebased the branch because it got a conflict β it's ready to merge again)
WHY are these changes introduced?
Fixes https://github.com/Shopify/cli/issues/4618
The Assets API may return 401 statuses after running for a while, and that may happen before the session gets refreshed. To prevent the development server from terminating, if we get that status, we manually refresh the session.
WHAT is this pull request doing?
This PR solves this by calling
session.refresh()
when it gets a 401 error. We'd face a circular dependency if we were to get the types correctly, so this PR checks therefresh
at runtime and just calls it (this will no longer be necessary with https://github.com/Shopify/cli/issues/4769 solved).How to test your changes?
SESSION_TIMEOUT_IN_MS
value (indev-server-session.ts
) to300 * 60 * 1000
shopify theme dev --verbose
console.log
logs to make things a bit clearer)Post-release steps
N/A
Measuring impact
How do we know this change was effective? Please choose one:
Checklist