Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #7542

Merged
merged 1 commit into from
Jun 7, 2022
Merged

Version Packages #7542

merged 1 commit into from
Jun 7, 2022

Conversation

keystonejs-release-bot
Copy link
Collaborator

@keystonejs-release-bot keystonejs-release-bot commented May 18, 2022

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@keystone-ui/button@7.0.0

Major Changes

Patch Changes

  • Updated dependencies [717830fd2]:
    • @keystone-ui/core@5.0.0
    • @keystone-ui/icons@6.0.0
    • @keystone-ui/loading@6.0.0

@keystone-ui/core@5.0.0

Major Changes

@keystone-ui/fields@7.0.0

Major Changes

Patch Changes

  • #7543 0af99e462 Thanks @mitchellhamilton! - Fixed the viewport sometimes shifting when opening the date picker in the create drawer.

  • Updated dependencies [0af99e462, 717830fd2]:

    • @keystone-ui/popover@6.0.0
    • @keystone-ui/core@5.0.0
    • @keystone-ui/icons@6.0.0

@keystone-ui/icons@6.0.0

Major Changes

Patch Changes

  • Updated dependencies [717830fd2]:
    • @keystone-ui/core@5.0.0

@keystone-ui/loading@6.0.0

Major Changes

Patch Changes

  • Updated dependencies [717830fd2]:
    • @keystone-ui/core@5.0.0

@keystone-ui/modals@6.0.0

Major Changes

Minor Changes

  • #7556 e0527693c Thanks @Achisingh! - Fixed z-index issues occurring when pop-overs in document editor text-area or the toolbar overlapped other fields and buttons.

Patch Changes

@keystone-ui/notice@6.0.0

Major Changes

Patch Changes

  • Updated dependencies [717830fd2]:
    • @keystone-ui/button@7.0.0
    • @keystone-ui/core@5.0.0
    • @keystone-ui/icons@6.0.0

@keystone-ui/options@6.0.0

Major Changes

Patch Changes

  • Updated dependencies [0af99e462, 717830fd2]:
    • @keystone-ui/fields@7.0.0
    • @keystone-ui/core@5.0.0
    • @keystone-ui/icons@6.0.0

@keystone-ui/pill@7.0.0

Major Changes

Patch Changes

  • Updated dependencies [717830fd2]:
    • @keystone-ui/core@5.0.0
    • @keystone-ui/icons@6.0.0

@keystone-ui/popover@6.0.0

Major Changes

Patch Changes

@keystone-ui/segmented-control@7.0.0

Major Changes

Patch Changes

  • Updated dependencies [717830fd2]:
    • @keystone-ui/core@5.0.0

@keystone-ui/toast@6.0.0

Major Changes

Patch Changes

  • Updated dependencies [717830fd2]:
    • @keystone-ui/core@5.0.0
    • @keystone-ui/icons@6.0.0

@keystone-ui/tooltip@6.0.0

Major Changes

Patch Changes

  • Updated dependencies [0af99e462, 717830fd2]:
    • @keystone-ui/popover@6.0.0
    • @keystone-ui/core@5.0.0

@keystone-6/auth@3.0.0

Major Changes

Patch Changes

@keystone-6/cloudinary@3.0.0

Major Changes

Patch Changes

@keystone-6/core@2.0.0

