Skip to content

Commit

Permalink
Merge branch 'master' into admin-ui-clean-up-apollo-init
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored May 6, 2020
2 parents 5928773 + c8e52f3 commit 635962c
Show file tree
Hide file tree
Showing 185 changed files with 2,170 additions and 1,615 deletions.
7 changes: 7 additions & 0 deletions .changeset/beige-dragons-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@keystonejs/list-plugins': patch
---

Tweaked hooks and utility function.
* Renamed `composeResolveInput` utility function to `composeHook` to indicate right use by name, this can also be used in other hook type and not just `resolveInput` hook.
* Switch to use of `operation` param to hook for detecting if this is `create` or `update` operation instead of existingItem being `undefined`.
7 changes: 7 additions & 0 deletions .changeset/breezy-files-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@keystonejs/app-admin-ui': minor
---

Refactored the internal handling of list data fetching. This resolves two issues:
- Fixed two API requests being made when loading a list.
- Fixed Ract errors in the search and pagination components.
5 changes: 5 additions & 0 deletions .changeset/bright-papayas-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': patch
---

Removed unused prop passed to `ItemDetails`.
6 changes: 6 additions & 0 deletions .changeset/chatty-garlics-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystonejs/app-admin-ui': minor
'@keystonejs/fields': minor
---

The base `FieldController` class no longer takes the owning list as a second argument.
5 changes: 5 additions & 0 deletions .changeset/chilly-adults-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': patch
---

Refactored `UpdateManyModal` component.
5 changes: 5 additions & 0 deletions .changeset/cuddly-llamas-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': patch
---

Revert change in CSS import
5 changes: 5 additions & 0 deletions .changeset/curly-llamas-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': patch
---

Cleaned up duplicated and/or unnecessary list config data.
6 changes: 6 additions & 0 deletions .changeset/curly-pumpkins-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystonejs/app-admin-ui': major
'@keystonejs/keystone': major
---

Added a method `Keystone.getAdminViews({ schemaName })` which returns the views for the Admin UI. `List.getAdminMeta()` no longer returns a `views` values.
5 changes: 5 additions & 0 deletions .changeset/dirty-cougars-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': patch
---

Converted ResizeHandler and ScrollQuery components to custom hooks.
6 changes: 6 additions & 0 deletions .changeset/eighty-boxes-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystonejs/keystone': patch
'@keystonejs/utils': patch
---

Converted some stray promise chains to async/await.
6 changes: 6 additions & 0 deletions .changeset/few-moles-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystonejs/app-admin-ui': minor
'@keystonejs/fields': minor
---

Refactored the Unsplash content block to use Apollo query hooks.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-carrots-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/keystone': patch
---

Included id fields in the \_ksListsMeta schema query.
5 changes: 5 additions & 0 deletions .changeset/giant-hornets-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': patch
---

Refactored internals for readability.
9 changes: 9 additions & 0 deletions .changeset/gorgeous-cheetahs-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@keystonejs/app-admin-ui': major
'@keystonejs/field-views-loader': major
---

The default function in `@keystonejs/field-views-loader` now takes `{ pages, hooks, listViews }` rather than `{ adminMeta }`.
`AdminUIApp` now has a method `.getAdminViews({ keystone, includeLists })` which returns these values.
`AdminUIApp.createDevMiddleware` now takes `{ adminMeta, keystone }` as arguments.
These changes will only effect users who may have explicitly been using the `@keystone/fields-views-loader` packages or `.createDevMiddleware()`.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-lemons-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': major
---

Removed `AdminUIApp.createSessionMiddleware()`. No need to take an action if you were explicitly using this method.
5 changes: 5 additions & 0 deletions .changeset/large-geese-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': patch
---

Refactored internals of AdminUIApp, no functional changes.
7 changes: 7 additions & 0 deletions .changeset/late-countries-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@keystonejs/app-admin-ui': patch
'@keystonejs/auth-password': patch
'@keystonejs/keystone': patch
---

Fixed Admin UI sometimes using the wrong auth mutation name.
10 changes: 10 additions & 0 deletions .changeset/light-tips-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@keystonejs/keystone': major
---

Fixed several access control input issues:
- `itemIds` is now properly set in list-level updateMany mutation checks. Previously this data was incorrectly assigned to `itemId` which is now `undefined` in list-level checks.
- `itemIds` is now set in field-level updateMany mutation checks (previously `undefined`).
- `itemId` is now set in field-level updateMany mutation checks (previously `undefined`). This is the ID of the item currently being checked.
- `itemId` is now properly set in field-level updateSingle mutation checks (previously `undefined`).
- All field-level access control checks now have `gqlName` properly set (previously `undefined`).
10 changes: 10 additions & 0 deletions .changeset/long-adults-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@keystonejs/cypress-project-access-control': patch
'@keystonejs/cypress-project-basic': patch
'@keystonejs/cypress-project-client-validation': patch
'@keystonejs/cypress-project-login': patch
'@keystonejs/keystone': major
'@keystonejs/session': major
---

