Merge branch 'main' of https://github.com/vercel/commerce into local-provider-updates

This commit is contained in:
Bel Curcio 2021-06-22 16:39:31 -03:00
commit 5f30f343b1
7 changed files with 17 additions and 6733 deletions

View File

@ -11,7 +11,7 @@ interface Props {
className?: string
product: Product
noNameTag?: boolean
imgProps?: Omit<ImageProps, 'src'>
imgProps?: Omit<ImageProps, 'src' | 'layout' | 'placeholder' | 'blurDataURL'>
variant?: 'default' | 'slim' | 'simple'
}

View File

@ -1,4 +1,4 @@
import useSWR, { responseInterface } from 'swr'
import useSWR, { SWRResponse } from 'swr'
import type {
HookSWRInput,
HookFetchInput,
@ -11,7 +11,7 @@ import type {
import defineProperty from './define-property'
import { CommerceError } from './errors'
export type ResponseState<Result> = responseInterface<Result, CommerceError> & {
export type ResponseState<Result> = SWRResponse<Result, CommerceError> & {
isLoading: boolean
}
@ -72,7 +72,7 @@ const useData: UseData = (options, input, fetcherFn, swrOptions) => {
})
}
return response
return response as typeof response & { isLoading: boolean }
}
export default useData

View File

@ -12,9 +12,6 @@ const isSwell = provider === 'swell'
const isVendure = provider === 'vendure'
module.exports = withCommerceConfig({
future: {
webpack5: true,
},
commerce,
i18n: {
locales: ['en-US', 'es'],

View File

@ -7,7 +7,7 @@
"start": "next start",
"analyze": "BUNDLE_ANALYZE=both yarn build",
"prettier-fix": "prettier --write .",
"find:unused": "next-unused",
"find:unused": "npx next-unused",
"generate": "graphql-codegen",
"generate:shopify": "DOTENV_CONFIG_PATH=./.env.local graphql-codegen -r dotenv/config --config framework/shopify/codegen.json",
"generate:vendure": "graphql-codegen --config framework/vendure/codegen.json",
@ -32,26 +32,26 @@
"lodash.debounce": "^4.0.8",
"lodash.random": "^3.2.0",
"lodash.throttle": "^4.1.1",
"next": "10.0.9-canary.5",
"next-seo": "^4.24.0",
"next": "^11.0.0",
"next-seo": "^4.26.0",
"next-themes": "^0.0.14",
"postcss": "^8.3.0",
"postcss": "^8.3.5",
"postcss-nesting": "^8.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-fast-marquee": "^1.1.3",
"react-fast-marquee": "^1.1.4",
"react-merge-refs": "^1.1.0",
"react-use-measure": "^2.0.4",
"swell-js": "^4.0.0-next.0",
"swr": "^0.5.6",
"tabbable": "^5.2.0",
"tailwindcss": "^2.1.2"
"tailwindcss": "^2.2.2"
},
"devDependencies": {
"@graphql-codegen/cli": "^1.21.5",
"@graphql-codegen/schema-ast": "^1.18.3",
"@graphql-codegen/typescript": "^1.22.1",
"@graphql-codegen/typescript-operations": "^1.18.0",
"@graphql-codegen/typescript": "^1.22.2",
"@graphql-codegen/typescript-operations": "^1.18.1",
"@next/bundle-analyzer": "^10.2.3",
"@types/body-scroll-lock": "^2.6.1",
"@types/cookie": "^0.4.0",
@ -59,18 +59,16 @@
"@types/lodash.debounce": "^4.0.6",
"@types/lodash.random": "^3.2.6",
"@types/lodash.throttle": "^4.1.6",
"@types/node": "^15.6.1",
"@types/node": "^15.12.4",
"@types/react": "^17.0.8",
"@types/shopify-buy": "^2.10.5",
"deepmerge": "^4.2.2",
"graphql": "^15.5.0",
"graphql": "^15.5.1",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"next-unused": "^0.0.6",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^6.7.0",
"prettier": "^2.3.0",
"typescript": "4.2.4"
"typescript": "4.3.4"
},
"husky": {
"hooks": {

View File

@ -34,6 +34,7 @@ module.exports = {
resolveJsonModule: true,
isolatedModules: true,
jsx: 'preserve',
incremental: true,
paths: {
'@lib/*': ['lib/*'],
'@utils/*': ['utils/*'],

View File

@ -14,6 +14,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"paths": {
"@lib/*": ["lib/*"],
"@utils/*": ["utils/*"],

6713
yarn.lock

File diff suppressed because it is too large Load Diff