Skip to content

Commit

Permalink
Version Packages (keystonejs#8095)
Browse files Browse the repository at this point in the history
* Version Packages

* add new contributors

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dinesh Pandiyan <flexdinesh@gmail.com>
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

3 people authored Dec 6, 2022
1 parent 39cc3cc commit 228be7d
Showing 113 changed files with 558 additions and 258 deletions.
6 changes: 5 additions & 1 deletion .changeset/contributors.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
"Achisingh",
"AliceRossa",
"Greenheart",
"JedWatson",
"MadeByMike",
@@ -21,12 +22,14 @@
"dependabot[bot]",
"dominikwilkowski",
"emmatown",
"fkrauthan",
"flexdinesh",
"gautamsi",
"georgekrax",
"github-actions[bot]",
"gwyneplaine",
"hmmhmmhm",
"januzis",
"jesstelford",
"jordanoverbye",
"jossmac",
@@ -45,10 +48,11 @@
"renovate",
"renovate[bot]",
"sarneaud",
"shusiner",
"simonswiss",
"singhArmani",
"ticidesign",
"timleslie",
"u-ishii",
"willemmulder"
]
]
5 changes: 0 additions & 5 deletions .changeset/early-days-thank.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fix-bind-again.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fix-busted-init.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/goodbye-busted-context.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/goodbye-busted-session.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/honest-foxes-drum.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/late-ties-multiply.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/late-ties-search.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/metal-tips-invite.md

This file was deleted.

18 changes: 0 additions & 18 deletions .changeset/sharp-countries-decide.md

This file was deleted.

6 changes: 6 additions & 0 deletions design-system/packages/modals/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @keystone-ui/modals

## 6.0.3

### Patch Changes

