Skip to content

Commit

Permalink
Version Packages (wpengine#714)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Dec 15, 2021
1 parent f0cc812 commit b43d713
Show file tree
Hide file tree
Showing 16 changed files with 95 additions and 85 deletions.
50 changes: 0 additions & 50 deletions .changeset/clean-scissors-turn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cyan-wasps-sell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/orange-plants-divide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sharp-zoos-jam.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/short-mangos-vanish.md

This file was deleted.

4 changes: 2 additions & 2 deletions examples/next/getting-started/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"wpe-build": "next build"
},
"dependencies": {
"@faustjs/core": "^0.15.0",
"@faustjs/next": "^0.15.0",
"@faustjs/core": "^0.15.1",
"@faustjs/next": "^0.15.1",
"next": "^12.0.7",
"normalize.css": "^8.0.1",
"react": "^17.0.2",
Expand Down
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @faustjs/core

## 0.15.1

### Patch Changes

- 3c1280b: Updated `schema.generated.ts` to support `contentNode` for `usePreviewNode` usage.

## 0.15.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@faustjs/core",
"version": "0.15.0",
"version": "0.15.1",
"description": "This module helps you use WordPress as a Headless CMS",
"main": "dist/cjs/export/index.js",
"module": "dist/mjs/export/index.js",
Expand Down
56 changes: 56 additions & 0 deletions packages/next/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# @faustjs/next

## 0.15.1

### Patch Changes

- c74ce4f: Introduced the `usePreviewNode` hook to get preview data from any post type. You can use it like so:

```tsx
import type { Page, Post } from 'client';
import { client } from 'client';

export default function Preview() {
const isLoading = client.useIsLoading();
const { typeName, node } = client.auth.usePreviewNode();

if (isLoading || node === undefined) {
return <p>Loading...</p>;
}

if (node === null) {
return <p>Post not found</p>;
}

switch (typeName) {
case 'Page': {
const page = node as Page;
return (
<>
<h1>{page.title()}</h1>
<div dangerouslySetInnerHTML={{ __html: page.content() }} />
</>
);
}
case 'Post': {
const post = node as Post;
return (
<>
<h1>{post.title()}</h1>
<div dangerouslySetInnerHTML={{ __html: post.content() }} />
</>
);
}
// Add custom post types here as needed
default: {
throw new Error(`Unknown post type: ${typeName}`);
}
}
}
```

With `usePreviewNode`, we have deprecated the `usePreview` hook. It is still available, but it is recommended to use `usePreviewNode` instead.

- Updated dependencies [3c1280b]
- Updated dependencies [3c1280b]
- @faustjs/react@0.15.1
- @faustjs/core@0.15.1

## 0.15.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@faustjs/next",
"version": "0.15.0",
"version": "0.15.1",
"description": "This module helps you use WordPress as a Headless CMS with Next.js",
"main": "dist/cjs/export/index.js",
"module": "dist/mjs/export/index.js",
Expand Down Expand Up @@ -109,8 +109,8 @@
"dependencies": {
"@gqty/logger": "^2.0.1",
"@gqty/react": "^2.1.0",
"@faustjs/core": "^0.15.0",
"@faustjs/react": "^0.15.0",
"@faustjs/core": "^0.15.1",
"@faustjs/react": "^0.15.1",
"graphql": ">=15.6",
"lodash": "^4.17.21"
}
Expand Down
8 changes: 8 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @faustjs/react

## 0.15.1

### Patch Changes

- 3c1280b: Updated client to support `contentNode` for `usePreviewNode` usage.
- Updated dependencies [3c1280b]
- @faustjs/core@0.15.1

## 0.15.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@faustjs/react",
"version": "0.15.0",
"version": "0.15.1",
"description": "This module helps you use WordPress as a Headless CMS with React",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
Expand Down Expand Up @@ -80,7 +80,7 @@
},
"dependencies": {
"@gqty/react": "^2.1.0",
"@faustjs/core": "^0.15.0",
"@faustjs/core": "^0.15.1",
"gqty": "^2.1.0",
"graphql": ">=15.6",
"lodash": "^4.17.21"
Expand Down
7 changes: 7 additions & 0 deletions plugins/faustwp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# FaustWP

## 0.7.2

### Patch Changes

- 4cff9dc: feat: add link to Settings page on Installed Plugins list page
- 3c1280b: Adds the GraphQL `Type` name to the preview URL to avoid making a request to get the content type in the Faust.js packages

## 0.7.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion plugins/faustwp/faustwp.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: faustwp
* Domain Path: /languages
* Version: 0.7.1
* Version: 0.7.2
* Requires PHP: 7.2
* Requires at least: 5.7
*
Expand Down
2 changes: 1 addition & 1 deletion plugins/faustwp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "faustwp",
"version": "0.7.1",
"version": "0.7.2",
"private": true,
"dependencies": {}
}
13 changes: 8 additions & 5 deletions plugins/faustwp/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: antpb, apmatthe, blakewpe, claygriffiths, markkelnar, mindctrl, mo
Tags: faustjs, faust, headless, decoupled
Requires at least: 5.7
Tested up to: 5.8.2
Stable tag: 0.7.1
Stable tag: 0.7.2
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand All @@ -30,6 +30,13 @@ That's it! For more information on getting started with headless WordPress, see

== Changelog ==

= 0.7.2 =

### Patch Changes

- 4cff9dc: feat: add link to Settings page on Installed Plugins list page
- 3c1280b: Adds the GraphQL `Type` name to the preview URL to avoid making a request to get the content type in the Faust.js packages

= 0.7.1 =

### Patch Changes
Expand Down Expand Up @@ -58,8 +65,4 @@ That's it! For more information on getting started with headless WordPress, see
- Fixed skipped domain replacement in GraphQL responses that include `generalSettings`.
- Added LICENSE file.

= 0.6.1 =

- Fixed the headless options page sidebar links to new Faust.js documentation site.

[View the full changelog](https://faustjs.org/docs/changelog/faustwp)

0 comments on commit b43d713

Please sign in to comment.