From 20b9f0829670f12bc72c17799bbc4cd633659130 Mon Sep 17 00:00:00 2001 From: Guilherme Pacheco Date: Sat, 16 May 2020 20:42:49 -0300 Subject: [PATCH 1/3] Allow non-cell files name end with Cell --- packages/core/src/loaders/cell-loader.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/src/loaders/cell-loader.ts b/packages/core/src/loaders/cell-loader.ts index efb1baaeaa47..1a08d4e73e2a 100644 --- a/packages/core/src/loaders/cell-loader.ts +++ b/packages/core/src/loaders/cell-loader.ts @@ -1,4 +1,8 @@ export default function (source: string) { + if (source.match('export default')) { + return source + } + const exports: string[] = [] const names = [ From 8b76e3dc1252652b975333f30c06b8c185bdb1fa Mon Sep 17 00:00:00 2001 From: Guilherme Pacheco Date: Mon, 18 May 2020 15:38:55 -0300 Subject: [PATCH 2/3] Check for QUERY export before ignoring a Cell file with default export --- packages/core/src/loaders/cell-loader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/loaders/cell-loader.ts b/packages/core/src/loaders/cell-loader.ts index 1a08d4e73e2a..f3ff4175a733 100644 --- a/packages/core/src/loaders/cell-loader.ts +++ b/packages/core/src/loaders/cell-loader.ts @@ -1,5 +1,5 @@ export default function (source: string) { - if (source.match('export default')) { + if (source.match('export default') && !source.match('export const QUERY')) { return source } From 8f2ae2a148070b185488cde539e346fad49cd581 Mon Sep 17 00:00:00 2001 From: Guilherme Pacheco Date: Wed, 20 May 2020 15:15:58 -0300 Subject: [PATCH 3/3] Run yarn lint --fix --- packages/web/src/components/RedwoodProvider.js | 1 - packages/web/src/graphql/index.js | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/web/src/components/RedwoodProvider.js b/packages/web/src/components/RedwoodProvider.js index 99abb93e861d..37128d66eb29 100644 --- a/packages/web/src/components/RedwoodProvider.js +++ b/packages/web/src/components/RedwoodProvider.js @@ -29,7 +29,6 @@ const GraphQLProviderWithAuth = ({ return null } - if (!isAuthenticated) { return ( diff --git a/packages/web/src/graphql/index.js b/packages/web/src/graphql/index.js index ba7fa0e985f1..fbdaab804cf8 100644 --- a/packages/web/src/graphql/index.js +++ b/packages/web/src/graphql/index.js @@ -20,6 +20,5 @@ export const createGraphQLClient = (config) => { * A GraphQL provider that instantiates a client automatically. */ export const GraphQLProvider = ({ config, ...rest }) => { - return }