- [#8123](https://github.com/keystonejs/keystone/pull/8123) [`cf18ee7c5`](https://github.com/keystonejs/keystone/commit/cf18ee7c5e173fd9cb05e918293dcc4e71a93d96) Thanks [@januzis](https://github.com/januzis)! - Fixes inline related item form submitting the parent form

## 6.0.2

### Patch Changes
2 changes: 1 addition & 1 deletion design-system/packages/modals/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keystone-ui/modals",
"version": "6.0.2",
"version": "6.0.3",
"license": "MIT",
"main": "dist/keystone-ui-modals.cjs.js",
"module": "dist/keystone-ui-modals.esm.js",
11 changes: 11 additions & 0 deletions design-system/website/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @keystone-ui/website

## 5.1.0

### Minor Changes

- [#8061](https://github.com/keystonejs/keystone/pull/8061) [`5989672e3`](https://github.com/keystonejs/keystone/commit/5989672e3b7d1fc844a4f0a596f8e449abef1351) Thanks [@AliceRossa](https://github.com/AliceRossa)! - Next.js 13 Upgrade

### Patch Changes

- Updated dependencies [[`cf18ee7c5`](https://github.com/keystonejs/keystone/commit/cf18ee7c5e173fd9cb05e918293dcc4e71a93d96)]:
- @keystone-ui/modals@6.0.3

## 5.0.1

### Patch Changes
4 changes: 2 additions & 2 deletions design-system/website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keystone-ui/website",
"version": "5.0.1",
"version": "5.1.0",
"private": true,
"license": "MIT",
"scripts": {
@@ -12,7 +12,7 @@
"@keystone-ui/core": "^5.0.1",
"@keystone-ui/fields": "^7.1.1",
"@keystone-ui/loading": "^6.0.1",
"@keystone-ui/modals": "^6.0.1",
"@keystone-ui/modals": "^6.0.3",
"@keystone-ui/notice": "^6.0.1",
"@keystone-ui/options": "^6.0.1",
"@keystone-ui/pill": "^7.0.1",
11 changes: 11 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @keystone-6/website

## 0.1.0

### Minor Changes

- [#8061](https://github.com/keystonejs/keystone/pull/8061) [`5989672e3`](https://github.com/keystonejs/keystone/commit/5989672e3b7d1fc844a4f0a596f8e449abef1351) Thanks [@AliceRossa](https://github.com/AliceRossa)! - Next.js 13 Upgrade

### Patch Changes

- Updated dependencies [[`57e9527c3`](https://github.com/keystonejs/keystone/commit/57e9527c39771ce8bbd0bed960fddfe6b3ee01a2), [`57e9527c3`](https://github.com/keystonejs/keystone/commit/57e9527c39771ce8bbd0bed960fddfe6b3ee01a2), [`39cc3cc53`](https://github.com/keystonejs/keystone/commit/39cc3cc53849418ace354f86792e87956c263afa)]:
- @keystone-6/fields-document@6.0.0

## 0.0.6

### Patch Changes
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keystone-6/website",
"version": "0.0.6",
"version": "0.1.0",
"private": true,
"license": "MIT",
"scripts": {
@@ -22,7 +22,7 @@
"@emotion/react": "^11.7.1",
"@emotion/server": "11.10.0",
"@emotion/weak-memoize": "^0.3.0",
"@keystone-6/fields-document": "^5.0.0",
"@keystone-6/fields-document": "^6.0.0",
"@keystone-ui/core": "^5.0.1",
"@keystone-ui/icons": "^6.0.1",
"@markdoc/markdoc": "^0.2.0",
40 changes: 3 additions & 37 deletions docs/pages/docs/config/config.md
Original file line number Diff line number Diff line change
@@ -220,13 +220,8 @@ export default config({
port: 3000,
maxFileSize: 200 * 1024 * 1024,
healthCheck: true,
{% if $nextRelease %}
extendExpressApp: (app, commonContext) => { /* ... */ },
extendExpressApp: (app, commonContext) => { /* ... */ },
extendHttpServer: (httpServer, commonContext, graphQLSchema) => { /* ... */ },
{% else /%}
extendExpressApp: (app, createContext) => { /* ... */ },
extendHttpServer: (httpServer, createContext, graphQLSchema) => { /* ... */ },
{% /if %}
},
/* ... */
});
@@ -273,11 +268,7 @@ This lets you modify the express app that Keystone creates _before_ the Apollo S
The function is passed two arguments:

- `app`: The express app keystone has created
{% if $nextRelease %}
- `context`: A Keystone Context
{% else /%}
- `async createRequestContext(req, res)`: A function you can call to create a Keystone Context for the request
{% /if %}

For example, you could add your own request logging middleware:

@@ -313,23 +304,13 @@ You could also use it to add custom REST endpoints to your server, by creating a
```ts
export default config({
server: {
{% if $nextRelease %}
extendExpressApp: (app, commonContext) => {
extendExpressApp: (app, commonContext) => {
app.get('/api/users', async (req, res) => {
const context = commonContext.withRequest(req, res);
const users = await context.query.User.findMany();
res.json(users);
});
},
{% else /%}
extendExpressApp: (app, createRequestContext) => {
app.get('/api/users', async (req, res) => {
const context = await createRequestContext(req, res);
const users = await context.query.User.findMany();
res.json(users);
});
},
{% /if %}
},
});
```
@@ -345,11 +326,7 @@ This lets you interact with the node [http.Server](https://nodejs.org/api/http.h
The function is passed in 3 arguments:

- `server` - this is the HTTP server that you can then extend
{% if $nextRelease %}
- `context`: A Keystone Context
{% else /%}
- `async createRequestContext(req, res)`: A function you can call to create a Keystone Context for the request
{% /if %}
- `graphqlSchema` - this is the keystone graphql schema that can be used in a WebSocket GraphQL server for subscriptions

For example, this function could be used to listen for `'upgrade'` requests for a WebSocket server when adding support for GraphQL subscriptions
@@ -360,25 +337,14 @@ import { useServer as wsUseServer } from 'graphql-ws/lib/use/ws';

export default config({
server: {
{% if $nextRelease %}
extendHttpServer: (httpServer, commonContext, graphqlSchema) => {
const wss = new WebSocketServer({
server: httpServer,
path: '/api/graphql',
});

wsUseServer({ schema: graphqlSchema }, wss);
},
{% else /%}
extendHttpServer: (httpServer, createRequestContext, graphqlSchema) => {
extendHttpServer: (httpServer, commonContext, graphqlSchema) => {
const wss = new WebSocketServer({
server: httpServer,
path: '/api/graphql',
});

wsUseServer({ schema: graphqlSchema }, wss);
},
{% /if %}
},
});
```
21 changes: 0 additions & 21 deletions docs/pages/docs/config/session.md
Original file line number Diff line number Diff line change
@@ -5,19 +5,11 @@ description: "Reference docs for the session property of Keystone’s system con

The `session` property of the [system configuration](./config) object allows you to configure session management of your Keystone system.
It has a TypeScript type of `SessionStrategy<any>`.
{% if $nextRelease %}
In general you will use `SessionStrategy` objects from the `@keystone-6/auth/session` package, rather than writing this yourself.
{% else /%}
In general you will use `SessionStrategy` objects from the `@keystone-6/core/session` package, rather than writing this yourself.
{% /if %}

```typescript
import { config } from '@keystone-6/core';
{% if $nextRelease %}
import { statelessSessions } from '@keystone-6/auth/session';
{% else /%}
import { statelessSessions } from '@keystone-6/core/session';
{% /if %}

export default config({
session: statelessSessions({
@@ -45,11 +37,7 @@ Both `statelessSessions()` and `storedSessions()` accept a common set of argumen

```typescript
import { config } from '@keystone-6/core';
{% if $nextRelease %}
import { statelessSessions, storedSessions } from '@keystone-6/auth/session';
{% else /%}
import { statelessSessions, storedSessions } from '@keystone-6/core/session';
{% /if %}

export default config({
// Stateless
@@ -107,7 +95,6 @@ Interface:

If you configure your Keystone session with session management then the [`KeystoneContext`](../context/overview) type will include the following session related properties.

{% if $nextRelease %}
- `session`: An object representing the session data. The value will depend on the value passed into `context.sessionStrategy.start()`.
- `sessionStrategy`: an object that, when using `statelessSessions` or `storedSessions` from `@keystone-6/core/session` includes the following functions:
- `get({context})`: a function that returns a `session` object based on `context` - this needs to be a `context` with a valid `req` (using `context.withRequest`). This function is called by Keystone to get the value of `context.session`
@@ -116,14 +103,6 @@ If you configure your Keystone session with session management then the [`Keysto

The `start` and `end` functions will be used by [authentication mutations](./auth) to start and end authenticated sessions.
These mutations will set the value of `session` to include the values `{ listKey, itemId }`.
{% else /%}
- `session`: An object representing the session data. The value will depend on the value passed into `context.startSession()`.
- `startSession`: A function `data => {...}` which will start a new session using the provided `data` value.
- `endSession`: A function `() => {...}` which will end the current session.

The `startSession` and `endSession` functions will be used by [authentication mutations](./auth) to start and end authenticated sessions.
These mutations will set the value of `session` to include the values `{ listKey, itemId }`.
{% /if %}

## Related resources

17 changes: 1 addition & 16 deletions docs/pages/docs/context/overview.md
Original file line number Diff line number Diff line change
@@ -16,9 +16,7 @@ import type { Context } from '.keystone/types';
context = {
// HTTP request object
req,
{% if $nextRelease %}
res,
{% /if %}
res,

// Query API
query,
@@ -35,12 +33,7 @@ context = {

// Session API
session,
{% if $nextRelease %}
sessionStrategy
{% else /%}
startSession,
endSession,
{% /if %}

// New context creators
sudo,
@@ -66,9 +59,7 @@ context = {
### HTTP request object

`req`: The [IncomingMessage](https://nodejs.org/api/http.html#class-httpincomingmessage) object from the HTTP request.
{% if $nextRelease %}
`res`: The [ServerResonse](https://nodejs.org/api/http.html#class-httpserverresponse) object for HTTP request.
{% /if %}
### Query API

`query`: The [Query API](./query), which can be used to perform CRUD operations against your GraphQL API and return a queried value.
@@ -103,13 +94,7 @@ See the [session API](../config/session#session-context) for more details.

`session`: The current session data object.

{% if $nextRelease %}
`sessionStrategy`: an object containing functions(`get`, `start` and `end`) that manipulate a session. See the [session API](../config/session#session-context) for more details.
{% else /%}
`startSession`: An internal helper function used by authentication mutations to start a session on a successful login. This should not be called directly.

`endSession`: An internal helper function used by authentication mutations to end a session on logout. This should not be called directly.
{% /if %}

### New context creators

Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

0 comments on commit 228be7d

Please sign in to comment.