15.0.0 (2022-05-09)
14.3.4 (2021-10-19)
14.3.3 (2021-10-19)
- deps: pin dependency react-is to 17.0.2 (a62c5fd)
- fixed crashing on circular React elements (#619) (ea73118)
- handle invalid Date objects (#605) (#606) (dbbd9e5)
14.3.2 (2020-10-28)
- deps: update dependency is-plain-object to v3.0.1 (4974512)
- Handle multiple words before trailing space (#572) (e0c082e)
14.3.1 (2020-01-21)
14.3.0 (2020-01-17)
14.2.0 (2019-12-29)
- deps: pin dependency @base2/pretty-print-object to 1.0.0 (07f19f9)
- formatting: fix the anonymous functional component detection after babel upgrade (7a1b93e)
14.1.0 (2019-09-15)
- deps: Remove dependency stringify-object (6dc6d8d)
- deps: Replace dependency stringify-object with pretty-print-object (940a413)
14.0.3 (2019-07-19)
- deps: update dependency is-plain-object to v3 (#361) (b58cbbd)
- Rework the propNameSorter to be less dependents of node sort internals (a9ee312)
- deps: update dependency stringify-object to v3.3.0 (bfe9a9f)
- formatting: Make the props "key" and "ref" order predictibale (#340) (3853463)
- deps: If you use the
showFunctions: true
option, the function are now always inlined in the output by default. Before it was not always the case (depending one the engine, platform or babel versions)
You could get back to the previous behavior by using the preserveFunctionLineBreak
function export as a value of the option functionValue
.
- test(smoke): Adapt the CommonJS bundle import
14.0.2 (2018-10-10)
- formatting: Fix JSX element in prop object recursive loop (#309) (fd4f53b)
- functionValue: handle nested datastructures (94d1aeb)
14.0.1 (2018-06-20)
- browser: Add IE 11 support (#288) (6c071b6), closes #211 #285
- build: missing babel helpers, true esm modules, simplify (#290) (faa8f46)
14.0.0 (2018-05-25)
-
browser: This PR change of the internal directory structure of the exported code. The previous code has move from the
dist/
into thedist/esm
directory (but remender that we do not avice you to do use internals code 🤓) -
fix(bunble): do not bundle peer dependencies
-
qa(ci): Avoid duplicate runs of checks on CI
-
qa(dependencies): Upgrade to latest rollup versions
-
qa(test): Allow to run the smoke tests aggaint all builded versions
13.2.0 (2018-03-14)
- deps: update dependency stringify-object to v3.2.2 (b1a4c5e)
13.1.0 (2017-11-15)
- formatting: Date/RegExp values output by formatComplexDataStructure (#250) (0387b72)
- react: Fix warning about access to PropTypes using React 15.5+ (fixes #213) (2dcfd10)
- test: Fix usage of yarn instead of npm in test script (0db5aa4)
13.0.0 (2017-10-09)
- deps: update dependency stringify-object to v3.2.1 (539ea56)
- formatting: symbol description are now quoted (2747f1b), closes #134
- formatting: trailing space (2a07d5e), closes #135
- formatting: Trailing are now preserved. In some rare case,
react-element-to-jsx-string
failed to respect the JSX specs for the trailing space. Event is the space were in the final output. There were silentrly ignored by JSX parser. This commit fix this bug by protecting the trailing space in the output.
If we take the JSX:
<div>
foo <strong>bar</strong> baz
</div>
Before it was converted to (the trailing space are replace by *
for the readability):
<div>
foo*
<strong>
bar
</strong>
*baz
</div>
Now there are preserved:
<div>
foo{' '}
<strong>
bar
</strong>
{' '}baz
</div>
- formatting: Symbol description are now correctly quoted. This change the output if you use Symbol in your code
12.0.0 (2017-08-03)
- flow: export flow definitions in the released bundle and fix the npm ignore too restrictive (#115) (c4f91b9)
- formatting: Children with multiline string are now correctly indented (d18809e)
- formatting: Fix JSX delimiters escaping in string (6e0eea3)
- release: revert change made by error in commit 86697517 (903fd5c)
- travis: manually install yarn on Travis CI (b8a4c1a)
- formatting: Improve string escaping of string that contains JSX delimiters (
{
,}
,<
,>
)
Before:
console.log(reactElementToJsxString(<div>{`Mustache :{`}</div>);
// <div>Mustache :{</div>
Now:
console.log(reactElementToJsxString(<div>{`Mustache :{`}</div>);
// <div>{`Mustache :{`}</div>
11.0.1 (2017-07-21)
- formatting: fix an edge case where number and string childrens are not correctly merged (47572e0)
11.0.0 (2017-07-20)
- release: Missing
mversion
package in dev dependencies (0f82ee7) - escaping: Complete lib refactor to handle more escaping cases (9f3c671)
- Fix escaping issue with quotes (in props value or in children of type string)
- Handle props value of
Date
type:<div foo={new Date("2017-01-01T11:00:00.000Z")} />
- Escape brace chars (
{}
) in a children string:<script type="application/json+ld">{ hello: 'world' }</script>
10.1.0 (2017-06-13)
- sortProps: add option to remove sorting of props (66e8307)
10.0.1 (2017-06-12)
10.0.0 (2017-06-07)
9.0.0 (2017-06-07)
8.0.0 (2017-05-24)
7.0.0 (2017-05-14)
6.4.0 (2017-04-24)
6.3.0 (2017-03-06)
6.2.0 (2017-02-27)
- inline attributes: Allow formatting attribute on the same line (da72176)
6.0.0 (2017-01-03)
- build: You need an ES2015 env to use react-element-to-jsx-string now
You can use the Babel polyfill to do so.
5.0.7 (2017-01-03)
5.0.6 (2017-01-02)
5.0.5 (2017-01-02)
5.0.4 (2016-12-08)
5.0.3 (2016-12-08)
5.0.2 (2016-11-17)
5.0.1 (2016-11-16)
5.0.0 (2016-10-24)
- pretty: prettify objects, arrays, nested (864b9db)
- pretty: objects and arrays are now prettified by default following #50 If this is a concern to you, open a PR that adds an option to inline parts or the whole output like before
4.2.0 (2016-09-21)
4.1.0 (2016-08-30)
4.0.0 (2016-08-04)
3.2.0 (2016-07-15)
3.1.2 (2016-07-12)
3.1.1 (2016-07-12)
3.1.0 (2016-06-28)
3.0.0 (2016-05-25)
2.6.1 (2016-04-15)
2.6.0 (2016-04-15)
- React: React v15 compat (37ee7b5)
2.4.0 (2016-02-02)
2.3.0 (2016-02-02)
- deps: upgrade all deps (f3e368d)
2.2.0 (2016-01-14)
2.1.5 (2016-01-05)
2.1.4 (2015-12-10)
2.1.3 (2015-11-30)
- handle {123}(609ac78), closes #8
- lodash: just use plain lodash and import (062b3fe)
- whitespace: handle {true} {false} (eaca1a2), closes #6 #7
- whitespace: stop rendering it differently in SOME cases (128aa95)
2.1.0 (2015-10-25)
2.0.5 (2015-10-21)
- merge plain strings props replacements (7c2bf27)
2.0.4 (2015-10-16)
- tagName: fixed an edge-case with decorated component name (9169ac7)
2.0.3 (2015-10-16)
- handle arrays the right way (597a910)
2.0.2 (2015-10-16)
- children: ensure the array of children is well handled (36b462a)
2.0.1 (2015-10-16)
- handle empty objects (fe052bd)
2.0.0 (2015-10-16)
- deep: functions are now stringified to
function noRefCheck() {}
instead offunction () {code;}
. For various reasons AND to be specific about the fact that we do not represent the function in a realistic way.
1.1.2 (2015-10-16)
1.1.1 (2015-10-15)
1.1.0 (2015-10-15)
- whitespace: remove unwanted whitespace in output (3e2e7b8)
- sort object keys in a deterministic way (c1ce8a6)