-
Notifications
You must be signed in to change notification settings - Fork 224
[Themes] Store and track theme asset upload errors during theme dev
#5220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report
Show files with reduced coverage 🔻
Test suite run success2000 tests passing in 904 suites. Report generated by 🧪jest coverage report action from 7e34195 |
550b4c6 to
6edd52f
Compare
theme dev
This comment has been minimized.
This comment has been minimized.
|
|
||
| export function mountThemeFileSystem(root: string, options?: ThemeFileSystemOptions): ThemeFileSystem { | ||
| const files = new Map<string, ThemeAsset>() | ||
| const uploadErrors = new Map<string, string[]>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to add a changelog!
6edd52f to
dd17d8a
Compare
.changeset/big-hairs-remember.md
Outdated
| '@shopify/cli-kit': minor | ||
| '@shopify/theme': minor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was waffling on this as well - I feel like it should it be a minor since this isn't a bugfix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this repo went patch for all changes since it doesn't really follow semver but I can't find any documentation on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Judging off the current contents of .changeset it doesn't seems like to be a convention.
I see other similar changes with patch let's go with that for this PR.
I'll follow up with the foundations team to confirm
dd17d8a to
7e34195
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/public/node/themes/types.d.ts@@ -92,6 +92,10 @@ export interface ThemeFileSystem extends VirtualFileSystem {
applyIgnoreFilters: <T extends {
key: string;
}>(files: T[]) => T[];
+ /**
+ * Stores upload errors returned when uploading files via the Asset API
+ */
+ uploadErrors: Map<Key, string[]>;
}
/**
* Represents a theme on the file system.
|

WHY are these changes introduced?
This will be used to access data + render an overlay when asset upload errors occur during the
theme devcommandThese errors can come from two places. The
theme uploader, where we do the initial theme upload when we start the command (in the background) as well as changes made to your theme files while the development server is running.Original attempt for context - link
WHAT is this pull request doing?
Introduces a new
uploadErrorsMap to track and persist file-specific upload errors in the theme file system. This enables:How to test your changes?
theme devin thejavascript debug terminal- place some breakpoints intheme-uploaderandtheme-fsMeasuring impact
Checklist