The `cookieSecret` option no longer defaults to a static value. It is now required in production mode. In development mode, if undefined, a random new value is generated each time the server is started.
5 changes: 5 additions & 0 deletions .changeset/poor-needles-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/test-utils': patch
---

Explicitly set `cookieSecret` in `Keystone` objects to prevent warnings.
5 changes: 5 additions & 0 deletions .changeset/popular-lemons-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': patch
---

Internal refactor, no functional changes.
5 changes: 5 additions & 0 deletions .changeset/purple-cherries-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@keystonejs/fields-datetime-utc": patch
---

Fixed an issue with filtering by null values.
29 changes: 29 additions & 0 deletions .changeset/purple-poets-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
'@keystonejs/keystone': major
'@keystonejs/session': major
---

Moved the cookie configuration from individual options to an object which is passed directly to the express-session middleware.
Previously you could only set `secure` and `maxAge` via `secureCookies` and `cookieMaxAge`.
These options have been removed.
You can now set a config option called `cookie` which can contain `secure` and `maxAge`, as well as `domain`, `expires`, `httpOnly`, `path` and `sameSite`.

The `sameSite` option is now explicitly defaulted to `false`.

See the [express-session middleware docs](https://github.com/expressjs/session#cookie) for more details on these options..

#### Default

```javascript
const keystone = new Keystone({
cookie: {
// domain: undefined,
// expires: undefined,
// httpOnly: true,
maxAge: 1000 * 60 * 60 * 24 * 30, // 30 days
sameSite: false,
// path: '/',
secure: process.env.NODE_ENV === 'production', // Defaults to true in production
},
});
```
5 changes: 0 additions & 5 deletions .changeset/rotten-berries-double.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/sixty-snakes-rhyme.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/smart-deers-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/demo-custom-fields': patch
---

Used new FieldDescription syntax.
7 changes: 7 additions & 0 deletions .changeset/soft-dogs-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@keystonejs/fields': minor
'@keystonejs/demo-custom-fields': patch
'@keystonejs/app-admin-ui': patch
---

Elevated isOrderable, isRequired, and adminDoc keys to direct FieldController properties.
7 changes: 7 additions & 0 deletions .changeset/spicy-apples-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@keystonejs/demo-custom-fields': patch
'@keystonejs/fields': patch
'@keystonejs/fields-mongoid': patch
---

Fixed a bunch more duplicate field class names (no functional changes).
5 changes: 5 additions & 0 deletions .changeset/stale-parents-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/fields': patch
---

Updated views to make use of the `getRefList()` method of the relationship field controller.
5 changes: 5 additions & 0 deletions .changeset/tasty-numbers-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/app-admin-ui': major
---

Removed the method `AdminUIApp.getAdminMeta()` in favour of the more complete `AdminUIApp.getAdminUIMeta(keystone)`.
7 changes: 7 additions & 0 deletions .changeset/twenty-horses-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@keystonejs/adapter-mongoose': patch
'@keystonejs/fields': patch
'@keystonejs/mongo-join-builder': patch
---

Updated mongodb and mongoose dependencies to latest version.
6 changes: 6 additions & 0 deletions .changeset/witty-dodos-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@arch-ui/options': patch
'@keystonejs/fields': patch
---

Added horizontal padding to Select field filter dropdown.
14 changes: 14 additions & 0 deletions api-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @keystonejs/api-tests

## 5.4.2

### Patch Changes

- [`f266a692`](https://github.com/keystonejs/keystone/commit/f266a6923a24c84936d66e00ec7de0ea0956445b) [#2854](https://github.com/keystonejs/keystone/pull/2854) Thanks [@timleslie](https://github.com/timleslie)! - Upgraded dependencies.

* [`96f0c6e9`](https://github.com/keystonejs/keystone/commit/96f0c6e917ecdd02af8da52829608b003219d3ca) [#2845](https://github.com/keystonejs/keystone/pull/2845) Thanks [@timleslie](https://github.com/timleslie)! - Updated patch versions of dependencies.

* Updated dependencies [[`b897ba14`](https://github.com/keystonejs/keystone/commit/b897ba14e34aa441b2d658c30b3dda9d1ebd48e2), [`f266a692`](https://github.com/keystonejs/keystone/commit/f266a6923a24c84936d66e00ec7de0ea0956445b), [`4e56eed6`](https://github.com/keystonejs/keystone/commit/4e56eed68c643fd436c371e2635d3024c51968b0), [`8a135a88`](https://github.com/keystonejs/keystone/commit/8a135a88ae6f3a4434db0ba7033cad2e5f18651e), [`3d40bd7d`](https://github.com/keystonejs/keystone/commit/3d40bd7dd39f2b5589012356dd2b1698eda4f0b2), [`96f0c6e9`](https://github.com/keystonejs/keystone/commit/96f0c6e917ecdd02af8da52829608b003219d3ca)]:
- @keystonejs/fields@9.0.5
- @keystonejs/app-graphql@5.1.6
- @keystonejs/keystone@8.1.4
- @keystonejs/test-utils@6.1.1

## 5.4.1

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions api-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@keystonejs/api-tests",
"description": "A set of tests for running against the KeystoneJS API.",
"private": true,
"version": "5.4.1",
"version": "5.4.2",
"author": "The KeystoneJS Development Team",
"license": "MIT",
"engines": {
Expand All @@ -19,15 +19,15 @@
"body-parser": "^1.18.2",
"cookie-signature": "^1.1.0",
"globby": "^11.0.0",
"supertest-light": "^1.0.2",
"supertest-light": "^1.0.3",
"testcheck": "^1.0.0-rc.2"
},
"dependencies": {
"@keystonejs/auth-password": "^5.1.1",
"@keystonejs/fields": "^9.0.4",
"@keystonejs/test-utils": "^6.1.0",
"@keystonejs/fields": "^9.0.5",
"@keystonejs/test-utils": "^6.1.1",
"@keystonejs/utils": "^5.4.0",
"cuid": "^2.1.6",
"cuid": "^2.1.8",
"express": "^4.17.1"
}
}
26 changes: 25 additions & 1 deletion api-tests/queries/meta.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ multiAdapterRunners().map(({ runner, adapterName }) =>
schema: {
queries: ['User', 'allUsers', '_allUsersMeta'],
fields: [
{
name: 'id',
type: expect.stringMatching(
/MongoIdImplementation|AutoIncrementImplementation/
),
},
{
name: 'company',
type: 'Relationship',
Expand Down Expand Up @@ -164,6 +170,12 @@ multiAdapterRunners().map(({ runner, adapterName }) =>
type: 'Company',
queries: ['Company', 'allCompanies', '_allCompaniesMeta'],
fields: [
{
name: 'id',
type: expect.stringMatching(
/MongoIdImplementation|AutoIncrementImplementation/
),
},
{
name: 'name',
type: 'Text',
Expand All @@ -186,6 +198,12 @@ multiAdapterRunners().map(({ runner, adapterName }) =>
schema: {
queries: ['Post', 'allPosts', '_allPostsMeta'],
fields: [
{
name: 'id',
type: expect.stringMatching(
/MongoIdImplementation|AutoIncrementImplementation/
),
},
{
name: 'content',
type: 'Text',
Expand Down Expand Up @@ -237,6 +255,12 @@ multiAdapterRunners().map(({ runner, adapterName }) =>
schema: {
queries: ['User', 'allUsers', '_allUsersMeta'],
fields: [
{
name: 'id',
type: expect.stringMatching(
/MongoIdImplementation|AutoIncrementImplementation/
),
},
{
name: 'company',
type: 'Relationship',
Expand Down Expand Up @@ -264,7 +288,7 @@ multiAdapterRunners().map(({ runner, adapterName }) =>
);

test(
'returns results for one list and one type of fields',
'returns results for one list and one type of field',
runner(setupKeystone, async ({ keystone }) => {
const { data, errors } = await graphqlRequest({
keystone,
Expand Down
14 changes: 14 additions & 0 deletions benchmarks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @keystonejs/benchmarks

## 5.1.7

### Patch Changes

- [`f266a692`](https://github.com/keystonejs/keystone/commit/f266a6923a24c84936d66e00ec7de0ea0956445b) [#2854](https://github.com/keystonejs/keystone/pull/2854) Thanks [@timleslie](https://github.com/timleslie)! - Upgraded dependencies.

* [`96f0c6e9`](https://github.com/keystonejs/keystone/commit/96f0c6e917ecdd02af8da52829608b003219d3ca) [#2845](https://github.com/keystonejs/keystone/pull/2845) Thanks [@timleslie](https://github.com/timleslie)! - Updated patch versions of dependencies.

* Updated dependencies [[`b897ba14`](https://github.com/keystonejs/keystone/commit/b897ba14e34aa441b2d658c30b3dda9d1ebd48e2), [`f266a692`](https://github.com/keystonejs/keystone/commit/f266a6923a24c84936d66e00ec7de0ea0956445b), [`4e56eed6`](https://github.com/keystonejs/keystone/commit/4e56eed68c643fd436c371e2635d3024c51968b0), [`8a135a88`](https://github.com/keystonejs/keystone/commit/8a135a88ae6f3a4434db0ba7033cad2e5f18651e), [`3d40bd7d`](https://github.com/keystonejs/keystone/commit/3d40bd7dd39f2b5589012356dd2b1698eda4f0b2), [`96f0c6e9`](https://github.com/keystonejs/keystone/commit/96f0c6e917ecdd02af8da52829608b003219d3ca)]:
- @keystonejs/fields@9.0.5
- @keystonejs/app-graphql@5.1.6
- @keystonejs/keystone@8.1.4
- @keystonejs/test-utils@6.1.1

## 5.1.6

### Patch Changes
Expand Down
Loading

0 comments on commit 635962c

Please sign in to comment.