From fc582940f62d1e9611bf926197ce0c21d18f8af3 Mon Sep 17 00:00:00 2001 From: Thibaud Date: Fri, 25 Jan 2019 01:40:34 +0000 Subject: [PATCH] chore(release): v2.2.2 [skip ci] ## [2.2.2](https://github.com/thibaudcolas/draftjs-filters/compare/v2.2.1...v2.2.2) (2019-01-25) ### Bug Fixes * **api:** use more precise Flow types for public APIs. Fix [#30](https://github.com/thibaudcolas/draftjs-filters/issues/30) ([f274aaa](https://github.com/thibaudcolas/draftjs-filters/commit/f274aaa)) --- CHANGELOG.md | 6 ++++++ README.md | 18 +++++++++--------- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20c80e0b..60f0f2ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), enforced with [semantic-release](https://github.com/semantic-release/semantic-release). +## [2.2.2](https://github.com/thibaudcolas/draftjs-filters/compare/v2.2.1...v2.2.2) (2019-01-25) + +### Bug Fixes + +- **api:** use more precise Flow types for public APIs. Fix [#30](https://github.com/thibaudcolas/draftjs-filters/issues/30) ([f274aaa](https://github.com/thibaudcolas/draftjs-filters/commit/f274aaa)) + ## [2.2.1](https://github.com/thibaudcolas/draftjs-filters/compare/v2.2.0...v2.2.1) (2019-01-23) ### Bug Fixes diff --git a/README.md b/README.md index 194ab565..7d15e6ab 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ Removes atomic blocks for which the entity isn't whitelisted. ###### Parameters -- `whitelist` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** +- `whitelist` **\$ReadOnlyArray<{type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>** - `content` **ContentState** ##### removeInvalidDepthBlocks @@ -146,7 +146,7 @@ ends up in the text. Other use cases may not be well covered. ###### Parameters -- `rules` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<{test: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), depth: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)}>** +- `rules` **\$ReadOnlyArray<{test: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), depth: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)}>** - `content` **ContentState** ##### limitBlockDepth @@ -165,7 +165,7 @@ Also sets depth to 0 (for potentially nested list items). ###### Parameters -- `whitelist` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** +- `whitelist` **\$ReadOnlyArray<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** - `content` **ContentState** ##### filterInlineStyles @@ -174,7 +174,7 @@ Removes all styles not present in the whitelist. ###### Parameters -- `whitelist` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** +- `whitelist` **\$ReadOnlyArray<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** - `content` **ContentState** ##### cloneEntities @@ -204,7 +204,7 @@ Keeps all entity types (images, links, documents, embeds) that are enabled. ###### Parameters -- `whitelist` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** +- `whitelist` **\$ReadOnlyArray<{type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>** - `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ##### shouldRemoveImageEntity @@ -223,9 +223,9 @@ Filters entities based on the data they contain. ###### Parameters -- `entityTypes` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** +- `entityTypes` **\$ReadOnlyArray<{type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), whitelist: {}}>** - `entityType` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** -- `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `data` **{}** ##### filterEntityData @@ -235,7 +235,7 @@ of unneeded attributes (width, height, etc). ###### Parameters -- `entityTypes` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** +- `entityTypes` **$ReadOnlyArray<{type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), attributes: $ReadOnlyArray<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>}>** - `content` **ContentState** ##### replaceTextBySpaces @@ -244,7 +244,7 @@ Replaces the given characters by their equivalent length of spaces, in all block ###### Parameters -- `characters` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** +- `characters` **\$ReadOnlyArray<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** - `content` **ContentState** ##### applyContentWithSelection diff --git a/package-lock.json b/package-lock.json index 58770aeb..eff89bbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "draftjs-filters", - "version": "2.2.1", + "version": "2.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 27994706..9e75d991 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "draftjs-filters", - "version": "2.2.1", + "version": "2.2.2", "description": "Filter Draft.js content to preserve only the formatting you allow", "author": "Thibaud Colas", "license": "MIT",