Skip to content

Conversation

isaacroldan
Copy link
Contributor

@isaacroldan isaacroldan commented Aug 22, 2025

WHY are these changes introduced?

Simplifies the flow template extension build process by using the existing copy_files mode instead of a custom flow mode.

WHAT is this pull request doing?

  • Removes the custom flow build mode and replaces it with the more generic copy_files mode for flow template extensions
  • Updates the outputFileName logic to handle all build modes correctly
  • Simplifies the build process by removing the separate bundling step for theme extensions
  • Removes unused flow template utility files and functions

How to test your changes?

  1. Create a new app with a flow template extension
  2. Run npm run dev to verify the extension builds correctly
  3. Verify that the flow template files (*.flow, *.json, *.toml) are properly copied to the output directory

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

Checklist

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

Copy link
Contributor Author

isaacroldan commented Aug 22, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@isaacroldan isaacroldan mentioned this pull request Aug 22, 2025
3 tasks
@isaacroldan isaacroldan changed the title Add new copy_files build mode and apply it to flow Use new copy_files build mode with Flow templates Aug 22, 2025
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from 50d8352 to 83c55b8 Compare August 22, 2025 14:04
@isaacroldan isaacroldan force-pushed the 08-22-add_new_copy_files_build_mode branch from 8c0de77 to 1d8faaf Compare August 22, 2025 14:04
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from 83c55b8 to 13812f2 Compare August 22, 2025 14:06
@isaacroldan isaacroldan force-pushed the 08-22-add_new_copy_files_build_mode branch from 1d8faaf to 2452642 Compare August 22, 2025 14:06
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch 2 times, most recently from e2cc36d to 9bbde93 Compare August 22, 2025 14:17
Copy link
Contributor

github-actions bot commented Aug 22, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.69% (+0.06% 🔼)
13525/17187
🟡 Branches
72.71% (+0.05% 🔼)
6566/9031
🟡 Functions
78.97% (+0.04% 🔼)
3511/4446
🟡 Lines
79.05% (+0.07% 🔼)
12784/16172
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / flow_template.ts
30.77% (-7.69% 🔻)
0%
0% (-20% 🔻)
30.77% (-7.69% 🔻)

Test suite run success

3243 tests passing in 1359 suites.

Report generated by 🧪jest coverage report action from beddeeb

@isaacroldan isaacroldan force-pushed the 08-22-add_new_copy_files_build_mode branch from 2452642 to 838606e Compare August 29, 2025 11:39
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch 2 times, most recently from 2bed3b6 to 7c0d909 Compare August 29, 2025 15:09
@isaacroldan isaacroldan mentioned this pull request Aug 29, 2025
5 tasks
@seandmccarthy seandmccarthy force-pushed the 08-22-add_new_copy_files_build_mode branch from 838606e to 8f0f766 Compare September 1, 2025 05:55
@seandmccarthy seandmccarthy force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from 7c0d909 to e9a0adc Compare September 1, 2025 05:55
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from e9a0adc to 434c6c3 Compare September 9, 2025 13:30
@isaacroldan isaacroldan force-pushed the 08-22-add_new_copy_files_build_mode branch from 8f0f766 to 2ed7248 Compare September 9, 2025 13:30
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from 434c6c3 to b1979e0 Compare September 9, 2025 13:35
@isaacroldan isaacroldan force-pushed the 08-22-add_new_copy_files_build_mode branch 2 times, most recently from ca41206 to f26b4d2 Compare September 9, 2025 15:11
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from b1979e0 to 89de6ea Compare September 9, 2025 15:11
@isaacroldan isaacroldan force-pushed the 08-22-add_new_copy_files_build_mode branch from f26b4d2 to b6c65ba Compare September 11, 2025 15:51
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from 89de6ea to 46b6836 Compare September 11, 2025 15:51
@isaacroldan isaacroldan marked this pull request as ready for review September 11, 2025 16:02
@isaacroldan isaacroldan requested a review from a team as a code owner September 11, 2025 16:02
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@seandmccarthy seandmccarthy force-pushed the 08-22-add_new_copy_files_build_mode branch from b6c65ba to 8f0f766 Compare September 11, 2025 22:56
@seandmccarthy seandmccarthy force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from 46b6836 to e9a0adc Compare September 11, 2025 22:56
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/common/version.d.ts
@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "3.84.1";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "3.84.0";
\ No newline at end of file
packages/cli-kit/dist/private/node/analytics/error-categorizer.d.ts
@@ -1,5 +1,4 @@
 export declare enum ErrorCategory {
-    Liquid = "LIQUID",
     ThemeCheck = "THEME_CHECK",
     Network = "NETWORK",
     FileSystem = "FILE_SYSTEM",
@@ -7,12 +6,7 @@ export declare enum ErrorCategory {
     Validation = "VALIDATION",
     Permission = "PERMISSION",
     RateLimit = "RATE_LIMIT",
-    Json = "JSON",
+    Parsing = "PARSING",
     Unknown = "UNKNOWN"
 }
-export declare function categorizeError(error: unknown): ErrorCategory;
-/**
- * Formats an error message for analytics tracking, preserving important information
- * based on the error category while keeping it concise and normalized.
- */
-export declare function formatErrorMessage(error: unknown, category: ErrorCategory): string;
\ No newline at end of file
+export declare function categorizeError(error: unknown): ErrorCategory;
\ No newline at end of file

@isaacroldan isaacroldan force-pushed the 08-22-add_new_copy_files_build_mode branch from 8f0f766 to b6c65ba Compare September 12, 2025 10:48
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from e9a0adc to 04aae4d Compare September 12, 2025 10:48
@isaacroldan isaacroldan force-pushed the 08-22-add_new_copy_files_build_mode branch from b6c65ba to 2e42e1c Compare September 12, 2025 11:03
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch 2 times, most recently from 3f326e3 to 577a5ef Compare September 12, 2025 12:56
@gonzaloriestra
Copy link
Contributor

/snapit

Copy link
Contributor

🫰✨ 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-20250916102642

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.

Base automatically changed from 08-22-add_new_copy_files_build_mode to main September 16, 2025 10:35
@isaacroldan isaacroldan force-pushed the 08-22-add_apply_new_build_mode_to_flow branch from 577a5ef to beddeeb Compare September 16, 2025 10:41
Copy link
Contributor

@gonzaloriestra gonzaloriestra left a comment

Choose a reason for hiding this comment

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

Tested that works as expected 👌

@isaacroldan isaacroldan added this pull request to the merge queue Sep 16, 2025
Merged via the queue into main with commit b32742b Sep 16, 2025
30 checks passed
@isaacroldan isaacroldan deleted the 08-22-add_apply_new_build_mode_to_flow branch September 16, 2025 14:44
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.

2 participants