Conversation
Coverage report
Test suite run success3796 tests passing in 1449 suites. Report generated by 🧪jest coverage report action from 99be1aa |
3573760 to
fc77660
Compare
|
/snapit |
This comment was marked as outdated.
This comment was marked as outdated.
721358e to
7e7ca2a
Compare
7e7ca2a to
99be1aa
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/conf-store.d.ts@@ -21,6 +21,8 @@ interface Cache {
export interface ConfSchema {
sessionStore: string;
currentSessionId?: string;
+ devSessionStore?: string;
+ currentDevSessionId?: string;
cache?: Cache;
}
/**
|
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Test the snapshot by installing your package globally: npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260304092735Caution After installing, validate the version by running |
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
|
|
||
| function currentSessionIdKey(): 'currentDevSessionId' | 'currentSessionId' { | ||
| return isLocalEnvironment() ? 'currentDevSessionId' : 'currentSessionId' | ||
| } |
There was a problem hiding this comment.
Backward-compatibility break for existing “local” users (no migration / fallback)
The PR introduces new storage keys (devSessionStore, currentDevSessionId) for the local environment and switches reads/writes to those keys when isLocalEnvironment() is true. However, there’s no fallback to the old keys for users who already authenticated in local mode before this PR (where sessions would have been stored under sessionStore / currentSessionId even in local).
Evidence in code:
function sessionStoreKey(): 'devSessionStore' | 'sessionStore' {
return isLocalEnvironment() ? 'devSessionStore' : 'sessionStore'
}
function currentSessionIdKey(): 'currentDevSessionId' | 'currentSessionId' {
return isLocalEnvironment() ? 'currentDevSessionId' : 'currentSessionId'
}In local env, getSessions() now reads only devSessionStore, and getCurrentSessionId() reads only currentDevSessionId. If a user already has valid sessions saved under the old keys from previous versions, the CLI will behave as if no session exists and will force a new login.
Impact:
- Users who had already logged in with
SHOPIFY_SERVICE_ENV=localwill be unexpectedly prompted to log in again after upgrading. - Affects all existing “local” users upgrading to this version.
- Can cause duplicated session records split across old/new keys.
|
🤖 Code Review · #projects-dev-ai for questions ✅ Complete - 1 findings 📋 History✅ 1 findings |
WHY are these changes introduced?
In #5914 we added support for multiple sessions, but if you switch between environments (production/development), the sessions get overwritten, so you have to log in again.
WHAT is this pull request doing?
When running the CLI against the local environment, save the sessions in different store fields.
How to test your changes?
npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260303162727shopify auth logoutshopify app versions listSHOPIFY_SERVICE_ENV=local shopify app versions listshopify app versions listSHOPIFY_SERVICE_ENV=local shopify app versions listIt should only start the login flow once per environment.
Measuring impact
How do we know this change was effective? Please choose one:
Checklist