Major Changes

  • #7410 717830fd2 Thanks @renovate! - upgrade dependancy "react": "^18.1.0"

  • #7070 ae81dc190 Thanks @{! - #### Breaking

    Move of image and files in the keystone config into new option storage

    The image and files config options have been removed from Keystone's config - the configuration has
    been moved into a new storage configuration object.

    Old:

    export default config({
      image: { upload: 'local' },
      lists: {
        Image: { fields: { image: image() } },
        /* ... */
      },
      /* ... */
    });

    New:

    export default config({
      storage: {
        my_images: {
          kind: 'local',
          type: 'image',
          generateUrl: path => `http://localhost:3000/images${path}`,
          serverRoute: { path: '/images' },
          storagePath: 'public/images',
        },
      },
      lists: {
        Image: { fields: { image: image({ storage: 'my_images' }) } },
        /* ... */
      },
      /* ... */
    });

    You can also now store assets on S3:

    export default config({
      storage: {
        my_image_storage: {
          kind: 's3',
          type: 'image',
          bucketName: S3_BUCKET_NAME,
          region: S3_REGION,
          accessKeyId: S3_ACCESS_KEY_ID,
          secretAccessKey: S3_SECRET_ACCESS_KEY,
        },
      },
      lists: {
        Image: { fields: { image: image({ storage: 'my_image_storage' }) } },
        /* ... */
      },
      /* ... */
    });
    Removal of refs for images and files

    Refs were an interesting situation! They allowed you to link images stored in your storage source (s3 or local), and use the same
    image anywhere else images are used. This causes a bunch of complication, and prevented Keystone ever reliably being able
    to remove images from your source, as it couldn't easily track where images were used.

    To simplify things for you and us, we're removing refs as a concept, but don't panic just yet, we are conceptually replacing
    them with something you are already familiar with: relationships.

    If you wanted refs, where images could be available in multiple places, our new recommendation is:

    export default config({
      storage: {
        my_image_storage: {
          /* ... */
        },
      },
      lists: {
        Image: { fields: { image: image({ storage: 'my_image_storage' }) } },
     fields: { avatar: relationship({ ref: 'Image' }) } },
        Blog: { fields: { photos: relationship({ ref: 'Image', many: true }) } },
        /* ... */
      },
      /* ... */
    });

    This allows mirroring of the old functionality, while allowing us to add the below feature/breaking change.

    Images and Files will now be deleted when deleted

    Before this change, if you uploaded a file or image, Keystone would never remove it from where it was stored. The inability to tidy up unused
    files or images was unwelcome. With the removal of ref, we can now remove things from the source, and this will be done by default.

    If you don't want files or images removed, we recommend storing them as a relationship, rather than on items themselves, so the files
    or images persist separate to lists that use them.

    If you want the existing behaviour of keystone, set preserve: true on the storage instead.

    file and image URLs now use generateUrl, allowing more control over what is returned to the user
    Local images no longer need a baseUrl

    Previously, if you were using local storage (you scallywag), you needed to provide a path for keystone to host images on. You
    can still do this, but if you plan on serving them from another location, you can opt into not doing this.

    {
    -   baseUrl: '/images'
    +   serverRoute: {
    +       path: '/images'
    +   }
    }

    New bits

    • S3 is now supported! See the storage config for all the options for S3.
    • preserve flag added to both file and image fields to allow removal of files from the source
    • Support for multiple storage sources - each image and file field can now use its own config you want.

Minor Changes

  • #7051 52348d70d Thanks @renovate! - Added disconnect to the SessionStrategy API, this allows Keystone to disconnect from the store when using stored sessions. This resolves the testrunner hanging when using stored sessions in automated tests.

  • #7546 19446362f Thanks @Achisingh! - Removed all Keystone Links, i.e. API explorer, GitHub repository and Keystone documentation, from the popover and replacing the popover button with Sign out button in production

  • #7537 3fe69ed96 Thanks @Achisingh! - Fixed list description from schema to display in the Admin UI

Patch Changes

  • #7562 5ca0d00c9 Thanks @mitchellhamilton! - The reset changes button on the item view now presents a confirmation modal before resetting changes and it has been moved to the right of the bottom bar so it is next to the delete button.

  • #7595 3aad917ee Thanks @mitchellhamilton! - The Prisma binaries are now downloaded just before they're needed if Prisma's install script to download them fails. Note this will never happen in production, they will always be downloaded before.

  • #7561 a4a3e40ad Thanks @mitchellhamilton! - Alert dialogs are now centered in the Admin UI.

  • #7543 0af99e462 Thanks @mitchellhamilton! - Fixed the viewport sometimes shifting when opening the date picker in the create drawer.

  • #7548 ea34fb183 Thanks @mitchellhamilton! - The label shown for a text field in the Admin UI is now associated with the input so the label can be read by screen readers

  • #7598 e05e4e91c Thanks @mitchellhamilton! - Fixed the Admin UI crashing when saving an item with a relationship field using the cards display mode when another item is added to the relationship (e.g. by another user or a hook) since the item was initially loaded

  • Updated dependencies [a4a3e40ad, 0af99e462, e0527693c, 0af99e462, 717830fd2]:

    • @keystone-ui/modals@6.0.0
    • @keystone-ui/popover@6.0.0
    • @keystone-ui/fields@7.0.0
    • @keystone-ui/button@7.0.0
    • @keystone-ui/core@5.0.0
    • @keystone-ui/icons@6.0.0
    • @keystone-ui/loading@6.0.0
    • @keystone-ui/notice@6.0.0
    • @keystone-ui/options@6.0.0
    • @keystone-ui/pill@7.0.0
    • @keystone-ui/segmented-control@7.0.0
    • @keystone-ui/toast@6.0.0
    • @keystone-ui/tooltip@6.0.0

@keystone-6/fields-document@3.0.0

