@shopify/hydrogen 2025.7.2 → 2025.7.3
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 +27 -24
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +27 -24
- package/dist/development/index.js.map +1 -1
- package/dist/production/index.cjs +27 -27
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.d.cts +2 -0
- package/dist/production/index.d.ts +2 -0
- package/dist/production/index.js +27 -27
- package/dist/production/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -434,7 +434,7 @@ function getPrivacyBanner() {
|
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
// package.json
|
|
437
|
-
var version = "2025.7.
|
|
437
|
+
var version = "2025.7.3";
|
|
438
438
|
|
|
439
439
|
// src/analytics-manager/ShopifyAnalytics.tsx
|
|
440
440
|
function getCustomerPrivacyRequired() {
|
|
@@ -1827,7 +1827,7 @@ function generateUUID() {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
|
|
1829
1829
|
// src/version.ts
|
|
1830
|
-
var LIB_VERSION = "2025.7.
|
|
1830
|
+
var LIB_VERSION = "2025.7.3";
|
|
1831
1831
|
|
|
1832
1832
|
// src/utils/graphql.ts
|
|
1833
1833
|
function minifyQuery(string) {
|
|
@@ -3859,12 +3859,13 @@ function createCustomerAccountClient({
|
|
|
3859
3859
|
);
|
|
3860
3860
|
loginUrl.searchParams.append("state", state);
|
|
3861
3861
|
loginUrl.searchParams.append("nonce", nonce);
|
|
3862
|
-
const
|
|
3862
|
+
const locale = getMaybeLocale({
|
|
3863
3863
|
contextLanguage: language ?? null,
|
|
3864
|
+
localeOverride: options?.locale ?? null,
|
|
3864
3865
|
uiLocalesOverride: options?.uiLocales ?? null
|
|
3865
3866
|
});
|
|
3866
|
-
if (
|
|
3867
|
-
loginUrl.searchParams.append("
|
|
3867
|
+
if (locale != null) {
|
|
3868
|
+
loginUrl.searchParams.append("locale", locale);
|
|
3868
3869
|
}
|
|
3869
3870
|
if (options?.countryCode) {
|
|
3870
3871
|
loginUrl.searchParams.append("region_country", options.countryCode);
|
|
@@ -3874,6 +3875,12 @@ function createCustomerAccountClient({
|
|
|
3874
3875
|
}
|
|
3875
3876
|
if (options?.loginHint) {
|
|
3876
3877
|
loginUrl.searchParams.append("login_hint", options.loginHint);
|
|
3878
|
+
if (options?.loginHintMode) {
|
|
3879
|
+
loginUrl.searchParams.append(
|
|
3880
|
+
"login_hint_mode",
|
|
3881
|
+
options.loginHintMode
|
|
3882
|
+
);
|
|
3883
|
+
}
|
|
3877
3884
|
}
|
|
3878
3885
|
const verifier = generateCodeVerifier();
|
|
3879
3886
|
const challenge = await generateCodeChallenge(verifier);
|
|
@@ -4057,32 +4064,28 @@ function createIfInvalidCredentialThrowError(getCustomerAccountUrl, customerAcco
|
|
|
4057
4064
|
}
|
|
4058
4065
|
};
|
|
4059
4066
|
}
|
|
4060
|
-
function
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
if (language == null) {
|
|
4067
|
-
return null;
|
|
4067
|
+
function getMaybeLocale(params) {
|
|
4068
|
+
if (params.localeOverride != null) {
|
|
4069
|
+
return toLocaleString(params.localeOverride);
|
|
4070
|
+
}
|
|
4071
|
+
if (params.uiLocalesOverride != null) {
|
|
4072
|
+
return toLocaleString(params.uiLocalesOverride);
|
|
4068
4073
|
}
|
|
4069
|
-
|
|
4070
|
-
|
|
4074
|
+
if (params.contextLanguage != null) {
|
|
4075
|
+
return toLocaleString(params.contextLanguage);
|
|
4076
|
+
}
|
|
4077
|
+
return null;
|
|
4078
|
+
}
|
|
4079
|
+
function toLocaleString(language) {
|
|
4080
|
+
const base = language.toLowerCase().replaceAll("_", "-");
|
|
4071
4081
|
const tokens = base.split("-");
|
|
4072
|
-
const langToken = tokens
|
|
4073
|
-
const regionToken = tokens
|
|
4082
|
+
const langToken = tokens[0];
|
|
4083
|
+
const regionToken = tokens[1];
|
|
4074
4084
|
if (regionToken) {
|
|
4075
4085
|
return `${langToken}-${regionToken.toUpperCase()}`;
|
|
4076
4086
|
}
|
|
4077
4087
|
return langToken;
|
|
4078
4088
|
}
|
|
4079
|
-
var regionalLanguageOverrides = {
|
|
4080
|
-
PT: "PT_PT",
|
|
4081
|
-
ZH: "ZH_CN"
|
|
4082
|
-
};
|
|
4083
|
-
function maybeEnforceRegionalVariant(language) {
|
|
4084
|
-
return regionalLanguageOverrides[language] ?? language;
|
|
4085
|
-
}
|
|
4086
4089
|
function createHydrogenContext(options, additionalContext) {
|
|
4087
4090
|
const {
|
|
4088
4091
|
env,
|