diff --git a/framework/shopify/README.md b/framework/shopify/README.md index fc6a70ce3..67f36cf8d 100644 --- a/framework/shopify/README.md +++ b/framework/shopify/README.md @@ -26,12 +26,7 @@ Collection of hooks and data fetching functions to integrate Shopify in a React 1. Install dependencies: -``` -yarn install shopify-buy -yarn install -D @types/shopify-buy -``` - -3. Environment variables need to be set: +2. Environment variables need to be set: ``` SHOPIFY_STORE_DOMAIN= @@ -40,7 +35,7 @@ NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN= NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN= ``` -4. Point the framework to `shopify` by updating `tsconfig.json`: +3. Point the framework to `shopify` by updating `tsconfig.json`: ``` "@framework/*": ["framework/shopify/*"], diff --git a/framework/shopify/api/operations/get-all-collections.ts b/framework/shopify/api/operations/get-all-collections.ts deleted file mode 100644 index 9cf216a91..000000000 --- a/framework/shopify/api/operations/get-all-collections.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Client from 'shopify-buy' -import { ShopifyConfig } from '../index' - -type Options = { - config: ShopifyConfig -} - -const getAllCollections = async (options: Options) => { - const { config } = options - - const client = Client.buildClient({ - storefrontAccessToken: config.apiToken, - domain: config.commerceUrl, - }) - - const res = await client.collection.fetchAllWithProducts() - - return JSON.parse(JSON.stringify(res)) -} - -export default getAllCollections diff --git a/package.json b/package.json index 491071e55..ed6c25947 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "react-dom": "^17.0.1", "react-merge-refs": "^1.1.0", "react-ticker": "^1.2.2", - "shopify-buy": "^2.11.0", "swr": "^0.4.0", "tabbable": "^5.1.5", "tailwindcss": "^2.0.2" @@ -66,7 +65,6 @@ "@types/lodash.throttle": "^4.1.6", "@types/node": "^14.14.16", "@types/react": "^17.0.0", - "@types/shopify-buy": "^2.10.5", "deepmerge": "^4.2.2", "graphql": "^15.4.0", "husky": "^4.3.8", diff --git a/yarn.lock b/yarn.lock index 9238b1f03..ce63461c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1129,11 +1129,6 @@ "@types/prop-types" "*" csstype "^3.0.2" -"@types/shopify-buy@^2.10.5": - version "2.10.5" - resolved "https://registry.yarnpkg.com/@types/shopify-buy/-/shopify-buy-2.10.5.tgz#c7184b792989a968af879224e8990cde4db45519" - integrity sha512-12Le/iXPynrONntux/OaXf9+yx0zbMBKhwywdej9mfR8YhXB82pPZYzU3o6j8cjK1uCQ/wWkqLTftpaXpeMKig== - "@types/warning@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/warning/-/warning-3.0.0.tgz#0d2501268ad8f9962b740d387c4654f5f8e23e52" @@ -6219,11 +6214,6 @@ shell-quote@1.7.2: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== -shopify-buy@^2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/shopify-buy/-/shopify-buy-2.11.0.tgz#0f7cb52741395e4ae778c336f32ddf3fe67c2f35" - integrity sha512-bGjS1b/VCPvCjazSstlKwgLtK1WBotWom06/12loja8yfo/cWkLuJsakBbQe1uEIDiOLhKaR0M0CAXZFheYDug== - signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"