Skip to content

Commit 9d3dd9a

Browse files
committed
Upgrading dependencies
1 parent bcda7c5 commit 9d3dd9a

File tree

7 files changed

+1974
-1227
lines changed

7 files changed

+1974
-1227
lines changed

dist/html-to-draftjs.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
"url": "https://github.com/jpuri/html-to-draftjs.git"
88
},
99
"devDependencies": {
10-
"babel-preset-es2015": "^6.22.0",
11-
"babel-preset-react": "^6.23.0",
12-
"babel-preset-stage-0": "^6.22.0",
13-
"chai": "^3.5.0",
14-
"draft-js": "^0.10.0",
10+
"babel-preset-es2015": "^6.24.1",
11+
"babel-preset-react": "^6.24.1",
12+
"babel-preset-stage-0": "^6.24.1",
13+
"chai": "^4.1.0",
14+
"draft-js": "^0.10.1",
1515
"draftjs-to-html": "^0.7.3",
16-
"react": "^15.4.2",
17-
"react-dom": "^15.4.2",
16+
"react": "^15.6.1",
17+
"react-dom": "^15.6.1",
1818
"react-draft-wysiwyg": "^1.10.7",
19-
"react-scripts": "0.9.5",
19+
"react-scripts": "1.0.10",
2020
"rimraf": "^2.6.1",
21-
"webpack": "^2.2.1"
21+
"webpack": "^3.3.0"
2222
},
2323
"peerDependencies": {
2424
"draft-js": "^0.9.x || ^0.10.x"

src/lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import ContentEditor from './ContentEditor';
22
import { convertToRawContentState } from './utils/dataConversion';
33

4-
module.exports = {
4+
export default {
55
ContentEditor,
66
convertToRawContentState,
77
};

src/library/chunkBuilder.js

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { OrderedSet, Map } from 'immutable';
33
const SPACE = ' ';
44
const MAX_DEPTH = 4;
55

6-
const getWhitespaceChunk = (entityId: ?string): Object => {
6+
export const getWhitespaceChunk = (entityId: ?string): Object => {
77
return {
88
text: SPACE,
99
inlines: [new OrderedSet()],
@@ -12,7 +12,7 @@ const getWhitespaceChunk = (entityId: ?string): Object => {
1212
};
1313
};
1414

15-
const createTextChunk = (node: Object, inlineStyle: OrderedSet, entityId: number): Object => {
15+
export const createTextChunk = (node: Object, inlineStyle: OrderedSet, entityId: number): Object => {
1616
const text = node.textContent;
1717
if (text.trim() === '') {
1818
return { chunk: getWhitespaceChunk(entityId) };
@@ -27,7 +27,7 @@ const createTextChunk = (node: Object, inlineStyle: OrderedSet, entityId: number
2727
};
2828
};
2929

30-
const getSoftNewlineChunk = (): Object => {
30+
export const getSoftNewlineChunk = (): Object => {
3131
return {
3232
text: '\n',
3333
inlines: [new OrderedSet()],
@@ -36,7 +36,7 @@ const getSoftNewlineChunk = (): Object => {
3636
};
3737
};
3838

39-
const getEmptyChunk = (): Object => {
39+
export const getEmptyChunk = (): Object => {
4040
return {
4141
text: '',
4242
inlines: [],
@@ -45,7 +45,7 @@ const getEmptyChunk = (): Object => {
4545
};
4646
};
4747

48-
const getFirstBlockChunk = (blockType: string, data: Object): Object => {
48+
export const getFirstBlockChunk = (blockType: string, data: Object): Object => {
4949
return {
5050
text: '',
5151
inlines: [],
@@ -58,7 +58,7 @@ const getFirstBlockChunk = (blockType: string, data: Object): Object => {
5858
};
5959
};
6060

61-
const getBlockDividerChunk = (blockType: string, depth: number, data: Object): Object => {
61+
export const getBlockDividerChunk = (blockType: string, depth: number, data: Object): Object => {
6262
return {
6363
text: '\r',
6464
inlines: [],
@@ -71,7 +71,7 @@ const getBlockDividerChunk = (blockType: string, depth: number, data: Object): O
7171
};
7272
};
7373

74-
const getAtomicBlockChunk = (entityId: number): Object => {
74+
export const getAtomicBlockChunk = (entityId: number): Object => {
7575
return {
7676
text: '\r ',
7777
inlines: [new OrderedSet()],
@@ -84,22 +84,11 @@ const getAtomicBlockChunk = (entityId: number): Object => {
8484
};
8585
};
8686

87-
const joinChunks = (A: Object, B: Object): Object => {
87+
export const joinChunks = (A: Object, B: Object): Object => {
8888
return {
8989
text: A.text + B.text,
9090
inlines: A.inlines.concat(B.inlines),
9191
entities: A.entities.concat(B.entities),
9292
blocks: A.blocks.concat(B.blocks),
9393
};
9494
}
95-
96-
module.exports = {
97-
createTextChunk,
98-
getWhitespaceChunk,
99-
getSoftNewlineChunk,
100-
getEmptyChunk,
101-
getBlockDividerChunk,
102-
getFirstBlockChunk,
103-
getAtomicBlockChunk,
104-
joinChunks,
105-
};

src/library/getEntityId.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ const getEntityId = (node) => {
2929
return entityId;
3030
}
3131

32-
module.exports = getEntityId;
32+
export default getEntityId;

src/library/getSafeBodyFromHTML.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ const getSafeBodyFromHTML = (html: string): ?Element => {
1212
return root;
1313
}
1414

15-
module.exports = getSafeBodyFromHTML;
15+
export default getSafeBodyFromHTML;

0 commit comments

Comments
 (0)