diff --git a/.changeset/stable-update-hydrogen-cli-13.0.1.md b/.changeset/stable-update-hydrogen-cli-13.0.1.md new file mode 100644 index 00000000000..083f015bab9 --- /dev/null +++ b/.changeset/stable-update-hydrogen-cli-13.0.1.md @@ -0,0 +1,5 @@ +--- +'@shopify/cli': patch +--- + +Update cli-hydrogen to 13.0.1 diff --git a/docs-shopify.dev/commands/interfaces/hydrogen-deploy.interface.ts b/docs-shopify.dev/commands/interfaces/hydrogen-deploy.interface.ts index 7696a3feb2d..a2546125862 100644 --- a/docs-shopify.dev/commands/interfaces/hydrogen-deploy.interface.ts +++ b/docs-shopify.dev/commands/interfaces/hydrogen-deploy.interface.ts @@ -53,7 +53,7 @@ export interface hydrogendeploy { '--env-file '?: string /** - * Forces a deployment to proceed if there are uncommitted changes in its Git repository. + * Forces a deployment to proceed if there are uncommitted changes in its Git repository, and skips confirmation prompts for non-preview environments. * @environment SHOPIFY_HYDROGEN_FLAG_FORCE */ '-f, --force'?: '' diff --git a/docs-shopify.dev/commands/interfaces/hydrogen-env-push.interface.ts b/docs-shopify.dev/commands/interfaces/hydrogen-env-push.interface.ts index eb9c80c1095..9e8c096ec7c 100644 --- a/docs-shopify.dev/commands/interfaces/hydrogen-env-push.interface.ts +++ b/docs-shopify.dev/commands/interfaces/hydrogen-env-push.interface.ts @@ -4,6 +4,12 @@ * @publicDocs */ export interface hydrogenenvpush { + /** + * Preview environment variable changes without pushing them. + * @environment SHOPIFY_HYDROGEN_FLAG_DRY_RUN + */ + '--dry-run'?: '' + /** * Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command. * @@ -16,6 +22,12 @@ export interface hydrogenenvpush { */ '--env-file '?: string + /** + * Push environment variable changes without confirmation. + * @environment SHOPIFY_HYDROGEN_FLAG_FORCE + */ + '-f, --force'?: '' + /** * The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run. * @environment SHOPIFY_HYDROGEN_FLAG_PATH diff --git a/docs-shopify.dev/generated/generated_docs_data_v2.json b/docs-shopify.dev/generated/generated_docs_data_v2.json index f33d3f63776..0855bbda4c8 100644 --- a/docs-shopify.dev/generated/generated_docs_data_v2.json +++ b/docs-shopify.dev/generated/generated_docs_data_v2.json @@ -3365,7 +3365,7 @@ "syntaxKind": "PropertySignature", "name": "-f, --force", "value": "''", - "description": "Forces a deployment to proceed if there are uncommitted changes in its Git repository.", + "description": "Forces a deployment to proceed if there are uncommitted changes in its Git repository, and skips confirmation prompts for non-preview environments.", "isOptional": true, "environmentValue": "SHOPIFY_HYDROGEN_FLAG_FORCE" }, @@ -3388,7 +3388,7 @@ "environmentValue": "SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN" } ], - "value": "export interface hydrogendeploy {\n /**\n * Directory containing the client assets to deploy, relative to the project root. Defaults to the detected Vite client output directory, then falls back to `dist/client`.\n * @environment SHOPIFY_HYDROGEN_FLAG_ASSETS_DIR\n */\n '--assets-dir '?: string\n\n /**\n * Generate an authentication bypass token, which can be used to perform end-to-end tests against the deployment.\n * @environment AUTH_BYPASS_TOKEN\n */\n '--auth-bypass-token'?: ''\n\n /**\n * Specify the duration (in hours) up to 12 hours for the authentication bypass token. Defaults to `2`\n * @environment AUTH_BYPASS_TOKEN_DURATION\n */\n '--auth-bypass-token-duration '?: string\n\n /**\n * Specify a build command to run before deploying. If not specified, the Hydrogen build pipeline will be used. When custom output directories are configured, defaults to `node --run build`.\n *\n */\n '--build-command '?: string\n\n /**\n * Entry file for the worker. Defaults to `./server`.\n * @environment SHOPIFY_HYDROGEN_FLAG_ENTRY\n */\n '--entry '?: string\n\n /**\n * Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.\n *\n */\n '--env '?: string\n\n /**\n * Specifies the environment to perform the operation using its Git branch name.\n * @environment SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH\n */\n '--env-branch '?: string\n\n /**\n * Path to an environment file to override existing environment variables for the deployment.\n *\n */\n '--env-file '?: string\n\n /**\n * Forces a deployment to proceed if there are uncommitted changes in its Git repository.\n * @environment SHOPIFY_HYDROGEN_FLAG_FORCE\n */\n '-f, --force'?: ''\n\n /**\n * Client sourcemapping is avoided by default because it makes backend code visible in the browser. Use this flag to force enabling it.\n * @environment SHOPIFY_HYDROGEN_FLAG_FORCE_CLIENT_SOURCEMAP\n */\n '--force-client-sourcemap'?: ''\n\n /**\n * Create a JSON file containing the deployment details in CI environments. Defaults to true, use `--no-json-output` to disable.\n *\n */\n '--json-output'?: ''\n\n /**\n * Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.\n * @environment SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK\n */\n '--lockfile-check'?: ''\n\n /**\n * Description of the changes in the deployment. Defaults to the commit message of the latest commit if there are no uncommitted changes.\n * @environment SHOPIFY_HYDROGEN_FLAG_METADATA_DESCRIPTION\n */\n '--metadata-description '?: string\n\n /**\n * User that initiated the deployment. Will be saved and displayed in the Shopify admin\n * @environment SHOPIFY_HYDROGEN_FLAG_METADATA_USER\n */\n '--metadata-user '?: string\n\n /**\n * Skip the routability verification step after deployment.\n *\n */\n '--no-verify'?: ''\n\n /**\n * The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.\n * @environment SHOPIFY_HYDROGEN_FLAG_PATH\n */\n '--path '?: string\n\n /**\n * Deploys to the Preview environment.\n *\n */\n '--preview'?: ''\n\n /**\n * Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).\n * @environment SHOPIFY_SHOP\n */\n '-s, --shop '?: string\n\n /**\n * Oxygen deployment token. Defaults to the linked storefront's token if available.\n * @environment SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN\n */\n '-t, --token '?: string\n\n /**\n * Directory containing the Oxygen worker entry point (`index.js` or `index.mjs`), relative to the project root. Defaults to the detected Vite server output directory, then falls back to `dist/server`.\n * @environment SHOPIFY_HYDROGEN_FLAG_WORKER_DIR\n */\n '--worker-dir '?: string\n}" + "value": "export interface hydrogendeploy {\n /**\n * Directory containing the client assets to deploy, relative to the project root. Defaults to the detected Vite client output directory, then falls back to `dist/client`.\n * @environment SHOPIFY_HYDROGEN_FLAG_ASSETS_DIR\n */\n '--assets-dir '?: string\n\n /**\n * Generate an authentication bypass token, which can be used to perform end-to-end tests against the deployment.\n * @environment AUTH_BYPASS_TOKEN\n */\n '--auth-bypass-token'?: ''\n\n /**\n * Specify the duration (in hours) up to 12 hours for the authentication bypass token. Defaults to `2`\n * @environment AUTH_BYPASS_TOKEN_DURATION\n */\n '--auth-bypass-token-duration '?: string\n\n /**\n * Specify a build command to run before deploying. If not specified, the Hydrogen build pipeline will be used. When custom output directories are configured, defaults to `node --run build`.\n *\n */\n '--build-command '?: string\n\n /**\n * Entry file for the worker. Defaults to `./server`.\n * @environment SHOPIFY_HYDROGEN_FLAG_ENTRY\n */\n '--entry '?: string\n\n /**\n * Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.\n *\n */\n '--env '?: string\n\n /**\n * Specifies the environment to perform the operation using its Git branch name.\n * @environment SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH\n */\n '--env-branch '?: string\n\n /**\n * Path to an environment file to override existing environment variables for the deployment.\n *\n */\n '--env-file '?: string\n\n /**\n * Forces a deployment to proceed if there are uncommitted changes in its Git repository, and skips confirmation prompts for non-preview environments.\n * @environment SHOPIFY_HYDROGEN_FLAG_FORCE\n */\n '-f, --force'?: ''\n\n /**\n * Client sourcemapping is avoided by default because it makes backend code visible in the browser. Use this flag to force enabling it.\n * @environment SHOPIFY_HYDROGEN_FLAG_FORCE_CLIENT_SOURCEMAP\n */\n '--force-client-sourcemap'?: ''\n\n /**\n * Create a JSON file containing the deployment details in CI environments. Defaults to true, use `--no-json-output` to disable.\n *\n */\n '--json-output'?: ''\n\n /**\n * Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.\n * @environment SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK\n */\n '--lockfile-check'?: ''\n\n /**\n * Description of the changes in the deployment. Defaults to the commit message of the latest commit if there are no uncommitted changes.\n * @environment SHOPIFY_HYDROGEN_FLAG_METADATA_DESCRIPTION\n */\n '--metadata-description '?: string\n\n /**\n * User that initiated the deployment. Will be saved and displayed in the Shopify admin\n * @environment SHOPIFY_HYDROGEN_FLAG_METADATA_USER\n */\n '--metadata-user '?: string\n\n /**\n * Skip the routability verification step after deployment.\n *\n */\n '--no-verify'?: ''\n\n /**\n * The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.\n * @environment SHOPIFY_HYDROGEN_FLAG_PATH\n */\n '--path '?: string\n\n /**\n * Deploys to the Preview environment.\n *\n */\n '--preview'?: ''\n\n /**\n * Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).\n * @environment SHOPIFY_SHOP\n */\n '-s, --shop '?: string\n\n /**\n * Oxygen deployment token. Defaults to the linked storefront's token if available.\n * @environment SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN\n */\n '-t, --token '?: string\n\n /**\n * Directory containing the Oxygen worker entry point (`index.js` or `index.mjs`), relative to the project root. Defaults to the detected Vite server output directory, then falls back to `dist/server`.\n * @environment SHOPIFY_HYDROGEN_FLAG_WORKER_DIR\n */\n '--worker-dir '?: string\n}" } }, "hydrogendev": { @@ -3621,6 +3621,15 @@ "description": "The following flags are available for the `hydrogen env push` command:", "isPublicDocs": true, "members": [ + { + "filePath": "docs-shopify.dev/commands/interfaces/hydrogen-env-push.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--dry-run", + "value": "''", + "description": "Preview environment variable changes without pushing them.", + "isOptional": true, + "environmentValue": "SHOPIFY_HYDROGEN_FLAG_DRY_RUN" + }, { "filePath": "docs-shopify.dev/commands/interfaces/hydrogen-env-push.interface.ts", "syntaxKind": "PropertySignature", @@ -3645,9 +3654,18 @@ "description": "The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.", "isOptional": true, "environmentValue": "SHOPIFY_HYDROGEN_FLAG_PATH" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/hydrogen-env-push.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-f, --force", + "value": "''", + "description": "Push environment variable changes without confirmation.", + "isOptional": true, + "environmentValue": "SHOPIFY_HYDROGEN_FLAG_FORCE" } ], - "value": "export interface hydrogenenvpush {\n /**\n * Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.\n *\n */\n '--env '?: string\n\n /**\n * Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.\n *\n */\n '--env-file '?: string\n\n /**\n * The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.\n * @environment SHOPIFY_HYDROGEN_FLAG_PATH\n */\n '--path '?: string\n}" + "value": "export interface hydrogenenvpush {\n /**\n * Preview environment variable changes without pushing them.\n * @environment SHOPIFY_HYDROGEN_FLAG_DRY_RUN\n */\n '--dry-run'?: ''\n\n /**\n * Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.\n *\n */\n '--env '?: string\n\n /**\n * Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.\n *\n */\n '--env-file '?: string\n\n /**\n * Push environment variable changes without confirmation.\n * @environment SHOPIFY_HYDROGEN_FLAG_FORCE\n */\n '-f, --force'?: ''\n\n /**\n * The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.\n * @environment SHOPIFY_HYDROGEN_FLAG_PATH\n */\n '--path '?: string\n}" } }, "hydrogengenerateroute": { diff --git a/packages/cli/README.md b/packages/cli/README.md index 888f4a00dbd..6cb53e751d2 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -2234,7 +2234,8 @@ USAGE FLAGS -f, --force - Forces a deployment to proceed if there are uncommitted changes in its Git repository. + Forces a deployment to proceed if there are uncommitted changes in its Git repository, and skips confirmation + prompts for non-preview environments. [env: SHOPIFY_HYDROGEN_FLAG_FORCE] -s, --shop= @@ -2450,9 +2451,17 @@ Push environment variables from the local .env file to your linked Hydrogen stor ``` USAGE - $ shopify hydrogen env push [--env | ] [--env-file ] [--path ] + $ shopify hydrogen env push [--dry-run | -f] [--env | ] [--env-file ] [--path ] FLAGS + -f, --force + Push environment variable changes without confirmation. + [env: SHOPIFY_HYDROGEN_FLAG_FORCE] + + --dry-run + Preview environment variable changes without pushing them. + [env: SHOPIFY_HYDROGEN_FLAG_DRY_RUN] + --env= Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command. diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index f89365d0538..cc434996b35 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -4181,7 +4181,7 @@ "force": { "allowNo": false, "char": "f", - "description": "Forces a deployment to proceed if there are uncommitted changes in its Git repository.", + "description": "Forces a deployment to proceed if there are uncommitted changes in its Git repository, and skips confirmation prompts for non-preview environments.", "env": "SHOPIFY_HYDROGEN_FLAG_FORCE", "name": "force", "required": false, @@ -4561,6 +4561,16 @@ "description": "Push environment variables from the local .env file to your linked Hydrogen storefront.", "enableJsonFlag": false, "flags": { + "dry-run": { + "allowNo": false, + "description": "Preview environment variable changes without pushing them.", + "env": "SHOPIFY_HYDROGEN_FLAG_DRY_RUN", + "exclusive": [ + "force" + ], + "name": "dry-run", + "type": "boolean" + }, "env": { "description": "Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.", "exclusive": [ @@ -4580,6 +4590,14 @@ "required": false, "type": "option" }, + "force": { + "allowNo": false, + "char": "f", + "description": "Push environment variable changes without confirmation.", + "env": "SHOPIFY_HYDROGEN_FLAG_FORCE", + "name": "force", + "type": "boolean" + }, "path": { "description": "The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.", "env": "SHOPIFY_HYDROGEN_FLAG_PATH", diff --git a/packages/cli/package.json b/packages/cli/package.json index 023b59ce8e3..9e943f29083 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -66,7 +66,7 @@ "@shopify/plugin-cloudflare": "4.5.0", "@shopify/plugin-did-you-mean": "4.5.0", "@shopify/theme": "4.5.0", - "@shopify/cli-hydrogen": "13.0.0", + "@shopify/cli-hydrogen": "13.0.1", "@types/global-agent": "3.0.0", "@vitest/coverage-istanbul": "^3.2.6", "esbuild-plugin-copy": "^2.1.1" diff --git a/packages/e2e/data/snapshots/commands.txt b/packages/e2e/data/snapshots/commands.txt index c44b5255cda..488d7481cb0 100644 --- a/packages/e2e/data/snapshots/commands.txt +++ b/packages/e2e/data/snapshots/commands.txt @@ -98,13 +98,18 @@ ├─ search ├─ store │ ├─ auth +│ │ └─ list │ ├─ bulk │ │ ├─ cancel │ │ ├─ execute │ │ └─ status +│ ├─ create +│ │ └─ preview │ ├─ execute │ ├─ graphiql -│ └─ info +│ ├─ info +│ ├─ list +│ └─ open ├─ theme │ ├─ check │ ├─ console diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 06724380946..8efb61755ba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -275,8 +275,8 @@ importers: specifier: 4.5.0 version: link:../app '@shopify/cli-hydrogen': - specifier: 13.0.0 - version: 13.0.0(@graphql-codegen/cli@6.3.1(@parcel/watcher@2.5.6)(@types/node@18.19.130)(crossws@0.3.5)(graphql@16.14.2)(typescript@5.9.3))(graphql-config@5.1.6(@types/node@22.19.17)(crossws@0.3.5)(graphql@16.14.2)(typescript@5.9.3))(graphql@16.14.2)(react-dom@19.2.4(react@18.3.1))(react@18.3.1)(vite@6.4.3(@types/node@22.19.17)(jiti@2.6.1)(sass@1.100.0)(tsx@4.22.4)(yaml@2.9.0)) + specifier: 13.0.1 + version: 13.0.1(@graphql-codegen/cli@6.3.1(@parcel/watcher@2.5.6)(@types/node@18.19.130)(crossws@0.3.5)(graphql@16.14.2)(typescript@5.9.3))(graphql-config@5.1.6(@types/node@22.19.17)(crossws@0.3.5)(graphql@16.14.2)(typescript@5.9.3))(graphql@16.14.2)(react-dom@19.2.4(react@18.3.1))(react@18.3.1)(vite@6.4.3(@types/node@22.19.17)(jiti@2.6.1)(sass@1.100.0)(tsx@4.22.4)(yaml@2.9.0)) '@shopify/cli-kit': specifier: 4.5.0 version: link:../cli-kit @@ -3818,8 +3818,8 @@ packages: '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==, tarball: https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz} - '@shopify/cli-hydrogen@13.0.0': - resolution: {integrity: sha512-s3nY0vU0V40VFAaOH2OA6sKgzxJqxWbCS20NJyQGoQ5kaXx0l7TPnziGhFirIbodzR8of7lA5noHNPIw3KKSoA==, tarball: https://registry.npmjs.org/@shopify/cli-hydrogen/-/cli-hydrogen-13.0.0.tgz} + '@shopify/cli-hydrogen@13.0.1': + resolution: {integrity: sha512-P9y8MbtRa8fSKOjoeh3rSko40DdRNqjknZzJAXx/U4de5vIhNrUM2SXs/LWJ58I1o6cYyH862ZYMySkjLlZZxQ==, tarball: https://registry.npmjs.org/@shopify/cli-hydrogen/-/cli-hydrogen-13.0.1.tgz} engines: {node: ^22 || ^24} hasBin: true peerDependencies: @@ -13032,7 +13032,7 @@ snapshots: '@shikijs/vscode-textmate@10.0.2': {} - '@shopify/cli-hydrogen@13.0.0(@graphql-codegen/cli@6.3.1(@parcel/watcher@2.5.6)(@types/node@18.19.130)(crossws@0.3.5)(graphql@16.14.2)(typescript@5.9.3))(graphql-config@5.1.6(@types/node@22.19.17)(crossws@0.3.5)(graphql@16.14.2)(typescript@5.9.3))(graphql@16.14.2)(react-dom@19.2.4(react@18.3.1))(react@18.3.1)(vite@6.4.3(@types/node@22.19.17)(jiti@2.6.1)(sass@1.100.0)(tsx@4.22.4)(yaml@2.9.0))': + '@shopify/cli-hydrogen@13.0.1(@graphql-codegen/cli@6.3.1(@parcel/watcher@2.5.6)(@types/node@18.19.130)(crossws@0.3.5)(graphql@16.14.2)(typescript@5.9.3))(graphql-config@5.1.6(@types/node@22.19.17)(crossws@0.3.5)(graphql@16.14.2)(typescript@5.9.3))(graphql@16.14.2)(react-dom@19.2.4(react@18.3.1))(react@18.3.1)(vite@6.4.3(@types/node@22.19.17)(jiti@2.6.1)(sass@1.100.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@ast-grep/napi': 0.34.1 '@oclif/core': 3.26.5