Draftjs-exporter

Latest version: v5.0.0

Safety actively analyzes 629855 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

3.0.0

This release contains breaking changes. **Be sure to check out the "how to upgrade" section below.**

Changed

- Remove support for Python 2.7 and 3.4 ([111](https://github.com/springload/draftjs_exporter/issues/111), [#120](https://github.com/springload/draftjs_exporter/pull/120)).
- Add support for Python 3.8.
- Small performance improvements by using lists’ mutable `.sort()` instead of `sorted()`, which is a bit faster. (±2% faster) ([120](https://github.com/springload/draftjs_exporter/pull/120)).

Added

- Add [PEP-484](https://www.python.org/dev/peps/pep-0484/) type annotations for the project’s public APIs ([#101](https://github.com/springload/draftjs_exporter/issues/101), [#123](https://github.com/springload/draftjs_exporter/pull/123)).
- Add [PEP-561](https://www.python.org/dev/peps/pep-0561/) metadata so the exporter’s type annotations can be read by type checkers ([#101](https://github.com/springload/draftjs_exporter/issues/101), [#123](https://github.com/springload/draftjs_exporter/pull/123)).
- Give entity rendering components access to the current `block`, `blocks` list, `mutability`, and key as `entity_range.key` ([91](https://github.com/springload/draftjs_exporter/issues/91), [#124](https://github.com/springload/draftjs_exporter/pull/124)).

How to upgrade

Python 2.7 and 3.4 support

Do not upgrade to this version if you are using the exporter in Python 2.7 or 3.4. Please keep using [v2.1.7](https://github.com/springload/draftjs_exporter/tree/v2.1.7) of the exporter.

PEP-484 type annotations

If you are using the exporter in a codebase using type annotations and a type checker, there is a chance the annotations added in this release will create conflicts with your project’s annotations – if there are discrepancies between the expected input/output of the exporter, or in the configuration. In this case you may need to update your project’s type annotations or stubs to match the expected types of the exporter’s public API.

If you believe there is a problem with how the public API is typed, please [open a new issue](https://github.com/springload/draftjs_exporter/issues/new/choose).

2.1.7

Changed

- Minor performance improvements (10% speed-up, 30% lower memory consumption) by adding Python [`__slots__`](https://stackoverflow.com/questions/472000/usage-of-slots) and implementing other optimisations.

2.1.6

Changed

- Assume same block defaults as Draft.js would when attributes are missing: depth = 0, type = unstyled, no entities, no styles ([110](https://github.com/springload/draftjs_exporter/pull/110), thanks to [tpict](https://github.com/tpict)).
- Minor performance improvements for text-only blocks ([112](https://github.com/springload/draftjs_exporter/pull/112)).

2.1.5

Changed

- Minor performance improvements (8% speed-up, 20% lower memory consumption) ([108](https://github.com/springload/draftjs_exporter/pull/108))

Fixed

- Fix export bug with adjacent entities - the exporter moved their contents outside of the entities' markup ([106](https://github.com/springload/draftjs_exporter/pull/106), [#107](https://github.com/springload/draftjs_exporter/pull/107)). Thanks to [ericpai](https://github.com/ericpai) for reporting this.

2.1.4

Changed

- Attempt to fix project description formatting on [PyPI](https://pypi.org/project/draftjs_exporter/), broken in the last release ([#103](https://github.com/springload/draftjs_exporter/issues/103)).

2.1.3

Changed

- Increase lower bound of optional lxml dependency to v4.2.0 to guarantee Python 3.7 support ([88](https://github.com/springload/draftjs_exporter/pull/88)).

Page 2 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.