diff --git a/examples/next/getting-started/package.json b/examples/next/getting-started/package.json index ec8c760a4..6e3a73567 100644 --- a/examples/next/getting-started/package.json +++ b/examples/next/getting-started/package.json @@ -12,8 +12,8 @@ "wpe-build": "next build" }, "dependencies": { - "@faustjs/core": "^0.8.0", - "@faustjs/next": "^0.8.0", + "@faustjs/core": "^0.9.0", + "@faustjs/next": "^0.9.0", "next": "^11.1.0", "normalize.css": "^8.0.1", "react": "^17.0.2", diff --git a/examples/react/getting-started/package.json b/examples/react/getting-started/package.json index 9ca9ff916..44e511c38 100644 --- a/examples/react/getting-started/package.json +++ b/examples/react/getting-started/package.json @@ -7,8 +7,8 @@ "@types/react": "^17.0.11", "@types/react-dom": "^17.0.8", "@types/react-router-dom": "^5.1.7", - "@faustjs/core": "^0.8.0", - "@faustjs/react": "^0.8.0", + "@faustjs/core": "^0.9.0", + "@faustjs/react": "^0.9.0", "dotenv": "^10.0.0", "express": "^4.17.1", "normalize.css": "^8.0.1", diff --git a/examples/react/getting-started/src/faust.config.js b/examples/react/getting-started/src/faust.config.js index 9e1e5a4b9..8eeae0795 100644 --- a/examples/react/getting-started/src/faust.config.js +++ b/examples/react/getting-started/src/faust.config.js @@ -1,10 +1,12 @@ -require('dotenv').config(); -const { headlessConfig } = require('@faustjs/core'); +import dotenv from 'dotenv'; +import { headlessConfig } from '@faustjs/core'; + +dotenv.config(); /** * @type {import("@faustjs/core").HeadlessConfig} */ -module.exports = headlessConfig({ +export default headlessConfig({ wpUrl: process.env.REACT_APP_WORDPRESS_URL || '', apiUrl: process.env.REACT_APP_API_URL, apiClientSecret: process.env.WP_HEADLESS_SECRET, diff --git a/packages/core/package.json b/packages/core/package.json index 65366a09c..cbc55e1db 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@faustjs/core", - "version": "0.8.0", + "version": "0.9.0", "description": "This module helps you use WordPress as a Headless CMS", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js", diff --git a/packages/core/src/api/client/index.ts b/packages/core/src/api/client/index.ts index ec266075c..0723faecc 100644 --- a/packages/core/src/api/client/index.ts +++ b/packages/core/src/api/client/index.ts @@ -32,7 +32,7 @@ export interface RequestContext { export function createQueryFetcher( context?: IncomingMessage, applyRequestContext?: ClientConfig['applyRequestContext'], -) { +): QueryFetcher { return async function (query, variables): Promise { const url = getGqlUrl(); const token = getAccessToken({ diff --git a/packages/next/package.json b/packages/next/package.json index 294634bb7..d0386d6e2 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "@faustjs/next", - "version": "0.8.0", + "version": "0.9.0", "description": "This module helps you use WordPress as a Headless CMS with Next.js", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js", @@ -81,8 +81,8 @@ "dependencies": { "@gqty/logger": "^1.0.2", "@gqty/react": "^1.1.0", - "@faustjs/core": "^0.8.0", - "@faustjs/react": "^0.8.0", + "@faustjs/core": "^0.9.0", + "@faustjs/react": "^0.9.0", "graphql": ">=15.5", "lodash": "^4.17.21" } diff --git a/packages/react/package.json b/packages/react/package.json index ce32ca0cf..2c96dc115 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@faustjs/react", - "version": "0.8.0", + "version": "0.9.0", "description": "This module helps you use WordPress as a Headless CMS with React", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js", @@ -76,7 +76,7 @@ }, "dependencies": { "@gqty/react": "^1.1.0", - "@faustjs/core": "^0.8.0", + "@faustjs/core": "^0.9.0", "gqty": "^1.0.3", "graphql": ">=15.5", "lodash": "^4.17.21"