New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-element-to-jsx-string

Package Overview
Dependencies
Maintainers
20
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-element-to-jsx-string - npm Package Versions

134567

14.0.2

Diff
patrick.sachs
published 14.0.2 •

Changelog

Source

14.0.2 (2018-10-10)

Bug Fixes

  • formatting: Fix JSX element in prop object recursive loop (#309) (fd4f53b)
  • functionValue: handle nested datastructures (94d1aeb)

<a name="14.0.1"></a>

vvo
published 14.0.1 •

Changelog

Source

14.0.1 (2018-06-20)

Bug Fixes

<a name="14.0.0"></a>

vvo
published 14.0.0 •

Changelog

Source

14.0.0 (2018-05-25)

Features

  • browser: build a dedicated version for the browser (#242) (574d850)

BREAKING CHANGES

  • browser: This PR change of the internal directory structure of the exported code. The previous code has move from the dist/ into the dist/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

<a name="13.2.0"></a>

spy-seth
published 13.2.0 •

Changelog

Source

13.2.0 (2018-03-14)

Bug Fixes

  • deps: update dependency stringify-object to v3.2.2 (b1a4c5e)

<a name="13.1.0"></a>

spy-seth
published 13.1.0 •

Changelog

Source

13.1.0 (2017-11-15)

Bug Fixes

  • 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)

<a name="13.0.0"></a>

spy-seth
published 13.0.0 •

Changelog

Source

13.0.0 (2017-10-09)

Bug Fixes

  • 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

BREAKING CHANGES

  • 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

<a name="12.0.0"></a>

spy-seth
published 12.0.0 •

Changelog

Source

12.0.0 (2017-08-03)

Bug Fixes

  • 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)

BREAKING CHANGES

  • formatting: Improve string escaping of string that contains JSX delimiters ({,},<,>)

Before:

console.log(reactElementToJsxString(<div>{`Mustache :{`}</div>);

// <div>Mustache :&lbrace;</div>

Now:

console.log(reactElementToJsxString(<div>{`Mustache :{`}</div>);

// <div>{`Mustache :{`}</div>

<a name="11.0.1"></a>

spy-seth
published 11.0.1 •

Changelog

Source

11.0.1 (2017-07-21)

Bug Fixes

  • formatting: fix an edge case where number and string childrens are not correctly merged (47572e0)

<a name="11.0.0"></a>

spy-seth
published 11.0.0 •

Changelog

Source

11.0.0 (2017-07-20)

Bug Fixes

  • release: Missing mversion package in dev dependencies (0f82ee7)
  • escaping: Complete lib refactor to handle more escaping cases (9f3c671)

BREAKING CHANGES

  • 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">&lbrace; hello: 'world' &rbrace;</script>

<a name="10.1.0"></a>

vvo
published 10.1.0 •

Changelog

Source

10.1.0 (2017-06-13)

Features

  • sortProps: add option to remove sorting of props (66e8307)

<a name="10.0.1"></a>