From 67ef7d942080f685d7e70e8f15efac82442f5083 Mon Sep 17 00:00:00 2001 From: Will Johnston Date: Wed, 30 Jun 2021 11:03:57 -0700 Subject: [PATCH] Setting @faustjs as framework name (#319) * feat: (#317) setting @faustjs as framework name * fix: lint issues --- examples/next/getting-started/next-env.d.ts | 1 + examples/next/getting-started/package.json | 4 +- .../next/getting-started/src/client/index.ts | 2 +- .../src/components/Pagination.tsx | 2 +- .../src/pages/[...pageUri].tsx | 2 +- .../next/getting-started/src/pages/_app.tsx | 4 +- .../src/pages/api/auth/wpe-headless.ts | 2 +- .../[paginationTerm]/[categoryCursor].tsx | 2 +- .../pages/category/[categorySlug]/index.tsx | 2 +- .../getting-started/src/pages/custom-page.tsx | 2 +- .../next/getting-started/src/pages/index.tsx | 2 +- .../pages/posts/[postSlug]/[postCursor].tsx | 2 +- .../src/pages/posts/[postSlug]/index.tsx | 2 +- .../getting-started/src/pages/posts/index.tsx | 2 +- .../getting-started/src/pages/preview.tsx | 2 +- examples/react/getting-started/package.json | 4 +- examples/react/getting-started/server.js | 2 +- .../react/getting-started/src/client/index.ts | 2 +- examples/react/getting-started/src/index.tsx | 2 +- .../getting-started/src/pages/preview.tsx | 2 +- package-lock.json | 262 +++++++++--------- package.json | 20 +- packages/core/CHANGELOG.md | 4 +- packages/core/package.json | 2 +- packages/next/CHANGELOG.md | 4 +- packages/next/package.json | 6 +- packages/next/src/client.ts | 4 +- packages/next/src/getProps.ts | 6 +- packages/react/CHANGELOG.md | 4 +- packages/react/package.json | 4 +- packages/react/src/client.ts | 15 +- 31 files changed, 183 insertions(+), 193 deletions(-) diff --git a/examples/next/getting-started/next-env.d.ts b/examples/next/getting-started/next-env.d.ts index 7b7aa2c77..c6643fda1 100644 --- a/examples/next/getting-started/next-env.d.ts +++ b/examples/next/getting-started/next-env.d.ts @@ -1,2 +1,3 @@ /// /// +/// diff --git a/examples/next/getting-started/package.json b/examples/next/getting-started/package.json index 66cb2831c..783722207 100644 --- a/examples/next/getting-started/package.json +++ b/examples/next/getting-started/package.json @@ -12,8 +12,8 @@ "wpe-build": "next build" }, "dependencies": { - "@wpengine/headless-core": "^0.7.0", - "@wpengine/headless-next": "^0.7.0", + "@faustjs/core": "^0.7.0", + "@faustjs/next": "^0.7.0", "next": "^11.0.0", "normalize.css": "^8.0.1", "react": "^17.0.2", diff --git a/examples/next/getting-started/src/client/index.ts b/examples/next/getting-started/src/client/index.ts index 27c5dcaf2..884af7bd2 100644 --- a/examples/next/getting-started/src/client/index.ts +++ b/examples/next/getting-started/src/client/index.ts @@ -2,7 +2,7 @@ * GQLESS: You can safely modify this file and Query Fetcher based on your needs */ import type { IncomingMessage } from 'http'; -import { getClient } from '@wpengine/headless-next'; +import { getClient } from '@faustjs/next'; import { generatedSchema, scalarsEnumsHash, diff --git a/examples/next/getting-started/src/components/Pagination.tsx b/examples/next/getting-started/src/components/Pagination.tsx index 4a0b29815..4b569e7ce 100644 --- a/examples/next/getting-started/src/components/Pagination.tsx +++ b/examples/next/getting-started/src/components/Pagination.tsx @@ -1,5 +1,5 @@ import Link from 'next/link'; -import { WPPageInfo } from '@wpengine/headless-core'; +import { WPPageInfo } from '@faustjs/core'; interface NextPageNavigationProps { href: string; diff --git a/examples/next/getting-started/src/pages/[...pageUri].tsx b/examples/next/getting-started/src/pages/[...pageUri].tsx index c516a294c..5fc44ce14 100644 --- a/examples/next/getting-started/src/pages/[...pageUri].tsx +++ b/examples/next/getting-started/src/pages/[...pageUri].tsx @@ -1,4 +1,4 @@ -import { getNextStaticProps, is404 } from '@wpengine/headless-next'; +import { getNextStaticProps, is404 } from '@faustjs/next'; import { Footer, Header, Hero } from 'components'; import { GetStaticPropsContext } from 'next'; import Head from 'next/head'; diff --git a/examples/next/getting-started/src/pages/_app.tsx b/examples/next/getting-started/src/pages/_app.tsx index 5d4f94531..1de8faf6f 100644 --- a/examples/next/getting-started/src/pages/_app.tsx +++ b/examples/next/getting-started/src/pages/_app.tsx @@ -1,5 +1,5 @@ -import { headlessConfig } from '@wpengine/headless-core'; -import { HeadlessProvider } from '@wpengine/headless-next'; +import { headlessConfig } from '@faustjs/core'; +import { HeadlessProvider } from '@faustjs/next'; import 'normalize.css/normalize.css'; import React from 'react'; import 'scss/main.scss'; diff --git a/examples/next/getting-started/src/pages/api/auth/wpe-headless.ts b/examples/next/getting-started/src/pages/api/auth/wpe-headless.ts index f88e3ee85..ca7cce825 100644 --- a/examples/next/getting-started/src/pages/api/auth/wpe-headless.ts +++ b/examples/next/getting-started/src/pages/api/auth/wpe-headless.ts @@ -1,3 +1,3 @@ -import { authorizeHandler } from '@wpengine/headless-core'; +import { authorizeHandler } from '@faustjs/core'; export default authorizeHandler; diff --git a/examples/next/getting-started/src/pages/category/[categorySlug]/[paginationTerm]/[categoryCursor].tsx b/examples/next/getting-started/src/pages/category/[categorySlug]/[paginationTerm]/[categoryCursor].tsx index 26dcf4e57..adc69b890 100644 --- a/examples/next/getting-started/src/pages/category/[categorySlug]/[paginationTerm]/[categoryCursor].tsx +++ b/examples/next/getting-started/src/pages/category/[categorySlug]/[paginationTerm]/[categoryCursor].tsx @@ -1,6 +1,6 @@ import { GetStaticPropsContext } from 'next'; import Page from 'pages/category/[categorySlug]'; -import { getNextStaticProps } from '@wpengine/headless-next'; +import { getNextStaticProps } from '@faustjs/next'; import { client } from 'client'; export default Page; diff --git a/examples/next/getting-started/src/pages/category/[categorySlug]/index.tsx b/examples/next/getting-started/src/pages/category/[categorySlug]/index.tsx index ccaee633b..9f88cd916 100644 --- a/examples/next/getting-started/src/pages/category/[categorySlug]/index.tsx +++ b/examples/next/getting-started/src/pages/category/[categorySlug]/index.tsx @@ -1,4 +1,4 @@ -import { getNextStaticProps, is404 } from '@wpengine/headless-next'; +import { getNextStaticProps, is404 } from '@faustjs/next'; import Head from 'next/head'; import { Header, Footer, Posts, Pagination } from 'components'; import { GetStaticPropsContext } from 'next'; diff --git a/examples/next/getting-started/src/pages/custom-page.tsx b/examples/next/getting-started/src/pages/custom-page.tsx index 649b33fb5..2a2d6a0a2 100644 --- a/examples/next/getting-started/src/pages/custom-page.tsx +++ b/examples/next/getting-started/src/pages/custom-page.tsx @@ -1,4 +1,4 @@ -import { getNextStaticProps } from '@wpengine/headless-next'; +import { getNextStaticProps } from '@faustjs/next'; import { client } from 'client'; import { Footer, Header, Hero } from 'components'; import { GetStaticPropsContext } from 'next'; diff --git a/examples/next/getting-started/src/pages/index.tsx b/examples/next/getting-started/src/pages/index.tsx index 253d5bfd6..61e285671 100644 --- a/examples/next/getting-started/src/pages/index.tsx +++ b/examples/next/getting-started/src/pages/index.tsx @@ -1,4 +1,4 @@ -import { getNextStaticProps } from '@wpengine/headless-next'; +import { getNextStaticProps } from '@faustjs/next'; import { GetStaticPropsContext } from 'next'; import Head from 'next/head'; diff --git a/examples/next/getting-started/src/pages/posts/[postSlug]/[postCursor].tsx b/examples/next/getting-started/src/pages/posts/[postSlug]/[postCursor].tsx index d401bfdac..52335d98c 100644 --- a/examples/next/getting-started/src/pages/posts/[postSlug]/[postCursor].tsx +++ b/examples/next/getting-started/src/pages/posts/[postSlug]/[postCursor].tsx @@ -1,4 +1,4 @@ -import { getNextStaticProps } from '@wpengine/headless-next'; +import { getNextStaticProps } from '@faustjs/next'; import { GetStaticPropsContext } from 'next'; import Page from '..'; import { client } from 'client'; diff --git a/examples/next/getting-started/src/pages/posts/[postSlug]/index.tsx b/examples/next/getting-started/src/pages/posts/[postSlug]/index.tsx index bf8111272..010165c67 100644 --- a/examples/next/getting-started/src/pages/posts/[postSlug]/index.tsx +++ b/examples/next/getting-started/src/pages/posts/[postSlug]/index.tsx @@ -1,4 +1,4 @@ -import { getNextStaticProps, is404 } from '@wpengine/headless-next'; +import { getNextStaticProps, is404 } from '@faustjs/next'; import { client, Post } from 'client'; import { Footer, Header, Hero } from 'components'; import { GetStaticPropsContext } from 'next'; diff --git a/examples/next/getting-started/src/pages/posts/index.tsx b/examples/next/getting-started/src/pages/posts/index.tsx index 587043848..c72b396a3 100644 --- a/examples/next/getting-started/src/pages/posts/index.tsx +++ b/examples/next/getting-started/src/pages/posts/index.tsx @@ -1,4 +1,4 @@ -import { getNextStaticProps } from '@wpengine/headless-next'; +import { getNextStaticProps } from '@faustjs/next'; import { client, OrderEnum, PostObjectsConnectionOrderbyEnum } from 'client'; import { Footer, Header, Pagination, Posts } from 'components'; import { GetStaticPropsContext } from 'next'; diff --git a/examples/next/getting-started/src/pages/preview.tsx b/examples/next/getting-started/src/pages/preview.tsx index 93e0b217d..6c10bd020 100644 --- a/examples/next/getting-started/src/pages/preview.tsx +++ b/examples/next/getting-started/src/pages/preview.tsx @@ -1,6 +1,6 @@ import { useRouter } from "next/router"; import { PageComponent } from "./[...pageUri]"; -import type { Page, Post } from "@wpengine/headless-core"; +import type { Page, Post } from "@faustjs/core"; import { PostComponent } from "./posts/[postSlug]"; import { client } from 'client'; diff --git a/examples/react/getting-started/package.json b/examples/react/getting-started/package.json index 597139e35..08b6e83cd 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", - "@wpengine/headless-core": "^0.7.0", - "@wpengine/headless-react": "^0.7.0", + "@faustjs/core": "^0.7.0", + "@faustjs/react": "^0.7.0", "dotenv": "^10.0.0", "express": "^4.17.1", "normalize.css": "^8.0.1", diff --git a/examples/react/getting-started/server.js b/examples/react/getting-started/server.js index 2917cb96f..39cb02d17 100644 --- a/examples/react/getting-started/server.js +++ b/examples/react/getting-started/server.js @@ -1,7 +1,7 @@ require('dotenv').config(); const express = require('express'); const app = express(); -const { authorizeHandler, headlessConfig } = require('@wpengine/headless-core'); +const { authorizeHandler, headlessConfig } = require('@faustjs/core'); const port = 5000; headlessConfig({ diff --git a/examples/react/getting-started/src/client/index.ts b/examples/react/getting-started/src/client/index.ts index da0b2b7a9..e15602713 100644 --- a/examples/react/getting-started/src/client/index.ts +++ b/examples/react/getting-started/src/client/index.ts @@ -2,7 +2,7 @@ * GQLESS: You can safely modify this file and Query Fetcher based on your needs */ import type { IncomingMessage } from 'http'; -import { getClient } from '@wpengine/headless-react'; +import { getClient } from '@faustjs/react'; import { generatedSchema, scalarsEnumsHash, diff --git a/examples/react/getting-started/src/index.tsx b/examples/react/getting-started/src/index.tsx index 1e4de4b1c..f2249228f 100644 --- a/examples/react/getting-started/src/index.tsx +++ b/examples/react/getting-started/src/index.tsx @@ -1,4 +1,4 @@ -import { headlessConfig } from '@wpengine/headless-core'; +import { headlessConfig } from '@faustjs/core'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; diff --git a/examples/react/getting-started/src/pages/preview.tsx b/examples/react/getting-started/src/pages/preview.tsx index 6949439f0..91fc184af 100644 --- a/examples/react/getting-started/src/pages/preview.tsx +++ b/examples/react/getting-started/src/pages/preview.tsx @@ -1,4 +1,4 @@ -import { ensureAuthorization } from '@wpengine/headless-core'; +import { ensureAuthorization } from '@faustjs/core'; import { client, Page as PageType, diff --git a/package-lock.json b/package-lock.json index a77a622ed..163ef49b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,8 +22,8 @@ "name": "next-headless-getting-started", "version": "0.1.0", "dependencies": { - "@wpengine/headless-core": "^0.7.0", - "@wpengine/headless-next": "^0.7.0", + "@faustjs/core": "^0.7.0", + "@faustjs/next": "^0.7.0", "next": "^11.0.0", "normalize.css": "^8.0.1", "react": "^17.0.2", @@ -1204,6 +1204,18 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/@faustjs/core": { + "resolved": "packages/core", + "link": true + }, + "node_modules/@faustjs/next": { + "resolved": "packages/next", + "link": true + }, + "node_modules/@faustjs/react": { + "resolved": "packages/react", + "link": true + }, "node_modules/@gqless/cli": { "version": "2.0.16", "resolved": "https://registry.npmjs.org/@gqless/cli/-/cli-2.0.16.tgz", @@ -3060,18 +3072,6 @@ "wp-env": "bin/wp-env" } }, - "node_modules/@wpengine/headless-core": { - "resolved": "packages/core", - "link": true - }, - "node_modules/@wpengine/headless-next": { - "resolved": "packages/next", - "link": true - }, - "node_modules/@wpengine/headless-react": { - "resolved": "packages/react", - "link": true - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -14714,7 +14714,7 @@ } }, "packages/core": { - "name": "@wpengine/headless-core", + "name": "@faustjs/core", "version": "0.7.0", "license": "MIT", "dependencies": { @@ -14753,14 +14753,14 @@ } }, "packages/next": { - "name": "@wpengine/headless-next", + "name": "@faustjs/next", "version": "0.7.0", "license": "MIT", "dependencies": { + "@faustjs/core": "^0.7.0", + "@faustjs/react": "^0.7.0", "@gqless/logger": "^2.0.11", "@gqless/react": "^2.0.15", - "@wpengine/headless-core": "^0.7.0", - "@wpengine/headless-react": "^0.7.0", "graphql": ">=15.5", "lodash": "^4.17.21" }, @@ -14800,12 +14800,12 @@ } }, "packages/react": { - "name": "@wpengine/headless-react", + "name": "@faustjs/react", "version": "0.7.0", "license": "MIT", "dependencies": { + "@faustjs/core": "^0.7.0", "@gqless/react": "^2.0.15", - "@wpengine/headless-core": "^0.7.0", "gqless": "^2.0.14", "graphql": ">=15.5", "lodash": "^4.17.21" @@ -15676,6 +15676,115 @@ } } }, + "@faustjs/core": { + "version": "file:packages/core", + "requires": { + "@gqless/cli": "^2.0.16", + "@testing-library/jest-dom": "^5.14.1", + "@types/express": "^4.17.12", + "@types/is-number": "^7.0.1", + "@types/isomorphic-fetch": "^0.0.35", + "@types/jest": "^26.0.23", + "@types/lodash": "^4.14.170", + "@types/node": "^15.12.3", + "@types/webpack-env": "^1.16.0", + "@typescript-eslint/eslint-plugin": "^4.27.0", + "@typescript-eslint/parser": "^4.27.0", + "clean-webpack-plugin": "^3.0.0", + "deepmerge": "^4.2.2", + "eslint": "^7.28.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-simple-import-sort": "^7.0.0", + "gqless": "^2.0.14", + "graphql": ">=15.5", + "graphql-tag": "^2.12.4", + "isomorphic-fetch": "^3.0.0", + "jest": "^26.6.3", + "lodash": "^4.17.21", + "prettier": "^2.3.1", + "rimraf": "^3.0.2", + "ts-jest": "^26.5.6", + "ts-loader": "^9.2.3", + "typescript": "^4.3.4", + "universal-cookie": "^4.0.4" + } + }, + "@faustjs/next": { + "version": "file:packages/next", + "requires": { + "@faustjs/core": "^0.7.0", + "@faustjs/react": "^0.7.0", + "@gqless/logger": "^2.0.11", + "@gqless/react": "^2.0.15", + "@testing-library/jest-dom": "^5.14.1", + "@testing-library/react": "^11.2.7", + "@types/jest": "^26.0.23", + "@types/lodash": "^4.14.170", + "@types/node": "^15.12.3", + "@types/react": "^17.0.11", + "@typescript-eslint/eslint-plugin": "^4.27.0", + "@typescript-eslint/parser": "^4.27.0", + "eslint": "^7.28.0", + "eslint-config-airbnb-typescript": "^12.3.1", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-react": "^7.24.0", + "eslint-plugin-react-hooks": "^4.2.0", + "eslint-plugin-simple-import-sort": "^7.0.0", + "gqless": "^2.0.14", + "graphql": ">=15.5", + "jest": "^26.6.3", + "lodash": "^4.17.21", + "next": "^11.0.0", + "prettier": "^2.3.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "rimraf": "^3.0.2", + "ts-jest": "^26.5.6", + "ts-loader": "^9.2.3", + "typescript": "^4.3.4" + } + }, + "@faustjs/react": { + "version": "file:packages/react", + "requires": { + "@faustjs/core": "^0.7.0", + "@gqless/react": "^2.0.15", + "@testing-library/jest-dom": "^5.14.1", + "@testing-library/react": "^11.2.7", + "@testing-library/react-hooks": "^7.0.0", + "@types/jest": "^26.0.23", + "@types/lodash": "^4.14.170", + "@types/node": "^15.12.3", + "@types/react": "^17.0.11", + "@typescript-eslint/eslint-plugin": "^4.27.0", + "@typescript-eslint/parser": "^4.27.0", + "eslint": "^7.28.0", + "eslint-config-airbnb-typescript": "^12.3.1", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-react": "^7.24.0", + "eslint-plugin-react-hooks": "^4.2.0", + "eslint-plugin-simple-import-sort": "^7.0.0", + "gqless": "^2.0.14", + "graphql": ">=15.5", + "jest": "^26.6.3", + "lodash": "^4.17.21", + "prettier": "^2.3.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "rimraf": "^3.0.2", + "ts-jest": "^26.5.6", + "ts-loader": "^9.2.3", + "typescript": "^4.3.4" + } + }, "@gqless/cli": { "version": "2.0.16", "resolved": "https://registry.npmjs.org/@gqless/cli/-/cli-2.0.16.tgz", @@ -17249,115 +17358,6 @@ "yargs": "^14.0.0" } }, - "@wpengine/headless-core": { - "version": "file:packages/core", - "requires": { - "@gqless/cli": "^2.0.16", - "@testing-library/jest-dom": "^5.14.1", - "@types/express": "^4.17.12", - "@types/is-number": "^7.0.1", - "@types/isomorphic-fetch": "^0.0.35", - "@types/jest": "^26.0.23", - "@types/lodash": "^4.14.170", - "@types/node": "^15.12.3", - "@types/webpack-env": "^1.16.0", - "@typescript-eslint/eslint-plugin": "^4.27.0", - "@typescript-eslint/parser": "^4.27.0", - "clean-webpack-plugin": "^3.0.0", - "deepmerge": "^4.2.2", - "eslint": "^7.28.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.23.4", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-simple-import-sort": "^7.0.0", - "gqless": "^2.0.14", - "graphql": ">=15.5", - "graphql-tag": "^2.12.4", - "isomorphic-fetch": "^3.0.0", - "jest": "^26.6.3", - "lodash": "^4.17.21", - "prettier": "^2.3.1", - "rimraf": "^3.0.2", - "ts-jest": "^26.5.6", - "ts-loader": "^9.2.3", - "typescript": "^4.3.4", - "universal-cookie": "^4.0.4" - } - }, - "@wpengine/headless-next": { - "version": "file:packages/next", - "requires": { - "@gqless/logger": "^2.0.11", - "@gqless/react": "^2.0.15", - "@testing-library/jest-dom": "^5.14.1", - "@testing-library/react": "^11.2.7", - "@types/jest": "^26.0.23", - "@types/lodash": "^4.14.170", - "@types/node": "^15.12.3", - "@types/react": "^17.0.11", - "@typescript-eslint/eslint-plugin": "^4.27.0", - "@typescript-eslint/parser": "^4.27.0", - "@wpengine/headless-core": "^0.7.0", - "@wpengine/headless-react": "^0.7.0", - "eslint": "^7.28.0", - "eslint-config-airbnb-typescript": "^12.3.1", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.23.4", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-react": "^7.24.0", - "eslint-plugin-react-hooks": "^4.2.0", - "eslint-plugin-simple-import-sort": "^7.0.0", - "gqless": "^2.0.14", - "graphql": ">=15.5", - "jest": "^26.6.3", - "lodash": "^4.17.21", - "next": "^11.0.0", - "prettier": "^2.3.1", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "rimraf": "^3.0.2", - "ts-jest": "^26.5.6", - "ts-loader": "^9.2.3", - "typescript": "^4.3.4" - } - }, - "@wpengine/headless-react": { - "version": "file:packages/react", - "requires": { - "@gqless/react": "^2.0.15", - "@testing-library/jest-dom": "^5.14.1", - "@testing-library/react": "^11.2.7", - "@testing-library/react-hooks": "^7.0.0", - "@types/jest": "^26.0.23", - "@types/lodash": "^4.14.170", - "@types/node": "^15.12.3", - "@types/react": "^17.0.11", - "@typescript-eslint/eslint-plugin": "^4.27.0", - "@typescript-eslint/parser": "^4.27.0", - "@wpengine/headless-core": "^0.7.0", - "eslint": "^7.28.0", - "eslint-config-airbnb-typescript": "^12.3.1", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.23.4", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-react": "^7.24.0", - "eslint-plugin-react-hooks": "^4.2.0", - "eslint-plugin-simple-import-sort": "^7.0.0", - "gqless": "^2.0.14", - "graphql": ">=15.5", - "jest": "^26.6.3", - "lodash": "^4.17.21", - "prettier": "^2.3.1", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "rimraf": "^3.0.2", - "ts-jest": "^26.5.6", - "ts-loader": "^9.2.3", - "typescript": "^4.3.4" - } - }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -22750,10 +22750,10 @@ "next-headless-getting-started": { "version": "file:examples/next/getting-started", "requires": { + "@faustjs/core": "^0.7.0", + "@faustjs/next": "^0.7.0", "@gqless/cli": "^2.0.16", "@types/react": "^17.0.11", - "@wpengine/headless-core": "^0.7.0", - "@wpengine/headless-next": "^0.7.0", "dotenv": "^10.0.0", "eslint": "^7.28.0", "eslint-config-next": "^11.0.0", diff --git a/package.json b/package.json index aa7e860f3..0becf6460 100644 --- a/package.json +++ b/package.json @@ -10,19 +10,19 @@ ] }, "scripts": { - "build": "npm run build --workspace=@wpengine/headless-core --workspace=@wpengine/headless-react --workspace=@wpengine/headless-next", - "build:core": "npm run build --workspace=@wpengine/headless-core", - "build:next": "npm run build --workspace=@wpengine/headless-next", - "build:react": "npm run build --workspace=@wpengine/headless-react", - "clean": "npm run clean --workspace=@wpengine/headless-core --workspace=@wpengine/headless-react --workspace=@wpengine/headless-next", + "build": "npm run build --workspace=@faustjs/core --workspace=@faustjs/react --workspace=@faustjs/next", + "build:core": "npm run build --workspace=@faustjs/core", + "build:next": "npm run build --workspace=@faustjs/next", + "build:react": "npm run build --workspace=@faustjs/react", + "clean": "npm run clean --workspace=@faustjs/core --workspace=@faustjs/react --workspace=@faustjs/next", "clean:examples": "rimraf examples/**/node_modules", - "lint": "npm run lint --workspace=@wpengine/headless-core --workspace=@wpengine/headless-react --workspace=@wpengine/headless-next", - "lint:fix": "npm run lint:fix --workspace=@wpengine/headless-core --workspace=@wpengine/headless-react --workspace=@wpengine/headless-next", + "lint": "npm run lint --workspace=@faustjs/core --workspace=@faustjs/react --workspace=@faustjs/next", + "lint:fix": "npm run lint:fix --workspace=@faustjs/core --workspace=@faustjs/react --workspace=@faustjs/next", "dev": "npm run build && npm run dev:next:getting-started", "dev:next:getting-started": "npm run dev ---workspace=examples/next/getting-started", - "test": "npm test --workspace=@wpengine/headless-core --workspace=@wpengine/headless-react --workspace=@wpengine/headless-next", - "minor": "npm version minor --git-tag-version=false --workspace=@wpengine/headless-core --workspace=@wpengine/headless-react --workspace=@wpengine/headless-next", - "patch": "npm version patch --git-tag-version=false --workspace=@wpengine/headless-core --workspace=@wpengine/headless-react --workspace=@wpengine/headless-next", + "test": "npm test --workspace=@faustjs/core --workspace=@faustjs/react --workspace=@faustjs/next", + "minor": "npm version minor --git-tag-version=false --workspace=@faustjs/core --workspace=@faustjs/react --workspace=@faustjs/next", + "patch": "npm version patch --git-tag-version=false --workspace=@faustjs/core --workspace=@faustjs/react --workspace=@faustjs/next", "wp-env": "wp-env", "wp:start": "wp-env start", "wp:stop": "wp-env stop", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 6852bb8e8..fdc4b4a6d 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.6.5] - 2021-05-25 -Version bumped to remain in lockstep with `@wpengine/headless-react` and `@wpengine/headless-next`. No changes. +Version bumped to remain in lockstep with `@faustjs/react` and `@faustjs/next`. No changes. ## [0.6.4] - 2021-05-18 -Initial release of `@wpengine/headless-core` +Initial release of `@faustjs/core` diff --git a/packages/core/package.json b/packages/core/package.json index 446310350..1a4ea9298 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,5 +1,5 @@ { - "name": "@wpengine/headless-core", + "name": "@faustjs/core", "version": "0.7.0", "description": "This module helps you use WordPress as a Headless CMS", "main": "dist/index.js", diff --git a/packages/next/CHANGELOG.md b/packages/next/CHANGELOG.md index 2071b105a..639fb7a14 100644 --- a/packages/next/CHANGELOG.md +++ b/packages/next/CHANGELOG.md @@ -12,8 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Refactor - Removed `nextConfig.js` & `next-transpile-modules` as a dependency -- Removed unnecessary re-exports from `@wpengine/headless-core` and `@wpengine/headless-react` +- Removed unnecessary re-exports from `@faustjs/core` and `@faustjs/react` ## [0.6.4] - 2021-05-18 -Initial release of `@wpengine/headless-next` +Initial release of `@faustjs/next` diff --git a/packages/next/package.json b/packages/next/package.json index f920d85c5..733dee7ef 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,5 +1,5 @@ { - "name": "@wpengine/headless-next", + "name": "@faustjs/next", "version": "0.7.0", "description": "This module helps you use WordPress as a Headless CMS with Next.js", "main": "dist/index.js", @@ -71,8 +71,8 @@ "dependencies": { "@gqless/logger": "^2.0.11", "@gqless/react": "^2.0.15", - "@wpengine/headless-core": "^0.7.0", - "@wpengine/headless-react": "^0.7.0", + "@faustjs/core": "^0.7.0", + "@faustjs/react": "^0.7.0", "graphql": ">=15.5", "lodash": "^4.17.21" } diff --git a/packages/next/src/client.ts b/packages/next/src/client.ts index 07112ae61..a49411b1c 100644 --- a/packages/next/src/client.ts +++ b/packages/next/src/client.ts @@ -16,8 +16,8 @@ import { PostIdType, ensureAuthorization, WithClient, -} from '@wpengine/headless-core'; -import type { RequiredSchema } from '@wpengine/headless-react'; +} from '@faustjs/core'; +import type { RequiredSchema } from '@faustjs/react'; import isString from 'lodash/isString'; import defaults from 'lodash/defaults'; import isFunction from 'lodash/isFunction'; diff --git a/packages/next/src/getProps.ts b/packages/next/src/getProps.ts index 837cebe84..f8bddc196 100644 --- a/packages/next/src/getProps.ts +++ b/packages/next/src/getProps.ts @@ -1,9 +1,5 @@ /* eslint-disable react/no-children-prop */ -import { - CategoryIdType, - PageIdType, - PostIdType, -} from '@wpengine/headless-core'; +import { CategoryIdType, PageIdType, PostIdType } from '@faustjs/core'; import { isObject } from 'lodash'; import isNil from 'lodash/isNil'; import { diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 8d11a56cd..8bf161565 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.6.5] - 2021-05-25 -Version bumped to remain in lockstep with `@wpengine/headless-core` and `@wpengine/headless-next`. No changes. +Version bumped to remain in lockstep with `@faustjs/core` and `@faustjs/next`. No changes. ## [0.6.4] - 2021-05-18 -Initial release of `@wpengine/headless-react` +Initial release of `@faustjs/react` diff --git a/packages/react/package.json b/packages/react/package.json index b61e6868c..afa8bd17d 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,5 +1,5 @@ { - "name": "@wpengine/headless-react", + "name": "@faustjs/react", "version": "0.7.0", "description": "This module helps you use WordPress as a Headless CMS with React", "main": "dist/index.js", @@ -66,7 +66,7 @@ }, "dependencies": { "@gqless/react": "^2.0.15", - "@wpengine/headless-core": "^0.7.0", + "@faustjs/core": "^0.7.0", "gqless": "^2.0.14", "graphql": ">=15.5", "lodash": "^4.17.21" diff --git a/packages/react/src/client.ts b/packages/react/src/client.ts index d059ee0fa..cb50c5890 100644 --- a/packages/react/src/client.ts +++ b/packages/react/src/client.ts @@ -9,7 +9,7 @@ import { getClient as getCoreClient, PageIdType, PostIdType, -} from '@wpengine/headless-core'; +} from '@faustjs/core'; import { GQlessClient } from 'gqless'; import isObject from 'lodash/isObject'; import merge from 'lodash/merge'; @@ -44,15 +44,8 @@ export interface RequiredSchema { subscription: any; } -export interface ReactClient< - Schema extends RequiredSchema, - ObjectTypesNames extends string = never, - ObjectTypes extends { - [P in ObjectTypesNames]: { - __typename: P | undefined; - }; - } = never, -> extends GQlessReactClient { +export interface ReactClient + extends GQlessReactClient { client: GQlessClient; useCategory( @@ -263,7 +256,7 @@ export function getClient< return useQuery().$state.isLoading; }; - const c: ReactClient = { + const c: ReactClient = { client: coreClient, ...reactClient, useCategory,