From 2e74941787e4558b96b4d11b7e56f26b684be6a5 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Fri, 27 Oct 2017 13:48:30 -0700 Subject: [PATCH] update changelogs --- packages/slate-base64-serializer/Changelog.md | 10 +++++++ packages/slate-html-serializer/Changelog.md | 10 +++++++ packages/slate-hyperscript/Changelog.md | 14 ++++++++++ packages/slate-plain-serializer/Changelog.md | 10 +++++++ packages/slate-prop-types/Changelog.md | 14 ++++++++++ packages/slate-react/Changelog.md | 26 +++++++++++++++++++ packages/slate-simulator/Changelog.md | 12 +++++++++ packages/slate-simulator/src/index.js | 10 +++---- packages/slate/Changelog.md | 18 +++++++++++++ 9 files changed, 119 insertions(+), 5 deletions(-) diff --git a/packages/slate-base64-serializer/Changelog.md b/packages/slate-base64-serializer/Changelog.md index a3cf73c7f..20331c587 100644 --- a/packages/slate-base64-serializer/Changelog.md +++ b/packages/slate-base64-serializer/Changelog.md @@ -7,6 +7,16 @@ This document maintains a list of changes to the `slate-base64-serializer` packa --- +### `0.2.0` — October 27, 2017 + +###### BREAKING + +- **Updated to work with `slate@0.29.0`.** This is required because `slate-base64-serializer` needs access to the new `Value` model. + + +--- + + ### `0.1.0` — September 17, 2017 :tada: diff --git a/packages/slate-html-serializer/Changelog.md b/packages/slate-html-serializer/Changelog.md index 0618e4b02..c4ef31f0e 100644 --- a/packages/slate-html-serializer/Changelog.md +++ b/packages/slate-html-serializer/Changelog.md @@ -7,6 +7,16 @@ This document maintains a list of changes to the `slate-html-serializer` package --- +### `0.3.0` — October 27, 2017 + +###### BREAKING + +- **Updated to work with `slate@0.29.0`.** This is required because `slate-html-serializer` needs access to the new `Value` model. + + +--- + + ### `0.2.0` — October 14, 2017 ###### BREAKING diff --git a/packages/slate-hyperscript/Changelog.md b/packages/slate-hyperscript/Changelog.md index e419b3270..cc557f210 100644 --- a/packages/slate-hyperscript/Changelog.md +++ b/packages/slate-hyperscript/Changelog.md @@ -7,6 +7,20 @@ This document maintains a list of changes to the `slate-hyperscript` package wit --- +### `0.3.0` — October 27, 2017 + +###### BREAKING + +- **Updated to work with `slate@0.29.0`.** This is required because `slate-hyperscript` needs access to the new `Value` model. + +###### DEPRECATED + +- **The `` tag has been renamed to ``.** This is to stay in line with the newest version of Slate where the `State` object was renamed to `Value`. + + +--- + + ### `0.2.0` — October 14, 2017 ###### BREAKING diff --git a/packages/slate-plain-serializer/Changelog.md b/packages/slate-plain-serializer/Changelog.md index 6cae1ba51..824e0850e 100644 --- a/packages/slate-plain-serializer/Changelog.md +++ b/packages/slate-plain-serializer/Changelog.md @@ -7,6 +7,16 @@ This document maintains a list of changes to the `slate-plain-serializer` packag --- +### `0.3.0` — October 27, 2017 + +###### BREAKING + +- **Updated to work with `slate@0.29.0`.** This is required because `slate-plain-serializer` needs access to the new `Value` model. + + +--- + + ### `0.2.0` — October 14, 2017 ###### BREAKING diff --git a/packages/slate-prop-types/Changelog.md b/packages/slate-prop-types/Changelog.md index 17d508db5..3fc7b798c 100644 --- a/packages/slate-prop-types/Changelog.md +++ b/packages/slate-prop-types/Changelog.md @@ -7,6 +7,20 @@ This document maintains a list of changes to the `slate-prop-types` package with --- +### `0.3.0` — October 27, 2017 + +###### BREAKING + +- **Updated to work with `slate@0.29.0`.** This is required because `slate-prop-types` needs access to the new `Value` model. + +###### DEPRECATED + +- **The `state` prop type has been renamed to `value`.** This is to stay in line with `slate-react@0.29.0` where the `State` object was renamed. + + +--- + + ### `0.2.0` — October 14, 2017 ###### BREAKING diff --git a/packages/slate-react/Changelog.md b/packages/slate-react/Changelog.md index 69253a850..3dcae26dd 100644 --- a/packages/slate-react/Changelog.md +++ b/packages/slate-react/Changelog.md @@ -7,6 +7,32 @@ This document maintains a list of changes to the `slate-react` package with each --- +### `0.9.0` — October 27, 2017 + +###### BREAKING + +- **Updated to use `slate@0.29.0`.** This is to gain access to the new `Value` model introduced in the newest version of Slate. + +- **Custom components no longer receive `props.state` or `props.schema`.** These are now exposed directly on the `props.editor` instance itself as `editor.value` and `editor.schema`. This helps eliminate a common issue where because of `shouldComponentUpdate` returning `false`, the `props.state` value was actually outdated, and transforming from it would cause incorrect behaviors. + +- **The `plugin.renderEditor` function's signature has changed.** Previously it received `(props, state, editor)` but it now receives just `(props, editor)`. If you need access to the editor's current value, use the new `editor.value` property. This is simply to clean up the API, since the value is already accessible on `editor`. + +###### DEPRECATED + +- **The "state" has been renamed to "value" everywhere.** All of the current references are maintained as deprecations, so you should be able to upgrade and see warnings logged instead of being greeted with a broken editor. This is to reduce the confusion between React's "state" and Slate's editor value, and in an effort to further mimic the native DOM APIs. + +- **The editor `getSchema()`, `getStack()` and `getState()` methods are deprecated.** These have been replaced by property getters on the editor instance itself—`editor.schema`, `editor.stack` and `editor.value`, respectively. This is to reduce confusion with React's own `setState`, and to make accessing these commonly used properties more convenient. + +###### NEW + +- **Added a new `editor.value` getter property.** This now mimics the DOM for things like `input.value` and `textarea.value`, and is the new way to access the editor's current value. + +- **Added new `editor.schema` and `editor.stack` getters.** Similarly to the new `value` getter, these two new getters give you access to the editor's current schema and stack. + + +--- + + ### `0.8.0` — October 25, 2017 ###### BREAKING diff --git a/packages/slate-simulator/Changelog.md b/packages/slate-simulator/Changelog.md index 0eeeabadb..fcccf29b7 100644 --- a/packages/slate-simulator/Changelog.md +++ b/packages/slate-simulator/Changelog.md @@ -7,6 +7,18 @@ This document maintains a list of changes to the `slate-simulator` package with --- +### `0.3.0` — October 27, 2017 + +###### DEPRECATED + +- **The `props.state` prop has been renamed to `props.value`.** This is to stay in line with `slate-react@0.9.0` where the same change was made to the ``. + +- **The `simulator.state` property is now `simulator.value`** This is to stay in line with `slate@0.29.0` where the same change as made to the `Change` objects. + + +--- + + ### `0.2.0` — October 25, 2017 ###### BREAKING diff --git a/packages/slate-simulator/src/index.js b/packages/slate-simulator/src/index.js index d24101d59..4285c4c52 100644 --- a/packages/slate-simulator/src/index.js +++ b/packages/slate-simulator/src/index.js @@ -41,17 +41,17 @@ class Simulator { this.stack = stack this.value = value + if (props.state) { + logger.deprecate('slate-simulator@0.3.0', 'The `state` prop has been renamed to `value`.') + this.value = props.state + } + Object.defineProperty(this, 'state', { get() { logger.deprecate('slate-simulator@0.3.0', 'The `simulator.state` property has been renamed to `simulator.value`.') return this.value } }) - - if (props.state) { - logger.deprecate('slate-simulator@0.3.0', 'The `state` prop has been renamed to `value`.') - this.value = props.state - } } } diff --git a/packages/slate/Changelog.md b/packages/slate/Changelog.md index 963c0deae..c188ab3fd 100644 --- a/packages/slate/Changelog.md +++ b/packages/slate/Changelog.md @@ -7,6 +7,24 @@ This document maintains a list of changes to the `slate` package with each new v --- +### `0.29.0` — October 27, 2017 + +###### BREAKING + +- **The `set_state` operation has been renamed `set_value`**. This shouldn't affect almost anyone, but in the event that you were relying on the low-level operation types you'll need to update this. + +###### DEPRECATED + +- **The "state" has been renamed to "value" everywhere.** All of the current references are maintained as deprecations, so you should be able to upgrade and see warnings logged instead of being greeted with a broken editor. This is to reduce the confusion between React's "state" and Slate's editor value, and in an effort to further mimic the native DOM APIs. + +###### NEW + +- **Added the new `Value` model to replace `State`.** The new model is exactly the same, but with a new name. There is also a shimmed `State` model exported that warns when used, to ease migration. + + +--- + + ### `0.28.0` — October 25, 2017 ###### BREAKING