Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@shopify/[email protected]
Major Changes
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.Minor Changes
Move the Hydrogen CLI's
env push
command to stable. (#1946) by @aswamyDeprecate the
--env-branch
flag, in favor of--env
. (#1841) by @aswamy--env
accepts the environment's handle, instead of the environment's associated branch nameenv list
to display all environments and their handles--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:
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 @michenlyRemove the
@shopify/cli-hydrogen/experimental-vite
import path in favor of@shopify/hydrogen/vite
and@shopify/mini-oxygen/vite
. (#1935) by @frandioxPatch Changes
Avoid throwing error in
h2 dev --codegen
when the Customer Account schema is not found. (#1962) by @frandioxBump 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:
Add
--quickstart
flag option to init/create command. (#1822) by @gfscottAdd a newline after the
h2
alias created in ZSH/Bash profiles. (#1950) by @madmathFix the
--markets
flag when usingnpm create @shopify/hydrogen
. (#1916) by @frandioxHandle duplicate storefront names when running
link
command. (#1860) by @gfscottList uncommitted files in the
deploy
command's "uncommitted changes" error message. (#1944) by @graygilmoreImprove
h2 setup vite
command to cover more migration steps (e.g. vanilla-extract, css-modules, etc.) and keep Remix future flags. (#1915) by @frandioxAdd
--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]
Major Changes
The default runtime exported from
@shopify/mini-oxygen
is now based on workerd. (#1891) by @frandioxThe previous Node.js sandbox runtime has been moved to the
@shopify/mini-oxygen/node
export.Example usage:
Minor Changes
@shopify/mini-oxygen/vite
. It integrates Vite with MiniOxygen by running the application code within a worker. (#1935) by @frandiox@shopify/[email protected]
Minor Changes
Change
storefrontRedirect
to ignore query parameters when matching redirects. For example, a redirect in the admin from/snowboards
to/collections/snowboards
will now match on the URL/snowboards?utm_campaign=buffer
and redirect the user to/collections/snowboards?utm_campaign=buffer
. (#1900) by @blittleThis is a breaking change. If you want to retain the legacy functionality that is query parameter sensitive, pass
matchQueryParams
tostorefrontRedirect()
:Patch Changes
Make
StorefrontRedirect
case insensitive when querying redirect URLs from the Storefront API. (#1941) by @blittleFix bug where
storefrontRedirect
would return an error on soft page navigations. (#1880) by @blittleFix a bug where
cart
could be null, even though a new cart was created by adding a line item. (#1865) by @blittleThis allows calling the cart
.get()
method right after creating a new cart withone of the mutation methods:
create()
,addLines()
,updateDiscountCodes()
,updateBuyerIdentity()
,updateNote()
,updateAttributes()
,setMetafields()
.Add
postLogoutRedirectUri
option to the Customer Account API client's logout method. (#1871) by @michenlyIntroducing
<UNSTABLE_Analytics.Provider>
that also includes Shopify analytics, Customer Privacy API and Privacy banner (#1789) by @wizardlyhelExport new Hydrogen Vite plugin from
@shopify/hydrogen/vite
. (#1935) by @frandioxAdd 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 @michenlyFix default content security policy directive for
frameAncestors
. (#1883) by @blittleFall back to "mock.shop" when no value is passed in
storeDomain
tocreateStorefrontClient
in development. (#1971) by @frandioxAllow
ui_locale
to be passed to the customer account login page. (#1842) by @wizardlyhelDeprecate the
<Seo />
component in favor of directly using Remix meta route exports. Add thegetSeoMeta
to make migration easier. (#1875) by @blittleMigration steps:
1. Remove the
<Seo />
component fromroot.jsx
:export default function App() { const nonce = useNonce(); const data = useLoaderData<typeof loader>(); return ( <html lang="en"> <head> <meta charSet="utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1" /> - <Seo /> <Meta /> <Links /> </head> <body> <Layout {...data}> <Outlet /> </Layout> <ScrollRestoration nonce={nonce} /> <Scripts nonce={nonce} /> <LiveReload nonce={nonce} /> </body> </html> ); }
2. Add a Remix meta export to each route that returns an
seo
property from aloader
orhandle
:3. Merge root route meta data
If your root route loader also returns an
seo
property, make sure to merge that data:Or more simply:
4. Override meta
Sometimes
getSeoMeta
might produce a property in a way you'd like to change. Map over the resulting array to change it. For example, Hydrogen removes query parameters from canonical URLs, add them back:Updated dependencies [
f4d6e5b0
,a209019f
,e50f4349
]:@shopify/[email protected]
Minor Changes
schema
export. UsegetSchema('storefront')
instead. (#1962) by @frandiox@shopify/[email protected]
Patch Changes
Add
--quickstart
flag option to init/create command. (#1822) by @gfscottUpdated dependencies [
4eaec272
,646b78d4
,5f1295fe
,11879b17
,788d86b3
,da95bb1c
,5bb43304
,140e4768
,b3323e59
,ab0df5a5
,ebaf5529
,a5511cd7
,34fbae23
,e3baaba5
,99d72f7a
,9351f9f5
]:@shopify/[email protected]
Patch Changes
Introducing
<UNSTABLE_Analytics.Provider>
that also includes Shopify analytics, Customer Privacy API and Privacy banner (#1789) by @wizardlyhelFall back to "mock.shop" when no value is passed in
storeDomain
tocreateStorefrontClient
in development. (#1971) by @frandioxExpose
cartReady
state from the cart context. (#1885) by @celsowhite@shopify/[email protected]
Patch Changes
/subrequest-profiler
with Vite. (#1935) by @frandiox[email protected]
Patch Changes
Update internal libraries for parsing
.env
files. (#1946) by @aswamyPlease update the
@shopify/cli
dependency in your app to avoid duplicated subdependencies:Add Adds magic Catalog route (#1967) by @juanpprieto
Update Vite plugin imports, and how their options are passed to Remix: (#1935) by @frandiox
Add
@shopify/mini-oxygen
as a dev dependency for local development: (#1891) by @frandiox"devDependencies": { "@remix-run/dev": "^2.8.0", "@remix-run/eslint-config": "^2.8.0", + "@shopify/mini-oxygen": "^3.0.0", "@shopify/oxygen-workers-types": "^4.0.0", ... },
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 @michenlyFix types returned by the
session
object. (#1869) by @frandioxIn
remix.env.d.ts
orenv.d.ts
, add the following types:Codegen dependencies must be now listed explicitly in
package.json
: (#1962) by @frandioxUpdated dependencies [
4eaec272
,14bb5df1
,646b78d4
,87072950
,5f1295fe
,3c8a7313
,ca1dcbb7
,11879b17
,f4d6e5b0
,788d86b3
,ebaf5529
,da95bb1c
,5bb43304
,140e4768
,062d6be7
,b3323e59
,ab0df5a5
,ebaf5529
,ebaf5529
,9e899218
,a209019f
,d007b7bc
,a5511cd7
,4afedb4d
,34fbae23
,e3baaba5
,99d72f7a
,9351f9f5
]: