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

chore: bump @udecode/plate-core from 36.5.9 to 42.0.4 #1820

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 13, 2025

Bumps @udecode/plate-core from 36.5.9 to 42.0.4.

Release notes

Sourced from @​udecode/plate-core's releases.

@​udecode/plate-core@​42.0.4

Patch Changes

@​udecode/plate-core@​42.0.3

Patch Changes

  • #3952 by @​zbeyens
    • Fix tf.reset missing options argument. Fixes editor reset on select all > backspace using ResetNodePlugin.
    • PlateStatic element and leaf rendering is now memoized with React.memo so you can safely update editor.children. For elements, it compares the element reference or element._memo value. The latter can be used to memoize based on the markdown string instead of the element reference. For example, deserializeMd with memoize: true will set element._memo for that purpose.

@​udecode/plate-core@​42.0.1

Patch Changes

  • #3948 by @​zbeyens – Fix: deserialization should work with custom node types

@​udecode/plate-core@​42.0.0

Major Changes

  • #3920 by @​zbeyens

    • Plugin normalizeInitialValue now returns void instead of Value. When mutating nodes, keep their references (e.g., use Object.assign instead of spread).

    • Editor methods have moved to editor.tf and editor.api. They still exist at the top level for slate backward compatibility, but are no longer redundantly typed. If you truly need the top-level method types, extend your editor type with LegacyEditorMethods (e.g. editor as Editor & LegacyEditorMethods). Since these methods can be overridden by extendEditor, with..., or slate plugins, consider migrating to the following approaches:

      // For overriding existing methods only:
      overrideEditor(({ editor, tf: { deleteForward }, api: { isInline } }) => ({
        transforms: {
          deleteForward(options) {
            // ...conditional override
            deleteForward(options);
          },
        },
        api: {
          isInline(element) {
            // ...conditional override
            return isInline(element);
          },
        },
      }));

    This was previously done in extendEditor using top-level methods, which still works but now throws a type error due to the move to editor.tf/editor.api. A workaround is to extend your editor with LegacyEditorMethods.

    Why? Having all methods at the top-level (next to children, marks, etc.) would clutter the editor interface. Slate splits transforms in three places (editor, Editor, and Transforms), which is also confusing. We've reorganized them into tf and api for better DX, but also to support transform-only middlewares in the future. This also lets us leverage extendEditorTransforms, extendEditorApi, and overrideEditor to modify those methods.

    Migration example:

... (truncated)

Changelog

Sourced from @​udecode/plate-core's changelog.

42.0.4

Patch Changes

42.0.3

Patch Changes

  • #3952 by @​zbeyens
    • Fix tf.reset missing options argument. Fixes editor reset on select all > backspace using ResetNodePlugin.
    • PlateStatic element and leaf rendering is now memoized with React.memo so you can safely update editor.children. For elements, it compares the element reference or element._memo value. The latter can be used to memoize based on the markdown string instead of the element reference. For example, deserializeMd with memoize: true will set element._memo for that purpose.

42.0.1

Patch Changes

  • #3948 by @​zbeyens – Fix: deserialization should work with custom node types

42.0.0

Major Changes

  • #3920 by @​zbeyens

    • Plugin normalizeInitialValue now returns void instead of Value. When mutating nodes, keep their references (e.g., use Object.assign instead of spread).

    • Editor methods have moved to editor.tf and editor.api. They still exist at the top level for slate backward compatibility, but are no longer redundantly typed. If you truly need the top-level method types, extend your editor type with LegacyEditorMethods (e.g. editor as Editor & LegacyEditorMethods). Since these methods can be overridden by extendEditor, with..., or slate plugins, consider migrating to the following approaches:

      // For overriding existing methods only:
      overrideEditor(({ editor, tf: { deleteForward }, api: { isInline } }) => ({
        transforms: {
          deleteForward(options) {
            // ...conditional override
            deleteForward(options);
          },
        },
        api: {
          isInline(element) {
            // ...conditional override
            return isInline(element);
          },
        },
      }));

    This was previously done in extendEditor using top-level methods, which still works but now throws a type error due to the move to editor.tf/editor.api. A workaround is to extend your editor with LegacyEditorMethods.

    Why? Having all methods at the top-level (next to children, marks, etc.) would clutter the editor interface. Slate splits transforms in three places (editor, Editor, and Transforms), which is also confusing. We've reorganized them into tf and api for better DX, but also to support transform-only middlewares in the future. This also lets us leverage extendEditorTransforms, extendEditorApi, and overrideEditor to modify those methods.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@udecode/plate-core](https://github.com/udecode/plate/tree/HEAD/packages/core) from 36.5.9 to 42.0.4.
- [Release notes](https://github.com/udecode/plate/releases)
- [Changelog](https://github.com/udecode/plate/blob/main/packages/core/CHANGELOG.md)
- [Commits](https://github.com/udecode/plate/commits/@udecode/plate-core@42.0.4/packages/core)

---
updated-dependencies:
- dependency-name: "@udecode/plate-core"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from a team as a code owner January 13, 2025 11:38
@dependabot dependabot bot added dependabot dependencies Pull requests that update a dependency file labels Jan 13, 2025
Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 20, 2025

Superseded by #1824.

@dependabot dependabot bot closed this Jan 20, 2025
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/master/udecode/plate-core-42.0.4 branch January 20, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependabot dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants