Skip to content

Conversation

aswamy
Copy link
Contributor

@aswamy aswamy commented Aug 8, 2025

WHY are these changes introduced?

  • Feature: Fetch new AI instructions from theme-liquid-docs
  • Bug Fix: Only remove .github, .cursor, and .claude directories if it's NOT a skeleton theme
    • If you're cloning a theme repo that isn't ours (by passing in the --clone-url flag), we shouldn't be removing directories

WHAT is this pull request doing?

  • Fetch it into a temp directory and copy content
  • Add a new utility that copies content from src directory instead of overriding the whole directory

How to test your changes?

Initializing Skeleton Theme

  • shopify theme init
  • Select to create AI instructions (try each one)
  • You should have a new directory in the file system .github, .cursor, or .claude` that contains AI instructions

Initializing non-Skeleton Theme

  • shopify theme init --clone-url "https://github.com/shopify-playground/alok-sandbox"
  • Select to create AI instructions (try each one)
  • Existing .github, .cursor, and .claude` directories are NOT deleted
  • AI Instructions are merged in with existing content

Post-release steps

n/a

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@aswamy aswamy force-pushed the update-ai-instructions branch 2 times, most recently from 8170ba3 to c9f3b5e Compare August 11, 2025 20:19
@aswamy aswamy marked this pull request as ready for review August 11, 2025 20:20
@aswamy aswamy requested review from a team as code owners August 11, 2025 20:20
@aswamy aswamy force-pushed the update-ai-instructions branch from c9f3b5e to a8a4854 Compare August 11, 2025 20:25
Copy link
Contributor

github-actions bot commented Aug 11, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.33% (-0.01% 🔻)
13243/16906
🟡 Branches
72.38% (+0.03% 🔼)
6474/8944
🟡 Functions
78.55% (-0.02% 🔻)
3450/4392
🟡 Lines
78.7% (-0.01% 🔻)
12528/15919
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / init.ts
28.57% (-8.27% 🔻)
0% 0%
30% (-8.89% 🔻)
🟢
... / init.ts
88.89% (-11.11% 🔻)
66.67% (-13.33% 🔻)
81.82% (-18.18% 🔻)
88.89% (-11.11% 🔻)

Test suite run success

3149 tests passing in 1328 suites.

Report generated by 🧪jest coverage report action from 9b872dc

@graygilmore
Copy link
Contributor

/snapit

Copy link
Contributor

🫰✨ Thanks @graygilmore! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g @shopify/[email protected]

Tip

If you get an ETARGET error, install it with NPM and the flag --@shopify:registry=https://registry.npmjs.org

Caution

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.
Use which shopify to find out which one you are running and uninstall it.

Copy link
Contributor

@graygilmore graygilmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎩 went great

@karreiro karreiro self-requested a review August 12, 2025 12:42
Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR, @aswamy! 🚀 I've left only one minor suggestion and one question. Please let me know your thoughts about them :)

@aswamy aswamy force-pushed the update-ai-instructions branch 2 times, most recently from 1676d38 to 696bfbf Compare August 12, 2025 18:11
@aswamy aswamy enabled auto-merge August 12, 2025 18:22
@aswamy aswamy force-pushed the update-ai-instructions branch from 696bfbf to 9b872dc Compare August 12, 2025 19:41
Copy link
Contributor

Differences in type declarations

We 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:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/fs.d.ts
@@ -329,4 +329,11 @@ export declare function matchGlob(key: string, pattern: string, options?: MatchG
  * @returns A promise that resolves to an array of file names.
  */
 export declare function readdir(path: string): Promise<string[]>;
+/**
+ * Copies the contents of a directory to another directory.
+ *
+ * @param srcDir - Source directory path.
+ * @param destDir - Destination directory path.
+ */
+export declare function copyDirectoryContents(srcDir: string, destDir: string): Promise<void>;
 export {};
\ No newline at end of file

@aswamy aswamy added this pull request to the merge queue Aug 19, 2025
Merged via the queue into main with commit 98678ed Aug 19, 2025
30 checks passed
@aswamy aswamy deleted the update-ai-instructions branch August 19, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants