From 6a85fb3d5d3a572e2c6cfbcbc9d2e247a621d984 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 16 May 2024 13:05:43 +0700 Subject: [PATCH 1/2] chore: update lint, auto fallback PUBLIC_CHECKOUT_DOMAIN to PUBLIC_STORE_DOMAIN --- .eslintrc.cjs | 4 +- app/entry.server.tsx | 3 +- app/root.tsx | 12 +-- package-lock.json | 182 +++++++++++++++++------------------ storefrontapi.generated.d.ts | 105 -------------------- 5 files changed, 100 insertions(+), 206 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 6ab482a1..dcb74991 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -4,8 +4,6 @@ module.exports = { extends: [ "@remix-run/eslint-config", - "plugin:hydrogen/recommended", - "plugin:hydrogen/typescript", ], rules: { "@typescript-eslint/ban-ts-comment": "off", @@ -17,7 +15,7 @@ module.exports = { // TODO: Remove jest plugin from hydrogen/eslint-plugin "jest/no-deprecated-functions": "off", "import/order": [ - "error", + "warn", { /** * @description diff --git a/app/entry.server.tsx b/app/entry.server.tsx index 54e84df7..29164650 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -16,7 +16,8 @@ export default async function handleRequest( const { nonce, header, NonceProvider } = createContentSecurityPolicy({ ...getWeaverseCsp(request), shop: { - checkoutDomain: context.env?.PUBLIC_CHECKOUT_DOMAIN, + checkoutDomain: + context.env?.PUBLIC_CHECKOUT_DOMAIN || context.env?.PUBLIC_STORE_DOMAIN, storeDomain: context.env?.PUBLIC_STORE_DOMAIN, }, }); diff --git a/app/root.tsx b/app/root.tsx index 822e0e41..ee75d783 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,9 +1,9 @@ -import { +import { defer } from "@shopify/remix-oxygen"; +import type { + MetaArgs, type AppLoadContext, - defer, type LinksFunction, type LoaderFunctionArgs, - MetaArgs, type SerializeFrom, } from "@shopify/remix-oxygen"; import type { ShouldRevalidateFunction } from "@remix-run/react"; @@ -25,22 +25,22 @@ import { UNSTABLE_Analytics as Analytics, useNonce, } from "@shopify/hydrogen"; -import { CustomAnalytics } from "~/components/CustomAnalytics"; import invariant from "tiny-invariant"; import { withWeaverse } from "@weaverse/hydrogen"; import roboto400 from "@fontsource/roboto/400.css?url"; import roboto500 from "@fontsource/roboto/500.css?url"; import roboto700 from "@fontsource/roboto/700.css?url"; +import { CustomAnalytics } from "~/components/CustomAnalytics"; import { Layout } from "~/components"; import { seoPayload } from "~/lib/seo.server"; +import { GlobalLoading } from "~/components/global-loading"; import { GenericError } from "./components/GenericError"; import { NotFound } from "./components/NotFound"; import styles from "./styles/app.css?url"; import { DEFAULT_LOCALE, parseMenu } from "./lib/utils"; import { GlobalStyle } from "./weaverse/style"; -import { GlobalLoading } from "~/components/global-loading"; // This is important to avoid re-fetching root queries on sub-navigations export const shouldRevalidate: ShouldRevalidateFunction = ({ @@ -106,7 +106,7 @@ export async function loader({ request, context }: LoaderFunctionArgs) { publicStorefrontId: env.PUBLIC_STOREFRONT_ID, }), consent: { - checkoutDomain: env.PUBLIC_CHECKOUT_DOMAIN, + checkoutDomain: env.PUBLIC_CHECKOUT_DOMAIN || env.PUBLIC_STORE_DOMAIN, storefrontAccessToken: env.PUBLIC_STOREFRONT_API_TOKEN, }, isLoggedIn: isLoggedInPromise, diff --git a/package-lock.json b/package-lock.json index 53f40922..126384f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1717,9 +1717,9 @@ } }, "node_modules/@csstools/postcss-cascade-layers": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-4.0.4.tgz", - "integrity": "sha512-MKErv8lpEwVmAcAwidY1Kfd3oWrh2Q14kxHs9xn26XzjP/PrcdngWq63lJsZeMlBY7o+WlEOeE+FP6zPzeY2uw==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-4.0.6.tgz", + "integrity": "sha512-Xt00qGAQyqAODFiFEJNkTpSUz5VfYqnDLECdlA/Vv17nl/OIV5QfTRHGAXrBGG5YcJyHpJ+GF9gF/RZvOQz4oA==", "dev": true, "funding": [ { @@ -1732,7 +1732,7 @@ } ], "dependencies": { - "@csstools/selector-specificity": "^3.0.3", + "@csstools/selector-specificity": "^3.1.1", "postcss-selector-parser": "^6.0.13" }, "engines": { @@ -1743,9 +1743,9 @@ } }, "node_modules/@csstools/postcss-cascade-layers/node_modules/@csstools/selector-specificity": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.3.tgz", - "integrity": "sha512-KEPNw4+WW5AVEIyzC80rTbWEUatTW2lXpN8+8ILC8PiPeWPjwUzrPZDIOZ2wwqDmeqOYTdSGyL3+vE5GC3FB3Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", + "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", "dev": true, "funding": [ { @@ -2023,9 +2023,9 @@ } }, "node_modules/@csstools/postcss-is-pseudo-class": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-4.0.6.tgz", - "integrity": "sha512-HilOhAsMpFheMYkuaREZx+CGa4hsG6kQdzwXSsuqKDFzYz2eIMP213+3dH/vUbPXaWrzqLKr8m3i0dgYPoh7vg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-4.0.8.tgz", + "integrity": "sha512-0aj591yGlq5Qac+plaWCbn5cpjs5Sh0daovYUKJUOMjIp70prGH/XPLp7QjxtbFXz3CTvb0H9a35dpEuIuUi3Q==", "dev": true, "funding": [ { @@ -2038,7 +2038,7 @@ } ], "dependencies": { - "@csstools/selector-specificity": "^3.0.3", + "@csstools/selector-specificity": "^3.1.1", "postcss-selector-parser": "^6.0.13" }, "engines": { @@ -2049,9 +2049,9 @@ } }, "node_modules/@csstools/postcss-is-pseudo-class/node_modules/@csstools/selector-specificity": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.3.tgz", - "integrity": "sha512-KEPNw4+WW5AVEIyzC80rTbWEUatTW2lXpN8+8ILC8PiPeWPjwUzrPZDIOZ2wwqDmeqOYTdSGyL3+vE5GC3FB3Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", + "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", "dev": true, "funding": [ { @@ -2842,9 +2842,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.1.tgz", - "integrity": "sha512-da4/1mBJwwgJkbj4fMH7SOXq2zapgTo0LKXX1VUZ0Dxr+e8N0WbS80nSZ5+zf3lvpf8qxrkZdqkOqFfm57gXwA==", + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.2.tgz", + "integrity": "sha512-giZ/uOxWDKda44ZuyfKbykeXznfuVNkTgXOUOPJIjbayJV6FRpQ4zxUy9JMBPLaK9IJcdWtaoeQrYBMh3Rr4vQ==", "cpu": [ "x64" ], @@ -3407,11 +3407,11 @@ } }, "node_modules/@graphql-tools/code-file-loader": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/code-file-loader/-/code-file-loader-8.1.1.tgz", - "integrity": "sha512-q4KN25EPSUztc8rA8YUU3ufh721Yk12xXDbtUA+YstczWS7a1RJlghYMFEfR1HsHSYbF7cUqkbnTKSGM3o52bQ==", + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/code-file-loader/-/code-file-loader-8.1.2.tgz", + "integrity": "sha512-GrLzwl1QV2PT4X4TEEfuTmZYzIZHLqoTGBjczdUzSqgCCcqwWzLB3qrJxFQfI8e5s1qZ1bhpsO9NoMn7tvpmyA==", "dependencies": { - "@graphql-tools/graphql-tag-pluck": "8.3.0", + "@graphql-tools/graphql-tag-pluck": "8.3.1", "@graphql-tools/utils": "^10.0.13", "globby": "^11.0.3", "tslib": "^2.4.0", @@ -3574,11 +3574,11 @@ } }, "node_modules/@graphql-tools/git-loader": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/@graphql-tools/git-loader/-/git-loader-8.0.5.tgz", - "integrity": "sha512-P97/1mhruDiA6D5WUmx3n/aeGPLWj2+4dpzDOxFGGU+z9NcI/JdygMkeFpGZNHeJfw+kHfxgPcMPnxHcyhAoVA==", + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@graphql-tools/git-loader/-/git-loader-8.0.6.tgz", + "integrity": "sha512-FQFO4H5wHAmHVyuUQrjvPE8re3qJXt50TWHuzrK3dEaief7JosmlnkLMDMbMBwtwITz9u1Wpl6doPhT2GwKtlw==", "dependencies": { - "@graphql-tools/graphql-tag-pluck": "8.3.0", + "@graphql-tools/graphql-tag-pluck": "8.3.1", "@graphql-tools/utils": "^10.0.13", "is-glob": "4.0.3", "micromatch": "^4.0.4", @@ -3671,9 +3671,9 @@ } }, "node_modules/@graphql-tools/graphql-tag-pluck": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.3.0.tgz", - "integrity": "sha512-gNqukC+s7iHC7vQZmx1SEJQmLnOguBq+aqE2zV2+o1hxkExvKqyFli1SY/9gmukFIKpKutCIj+8yLOM+jARutw==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.3.1.tgz", + "integrity": "sha512-ujits9tMqtWQQq4FI4+qnVPpJvSEn7ogKtyN/gfNT+ErIn6z1e4gyVGQpTK5sgAUXq1lW4gU/5fkFFC5/sL2rQ==", "dependencies": { "@babel/core": "^7.22.9", "@babel/parser": "^7.16.8", @@ -4543,9 +4543,9 @@ } }, "node_modules/@npmcli/package-json/node_modules/glob": { - "version": "10.3.14", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.14.tgz", - "integrity": "sha512-4fkAqu93xe9Mk7le9v0y3VrPDqLKHarNi2s4Pv7f2yOvfhWfhc7hRPHC/JyqMqb8B/Dt/eGS4n7ykwf3fOsl8g==", + "version": "10.3.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", + "integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", "devOptional": true, "dependencies": { "foreground-child": "^3.1.0", @@ -4558,7 +4558,7 @@ "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -6929,9 +6929,9 @@ } }, "node_modules/@shopify/oxygen-cli": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@shopify/oxygen-cli/-/oxygen-cli-4.4.5.tgz", - "integrity": "sha512-8woMkufsMnHNNV3lVcW5ilJ94Qp3vyukPr87A0v66JFJv/cPDoAc2Pyt9WkYZ29iofiQ4JvEa/XHzzxYyjfYvw==", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@shopify/oxygen-cli/-/oxygen-cli-4.4.6.tgz", + "integrity": "sha512-GCsp0l/VQxsezNoH7ItUuYBL4DB4yolYSe8z2FY6EyJ9vD7NPxBoBsVF4ZqPqVThjLXC/9hpokLUY0lH1MpPZg==", "os": [ "darwin", "linux", @@ -6940,7 +6940,7 @@ "dependencies": { "@bugsnag/core": "^7.19.0", "@bugsnag/js": "^7.22.4", - "@bugsnag/node": "^7.22.7", + "@bugsnag/node": "^7.23.0", "async": "^3.2.5" }, "bin": { @@ -7300,9 +7300,9 @@ "devOptional": true }, "node_modules/@types/node": { - "version": "20.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz", - "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==", + "version": "20.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", + "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", "dependencies": { "undici-types": "~5.26.4" } @@ -8732,9 +8732,9 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "10.3.14", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.14.tgz", - "integrity": "sha512-4fkAqu93xe9Mk7le9v0y3VrPDqLKHarNi2s4Pv7f2yOvfhWfhc7hRPHC/JyqMqb8B/Dt/eGS4n7ykwf3fOsl8g==", + "version": "10.3.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", + "integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", "devOptional": true, "dependencies": { "foreground-child": "^3.1.0", @@ -8747,7 +8747,7 @@ "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -8841,9 +8841,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001617", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz", - "integrity": "sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA==", + "version": "1.0.30001618", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001618.tgz", + "integrity": "sha512-p407+D1tIkDvsEAPS22lJxLQQaG8OTBEqo0KhzfABGk0TU4juBNDSfH0hyAp/HRyx+M8L17z/ltyhxh27FTfQg==", "funding": [ { "type": "opencollective", @@ -9732,9 +9732,9 @@ } }, "node_modules/css-has-pseudo": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-6.0.3.tgz", - "integrity": "sha512-qIsDxK/z0byH/mpNsv5hzQ5NOl8m1FRmOLgZpx4bG5uYHnOlO2XafeMI4mFIgNSViHwoUWcxSJZyyijaAmbs+A==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-6.0.5.tgz", + "integrity": "sha512-ZTv6RlvJJZKp32jPYnAJVhowDCrRrHUTAxsYSuUPBEDJjzws6neMnzkRblxtgmv1RgcV5dhH2gn7E3wA9Wt6lw==", "dev": true, "funding": [ { @@ -9747,7 +9747,7 @@ } ], "dependencies": { - "@csstools/selector-specificity": "^3.0.3", + "@csstools/selector-specificity": "^3.1.1", "postcss-selector-parser": "^6.0.13", "postcss-value-parser": "^4.2.0" }, @@ -9759,9 +9759,9 @@ } }, "node_modules/css-has-pseudo/node_modules/@csstools/selector-specificity": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.3.tgz", - "integrity": "sha512-KEPNw4+WW5AVEIyzC80rTbWEUatTW2lXpN8+8ILC8PiPeWPjwUzrPZDIOZ2wwqDmeqOYTdSGyL3+vE5GC3FB3Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", + "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", "dev": true, "funding": [ { @@ -9856,9 +9856,9 @@ } }, "node_modules/cssdb": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-8.0.0.tgz", - "integrity": "sha512-hfpm8VXc7/dhcEWpLvKDLwImOSk1sa2DxL36OEiY/4h2MGfKjPYIMZo4hnEEl+TCJr2GwcX46jF5TafRASDe9w==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-8.0.1.tgz", + "integrity": "sha512-diegY/vnOYmPXY0bOBj5jeHaiK8MMpjgPuipirY8pF9AthtqEXgqVdKF5tnb6RTc/ZdhQqG0TBnInQ5CbbUW7Q==", "dev": true, "funding": [ { @@ -10445,9 +10445,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.762", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.762.tgz", - "integrity": "sha512-rrFvGweLxPwwSwJOjIopy3Vr+J3cIPtZzuc74bmlvmBIgQO3VYJDvVrlj94iKZ3ukXUH64Ex31hSfRTLqvjYJQ==" + "version": "1.4.768", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.768.tgz", + "integrity": "sha512-z2U3QcvNuxdkk33YV7R1bVMNq7fL23vq3WfO5BHcqrm4TnDGReouBfYKLEFh5umoK1XACjEwp8mmnhXk2EJigw==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -13146,9 +13146,9 @@ } }, "node_modules/hyphenate-style-name": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", - "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.5.tgz", + "integrity": "sha512-fedL7PRwmeVkgyhu9hLeTBaI6wcGk7JGJswdaRsa5aUbkXI1kr1xZwTPBtaYPpwf56878iDek6VbVnuWMebJmw==" }, "node_modules/iconv-lite": { "version": "0.4.24", @@ -14404,9 +14404,9 @@ } }, "node_modules/jose": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/jose/-/jose-5.2.4.tgz", - "integrity": "sha512-6ScbIk2WWCeXkmzF6bRPmEuaqy1m8SbsRFMa/FLrSCkGIhj8OLVG/IH+XHVmNMx/KUo8cVWEE6oKR4dJ+S0Rkg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.3.0.tgz", + "integrity": "sha512-IChe9AtAE79ru084ow8jzkN2lNrG3Ntfiv65Cvj9uOCE2m5LNsdHG+9EbxWxAoWRF9TgDOqLN5jm08++owDVRg==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -17385,16 +17385,16 @@ } }, "node_modules/path-scurry": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.0.tgz", - "integrity": "sha512-LNHTaVkzaYaLGlO+0u3rQTz7QrHTFOuKyba9JMTQutkmtNew8dw8wOD7mTU/5fCPZzCWpfW0XnQKzY61P0aTaw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "devOptional": true, "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -17450,9 +17450,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -18387,9 +18387,9 @@ } }, "node_modules/postcss-nesting": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-12.1.2.tgz", - "integrity": "sha512-FUmTHGDNundodutB4PUBxt/EPuhgtpk8FJGRsBhOuy+6FnkR2A8RZWIsyyy6XmhvX2DZQQWIkvu+HB4IbJm+Ew==", + "version": "12.1.4", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-12.1.4.tgz", + "integrity": "sha512-CcHOq94K137E+U4Ommu7pexcpp0Tjm24zl4UcqWs1oSLAr5cLI+jLrqQ5h/bdjhMX6cMbzunyustVNnvrzF8Zg==", "dev": true, "funding": [ { @@ -18403,7 +18403,7 @@ ], "dependencies": { "@csstools/selector-resolve-nested": "^1.1.0", - "@csstools/selector-specificity": "^3.0.3", + "@csstools/selector-specificity": "^3.1.1", "postcss-selector-parser": "^6.0.13" }, "engines": { @@ -18436,9 +18436,9 @@ } }, "node_modules/postcss-nesting/node_modules/@csstools/selector-specificity": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.3.tgz", - "integrity": "sha512-KEPNw4+WW5AVEIyzC80rTbWEUatTW2lXpN8+8ILC8PiPeWPjwUzrPZDIOZ2wwqDmeqOYTdSGyL3+vE5GC3FB3Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", + "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", "dev": true, "funding": [ { @@ -19629,9 +19629,9 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.3.14", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.14.tgz", - "integrity": "sha512-4fkAqu93xe9Mk7le9v0y3VrPDqLKHarNi2s4Pv7f2yOvfhWfhc7hRPHC/JyqMqb8B/Dt/eGS4n7ykwf3fOsl8g==", + "version": "10.3.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", + "integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", @@ -19644,7 +19644,7 @@ "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -20601,9 +20601,9 @@ } }, "node_modules/sucrase/node_modules/glob": { - "version": "10.3.14", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.14.tgz", - "integrity": "sha512-4fkAqu93xe9Mk7le9v0y3VrPDqLKHarNi2s4Pv7f2yOvfhWfhc7hRPHC/JyqMqb8B/Dt/eGS4n7ykwf3fOsl8g==", + "version": "10.3.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", + "integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", @@ -20616,7 +20616,7 @@ "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -21795,9 +21795,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz", - "integrity": "sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "funding": [ { "type": "opencollective", @@ -21814,7 +21814,7 @@ ], "dependencies": { "escalade": "^3.1.2", - "picocolors": "^1.0.0" + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" diff --git a/storefrontapi.generated.d.ts b/storefrontapi.generated.d.ts index 652d4d75..1b2107d7 100644 --- a/storefrontapi.generated.d.ts +++ b/storefrontapi.generated.d.ts @@ -977,107 +977,6 @@ export type MetaObjectsQuery = { }; }; -export type LayoutQueryVariables = StorefrontAPI.Exact<{ - language?: StorefrontAPI.InputMaybe; - headerMenuHandle: StorefrontAPI.Scalars['String']['input']; - footerMenuHandle: StorefrontAPI.Scalars['String']['input']; -}>; - -export type LayoutQuery = { - shop: Pick & { - primaryDomain: Pick; - brand?: StorefrontAPI.Maybe<{ - logo?: StorefrontAPI.Maybe<{ - image?: StorefrontAPI.Maybe>; - }>; - }>; - }; - headerMenu?: StorefrontAPI.Maybe< - Pick & { - items: Array< - Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' - > & { - items: Array< - Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' - > - >; - } - >; - } - >; - footerMenu?: StorefrontAPI.Maybe< - Pick & { - items: Array< - Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' - > & { - items: Array< - Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' - > - >; - } - >; - } - >; -}; - -export type ShopFragment = Pick< - StorefrontAPI.Shop, - 'id' | 'name' | 'description' -> & { - primaryDomain: Pick; - brand?: StorefrontAPI.Maybe<{ - logo?: StorefrontAPI.Maybe<{ - image?: StorefrontAPI.Maybe>; - }>; - }>; -}; - -export type MenuItemFragment = Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' ->; - -export type ChildMenuItemFragment = Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' ->; - -export type ParentMenuItemFragment = Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' -> & { - items: Array< - Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' - > - >; -}; - -export type MenuFragment = Pick & { - items: Array< - Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' - > & { - items: Array< - Pick< - StorefrontAPI.MenuItem, - 'id' | 'resourceId' | 'tags' | 'title' | 'type' | 'url' - > - >; - } - >; -}; - export type GetShopPrimaryDomainQueryVariables = StorefrontAPI.Exact<{ [key: string]: never; }>; @@ -1349,10 +1248,6 @@ interface GeneratedQueryTypes { return: MetaObjectsQuery; variables: MetaObjectsQueryVariables; }; - '#graphql\n query layout(\n $language: LanguageCode\n $headerMenuHandle: String!\n $footerMenuHandle: String!\n ) @inContext(language: $language) {\n shop {\n ...Shop\n }\n headerMenu: menu(handle: $headerMenuHandle) {\n ...Menu\n }\n footerMenu: menu(handle: $footerMenuHandle) {\n ...Menu\n }\n }\n fragment Shop on Shop {\n id\n name\n description\n primaryDomain {\n url\n }\n brand {\n logo {\n image {\n url\n }\n }\n }\n }\n fragment MenuItem on MenuItem {\n id\n resourceId\n tags\n title\n type\n url\n }\n fragment ChildMenuItem on MenuItem {\n ...MenuItem\n }\n fragment ParentMenuItem on MenuItem {\n ...MenuItem\n items {\n ...ChildMenuItem\n }\n }\n fragment Menu on Menu {\n id\n items {\n ...ParentMenuItem\n }\n }\n': { - return: LayoutQuery; - variables: LayoutQueryVariables; - }; '#graphql\n query getShopPrimaryDomain { shop { primaryDomain { url } } }\n ': { return: GetShopPrimaryDomainQuery; variables: GetShopPrimaryDomainQueryVariables; From 07c2f844dbd08d89c1fa8fd94e708f55cef46023 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 17 May 2024 11:43:46 +0700 Subject: [PATCH 2/2] chore: fix package-lock.json --- package-lock.json | 154 ++++++++++++++++++++++++---------------------- 1 file changed, 79 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index 126384f3..b9c28bc5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,63 +70,6 @@ "@esbuild/linux-x64": "^0.21.1" } }, - "../../packages/core": { - "name": "@weaverse/core", - "version": "3.1.6", - "license": "MIT", - "dependencies": { - "@stitches/core": "^1.2.8" - }, - "engines": { - "node": ">=18" - } - }, - "../../packages/hydrogen": { - "name": "@weaverse/hydrogen", - "version": "3.1.6", - "license": "MIT", - "dependencies": { - "@weaverse/react": "3.1.6", - "react-error-boundary": "^4.0.13" - }, - "devDependencies": { - "@shopify/oxygen-workers-types": "4", - "@shopify/remix-oxygen": "2" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@remix-run/react": "^2", - "@shopify/hydrogen": ">=2023", - "react": ">=18", - "react-dom": ">=18" - } - }, - "../../packages/hydrogen/node_modules/@weaverse/react": { - "resolved": "../../packages/react", - "link": true - }, - "../../packages/react": { - "name": "@weaverse/react", - "version": "3.1.6", - "license": "MIT", - "dependencies": { - "@weaverse/core": "3.1.6", - "clsx": "^2.1.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "react": ">=18", - "react-dom": ">=18" - } - }, - "../../packages/react/node_modules/@weaverse/core": { - "resolved": "../../packages/core", - "link": true - }, "node_modules/@alcalzone/ansi-tokenize": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@alcalzone/ansi-tokenize/-/ansi-tokenize-0.1.3.tgz", @@ -2842,9 +2785,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.2.tgz", - "integrity": "sha512-giZ/uOxWDKda44ZuyfKbykeXznfuVNkTgXOUOPJIjbayJV6FRpQ4zxUy9JMBPLaK9IJcdWtaoeQrYBMh3Rr4vQ==", + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.3.tgz", + "integrity": "sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ==", "cpu": [ "x64" ], @@ -5941,9 +5884,9 @@ ] }, "node_modules/@rushstack/eslint-patch": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.2.tgz", - "integrity": "sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.3.tgz", + "integrity": "sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==", "dev": true }, "node_modules/@shopify/cli": { @@ -7012,6 +6955,11 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@stitches/core": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@stitches/core/-/core-1.2.8.tgz", + "integrity": "sha512-Gfkvwk9o9kE9r9XNBmJRfV8zONvXThnm1tcuojL04Uy5uRyqg93DC83lDebl0rocZCfKSjUv+fWYtMQmEDJldg==" + }, "node_modules/@szmarczak/http-timer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", @@ -7315,8 +7263,9 @@ }, "node_modules/@types/react": { "version": "18.2.75", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.75.tgz", + "integrity": "sha512-+DNnF7yc5y0bHkBTiLKqXFe+L4B3nvOphiMY3tuA5X10esmjqk7smyBZzbGTy2vsiy/Bnzj8yFIBL8xhRacoOg==", "devOptional": true, - "license": "MIT", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -7324,8 +7273,9 @@ }, "node_modules/@types/react-dom": { "version": "18.2.24", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.24.tgz", + "integrity": "sha512-cN6upcKd8zkGy4HU9F1+/s98Hrp6D4MOcippK4PoE8OZRngohHZpbJn1GsaDLz87MqvHNoT13nHvNqM9ocRHZg==", "dev": true, - "license": "MIT", "dependencies": { "@types/react": "*" } @@ -7739,9 +7689,50 @@ "integrity": "sha512-8FGD6AejeC/nXcblgNCM5rnZb9KXa4WNkR03HCWtdJBpANjTgjHEglNLFnhuvdQ78tC6afaxBPI+g7F2NX3tgg==", "devOptional": true }, + "node_modules/@weaverse/core": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@weaverse/core/-/core-3.1.6.tgz", + "integrity": "sha512-DogQGpp5ZCxelGtcQKhoXiWX4f/wZgL3fzg6uyDgKzIqZde2mlzYdCCEztmNn0CLUIZjK+Lq4Rhyb/wv4QD84g==", + "dependencies": { + "@stitches/core": "^1.2.8" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@weaverse/hydrogen": { - "resolved": "../../packages/hydrogen", - "link": true + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@weaverse/hydrogen/-/hydrogen-3.1.6.tgz", + "integrity": "sha512-C4yOdLFVeF4onC5DLnD9C5xFsxsOTqFx1CZGpfVk3uYwJzNZWwS8tA2rUatR8K1xmXPLXGviXfUiSJozSZEzJg==", + "dependencies": { + "@weaverse/react": "3.1.6", + "react-error-boundary": "^4.0.13" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@remix-run/react": "^2", + "@shopify/hydrogen": ">=2023", + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/@weaverse/react": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@weaverse/react/-/react-3.1.6.tgz", + "integrity": "sha512-v9Dxf9xqYQ7VTvX1QCyioHDRNxCVF+r8/Vt/g60tHmfpvnt3n4BPYZwftVETf/k1ISh0tZMHe2T+CQQ1iSE9FQ==", + "dependencies": { + "@weaverse/core": "3.1.6", + "clsx": "^2.1.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } }, "node_modules/@web3-storage/multipart-parser": { "version": "1.0.0", @@ -8841,9 +8832,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001618", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001618.tgz", - "integrity": "sha512-p407+D1tIkDvsEAPS22lJxLQQaG8OTBEqo0KhzfABGk0TU4juBNDSfH0hyAp/HRyx+M8L17z/ltyhxh27FTfQg==", + "version": "1.0.30001620", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz", + "integrity": "sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew==", "funding": [ { "type": "opencollective", @@ -10445,9 +10436,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.768", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.768.tgz", - "integrity": "sha512-z2U3QcvNuxdkk33YV7R1bVMNq7fL23vq3WfO5BHcqrm4TnDGReouBfYKLEFh5umoK1XACjEwp8mmnhXk2EJigw==" + "version": "1.4.773", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.773.tgz", + "integrity": "sha512-87eHF+h3PlCRwbxVEAw9KtK3v7lWfc/sUDr0W76955AdYTG4bV/k0zrl585Qnj/skRMH2qOSiE+kqMeOQ+LOpw==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -18154,8 +18145,9 @@ }, "node_modules/postcss-import": { "version": "16.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-16.1.0.tgz", + "integrity": "sha512-7hsAZ4xGXl4MW+OKEWCnF6T5jqBw80/EE9aXg1r2yyn1RsVEU8EtKXbijEODa+rg7iih4bKf7vlvTGYR4CnPNg==", "dev": true, - "license": "MIT", "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", @@ -19073,6 +19065,17 @@ "react": "^18.2.0" } }, + "node_modules/react-error-boundary": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.0.13.tgz", + "integrity": "sha512-b6PwbdSv8XeOSYvjt8LpgpKrZ0yGdtZokYwkwV2wlcZbxgopHX/hgPl5VgpnoVOWd868n1hktM8Qm4b+02MiLQ==", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "peerDependencies": { + "react": ">=16.13.1" + } + }, "node_modules/react-fast-compare": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", @@ -21402,7 +21405,8 @@ }, "node_modules/typescript": { "version": "5.4.4", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver"