Skip to content

Commit e9a5c7f

Browse files
author
vvo
committed
chore(build): switch to stringify-object@3
BREAKING CHANGE: You need an ES2015 env to use react-element-to-jsx-string now You can use the Babel polyfill to do so.
1 parent 1bbf36c commit e9a5c7f

File tree

5 files changed

+972
-93
lines changed

5 files changed

+972
-93
lines changed

CHANGELOG.md

Lines changed: 44 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
<a name="5.0.7"></a>
2+
## [5.0.7](https://github.com/algolia/react-element-to-jsx-string/compare/v5.0.6...v5.0.7) (2017-01-03)
3+
4+
5+
### Bug Fixes
6+
7+
* **build:** revert to stringify-object[@2](https://github.com/2) ([58542bc](https://github.com/algolia/react-element-to-jsx-string/commit/58542bc)), closes [#71](https://github.com/algolia/react-element-to-jsx-string/issues/71)
8+
9+
10+
11+
<a name="5.0.6"></a>
12+
## [5.0.6](https://github.com/algolia/react-element-to-jsx-string/compare/v5.0.5...v5.0.6) (2017-01-02)
13+
14+
15+
16+
<a name="5.0.5"></a>
17+
## [5.0.5](https://github.com/algolia/react-element-to-jsx-string/compare/v5.0.4...v5.0.5) (2017-01-02)
18+
19+
20+
121
<a name="5.0.4"></a>
222
## [5.0.4](https://github.com/algolia/react-element-to-jsx-string/compare/v5.0.3...v5.0.4) (2016-12-08)
323

@@ -34,7 +54,7 @@
3454

3555
### BREAKING CHANGES
3656

37-
* pretty: objects and arrays are now prettified by default following #50
57+
* pretty: objects and arrays are now prettified by default following #50
3858
If this is a concern to you, open a PR that adds an option to inline parts or the whole output like before
3959

4060

@@ -52,11 +72,6 @@ If this is a concern to you, open a PR that adds an option to inline parts or th
5272
<a name="4.0.0"></a>
5373
# [4.0.0](https://github.com/algolia/react-element-to-jsx-string/compare/v3.2.0...v4.0.0) (2016-08-04)
5474

55-
### BREAKING CHANGES
56-
57-
* `Component.displayName` now takes precedence over `Component.name`. This will
58-
break for class and functional components that defined a `displayName` different
59-
from the class or function's own name.
6075

6176

6277
<a name="3.2.0"></a>
@@ -82,55 +97,62 @@ from the class or function's own name.
8297
<a name="3.0.0"></a>
8398
# [3.0.0](https://github.com/algolia/react-element-to-jsx-string/compare/v2.6.1...v3.0.0) (2016-05-25)
8499

85-
Boolean attributes are now translated to short version automatically.
86100

87101

88-
<a name="2.6.0"></a>
89-
# [2.6.0](https://github.com/algolia/react-element-to-jsx-string/compare/v2.6.1...v2.6.0) (2016-04-15)
102+
<a name="2.6.1"></a>
103+
## [2.6.1](https://github.com/algolia/react-element-to-jsx-string/compare/v2.6.0...v2.6.1) (2016-04-15)
90104

91105

106+
### Bug Fixes
92107

108+
* **deps:** allow react 0.14 ([7347b71](https://github.com/algolia/react-element-to-jsx-string/commit/7347b71)), closes [#24](https://github.com/algolia/react-element-to-jsx-string/issues/24)
93109

94-
<a name="2.5.0"></a>
95-
# [2.5.0](https://github.com/algolia/react-element-to-jsx-string/compare/v2.6.0...v2.5.0) (2016-04-15)
96110

97111

112+
<a name="2.6.0"></a>
113+
# [2.6.0](https://github.com/algolia/react-element-to-jsx-string/compare/2.5.0...v2.6.0) (2016-04-15)
98114

99115

100-
<a name="2.3.0"></a>
101-
# [2.3.0](https://github.com/algolia/react-element-to-jsx-string/compare/2.4.0...v2.3.0) (2016-02-02)
116+
### Features
102117

118+
* **React:** React v15 compat ([37ee7b5](https://github.com/algolia/react-element-to-jsx-string/commit/37ee7b5))
103119

104120

105121

106-
<a name="2.2.0"></a>
107-
# [2.2.0](https://github.com/algolia/react-element-to-jsx-string/compare/2.3.0...v2.2.0) (2016-02-02)
122+
<a name="2.4.0"></a>
123+
# [2.4.0](https://github.com/algolia/react-element-to-jsx-string/compare/2.3.0...2.4.0) (2016-02-02)
124+
125+
126+
127+
<a name="2.3.0"></a>
128+
# [2.3.0](https://github.com/algolia/react-element-to-jsx-string/compare/v2.2.0...2.3.0) (2016-02-02)
129+
130+
131+
### Features
108132

133+
* **deps:** upgrade all deps ([f3e368d](https://github.com/algolia/react-element-to-jsx-string/commit/f3e368d))
109134

110135

111136

112137
<a name="2.2.0"></a>
113138
# [2.2.0](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.5...v2.2.0) (2016-01-14)
114139

115-
* add reactElementToJSXString(ReactElement, opts) opts.displayName option to
116-
allow choosing the display name of components
117140

118141

119142
<a name="2.1.5"></a>
120143
## [2.1.5](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.4...v2.1.5) (2016-01-05)
121144

122-
### Bug Fixes
123145

124-
* stop breaking lines when interpolating {number}s ([13b832c](https://github.com/algolia/react-element-to-jsx-string/commit/13b832c))
125146

126147
<a name="2.1.4"></a>
127148
## [2.1.4](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.3...v2.1.4) (2015-12-10)
128149

129150

130151
### Bug Fixes
131152

132-
* **stateless comps:** add No Display Name as default component name ([89ea2f2](https://github.com/algolia/react-element-to-jsx-string/commit/89ea2f2))
133-
* consider elements containing only {''} as empty (resulting DOM being empty) ([d837683](https://github.com/algolia/react-element-to-jsx-string/commit/d837683))
153+
* **stateless comps:** add No Display Name as default component name ([dc0f65c](https://github.com/algolia/react-element-to-jsx-string/commit/dc0f65c)), closes [#11](https://github.com/algolia/react-element-to-jsx-string/issues/11)
154+
155+
134156

135157
<a name="2.1.3"></a>
136158
## [2.1.3](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.0...v2.1.3) (2015-11-30)
@@ -145,29 +167,6 @@ Boolean attributes are now translated to short version automatically.
145167

146168

147169

148-
<a name="2.1.2"></a>
149-
## [2.1.2](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.0...v2.1.2) (2015-11-08)
150-
151-
152-
### Bug Fixes
153-
154-
* **whitespace:** handle {true} {false} ([eaca1a2](https://github.com/algolia/react-element-to-jsx-string/commit/eaca1a2)), closes [#6](https://github.com/algolia/react-element-to-jsx-string/issues/6) [#7](https://github.com/algolia/react-element-to-jsx-string/issues/7)
155-
* handle <div>{123}</div> ([609ac78](https://github.com/algolia/react-element-to-jsx-string/commit/609ac78)), closes [#8](https://github.com/algolia/react-element-to-jsx-string/issues/8)
156-
* **whitespace:** stop rendering it differently in SOME cases ([128aa95](https://github.com/algolia/react-element-to-jsx-string/commit/128aa95))
157-
158-
159-
160-
<a name="2.1.1"></a>
161-
## [2.1.1](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.0...v2.1.1) (2015-11-08)
162-
163-
164-
### Bug Fixes
165-
166-
* **whitespace:** handle {true} {false} ([eaca1a2](https://github.com/algolia/react-element-to-jsx-string/commit/eaca1a2)), closes [#6](https://github.com/algolia/react-element-to-jsx-string/issues/6) [#7](https://github.com/algolia/react-element-to-jsx-string/issues/7)
167-
* handle <div>{123}</div> ([609ac78](https://github.com/algolia/react-element-to-jsx-string/commit/609ac78)), closes [#8](https://github.com/algolia/react-element-to-jsx-string/issues/8)
168-
169-
170-
171170
<a name="2.1.0"></a>
172171
# [2.1.0](https://github.com/algolia/react-element-to-jsx-string/compare/v2.0.5...v2.1.0) (2015-10-25)
173172

@@ -263,7 +262,6 @@ realistic way.
263262

264263

265264

266-
267265
<a name="1.1.0"></a>
268266
# [1.1.0](https://github.com/algolia/react-element-to-jsx-string/compare/3e2e7b8...v1.1.0) (2015-10-15)
269267

@@ -272,9 +270,7 @@ realistic way.
272270

273271
* **whitespace:** remove unwanted whitespace in output ([3e2e7b8](https://github.com/algolia/react-element-to-jsx-string/commit/3e2e7b8))
274272

273+
275274
### Features
276275

277276
* sort object keys in a deterministic way ([c1ce8a6](https://github.com/algolia/react-element-to-jsx-string/commit/c1ce8a6))
278-
279-
280-

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ Features:
2727
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
2828
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
2929

30-
- [react-element-to-jsx-string](#react-element-to-jsx-string)
31-
- [Setup](#setup)
32-
- [Usage](#usage)
33-
- [Test](#test)
34-
- [Build](#build)
35-
- [Thanks](#thanks)
30+
- [Setup](#setup)
31+
- [Usage](#usage)
32+
- [API](#api)
33+
- [reactElementToJSXString(ReactElement[, options])](#reactelementtojsxstringreactelement-options)
34+
- [Environment requirements](#environment-requirements)
35+
- [Test](#test)
36+
- [Build](#build)
37+
- [Release](#release)
38+
- [Thanks](#thanks)
3639

3740
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3841

@@ -93,6 +96,13 @@ console.log(reactElementToJSXString(<div a="1" b="2">Hello, world!</div>));
9396

9497
If false, Boolean prop values will be explicitly output like `prop={true}` and `prop={false}`
9598

99+
## Environment requirements
100+
101+
The environment you use to use `react-element-to-jsx-string` should have [ES2015](https://babeljs.io/learn-es2015/) support.
102+
103+
Use the [Babel polyfill](https://babeljs.io/docs/usage/polyfill/) or any other method that will make you
104+
environment behave like an ES2015 environment.
105+
96106
## Test
97107

98108
```sh

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"babel-preset-react": "^6.16.0",
2626
"babel-preset-stage-2": "^6.18.0",
2727
"babel-register": "^6.18.0",
28+
"conventional-changelog-cli": "^1.2.0",
29+
"doctoc": "^1.2.0",
2830
"eslint": "^3.12.2",
2931
"eslint-config-algolia": "^6.0.1",
3032
"eslint-import-resolver-webpack": "^0.8.0",
@@ -46,7 +48,7 @@
4648
"is-plain-object": "^2.0.1",
4749
"lodash": "^4.17.4",
4850
"sortobject": "^1.0.0",
49-
"stringify-object": "2.4.0",
51+
"stringify-object": "^3.1.0",
5052
"traverse": "^0.6.6"
5153
}
5254
}

release.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ if [[ $# -eq 0 ]] ; then
2424
fi
2525

2626
mversion $1
27+
conventional-changelog --infile CHANGELOG.md --same-file --preset angular
28+
doctoc README.md
2729
git commit -am "$(json -f package.json version)"
2830
git tag v`json -f package.json version`
2931
git push

0 commit comments

Comments
 (0)