Major Changes

  • #7428 ccbc24889 Thanks @mitchellhamilton! - This release contains substantial changes to the underlying document-editor component block interfaces, with the addition of array fields.
    The breaking changes are only for defining components, no database migration is needed.

    The primary breaking changes for component blocks are:

    • For the arguments to the component function from @keystone-6/fields-document/component-blocks, the following properties have been renamed

      • component -> preview
      • props -> schema
    • When using the fields within your preview component - as defined by your component .schema (previous .props) - you now use props.fields.{innerFieldName} instead of props.{innerFieldName}.
      For example, props.fields.title instead of props.title.
      For a nested example, props.fields.someObject.fields.title instead of props.someObject.title.

    • The React element to render for a child field is now props.{innerFieldName}.element instead of props.{innerFieldName}.

    As an example, the changes needed for updating the "Hero" component block as seen on https://keystonejs.com/docs/guides/document-field-demo is shown shown below

       hero: component({
    -    component: props => {
    +    preview: props => {
           return (
             <div
               css={{
                 backgroundColor: 'white',
    -            backgroundImage: `url(${props.imageSrc.value})`,
    +            backgroundImage: `url(${props.fields.imageSrc.value})`,
                 backgroundPosition: 'center',
                 backgroundSize: 'cover',
                 display: 'flex',
    @@ -51,7 +189,7 @@ export const componentBlocks = {
                   textShadow: '0px 1px 3px black',
                 }}
               >
    -            {props.title}
    +            {props.fields.title.element}
               </div>
               <div
                 css={{
    @@ -63,9 +201,9 @@ export const componentBlocks = {
                   textShadow: '0px 1px 3px black',
                 }}
               >
    -            {props.content}
    +            {props.fields.content.element}
               </div>
    -          {props.cta.discriminant ? (
    +          {props.fields.cta.discriminant ? (
                 <div
                   css={{
                     backgroundColor: '#F9BF12',
    @@ -78,14 +216,14 @@ export const componentBlocks = {
                     padding: '12px 16px',
                   }}
                 >
    -              {props.cta.value.text}
    +              {props.fields.cta.value.fields.text.element}
                 </div>
               ) : null}
             </div>
           );
         },
         label: 'Hero',
    -    props: {
    +    schema: {
           title: fields.child({ kind: 'inline', placeholder: 'Title...' }),
           content: fields.child({ kind: 'block', placeholder: '...' }),
           imageSrc: fields.text({

    Additionally this release introduces an array field fields.array for component block which represents an array of another field type, such as an object, conditional, form or other child field.
    See below for an example of a question & answers component block with the new array field:

    import { fields, component, NotEditable } from '@keystone-6/fields-document/component-blocks';
    
    component({
      label: 'Questions & Answers',
      schema: {
        questions: fields.array(
          fields.object({
            question: fields.child({ placeholder: 'Question', kind: 'inline' }),
            answer: fields.child({ placeholder: 'Answer', formatting: 'inherit', kind: 'block' }),
          })
        ),
      },
      preview: props => {
        return (
          <div>
            {props.fields.questions.elements.map(questionAndAnswer => {
              return (
                <div key={questionAndAnswer.key}>
                  <h2>{questionAndAnswer.fields.question.element}</h2>
                  <p>{questionAndAnswer.fields.answer.element}</p>
                  <NotEditable>
                    <Button
                      onClick={() => {
                        props.fields.questions.onChange(
                          props.fields.questions.elements
                            .filter(x => x.key !== questionAndAnswer.key)
                            .map(x => ({ key: x.key }))
                        );
                      }}
                    >
                      Remove
                    </Button>
                  </NotEditable>
                </div>
              );
            })}
            <NotEditable>
              <Button
                onClick={() => {
                  props.fields.questions.onChange([
                    ...props.fields.questions.elements,
                    { key: undefined },
                  ]);
                }}
              >
                Insert
              </Button>
            </NotEditable>
          </div>
        );
      },
    });

    Similar to the built-in document-editor lists, when an array field has only 1 element, pressing enter adds a new element and pressing delete removes an element.
    For example, here's a list of checkboxes:

    /** @jsxRuntime classic */
    /** @jsx jsx */
    import { jsx } from '@keystone-ui/core';
    import { useEffect } from 'react';
    import { fields, component } from '@keystone-6/fields-document/component-blocks';
    
    component({
      label: 'Checkbox List',
      schema: {
        children: fields.array(
          fields.object({
            done: fields.checkbox({ label: 'Done' }),
            content: fields.child({ kind: 'inline', placeholder: '', formatting: 'inherit' }),
          })
        ),
      },
      chromeless: true,
      preview: props => {
        useEffect(() => {
          if (!props.fields.children.elements.length) {
            props.fields.children.onChange([{ key: undefined }]);
          }
        });
    
        return (
          <ul css={{ padding: 0 }}>
            {props.fields.children.elements.map(element => (
              <li css={{ listStyle: 'none' }} key={element.key}>
                <input
                  contentEditable="false"
                  css={{ marginRight: 8 }}
                  type="checkbox"
                  checked={element.fields.done.value}
                  onChange={event => element.fields.done.onChange(event.target.checked)}
                />
                <span
                  style={{
                    textDecoration: element.fields.done.value ? 'line-through' : undefined,
                  }}
                >
                  {element.fields.content.element}
                </span>
              </li>
            ))}
          </ul>
        );
      },
    });

    Finally, some other changes introduced in this release are:

    • Each of the preview props fields (and their inner fields, if any) now have an onChange function so that you can update more than one field in a component at a time
    • Each of the preview props fields (and their inner fields, if any) now have a schema property to access their respective schema at that level
    • Generally, preview props are now referentially stable between renders when their value is stable

    Some internal breaking changes that are unlikely to affect users are:

    • The ComponentPropField type is now named ComponentSchema
    • FormField's are now constrained to prevent storing undefined.
      They must be a string, number, boolean, null, array of one of these or an object with one of these.
      This is required so that they can be represented within a JSON array.
    • Within the database, for the props object on a component-block node, child fields are now stored as null instead of undefined.
      This is required so that they can be represented within a JSON array.
      Component-block nodes that previously had undefined instead of null for a child field will continue to work though, no data migration is required.
    • The ObjectField type now has inner fields on a property named fields instead of value
    • The ConditionalField type now has two type parameters that look like this:
      type ConditionalField<
        DiscriminantField extends FormField<string | boolean, any>,
        ConditionalValues extends {
          [Key in `${DiscriminantField['defaultValue']}`]: ComponentSchema;
        }
      > = ...
  • #7410 717830fd2 Thanks @renovate! - upgrade dependancy "react": "^18.1.0"

Minor Changes

  • #7556 e0527693c Thanks @Achisingh! - Fixed z-index issues occurring when pop-overs in document editor text-area or the toolbar overlapped other fields and buttons.

Patch Changes

@keystone-6/session-store-redis@3.0.0

Major Changes

  • #7051 52348d70d Thanks @renovate! - Replaced redis@3 with @node-redis/client (which is also re-exported from redis@4)

Patch Changes

@keystone-6/document-renderer@1.1.0

Minor Changes

@keystone-ui/website@5.0.0

Major Changes

Patch Changes

  • Updated dependencies [a4a3e40ad, 0af99e462, e0527693c, 0af99e462, 717830fd2]:
    • @keystone-ui/modals@6.0.0
    • @keystone-ui/popover@6.0.0
    • @keystone-ui/fields@7.0.0
    • @keystone-ui/button@7.0.0
    • @keystone-ui/core@5.0.0
    • @keystone-ui/loading@6.0.0
    • @keystone-ui/notice@6.0.0
    • @keystone-ui/options@6.0.0
    • @keystone-ui/pill@7.0.0
    • @keystone-ui/segmented-control@7.0.0
    • @keystone-ui/toast@6.0.0
    • @keystone-ui/tooltip@6.0.0

@keystone-6/website@0.0.3

Patch Changes

@keystone-6/example-assets-local@0.0.3

Patch Changes

@keystone-6/example-assets-s3@0.0.2

Patch Changes

@keystone-6/example-auth@0.0.4

Patch Changes

@keystone-6/examples-app-basic@0.0.4

Patch Changes

@keystone-6/example-ecommerce@0.0.4

Patch Changes

@keystone-6/example-embedded-nextjs@0.0.3

Patch Changes

@keystone-6/example-graphql-api-endpoint@0.0.4

Patch Changes

@keystone-6/example-roles@0.0.4

Patch Changes

@keystone-6/example-blog@0.0.3

Patch Changes

@keystone-6/example-custom-admin-ui-logo@0.0.3

Patch Changes

@keystone-6/example-custom-admin-ui-navigation@0.0.3

Patch Changes

@keystone-6/example-custom-admin-ui-pages@0.0.3

Patch Changes

@keystone-6/example-custom-field@0.0.3

Patch Changes

@keystone-6/example-custom-field-view@0.0.3

Patch Changes

@keystone-6/example-default-values@0.0.3

Patch Changes

@keystone-6/example-document-field@0.0.4

Patch Changes

@keystone-6/example-extend-graphql-schema@0.0.3

Patch Changes

@keystone-6/example-extend-graphql-schema-graphql-ts@0.0.3

Patch Changes

@keystone-6/example-extend-graphql-schema-nexus@0.0.3

Patch Changes

@keystone-6/example-json-field@0.0.3

Patch Changes

@keystone-6/example-rest-api@0.0.3

Patch Changes

@keystone-6/example-task-manager@0.0.2

Patch Changes

@keystone-6/example-testing@0.0.3

Patch Changes

@keystone-6/example-virtual-field@0.0.2

Patch Changes

@keystone-6/example-with-auth@0.0.3

Patch Changes

@keystone-6/generate-artifacts-for-projects@0.0.1

Patch Changes

@keystone-6/admin-ui-tests@0.0.1

Patch Changes

@keystone-6/benchmarks-legacy@0.0.2

Patch Changes

@keystone-6/sandbox@0.0.3

Patch Changes

@keystone-6/test-projects-basic@0.0.2

Patch Changes

@keystone-6/test-projects-crud-notifications@1.0.2

Patch Changes

@keystone-6/test-projects-live-reloading@1.0.2

Patch Changes

@vercel
Copy link

vercel bot commented May 18, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
keystone-next-docs ✅ Ready (Inspect) Visit Preview Jun 7, 2022 at 1:39AM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 18, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f59a777:

Sandbox Source
@keystone-6/sandbox Configuration

@vercel vercel bot temporarily deployed to Preview May 18, 2022 06:42 Inactive
@vercel vercel bot temporarily deployed to Preview May 19, 2022 00:17 Inactive
@vercel vercel bot temporarily deployed to Preview May 19, 2022 02:39 Inactive
@vercel vercel bot temporarily deployed to Preview May 20, 2022 01:18 Inactive
@keystonejs-release-bot keystonejs-release-bot force-pushed the changeset-release/main branch 2 times, most recently from 2236015 to d4ebe03 Compare May 20, 2022 03:49
@vercel vercel bot temporarily deployed to Preview May 20, 2022 03:54 Inactive
@vercel vercel bot temporarily deployed to Preview May 23, 2022 01:58 Inactive
@vercel vercel bot temporarily deployed to Preview May 23, 2022 05:45 Inactive
@vercel vercel bot temporarily deployed to Preview May 23, 2022 22:58 Inactive
@vercel vercel bot temporarily deployed to Preview May 25, 2022 03:17 Inactive
@keystonejs-release-bot keystonejs-release-bot force-pushed the changeset-release/main branch 2 times, most recently from 3177a76 to 2b0d59f Compare May 25, 2022 05:53
@vercel vercel bot temporarily deployed to Preview May 25, 2022 06:00 Inactive
@vercel vercel bot temporarily deployed to Preview May 25, 2022 06:57 Inactive
@vercel vercel bot temporarily deployed to Preview May 26, 2022 03:00 Inactive
@vercel vercel bot temporarily deployed to Preview May 30, 2022 03:03 Inactive
@vercel vercel bot temporarily deployed to Preview June 1, 2022 01:41 Inactive
@vercel vercel bot temporarily deployed to Preview June 2, 2022 01:54 Inactive
@vercel vercel bot temporarily deployed to Preview June 2, 2022 02:37 Inactive
@vercel vercel bot temporarily deployed to Preview June 2, 2022 02:53 Inactive
@keystonejs-release-bot keystonejs-release-bot force-pushed the changeset-release/main branch 2 times, most recently from 958dd70 to cec0d71 Compare June 2, 2022 03:10
@vercel vercel bot temporarily deployed to Preview June 2, 2022 03:15 Inactive
@dcousens dcousens enabled auto-merge (squash) June 2, 2022 03:31
@vercel vercel bot temporarily deployed to Preview June 3, 2022 01:17 Inactive
@vercel vercel bot temporarily deployed to Preview June 6, 2022 02:07 Inactive
@vercel vercel bot temporarily deployed to Preview June 6, 2022 02:45 Inactive
@vercel vercel bot temporarily deployed to Preview June 7, 2022 00:49 Inactive
@vercel vercel bot temporarily deployed to Preview June 7, 2022 01:39 Inactive
@dcousens dcousens merged commit f1697b8 into main Jun 7, 2022
@dcousens dcousens deleted the changeset-release/main branch June 7, 2022 01:47
dcousens added a commit that referenced this pull request Jun 7, 2022
dcousens added a commit that referenced this pull request Jun 8, 2022
dcousens added a commit that referenced this pull request Jun 8, 2022
* Revert "Version Packages (#7542)"

This reverts commit f1697b8.

* reduce changeset for readability

* reduce changeset for readability

Co-authored-by: Daniel Cousens <dcousens@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants