@shopify/hydrogen 2025.10.0 → 2026.1.0
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/customer-account-api-types.d.ts +643 -8
- package/dist/customer-account.schema.json +1 -1
- package/dist/dev/{get-virtual-routes-ZEUPNZWL.js → get-virtual-routes-H72465VB.js} +8 -3
- package/dist/dev/hydrogen-routes.js +1 -1
- package/dist/development/{get-virtual-routes-XE7G57DS.js → get-virtual-routes-ACFZHU42.js} +10 -6
- package/dist/development/get-virtual-routes-ACFZHU42.js.map +1 -0
- package/dist/development/index.cjs +14 -9
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +7 -7
- package/dist/development/index.js.map +1 -1
- package/dist/production/get-virtual-routes-ZZEGQQDV.js +3 -0
- package/dist/production/get-virtual-routes-ZZEGQQDV.js.map +1 -0
- package/dist/production/index.cjs +47 -47
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.d.cts +7 -7
- package/dist/production/index.d.ts +7 -7
- package/dist/production/index.js +6 -6
- package/dist/production/index.js.map +1 -1
- package/dist/storefront-api-types.d.ts +48 -4
- package/dist/storefront.schema.json +1 -1
- package/dist/vite/get-virtual-routes.d.ts +6 -1
- package/dist/vite/get-virtual-routes.js +8 -3
- package/package.json +2 -2
- package/dist/development/get-virtual-routes-XE7G57DS.js.map +0 -1
- package/dist/production/get-virtual-routes-MYYLGSAS.js +0 -3
- package/dist/production/get-virtual-routes-MYYLGSAS.js.map +0 -1
|
@@ -6,15 +6,19 @@ var VIRTUAL_ROUTES_ROUTES_DIR_PARTS = [
|
|
|
6
6
|
"routes"
|
|
7
7
|
];
|
|
8
8
|
var VIRTUAL_ROUTES_DIR_PARTS = ["vite", "virtual-routes"];
|
|
9
|
-
function
|
|
10
|
-
const basePath = new URL("../",
|
|
9
|
+
function createVirtualRoutesPath(baseUrl, pathParts, forFile) {
|
|
10
|
+
const basePath = new URL("../", baseUrl);
|
|
11
11
|
const virtualRoutesPath = pathParts.reduce((working, dirPart) => {
|
|
12
12
|
return new URL(`${dirPart}/`, working);
|
|
13
13
|
}, basePath);
|
|
14
|
-
|
|
14
|
+
const pathname = new URL(forFile, virtualRoutesPath).pathname.replace(
|
|
15
15
|
/^\/[a-zA-Z]:\//,
|
|
16
16
|
"/"
|
|
17
17
|
);
|
|
18
|
+
return decodeURIComponent(pathname);
|
|
19
|
+
}
|
|
20
|
+
function getVirtualRoutesPath(pathParts, forFile) {
|
|
21
|
+
return createVirtualRoutesPath(import.meta.url, pathParts, forFile);
|
|
18
22
|
}
|
|
19
23
|
async function getVirtualRoutesV3() {
|
|
20
24
|
return {
|
|
@@ -65,5 +69,6 @@ export {
|
|
|
65
69
|
VIRTUAL_ROUTES_DIR,
|
|
66
70
|
VIRTUAL_ROUTES_DIR_PARTS,
|
|
67
71
|
VIRTUAL_ROUTES_ROUTES_DIR_PARTS,
|
|
72
|
+
createVirtualRoutesPath,
|
|
68
73
|
getVirtualRoutesV3
|
|
69
74
|
};
|
|
@@ -4,7 +4,7 @@ async function hydrogenRoutes(currentRoutes) {
|
|
|
4
4
|
if (env === "production") {
|
|
5
5
|
return currentRoutes;
|
|
6
6
|
}
|
|
7
|
-
const { getVirtualRoutesV3 } = await import("./get-virtual-routes-
|
|
7
|
+
const { getVirtualRoutesV3 } = await import("./get-virtual-routes-H72465VB.js");
|
|
8
8
|
const { layout, routes: virtualRoutes } = await getVirtualRoutesV3();
|
|
9
9
|
const childVirtualRoutes = virtualRoutes.map(({ path, file, index, id }) => {
|
|
10
10
|
return {
|
|
@@ -6,15 +6,19 @@ var VIRTUAL_ROUTES_ROUTES_DIR_PARTS = [
|
|
|
6
6
|
"routes"
|
|
7
7
|
];
|
|
8
8
|
var VIRTUAL_ROUTES_DIR_PARTS = ["vite", "virtual-routes"];
|
|
9
|
-
function
|
|
10
|
-
const basePath = new URL("../",
|
|
9
|
+
function createVirtualRoutesPath(baseUrl, pathParts, forFile) {
|
|
10
|
+
const basePath = new URL("../", baseUrl);
|
|
11
11
|
const virtualRoutesPath = pathParts.reduce((working, dirPart) => {
|
|
12
12
|
return new URL(`${dirPart}/`, working);
|
|
13
13
|
}, basePath);
|
|
14
|
-
|
|
14
|
+
const pathname = new URL(forFile, virtualRoutesPath).pathname.replace(
|
|
15
15
|
/^\/[a-zA-Z]:\//,
|
|
16
16
|
"/"
|
|
17
17
|
);
|
|
18
|
+
return decodeURIComponent(pathname);
|
|
19
|
+
}
|
|
20
|
+
function getVirtualRoutesPath(pathParts, forFile) {
|
|
21
|
+
return createVirtualRoutesPath(import.meta.url, pathParts, forFile);
|
|
18
22
|
}
|
|
19
23
|
async function getVirtualRoutesV3() {
|
|
20
24
|
return {
|
|
@@ -62,6 +66,6 @@ async function getVirtualRoutesV3() {
|
|
|
62
66
|
};
|
|
63
67
|
}
|
|
64
68
|
|
|
65
|
-
export { VIRTUAL_ROUTES_DIR, VIRTUAL_ROUTES_DIR_PARTS, VIRTUAL_ROUTES_ROUTES_DIR_PARTS, getVirtualRoutesV3 };
|
|
66
|
-
//# sourceMappingURL=get-virtual-routes-
|
|
67
|
-
//# sourceMappingURL=get-virtual-routes-
|
|
69
|
+
export { VIRTUAL_ROUTES_DIR, VIRTUAL_ROUTES_DIR_PARTS, VIRTUAL_ROUTES_ROUTES_DIR_PARTS, createVirtualRoutesPath, getVirtualRoutesV3 };
|
|
70
|
+
//# sourceMappingURL=get-virtual-routes-ACFZHU42.js.map
|
|
71
|
+
//# sourceMappingURL=get-virtual-routes-ACFZHU42.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/vite/get-virtual-routes.ts"],"names":[],"mappings":";AACO,IAAM,kBAAA,GAAqB;AAC3B,IAAM,+BAAA,GAAkC;AAAA,EAC7C,MAAA;AAAA,EACA,gBAAA;AAAA,EACA;AACF;AACO,IAAM,wBAAA,GAA2B,CAAC,MAAA,EAAQ,gBAAgB;AAM1D,SAAS,uBAAA,CACd,OAAA,EACA,SAAA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AAA,QACA,KAAA,EAAO;AAAA,OACT;AAAA,MACA;AAAA,QACE,EAAA,EAAI,GAAG,kBAAkB,CAAA,MAAA,CAAA;AAAA,QACzB,IAAA,EAAM,EAAA;AAAA,QACN,IAAA,EAAM,oBAAA;AAAA,UACJ,+BAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,KAAA,EAAO;AAAA;AACT,KACF;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,oBAAA,CAAqB,wBAAA,EAA0B,YAAY;AAAA;AACnE,GACF;AACF","file":"get-virtual-routes-ACFZHU42.js","sourcesContent":["// v3_routeConfig virtual routes constants\nexport const VIRTUAL_ROUTES_DIR = 'vite/virtual-routes/routes';\nexport const VIRTUAL_ROUTES_ROUTES_DIR_PARTS = [\n 'vite',\n 'virtual-routes',\n 'routes',\n];\nexport const VIRTUAL_ROUTES_DIR_PARTS = ['vite', 'virtual-routes'];\n\n/**\n * @internal\n * Exported for testing only.\n */\nexport function createVirtualRoutesPath(\n baseUrl: string,\n pathParts: Array<string>,\n forFile: string,\n): string {\n const basePath = new URL('../', baseUrl);\n const virtualRoutesPath = pathParts.reduce((working, dirPart) => {\n return new URL(`${dirPart}/`, working);\n }, basePath);\n\n // Getting rid of the drive path (ie. '/C:/') in windows\n const pathname = new URL(forFile, virtualRoutesPath).pathname.replace(\n /^\\/[a-zA-Z]:\\//,\n '/',\n );\n\n // Decode URI components to handle spaces and special characters in file paths\n return decodeURIComponent(pathname);\n}\n\nfunction getVirtualRoutesPath(\n pathParts: Array<string>,\n forFile: string,\n): string {\n return createVirtualRoutesPath(import.meta.url, pathParts, forFile);\n}\n\nexport async function getVirtualRoutesV3() {\n return {\n routes: [\n {\n id: `${VIRTUAL_ROUTES_DIR}/graphiql`,\n path: 'graphiql',\n file: getVirtualRoutesPath(\n VIRTUAL_ROUTES_ROUTES_DIR_PARTS,\n 'graphiql.jsx',\n ),\n index: false,\n },\n {\n id: `${VIRTUAL_ROUTES_DIR}/subrequest-profiler`,\n path: 'subrequest-profiler',\n file: getVirtualRoutesPath(\n VIRTUAL_ROUTES_ROUTES_DIR_PARTS,\n 'subrequest-profiler.jsx',\n ),\n index: false,\n },\n {\n id: `${VIRTUAL_ROUTES_DIR}/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json`,\n path: '.well-known/appspecific/com.chrome.devtools.json',\n file: getVirtualRoutesPath(\n VIRTUAL_ROUTES_ROUTES_DIR_PARTS,\n '[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx',\n ),\n index: false,\n },\n {\n id: `${VIRTUAL_ROUTES_DIR}/index`,\n path: '',\n file: getVirtualRoutesPath(\n VIRTUAL_ROUTES_ROUTES_DIR_PARTS,\n 'index.jsx',\n ),\n index: true,\n },\n ],\n layout: {\n file: getVirtualRoutesPath(VIRTUAL_ROUTES_DIR_PARTS, 'layout.jsx'),\n },\n };\n}\n"]}
|
|
@@ -30,17 +30,22 @@ __export(get_virtual_routes_exports, {
|
|
|
30
30
|
VIRTUAL_ROUTES_DIR: () => VIRTUAL_ROUTES_DIR,
|
|
31
31
|
VIRTUAL_ROUTES_DIR_PARTS: () => VIRTUAL_ROUTES_DIR_PARTS,
|
|
32
32
|
VIRTUAL_ROUTES_ROUTES_DIR_PARTS: () => VIRTUAL_ROUTES_ROUTES_DIR_PARTS,
|
|
33
|
+
createVirtualRoutesPath: () => createVirtualRoutesPath,
|
|
33
34
|
getVirtualRoutesV3: () => getVirtualRoutesV3
|
|
34
35
|
});
|
|
35
|
-
function
|
|
36
|
-
const basePath = new URL("../",
|
|
36
|
+
function createVirtualRoutesPath(baseUrl, pathParts, forFile) {
|
|
37
|
+
const basePath = new URL("../", baseUrl);
|
|
37
38
|
const virtualRoutesPath = pathParts.reduce((working, dirPart) => {
|
|
38
39
|
return new URL(`${dirPart}/`, working);
|
|
39
40
|
}, basePath);
|
|
40
|
-
|
|
41
|
+
const pathname = new URL(forFile, virtualRoutesPath).pathname.replace(
|
|
41
42
|
/^\/[a-zA-Z]:\//,
|
|
42
43
|
"/"
|
|
43
44
|
);
|
|
45
|
+
return decodeURIComponent(pathname);
|
|
46
|
+
}
|
|
47
|
+
function getVirtualRoutesPath(pathParts, forFile) {
|
|
48
|
+
return createVirtualRoutesPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)), pathParts, forFile);
|
|
44
49
|
}
|
|
45
50
|
async function getVirtualRoutesV3() {
|
|
46
51
|
return {
|
|
@@ -605,7 +610,7 @@ function getPrivacyBanner() {
|
|
|
605
610
|
}
|
|
606
611
|
|
|
607
612
|
// package.json
|
|
608
|
-
var version = "
|
|
613
|
+
var version = "2026.1.0";
|
|
609
614
|
|
|
610
615
|
// src/analytics-manager/ShopifyAnalytics.tsx
|
|
611
616
|
function getCustomerPrivacyRequired() {
|
|
@@ -2000,7 +2005,7 @@ function generateUUID() {
|
|
|
2000
2005
|
}
|
|
2001
2006
|
|
|
2002
2007
|
// src/version.ts
|
|
2003
|
-
var LIB_VERSION = "
|
|
2008
|
+
var LIB_VERSION = "2026.1.0";
|
|
2004
2009
|
|
|
2005
2010
|
// src/utils/graphql.ts
|
|
2006
2011
|
function minifyQuery(string) {
|
|
@@ -2843,7 +2848,7 @@ function cartDiscountCodesUpdateDefault(options) {
|
|
|
2843
2848
|
var CART_DISCOUNT_CODE_UPDATE_MUTATION = (cartFragment = MINIMAL_CART_FRAGMENT) => `#graphql
|
|
2844
2849
|
mutation cartDiscountCodesUpdate(
|
|
2845
2850
|
$cartId: ID!
|
|
2846
|
-
$discountCodes: [String!]
|
|
2851
|
+
$discountCodes: [String!]!
|
|
2847
2852
|
$language: LanguageCode
|
|
2848
2853
|
$country: CountryCode
|
|
2849
2854
|
$visitorConsent: VisitorConsent
|
|
@@ -3591,7 +3596,7 @@ var hydrogenContext = {
|
|
|
3591
3596
|
};
|
|
3592
3597
|
|
|
3593
3598
|
// src/customer/constants.ts
|
|
3594
|
-
var DEFAULT_CUSTOMER_API_VERSION = "
|
|
3599
|
+
var DEFAULT_CUSTOMER_API_VERSION = "2026-01";
|
|
3595
3600
|
var USER_AGENT = `Shopify Hydrogen ${LIB_VERSION}`;
|
|
3596
3601
|
var CUSTOMER_API_CLIENT_ID = "30243aa5-17c1-465a-8493-944bcc4e88aa";
|
|
3597
3602
|
var CUSTOMER_ACCOUNT_SESSION_KEY = "customerAccount";
|
|
@@ -6566,14 +6571,14 @@ var QUERIES = {
|
|
|
6566
6571
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartNoteUpdate
|
|
6567
6572
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartSelectedDeliveryOptionsUpdate
|
|
6568
6573
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartMetafieldsSet
|
|
6569
|
-
//! @see https://shopify.dev/docs/api/storefront/
|
|
6574
|
+
//! @see https://shopify.dev/docs/api/storefront/2026-01/mutations/cartMetafieldDelete
|
|
6570
6575
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartGiftCardCodesUpdate
|
|
6571
6576
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartGiftCardCodesAdd
|
|
6572
6577
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartGiftCardCodesRemove
|
|
6573
6578
|
//! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartDeliveryAddressesAdd
|
|
6574
6579
|
//! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartDeliveryAddressesRemove
|
|
6575
6580
|
//! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartDeliveryAddressesUpdate
|
|
6576
|
-
//! @see: https://shopify.dev/docs/api/storefront/
|
|
6581
|
+
//! @see: https://shopify.dev/docs/api/storefront/2026-01/mutations/cartDeliveryAddressesReplace
|
|
6577
6582
|
|
|
6578
6583
|
Object.defineProperty(exports, "AnalyticsEventName", {
|
|
6579
6584
|
enumerable: true,
|