-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add .shopify/metafields.json
to .gitignore
by default
#5184
base: main
Are you sure you want to change the base?
Conversation
.shopify/metafields.json
file gets created, the CLI now proposes to add it to .gitignore
by default.shopify/metafields.json
to .gitignore
by default
It looks like your code always adds the line to .gitignore; how to opt-out of it? |
Coverage report
Show files with reduced coverage 🔻
Test suite run success2008 tests passing in 906 suites. Report generated by 🧪jest coverage report action from bb40a59 |
Thank you for the review, @illarionvk!
It adds the line only when the file gets created. In subsequent synchronizations, it will no longer update the |
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.
❤️
…oposes to add it to `.gitignore` by default
…with the apps ecosystem) Refine .gitigore check
955ef22
to
bb40a59
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/fs.d.ts@@ -278,6 +278,31 @@ export declare function glob(pattern: Pattern | Pattern[], options?: GlobOptions
* @returns The File URL.
*/
export declare function pathToFileURL(path: string): URL;
+/**
+ * The operating system-specific end-of-line marker:
+ * -
+ node/20.18.1
+
+Use up/down arrow keys to select a version, return key to install, d to delete, q to quit on POSIX
+ * - on Windows
+ */
+export type EOL = '
+' | '
+';
+/**
+ * Detects the end-of-line marker used in a string.
+ *
+ * @param content - file contents to analyze
+ *
+ * @returns The detected end-of-line marker
+ */
+export declare function detectEOL(content: string): EOL;
+/**
+ * Returns the operating system's end-of-line marker.
+ *
+ * @returns The OS-specific end-of-line marker
+ */
+export declare function defaultEOL(): EOL;
/**
* Find a file by walking parent directories.
*
|
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.
Thanks!
writeFileSync(filePath, fileContent) | ||
} | ||
|
||
function addToGitIgnore(root: string, entry: 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.
We should consider centralizing this logic in cli-kit 😅
https://github.com/Shopify/hydrogen/blob/6bc6068fbffebbcd07c3d1db97956248bfa6a742/packages/cli/src/lib/shopify-config.ts#L135
WHY are these changes introduced?
Fixes #5183
We've noticed a significant number of users discussing whether to ignore the
.shopify/metafields.json
file. While this decision ultimately rests with the developer, ignoring it by default seems like a sensible approach. This PR proposes implementing that default.WHAT is this pull request doing?
This PR updates the
.shopify/metafields.json
creation to also add it to.gitignore
.How to test your changes?
shopify theme metafields pull
Post-release steps
N/A
Measuring impact
How do we know this change was effective? Please choose one:
Checklist