-
Update plugin-cloudflare by @juanpprieto
-
Update cli-hydrogen & create-hydrogen for latest cli (#2766) by @juanpprieto
- Fixed a regression in
hydrogen build
where the environment variableHYDROGEN_ASSET_BASE_URL
was ignored when used as build command when deploying. (#2758) by @vincentezw
-
Bump remix version (#2740) by @wizardlyhel
-
Turn on Remix
v3_singleFetch
future flag (#2708) by @wizardlyhel
-
Bump vite, Remix versions and tailwind v4 alpha to beta (#2696) by @wizardlyhel
-
Make sure tailwind stylesheet is generated in a style tag (#2734) by @wizardlyhel
-
Bump cli version (#2732) by @wizardlyhel
-
Updated dependencies [
fdab06f5
,68110f3f
]:- @shopify/[email protected]
- Bump cli version (#2694) by @wizardlyhel
- Attach Hydrogen version metadata to deployments (#2645) by @benwolfram
- Bump cli and cli-kit version (#2627) by @wizardlyhel
-
Add warnings to the Shopify CLI when your app uses reserved routes. These routes are reserved by Oxygen, and any local routes that conflict with them will not be used. (#2613) by @blittle
-
Updated dependencies [
a0f660aa
,29876f12
]:- @shopify/[email protected]
- @shopify/[email protected]
- Bump cli packages version (#2592) by @wizardlyhel
-
Update starter template with latest Hydrogen version. (#2580) by @scottdixon
-
Updated dependencies [
04b4c7c3
]:- @shopify/[email protected]
- Update starter template with latest Hydrogen version. (#2541) by @scottdixon
- Update starter template with latest Hydrogen version. (#2535) by @scottdixon
-
Update Shopify CLI and cli-kit dependencies to 3.66.1 (#2512) by @frandiox
-
Add
--force-client-sourcemap
flag. Client sourcemapping is avoided by default because it makes backend code visible in the browser. Use this flag to force enabling it. (#2477) by @frandioxIt is recommended to delete client sourcemaps before deploying the app to production.
-
Updated dependencies [
664a09d5
,9dd4c615
]:- @shopify/[email protected]
-
Update starter template with latest Hydrogen version. (#2432) by @frandiox
-
Fix upgrade notification right after scaffolding a new project. (#2432) by @frandiox
- Support
--env-file
in env:pull, dev, and preview commands to specify custom.env
files. (#2392) by @frandiox
-
Allow passing
customLogger
invite.config.js
. (#2341) by @frandiox -
Ignore
remix.config.js
file whenvite.config.js
is present, and warn about it. (#2379) by @frandiox -
Support special versions like
next
orexperimental
in CLI. (#2417) by @frandiox
- The Hydrogen CLI can now read the Codegen configuration from the GraphQL config file (e.g.
.graphqlrc.js
or.graphqlrc.yml
). (#2311) by @frandiox
- Fix auth flow. (#2331) by @graygilmore
-
Support Vite projects in
h2 setup css
command to setup Tailwind and vanilla-extract. Drop CSS setup support for classic Remix projects. (#2245) by @frandiox -
The build process in Vite projects now generates a bundle analysis tool for the server files. (#2138) by @frandiox
-
Fix Codegen config resolution when project directory contains dots. (#2293) by @frandiox
-
[Bug fix] Allow env-branch to be passed when running
h2 deploy
in CI (#2281) by @aswamy -
Fix CLI upgrade notification when running from a global process. (#2184) by @frandiox
-
skeleton template was updated to do session commit in server call instead of routes (#2137) by @michenly
-
Remove
PUBLIC_STORE_DOMAIN
environment variable from.env
when creating new projects with mock.shop. (#2221) by @frandiox -
Added an
--auth-bypass-token-duration
flag to thedeploy
command to allow for specified token duration between 1 to 12 hours. (#2182) by @NelsonLee-Code -
Updated dependencies [
0924410f
]:- @shopify/[email protected]
-
Support Vite projects in
h2 debug cpu
command. (#2124) by @frandiox -
The
h2 preview
command now supports--build
and--watch
flags to preview the project using the build process instead of Vite's dev process. (#2100) by @frandiox
-
The CLI now tries to add optimizable dependencies to Vite's ssr.optimizeDeps.include automatically. (#2106) by @frandiox
-
Fix Hydrogen upgrade notification when running the dev command. (#2120) by @frandiox
-
Hide non actionable warning about ts-node. (#2123) by @frandiox
-
<Analytics>
anduseAnalytics
are now stable. (#2141) by @wizardlyhel -
Updated internal CLI dependencies to
3.60.0
. (#2087) by @isaacroldan -
Updated dependencies [
cd888ec5
,27e51abf
]:- @shopify/[email protected]
-
Fix
h2 upgrade
command to detect outdated devDependencies. (#2093) by @frandiox -
Avoid unhandled promise rejections when showing the upgrade notification. (#2092) by @frandiox
-
Updated dependencies [
72e6794e
,1cd83113
,e9ea1891
,ddc7196f
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Clean up messaging around unlinked storefronts when running CLI commands (#1937) by @aswamy
- When you run
env list
,env pull
, ordeploy
against a storefront that isn't linked, it will show a warning message instead of an error message. - If you don't have a storefront to link to on Admin, we will just ask you to create a storefront instead of displaying an option list of size 1.
- If you deleted a storefront on Admin, we will try to relink your storefront when running
env list
,env pull
, ordeploy
.
- When you run
-
Add
@return
JSDoc tag to functions in JavaScript projects. (#2014) by @frandiox -
Fix
--quickstart
flag to support overwritting it with other flags. Example:h2 init --quickstart --no-install-deps
. (#2023) by @frandioxShow error in
h2 debug cpu
command for Vite projects until we support it.Remove deprecated
--styling
flag from theh2 init
command. -
Fix a warning when combining mock.shop and customer-account-push (#1992) by @frandiox
-
Updated dependencies [
7e8cf055
,a335afc1
]:- @shopify/[email protected]
-
Hydrogen CLI now requires
@shopify/mini-oxygen
to be installed separately as a dev dependency. It is still used automatically under the hood so there is no need to change your application code aside from installing the dependency. (#1891) by @frandioxAlso, if a port provided via
--port
or--inspector-port
flags is already in use, the CLI will now exit with an error message instead of finding a new open port. When the flags are not provided, the CLI will still find an open port.
-
Move the Hydrogen CLI's
env push
command to stable. (#1946) by @aswamy -
Deprecate the
--env-branch
flag, in favor of--env
. (#1841) by @aswamy--env
accepts the environment's handle, instead of the environment's associated branch name- Run
env list
to display all environments and their handles
- Run
- Any CLI commands that accepted the
--env-branch
flag now accept the--env
flag.
-
Support scaffolding projects from external repositories using the
--template
flag. (#1867) by @frandioxThe following examples are equivalent:
npm create @shopify/hydrogen -- --template shopify/hydrogen-demo-store npm create @shopify/hydrogen -- --template github.com/shopify/hydrogen-demo-store npm create @shopify/hydrogen -- --template https://github.com/shopify/hydrogen-demo-store
-
Add the
customer-account push
command to the Hydrogen CLI. This allows you to push the current--dev-origin
URL to the Shopify admin to enable secure connection to the Customer Account API for local development. (#1804) by @michenly -
Remove the
@shopify/cli-hydrogen/experimental-vite
import path in favor of@shopify/hydrogen/vite
and@shopify/mini-oxygen/vite
. (#1935) by @frandiox
-
Avoid throwing error in
h2 dev --codegen
when the Customer Account schema is not found. (#1962) by @frandiox -
Bump internal workerd dependency to fix a bug when running on Node 21. (#1866) by @frandiox
-
Support Node's
NODE_TLS_REJECT_UNAUTHORIZED
andNODE_EXTRA_CA_CERTS
environment variables in the worker environment. (#1882) by @frandioxUse this at your own risk to disable certificate validation or provide additional CA certificates when making HTTPS requests from the worker:
# Disable certificate validation NODE_TLS_REJECT_UNAUTHORIZED=0 npm run dev # Provide additional CA certificates NODE_EXTRA_CA_CERTS=/usr/.../ca-certificates/my-file.crt npm run dev
-
Add
--quickstart
flag option to init/create command. (#1822) by @gfscott -
Add a newline after the
h2
alias created in ZSH/Bash profiles. (#1950) by @madmath -
Fix the
--markets
flag when usingnpm create @shopify/hydrogen
. (#1916) by @frandiox -
Handle duplicate storefront names when running
link
command. (#1860) by @gfscott -
List uncommitted files in the
deploy
command's "uncommitted changes" error message. (#1944) by @graygilmore -
Improve
h2 setup vite
command to cover more migration steps (e.g. vanilla-extract, css-modules, etc.) and keep Remix future flags. (#1915) by @frandiox -
Add
--verbose
flag toh2 dev
andh2 preview
commands to enable verbose logging. (#1928) by @frandioxOnly CLI logs become verbose by default. If you also want to see verbose logs from Vite as well, use
DEBUG=* h2 dev
instead. -
Updated dependencies [
646b78d4
,140e4768
,ebaf5529
]:- @shopify/[email protected]
- @shopify/[email protected]
- Change the required Vite version to
~5.1.0
instead of^5.1.0
to avoid breaking changes in experimental APIs that will be introduced in Vite 5.2.0. (#1830) by @frandiox
-
Update
@shopify/cli-kit
dependency to3.56.3
and improve some help messaging. (#1786) by @frandiox -
Hide a non-actionable warning about a deprecated Node.js module
punycode
. (#1801) by @frandiox -
Add experimental support for Vite projects. (#1728) by @frandiox
To test this unstable feature, make sure you're running the latest version of the Hydrogen CLI, then run
npx shopify hydrogen setup vite
in your Hydrogen project. This command edits existing files and creates some new ones required to run Vite.Please report any issues you run into, and let us know if you have any feedback or suggestions.
-
Fix an issue that could cause the local worker runtime to freeze. (#1819) by @frandiox
-
Updated dependencies [
4e3d5b00
]:- @shopify/[email protected]
-
Adds new command line flag options for the
deploy
command: (#1736) by @vincentezwbuild-command
: Allows users to specify which command is used to build the project (instead of the default build function). This provides more flexibility for projects that have custom build processes.no-lockfile-check
: Allows users to skip the lockfile check during the build process. This can be useful in scenarios where you want to bypass the lockfile check for certain reasons, such as in monorepos, where the lockfile resides in the root folder.
-
Adding skip-verification flag to hydrogen deploy command (#1770) by @lynchv
-
Add
--env-file
flag to thedeploy
command (#1743) by @aswamyOptionally provide the path to a local .env file to override the environment variables set on Admin.
-
This is an important fix to a bug with 404 routes and path-based i18n projects where some unknown routes would not properly render a 404. This fixes all new projects, but to fix existing projects, add a
($locale).tsx
route with the following contents: (#1732) by @blittleimport {type LoaderFunctionArgs} from '@remix-run/server-runtime'; export async function loader({params, context}: LoaderFunctionArgs) { const {language, country} = context.storefront.i18n; if ( params.locale && params.locale.toLowerCase() !== `${language}-${country}`.toLowerCase() ) { // If the locale URL param is defined, yet we still are still at the default locale // then the the locale param must be invalid, send to the 404 page throw new Response(null, {status: 404}); } return null; }
-
Non-zero exit codes are now honored (#1766) by @graygilmore
-
Add support for multiple schemas in GraphiQL. Fix links in Subrequest Profiler. (#1693) by @frandiox
-
♻️
CustomerClient
type is deprecated and replaced byCustomerAccount
(#1692) by @michenly -
Skip prompt about creating
h2
shortcut during init flow if it has been already added to the environment. (#1718) by @gfscott -
Bump Codegen dependencies to fix known bugs and remove patches. (#1705) by @frandiox
-
Fix local asset path to Oxygen to return valid preflight headers (#1709) by @wizardlyhel
-
Updated dependencies [
c7b2017f
]:- @shopify/[email protected]
-
Make the worker runtime the default for the local development server when running
dev
andpreview
. To access the legacy Node.js runtime, pass the--legacy-runtime
flag. The legacy runtime will be deprecated and removed in a future release. (#1625) by @frandiox -
Remove deprecated
build
command flags--base
,--entry
,--target
. Additionally,--codegen-unstable
is now--codegen
. (#1640) by @frandiox
-
Check for local project GraphQL config files (example:
.graphqlrc.yml
) when running in Codegen mode (#1577) by @frandiox -
Add
deploy
command to Hydrogen CLI (#1628) by @graygilmoreYou can now deploy your Hydrogen app without connecting to GitHub. Run the
deploy
command from your local terminal or configure your own CI/CD workflows from any platform.Run
npx shopify hydrogen deploy --help
for more details. -
Add
--diff
flag todev
andbuild
commands, used for building Hydrogen app examples. (#1549) by @frandiox -
Add
--template
flag to enable scaffolding projects based on examples from the Hydrogen repo. (#1608) by @frandioxExample:
npm create @shopify/hydrogen@latest -- --template multipass
.
-
Reorganize starter template file and folder structure (#1612) by @frandiox
-
Fix step-debugging when running in the Node.js sandbox (#1501) by @frandiox
-
Generate sourcemaps by default when running the
deploy
command (#1623) by @blittle -
Remove bundle-size check from the
build
command, in favor of checking server-side withdeploy
(#1614) by @benwolfram -
-
Update example and template Remix versions to
^2.5.1
(#1639) by @wizardlyhel -
Enable Remix future flags:
-
-
Add the option to create a new storefront when running the
init
command (#1681) by @aswamy -
Updated dependencies [
0241b7d2
,9ad7c5ef
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Add the
upgrade
command to make it easier to upgrade from older versions of Hydrogen. Features: (#1458) by @juanpprieto- Automatically updates dependencies in your package.json file.
- Generates a customized instruction file in the
/.shopify
directory, outlining any code changes required to complete the upgrade. - Adds a warning when running the
dev
command with an outdated version. - Defaults to the latest version. Pass a
--version
flag and a version number to select a specific one.
To get started, run
npx shopify hydrogen upgrade
in your Hydrogen project. -
The worker runtime for development is now stable. This makes your development environment closer to parity with Oxygen’s production runtime. Pass the
--worker
flag with thedev
orpreview
commands to enable it. This runtime will be enabled by default in the next major release. (#1525) by @frandiox -
Add the
--debug
flag to thedev
command to enable step debugging in browser dev tools. (#1480) by @frandioxTo enable debugger connections for the Hydrogen app worker file, run
npx shopify hydrogen dev --debug --worker
, then open localhost:9229 in your browser.
-
Sync up environment variable names across all example & type files. (#1542) by @michenly
-
Serve assets from a separate domain when running the dev server, to better simulate cross-domain behaviors. This makes it more realistic to work with CORS requests, content security policies, and CDN paths in development. (#1503) by @frandiox
-
Update all Node.js dependencies to version 18. (Not a breaking change, since Node.js 18 is already required by Remix v2.) (#1543) by @michenly
-
Fix how peer dependencies are resolved. (#1489) by @frandiox
-
Update Shopify CLI versions. (#1504) by @vincentezw
-
Updated dependencies [
848c6260
,8fce70de
]:- @shopify/[email protected]
- Updated dependencies [
69624b32
]:- @shopify/[email protected]
-
Fix Shopify login during the init flow where the process would just exit when awaiting for a keypress. (#1481) by @frandiox
-
Updated dependencies [
074ef6e8
]:- @shopify/[email protected]
- The Codegen feature is now considered stable and related dependencies have been updated. Use
--codegen
flag instead of--codegen-unstable
to generate code from your GraphQL queries. (#1108) by @frandiox
-
Updated internal dependencies to improve terminal output. (#1456) by @vincentezw
Please update the
@shopify/cli
dependency in your app to avoid duplicated subdependencies:"dependencies": { - "@shopify/cli": "3.49.2", + "@shopify/cli": "3.50.0", }
-
Updated dependencies [
a6f397b6
,ad45656c
,ad45656c
,58dc68de
,0ae7cbe2
,ad45656c
]:- @shopify/[email protected]
- @shopify/[email protected]
- @shopify/[email protected]
-
Fix template dist package due to CI error (#1451) by @wizardlyhel
-
Updated dependencies [
3eb376fe
]:- @shopify/[email protected]
-
Generated JavaScript projects now use Codegen and JSDoc to enhance editor autocompletion. (#1334) by @frandiox
-
We've added an experimental tool for profiling the CPU at startup. This is useful for debugging slow startup times when Oxygen deployments fail with related errors. (#1352) by @frandiox
Run the new
h2 debug cpu
command to build + watch your app and generate astartup.cpuprofile
file that you can open in DevTools or VSCode to see a flamegraph of CPU usage.
-
Integrate the debug-network tooling with the new
--worker-unstable
runtime CLI flag. (#1387) by @frandiox -
Updated dependencies [
d30e2651
,b81b452d
,1b45311d
,2627faa7
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Fix subrequest performance in development. (#1411) by @frandiox
-
Increase the request body size limit to 100mb when running locally. (#1421) by @frandiox
-
Updated dependencies [
29414664
,832a0eaf
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Updated dependencies [
4f735fd7
]:- @shopify/[email protected]
-
Add token flag, environmentTag flag, environment selection screen, rename health check to deployment verification (#1381) by @vincentezw
-
Updated dependencies [
eb9451ed
]:- @shopify/[email protected]
-
The build command now throws errors on CI when it can't find a valid lockfile. This should prevent unforseen issues related to dependency versioning in production. (#1370) by @frandiox
This behavior can be disabled with the flag
--no-lockfile-check
, which might be useful in monorepos or other setups where the lockfile is not available in the project directory.
-
Add check to render collection images when available (#1373) by @juanpprieto
-
Remove sourcemap annotations from client bundles. This prevents errors showing up in the devtools when the sourcemaps fail to load. (#1364) by @blittle
- Make the CLI bundle analysis compatible with older Remix versions that don't output a metafile (#1357) by @blittle
-
Add
--worker-unstable
flag toh2 dev
andh2 preview
commands. This flag enables the use of the new experimental worker runtime for local development, which is closer to Oxygen production than the current Node.js sandbox. Please report any issues you encounter with this flag. (#1184) by @frandiox -
Add deploy command (disabled by default) (#1019) by @vincentezw
-
Add magic cart and discount routes to skeleton template (#1309) by @juanpprieto
-
Updates placeholder page to suggest the
h2 setup
command, instead ofh2 generate route home
(#1347) by @benjaminsehl -
Adjust behavior of
h2 preview
command around environment variables to be more consistent withh2 dev
command. (#1184) by @frandiox -
We've added a tool for analyzing bundle sizes. You should try to keep your worker bundle small. The larger it gets effects the cold startup time of your app. We now include
client-bundle-analyzer.html
andworker-bundle-analyzer.html
files in the build output. Open these in your browser to view an interactive analysis of your bundles. The CLI output also includes links to each file. Hydrogen also fails to build if your bundle size is over 10 MB. This is because Oxygen only supports worker bundles less than 10 MB. (#1306) by @blittle -
Raise the subrequest limit to 100 for development. (#1348) by @frandiox
-
Fix
--routes
and--markets
flag when creating new projects. (#1342) by @frandiox -
Make sourcemaps to default be turned on. They were off to prevent sourcemaps leaking server code to the client. Oxygen now makes sure to not serve the sourcemaps, so it's okay to generate them. Also, when sourcemaps are present, we hope to enable sourcemapped stack traces in error logs on Oxygen. (#1339) by @blittle
-
Delay installing certain dependencies to speed up project initialization time. (#1272) by @frandiox
-
(Unstable) server-side network request debug virtual route (#1284) by @wizardlyhel
-
Update your
server.ts
so that it also passes in thewaitUntil
andenv
.const handleRequest = createRequestHandler({ build: remixBuild, mode: process.env.NODE_ENV, + getLoadContext: () => ({session, storefront, env, waitUntil}), });
If you are using typescript, make sure to update
remix.env.d.ts
declare module '@shopify/remix-oxygen' { export interface AppLoadContext { + env: Env; cart: HydrogenCart; storefront: Storefront; session: HydrogenSession; + waitUntil: ExecutionContext['waitUntil']; } }
-
Run
npm run dev
and you should see terminal log information about a new virtual route that you can view server-side network requests at http://localhost:3000/debug-network -
Open http://localhost:3000/debug-network in a tab and your app another tab. When you navigate around your app, you should see server network requests being logged in the debug-network tab
-
-
Updated dependencies [
71a07374
]:- @shopify/[email protected]
-
Fix error stack traces in development mode. (#1297) by @frandiox
-
Updated dependencies [
345f06a2
]:- @shopify/[email protected]
-
Fix the default page shown when the project has no routes. (#1266) by @frandiox
-
Hydrogen is now compatible with TypeScript v5. (#1240) by @frandiox
If you have
typescript
as a dev dependency in your app, it is recommended to change its version as follows:"devDependencies": { ... - "typescript": "^4.9.5", + "typescript": "^5.2.2", },
After installing the new version of TypeScript, you may need to update the version used in your IDE. For example, in VSCode, you can do this by clicking on the
{ }
icon in the bottom-right toolbar next to the language mode (generally,{ } TypeScript JSX
when editing a.tsx
file). -
Fix development server port in some situations where it was set to a random number instead of the default 3000 or the
--port
flag value. (#1267) by @frandiox -
Fix transpiling TS to JS when scaffolding routes. (#1273) by @frandiox
-
Catch more errors during init while connecting to Shopify (#1281) by @graygilmore
-
Add functionality for creating a Content Security Policy. See the guide on Content Security Policies for more details. (#1235) by @blittle
-
Updated dependencies [
06516ee9
,423acee2
]:- @shopify/[email protected]
-
Support Remix Hot Module Replacement (HMR) and Hot Data Revalidation (HDR). (#1187) by @frandiox
Start using it with the following changes to your project:
-
Upgrade to the latest Hydrogen version and Remix 1.19.1.
-
Enable the v2 dev server in
remix.config.js
:
// ... future: { + v2_dev: true, v2_meta: true, v2_headers: true, // ... }
- Add Remix'
<LiveReload />
component if you don't have it to yourroot.jsx
orroot.tsx
file:
import { Outlet, Scripts, + LiveReload, ScrollRestoration, } from '@remix-run/react'; // ... export default function App() { // ... return ( <html> <head> {/* ... */} </head> <body> <Outlet /> <ScrollRestoration /> <Scripts /> + <LiveReload /> </body> </html> ); } export function ErrorBoundary() { // ... return ( <html> <head> {/* ... */} </head> <body> Error! <Scripts /> + <LiveReload /> </body> </html> ); }
-
-
Avoid development server crash on unhandled promise rejection. (#1244) by @frandiox
-
Fix build command when
public
directory is missing. (#1224) by @frandiox -
Use nonce from CSP header in MiniOxygen's auto-reload script. (#1251) by @frandiox
-
Add default exported route to enable the error to be caught in the root.tsx ErrorBoundary (#1215) by @josh-sanger
-
Improve error handling when failing to get remote environment variables. (#1225) by @frandiox
-
Fix GraphQL Codegen throwing error related to Git on Windows. (#1253) by @frandiox
-
Add shouldRevalidate export to limit root loaders revalidation on mutations only (#1237) by @juanpprieto
-
Removed quantityAvailable field from skeleton PDP graphql query so that it works with default Storefront API permissions. (#1236) by @abecciu
-
Updated dependencies [
e9e1736a
,1a0e858d
]:- @shopify/[email protected]
-
Update @shopify/oxygen-workers-types dependencies (#1208) by @juanpprieto
-
Updated dependencies [
21eb9dac
,d80c4ada
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Fix the starter template cart aside to cover everything on larger pages (#1163) by @QuentinGibson
-
Skip Oxygen requirement checks of
remix.config.js
when@shopify/remix-oxygen
is not installed. (#1137) by @frandiox -
Warn in development when Remix packages are out of sync. (#1173) by @frandiox
-
Updated dependencies [
b7a8ecf6
]:- @shopify/[email protected]
⭐️ Check out our blog post with all the latest updates on Hydrogen, and what’s coming on the roadmap.
Shopify CLI now gives you more options when creating a new Hydrogen app on the command line:
- Create a new Shopify storefront and connect it to the local project, or use Mock.shop.
- Pick your styling method: Tailwind, CSS Modules, Vanilla Extract, PostCSS.
- URL strategies to support language and currency options with Shopify Markets.
- Automatically scaffold standard Shopify routes.
-
The onboarding process when creating new Hydrogen apps has been reworked. (#913) by @frandiox
-
Add
login
andlogout
commands. Rework how other commands interact with auth. (#1022) by @frandiox -
Reload environment variables in the development server when
.env
file is updated. Show injected variables when project is not linked to any storefront. (#997) by @frandiox -
Support creating new storefronts from the
link
command. (#1022) by @frandiox
-
Stop checking
/products
and/discount
routes inh2 check routes
command. (#1141) by @frandiox -
Show proper error message when Hydrogen App isn't installed on Shop (#1075) by @aswamy
-
Improve warning and error format for known Hydrogen messages in development. (#1093) by @frandiox
-
Add
--codegen-unstable
flag tobuild
command. (#1049) by @frandiox -
Updated dependencies [
c39411e0
,0d2e5ffb
,4bee03df
,11ab64a8
,7a7456a5
]:- @shopify/[email protected]
-
Add more context on MiniOxygen local dev server startup (#1005) by @gfscott
-
Fix
--sourcemap
flag for build command. (#1032) by @frandiox -
Fix
dev --codegen-unstable
flag, which was removed by mistake in the previous release. (#1018) by @frandiox -
Updated dependencies [
b8f41ad7
]:- @shopify/[email protected]
-
Update Remix to the latest version (
1.17.1
). (#852) by @frandioxWhen updating your app, remember to also update your Remix dependencies to
1.17.1
in yourpackage.json
file:-"@remix-run/react": "1.15.0", +"@remix-run/react": "1.17.1", -"@remix-run/dev": "1.15.0", -"@remix-run/eslint-config": "1.15.0", +"@remix-run/dev": "1.17.1", +"@remix-run/eslint-config": "1.17.1",
-
Updated dependencies [
f29e178a
]:- @shopify/[email protected]
-
Remove
--codegen-unstable
flag from scripts when transpiling projects from TypeScript to JavaScript. (#937) by @frandiox -
Allow disabling sourcemaps with
shopify hydrogen build --no-sourcemap
(#975) by @blittle -
Allow the CLI route generate to work in non-oxygen deploys (#976) by @blittle
-
Hidden flag removed from new CLI commands (#995) by @graygilmore
You can now link your local Hydrogen storefront to a storefront you have created in the Shopify admin. This allows you to pull your environment variables into your local environment or have them be automatically injected into your runtime when you run
dev
. -
Updated dependencies [
7b4afea2
,32515232
,7d6a1a7c
,442f602a
,be912b2f
,b9ab8eb7
,d3817b9c
,93a7c3c6
,6b8537ba
]:- @shopify/[email protected]
- @shopify/[email protected]
- @shopify/[email protected]
-
Updated dependencies [
7aaa4e86
]:- @shopify/[email protected]
- @shopify/[email protected]
- @shopify/[email protected]
-
Add UNSTABLE support for GraphQL Codegen to automatically generate types for every Storefront API query in the project via
@shopify/hydrogen-codegen
. (#707) by @frandioxNote: This feature is unstable and subject to change in patch releases.
How to use it while unstable:
-
Write your queries/mutations in
.ts
or.tsx
files and use the#graphql
comment inside the strings. It's important that every query/mutation/fragment in your project has a unique name:const UNIQUE_NAME_SHOP_QUERY = `#graphql query unique_name_shop { shop { id } } `;
If you use string interpolation in your query variables (e.g. for reusing fragments) you will need to specify
as const
after each interpolated template literal. This helps TypeScript infer the types properly instead of getting a genericstring
type:const UNIQUE_NAME_SHOP_FRAGMENT = `#graphql fragment unique_name_shop_fields on Shop { id name } `; const UNIQUE_NAME_SHOP_QUERY = `#graphql query unique_name_shop { shop { ...unique_name_shop_fields } } ${UNIQUE_NAME_SHOP_FRAGMENT} ` as const;
-
Pass the queries to the Storefront client and do not specify a generic type value:
-import type {Shop} from '@shopify/hydrogen/storefront-api-types'; // ... -const result = await storefront.query<{shop: Shop}>(UNIQUE_NAME_SHOP_QUERY); +const result = await storefront.query(UNIQUE_NAME_SHOP_QUERY);
-
Pass the flag
--codegen-unstable
when running the development server, or use the newcodegen-unstable
command to run it standalone without a dev-server:npx shopify hydrogen dev --codegen-unstable # Dev server + codegen watcher npx shopify hydrogen codegen-unstable # One-off codegen npx shopify hydrogen codegen-unstable --watch # Standalone codegen watcher
As a result, a new
storefrontapi.generated.d.ts
file should be generated at your project root. You don't need to reference this file from anywhere for it to work, but you should commit it every time the types change.Optional: you can tune the codegen configuration by providing a
<root>/codegen.ts
file (or specify a different path with the--codegen-config-path
flag) with the following content:import type {CodegenConfig} from '@graphql-codegen/cli'; import {preset, pluckConfig, schema} from '@shopify/hydrogen-codegen'; export default <CodegenConfig>{ overwrite: true, pluckConfig, generates: { ['storefrontapi.generated.d.ts']: { preset, schema, documents: ['*.{ts,tsx}', 'app/**/*.{ts,tsx}'], }, }, };
Feel free to add your custom schemas and generation config here or read from different document files. Please, report any issue you find in our repository.
-
-
Add command to list environments from a linked Hydrogen storefront. (#889) by @graygilmore
-
Update dev command to automatically injected environment variables from a linked Hydrogen storefront (#861) by @graygilmore
-
Adds the ability to specify an Environment's branch name to interact with Hydrogen storefront environment variables (#883) by @graygilmore
-
Fixes issue where routes that begin with the url
/events
could not be created because an internal handler had claimed those routes already. The internal handler now listens at/__minioxygen_events
so hopefully that doesn't conflict with anyone now. :) (#915) by @frehner -
Updated dependencies [
112ac42a
,2e1e4590
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Add command to pull environment variables from a Hydrogen storefront defined in the Shopify Admin (#809) by @graygilmore
-
Update docs links on successful project creation (#810) by @gfscott
-
New
--debug
flag for thedev
command that attaches a Node inspector to the development server. (#869) by @frandiox -
Ensure request logs are shown in MiniOxygen during development. (#836) by @frandiox
Provide custom Oxygen headers in local MiniOxygen.
-
Add new commands for merchants to be able to list and link Hydrogen storefronts on Shopify (#784) by @graygilmore
-
Updated dependencies [
025385b6
,0a009a3b
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Fix the
check routes
command to match optional segments. (#774) by @frandiox -
Updated dependencies [
82b6af7
,361879e
]:- @shopify/[email protected]
-
Updated CLI prompts. It's recommended to update your version of
@shopify/cli
to3.45.0
when updating@shopify/cli-hydrogen
. (#733) by @frandiox"dependencies": { - "@shopify/cli": "3.x.x", + "@shopify/cli": "3.45.0", }
-
Added a new
shortcut
command that creates a globalh2
alias for the Hydrogen CLI: (#679) by @frandiox$> npx shopify hydrogen shortcut
After that, you can run commands using the new alias:
$> h2 generate route home $> h2 g r home # Same as the above $> h2 check routes
-
Add support for the Remix future flags
v2_meta
,v2_errorBoundary
andv2_routeConvention
to thegenerate
command. If these flags are enabled in your project, the new generated files will follow the v2 conventions. (#756) by @frandiox -
Update virtual route to use Remix V2 route name conventions (#792) by @DavidWittness
-
Bump internal Remix dependencies to 1.15.0. (#728) by @wizardlyhel
Recommendations to follow:
- Upgrade all the Remix packages in your app to 1.15.0.
- Enable Remix v2 future flags at your earliest convenience following the official guide.
-
Improve type safety in SEO data generators. (#763) by @davidhousedev
-
Updated dependencies [
85ae63a
,5e26503
,1f8526c
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Fixed a typo in the install deps flag. The flag is now SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS. (#672) by @cartogram
-
Display warning for deprecated flags. (#609) by @cartogram
-
Fix bug in CLI not recognising the --install-deps flag when creating projects (#644) by @cartogram
-
Fix
check routes
command to correctly check the standard route/discount/<code>
instead of/discounts/<code>
. (#601) by @frandiox -
Stop hydrating with
requestIdleCallback
(#667) by @juanpprieto -
Updated dependencies [
c78f441
,7fca5d5
]:- @shopify/[email protected]
- @shopify/[email protected]
-
Improve rate limit error messages when creating new projects. (#553) by @frandiox
-
Show better errors when initial build fails, and recover when fixing it. (#514) by @frandiox
-
Use woff2 format instead of ttf in onboarding routes to reduce download size of font files. (#538) by @lordofthecactus
-
Show available upgrades for CLI when creating new projects. (#518) by @frandiox
-
Fix CLI flags for init command, and add
--install-deps
. (#516) by @frandiox -
Fix template download on Windows during project creation. (#528) by @tchalabi
-
Fix template imports to only reference
@shopify/hydrogen
, not@shopify/hydrogen-react
(#523) by @blittle -
Fix pathnames on Windows when running the development server. (#520) by @frandiox
-
Onboarding fonts and styles (#533) by @lordofthecactus
-
Corrects links referred to in Onboarding Route. (#509) by @benjaminsehl
-
Improve onboarding style and links (#525) by @lordofthecactus
-
Updated dependencies [
ff9d729
]:- @shopify/[email protected]
-
Add license files and readmes for all packages (#463) by @blittle
-
Updated dependencies [
517f0f7
]:- @shopify/[email protected]
- Initial release