Conversation
|
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
a15c93e to
55feff7
Compare
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1049 tests passing in 535 suites. Report generated by 🧪jest coverage report action from 8669158 |
8c98111 to
050f12a
Compare
There was a problem hiding this comment.
Thank you, @Poitrin 🚀 Nice stuff, I've noticed only one minor issue.
Shopify CLI creates a host theme, because developers need to setup their theme app extension into a theme to preview it (it's the second step of their development workflow).
This PR really moves the creation of the host theme to a upper level, however we still need to pass a flag to the Ruby CLI mentioning that this theme is empty (or created at runtime).
Thus, the Ruby CLI may take care of populating the new theme with assets. Otherwise, the new development theme stays empty and developers cannot setup their theme app extension:
Excellent catch! Can you take a look again? :) |
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 declarationspackages/cli-kit/dist/public/node/themes/conf.d.tsimport { LocalStorage } from '@shopify/cli-kit/node/local-storage';
import { AdminSession } from '@shopify/cli-kit/node/session';
type HostThemeId = string;
type StoreFqdn = AdminSession['storeFqdn'];
interface HostThemeLocalStorageSchema {
[themeStore: StoreFqdn]: HostThemeId;
}
export declare function hostThemeLocalStorage(): LocalStorage<HostThemeLocalStorageSchema>;
export declare function getHostTheme(storeFqdn: StoreFqdn): string | undefined;
export declare function setHostTheme(storeFqdn: StoreFqdn, themeId: HostThemeId): void;
export declare function removeHostTheme(storeFqdn: StoreFqdn): void;
export {};
Existing type declarationsWe found no diffs with existing type declarations |
Benchmark reportThe following table contains a summary of the startup time for all commands.
|

WHY are these changes introduced?
Fixes https://github.com/Shopify/internal-cli-foundations/issues/532
Relates to https://github.com/Shopify/internal-cli-foundations/issues/509
WHAT is this pull request doing?
appandthemesboth need theme creation and ID retrieval logic, moves whole logic intocli-kit.How to test your changes?
npm init @shopify/app@latestcd <your app directory>npm run generate extensioncd ../– back into root dirpnpm shopify app dev --path="<your app directory>" --store=<store 1>pnpm shopify theme list --store=<store 1>lists your host theme with roles[development] [yours]pnpm shopify app dev --path="<your app directory>" --store=<store 2>pnpm shopify theme list --store=<store 2>lists your host theme with roles[development] [yours]pnpm shopify app dev --path="<your app directory>" --store=<store 1>Measuring impact
How do we know this change was effective? Please choose one:
Checklist
devordeployhave been reflected in the internal flowchart.