Shopify CLI 4.0.0
The release of Shopify CLI 4.0 today brings clarity to CLI versioning, the introduction of automatic updates, and the announced removal of the deprecated --force flag from shopify app deploy.
Semantic Versioning
Shopify CLI is now following semantic versioning practices. Releases with new features will be minor versions, and bug fixes will be patch versions. When required, major version releases will be used to communicate breaking changes to CLI command structure or behavior.
For more information, see our announcement of the move to SemVer.
Automatic Upgrades
Starting with Shopify CLI 4.0, Shopify CLI upgrades itself automatically using the package manager you installed it with. Auto-upgrade is skipped in CI, project-local installs, and for major version releases. Automatic upgrades can be disabled with the shopify config autoupgrade off command.
⚠️ Breaking Changes
App
- Remove the deprecated
--force(-f) flag andSHOPIFY_FLAG_FORCEenvironment variable fromshopify app deploy. Use--allow-updatesfor CI/CD environments, or--allow-updates --allow-deletesif you also want to allow removals. The--no-releaseflag continues to work and implicitly allows updates and deletes. (96281e6) - Remove the deprecated
--force(-f) flag andSHOPIFY_FLAG_FORCEenvironment variable fromshopify app release. Use--allow-updatesfor CI/CD environments, or--allow-updates --allow-deletesif you also want to allow removals. Passing both--allow-updatesand--allow-deletesskips the confirmation prompt (matching the previous--forcebehavior). (c36d5c2) - Remove the deprecated
--type(-t) flag andSHOPIFY_FLAG_EXTENSION_TYPEenvironment variable fromshopify app generate extension. Use--template(SHOPIFY_FLAG_EXTENSION_TEMPLATE) instead. (ad69d29) - Remove the deprecated
shopify app generate schemacommand. Useshopify app function schemainstead. (f23fe6c) - Remove the deprecated
shopify app scaffold extensioncommand. Useshopify app generate extensioninstead. (ec867ef) - Remove the deprecated top-level
shopify webhook triggeralias. Useshopify app webhook triggerinstead. (60d2697) - Remove the deprecated
--shared-secretflag andSHOPIFY_FLAG_SHARED_SECRETenvironment variable fromshopify app webhook trigger. Use--client-secret(SHOPIFY_FLAG_CLIENT_SECRET) instead. (38ce793)
Theme
- Remove the deprecated
shopify theme servecommand. Useshopify theme devinstead. (a960ee9)
General
- Drop support for Node 20 (0c35553)
Patch Changes
App
- Fix Spawn ETXTBSY bug with multiple Functions using trampoline binaries (2520541)
- Show Local URL in dev info when no App URL is available (e4ec92b)
- Detect files added during a running dev session (f8eabc1)
- Handle modern Bun
bun.lockfiles when cleaning up app templates so non-Bun projects do not keep stale Bun lockfiles or.gitignoreentries (a7d448b) - Fix
shopify app buildintermittently failing with "Source and destination must not be the same" on UI extensions when the local esbuild output directory and the bundle output directory resolve to the same path but differ as strings (e.g. due to.segments, trailing slashes, or path joining quirks). The same-path guard now normalizes both paths viaresolvePathbefore comparison. (e94c94e) - Fix
uidbeing written outside the[[extensions]]block in single-entry array-of-tables TOMLs (the shape produced byshopify app inittemplates) (1bf342d) - Guard app bundle uploads against oversized bundles and asset paths resolving outside the app directory (926db8b)
- Display a friendly error message instead of a stack trace when running
shopify app config link --client-id=<id>against a Dev Dashboard app and the client ID does not exist (8a9c5a1) - Hide the deprecated
remixtemplate fromshopify app init --templatehelp text and validation messages. The React Router template has replaced Remix as the supported choice. Passing--template remixcontinues to work for backwards compatibility. (6cb484f) - The CLI-generated
shopify.d.tsnow types theshopifybinding asApi & ShopifyGlobal(intersection) for UI extension targets whose.d.tsre-exports aShopifyGlobaltype. Existing consumers who access the target API viashopify.*are unaffected; new host-level APIs likeshopify.addEventListenernow type-check automatically for opt-in targets (e.g. POS background extensions). Targets that do not re-exportShopifyGlobalemit the same output as before. (c70e536) - Fix unhelpful error when extension locale file has invalid UTF-8 (d5028b5)
- Fix dev and build command for web_pixel extensions (dc70080)
Theme
- Upload
config/settings_schema.jsonbefore any other theme file. Fixestheme pushfailing on the first push when blocks or sections reference acolor_palettetheme setting. (1e8963e) - Fix theme dev proxy to support SFAPI requests (8f4e546)
- Fix
theme devanalytics being dropped on Ctrl+C (c6a114d)