@shopify/hydrogen 2026.4.7 → 2026.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/index.cjs +17 -4
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +17 -4
- package/dist/development/index.js.map +1 -1
- package/dist/production/index.cjs +45 -45
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +49 -49
- package/dist/production/index.js.map +1 -1
- package/dist/vite/chunk-IHK6YKEW.js +80 -0
- package/dist/vite/dev-tooling-guard.d.ts +10 -0
- package/dist/vite/dev-tooling-guard.js +8 -0
- package/dist/vite/plugin.js +4 -0
- package/package.json +2 -2
|
@@ -490,7 +490,7 @@ function getPrivacyBanner() {
|
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
// package.json
|
|
493
|
-
var version = "2026.4.
|
|
493
|
+
var version = "2026.4.8";
|
|
494
494
|
|
|
495
495
|
// src/analytics-manager/ShopifyAnalytics.tsx
|
|
496
496
|
function getCustomerPrivacyRequired() {
|
|
@@ -1874,7 +1874,7 @@ function generateUUID() {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
|
|
1876
1876
|
// src/version.ts
|
|
1877
|
-
var LIB_VERSION = "2026.4.
|
|
1877
|
+
var LIB_VERSION = "2026.4.8";
|
|
1878
1878
|
|
|
1879
1879
|
// src/utils/graphql.ts
|
|
1880
1880
|
function minifyQuery(string) {
|
|
@@ -3558,7 +3558,7 @@ function useOptimisticCart(cart) {
|
|
|
3558
3558
|
}
|
|
3559
3559
|
|
|
3560
3560
|
// src/changelogHandler.ts
|
|
3561
|
-
var DEFAULT_GITHUB_CHANGELOG_URL = "https://raw.githubusercontent.com/Shopify/hydrogen/
|
|
3561
|
+
var DEFAULT_GITHUB_CHANGELOG_URL = "https://raw.githubusercontent.com/Shopify/hydrogen/2026-04/docs/changelog.json";
|
|
3562
3562
|
async function changelogHandler({
|
|
3563
3563
|
request,
|
|
3564
3564
|
changelogUrl
|
|
@@ -3862,6 +3862,17 @@ function getRedirectUrl(requestUrl) {
|
|
|
3862
3862
|
}
|
|
3863
3863
|
}
|
|
3864
3864
|
}
|
|
3865
|
+
function getSameOriginPath(target, origin) {
|
|
3866
|
+
if (!target) return void 0;
|
|
3867
|
+
try {
|
|
3868
|
+
const url = target.startsWith("/") ? new URL(target, origin) : new URL(target);
|
|
3869
|
+
if (url.origin !== origin) return void 0;
|
|
3870
|
+
const path = `${url.pathname}${url.search}${url.hash}`;
|
|
3871
|
+
return path.startsWith("//") ? void 0 : path;
|
|
3872
|
+
} catch {
|
|
3873
|
+
return void 0;
|
|
3874
|
+
}
|
|
3875
|
+
}
|
|
3865
3876
|
function isLocalPath(requestUrl, redirectUrl) {
|
|
3866
3877
|
try {
|
|
3867
3878
|
return new URL(requestUrl).origin === new URL(redirectUrl, requestUrl).origin;
|
|
@@ -4200,7 +4211,9 @@ function createCustomerAccountClient({
|
|
|
4200
4211
|
codeVerifier: verifier,
|
|
4201
4212
|
state,
|
|
4202
4213
|
nonce,
|
|
4203
|
-
redirectPath: getRedirectUrl(request.url) ||
|
|
4214
|
+
redirectPath: getRedirectUrl(request.url) || // The same HTTPS origin the OAuth `redirect_uri` uses, so an http
|
|
4215
|
+
// `request.url` still matches the https pages customers browse.
|
|
4216
|
+
getSameOriginPath(getHeader(request, "Referer"), httpsOrigin) || defaultRedirectPath
|
|
4204
4217
|
});
|
|
4205
4218
|
loginUrl.searchParams.append("code_challenge", challenge);
|
|
4206
4219
|
loginUrl.searchParams.append("code_challenge_method", "S256");
|