1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-08 08:16:30 +02:00

Ensure multi-line expressions are padded by eslint (#1924)

* Fix eslint rule and upgrade eslint

* Fix for switch case

* Linting files
This commit is contained in:
Jinxuan Zhu
2018-06-21 22:27:10 -04:00
committed by Ian Storm Taylor
parent 1cc486e28c
commit e4ff1972d7
50 changed files with 312 additions and 97 deletions

View File

@@ -142,6 +142,18 @@
], ],
"valid-typeof": "error", "valid-typeof": "error",
"yield-star-spacing": ["error", "after"], "yield-star-spacing": ["error", "after"],
"yoda": ["error", "never"] "yoda": ["error", "never"],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "multiline-expression", "next": "*" },
{ "blankLine": "any", "prev": "multiline-expression", "next": "return" },
{ "blankLine": "always", "prev": "*", "next": "multiline-expression" },
{ "blankLine": "always", "prev": "*", "next": "multiline-expression" },
{ "blankLine": "always", "prev": "multiline-block-like", "next": "*" },
{ "blankLine": "any", "prev": "multiline-block-like", "next": "return" },
{ "blankLine": "always", "prev": "*", "next": "multiline-block-like" },
{ "blankLine": "always", "prev": "*", "next": "multiline-block-like" },
{ "blankLine": "any", "prev": "case", "next": "case" }
]
} }
} }

View File

@@ -137,6 +137,7 @@ class CodeHighlighting extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'comment': case 'comment':
return ( return (

View File

@@ -154,6 +154,7 @@ class Emojis extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node, isSelected } = props const { attributes, children, node, isSelected } = props
switch (node.type) { switch (node.type) {
case 'paragraph': { case 'paragraph': {
return <p {...attributes}>{children}</p> return <p {...attributes}>{children}</p>

View File

@@ -90,6 +90,7 @@ class ForcedLayout extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node } = props const { attributes, children, node } = props
switch (node.type) { switch (node.type) {
case 'title': case 'title':
return <h2 {...attributes}>{children}</h2> return <h2 {...attributes}>{children}</h2>

View File

@@ -127,6 +127,7 @@ class HoveringMenu extends React.Component {
const rect = range.getBoundingClientRect() const rect = range.getBoundingClientRect()
menu.style.opacity = 1 menu.style.opacity = 1
menu.style.top = `${rect.top + window.pageYOffset - menu.offsetHeight}px` menu.style.top = `${rect.top + window.pageYOffset - menu.offsetHeight}px`
menu.style.left = `${rect.left + menu.style.left = `${rect.left +
window.pageXOffset - window.pageXOffset -
menu.offsetWidth / 2 + menu.offsetWidth / 2 +
@@ -188,6 +189,7 @@ class HoveringMenu extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'bold': case 'bold':
return <strong {...attributes}>{children}</strong> return <strong {...attributes}>{children}</strong>

View File

@@ -96,6 +96,7 @@ class HugeDocument extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node } = props const { attributes, children, node } = props
switch (node.type) { switch (node.type) {
case 'heading': case 'heading':
return <h1 {...attributes}>{children}</h1> return <h1 {...attributes}>{children}</h1>
@@ -111,6 +112,7 @@ class HugeDocument extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'bold': case 'bold':
return <strong {...attributes}>{children}</strong> return <strong {...attributes}>{children}</strong>

View File

@@ -137,6 +137,7 @@ class Images extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, node, isSelected } = props const { attributes, node, isSelected } = props
switch (node.type) { switch (node.type) {
case 'image': { case 'image': {
const src = node.data.get('src') const src = node.data.get('src')

View File

@@ -90,6 +90,7 @@ class Links extends React.Component {
} else { } else {
const href = window.prompt('Enter the URL of the link:') const href = window.prompt('Enter the URL of the link:')
const text = window.prompt('Enter the text for the link:') const text = window.prompt('Enter the text for the link:')
change change
.insertText(text) .insertText(text)
.extend(0 - text.length) .extend(0 - text.length)
@@ -187,6 +188,7 @@ class Links extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node } = props const { attributes, children, node } = props
switch (node.type) { switch (node.type) {
case 'link': { case 'link': {
const { data } = node const { data } = node

View File

@@ -70,6 +70,7 @@ class MarkdownPreview extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'bold': case 'bold':
return <strong {...attributes}>{children}</strong> return <strong {...attributes}>{children}</strong>

View File

@@ -83,6 +83,7 @@ class MarkdownShortcuts extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node } = props const { attributes, children, node } = props
switch (node.type) { switch (node.type) {
case 'block-quote': case 'block-quote':
return <blockquote {...attributes}>{children}</blockquote> return <blockquote {...attributes}>{children}</blockquote>

View File

@@ -50,6 +50,7 @@ const RULES = [
{ {
deserialize(el, next) { deserialize(el, next) {
const block = BLOCK_TAGS[el.tagName.toLowerCase()] const block = BLOCK_TAGS[el.tagName.toLowerCase()]
if (block) { if (block) {
return { return {
object: 'block', object: 'block',
@@ -62,6 +63,7 @@ const RULES = [
{ {
deserialize(el, next) { deserialize(el, next) {
const mark = MARK_TAGS[el.tagName.toLowerCase()] const mark = MARK_TAGS[el.tagName.toLowerCase()]
if (mark) { if (mark) {
return { return {
object: 'mark', object: 'mark',
@@ -202,6 +204,7 @@ class PasteHtml extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node, isSelected } = props const { attributes, children, node, isSelected } = props
switch (node.type) { switch (node.type) {
case 'quote': case 'quote':
return <blockquote {...attributes}>{children}</blockquote> return <blockquote {...attributes}>{children}</blockquote>
@@ -258,6 +261,7 @@ class PasteHtml extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'bold': case 'bold':
return <strong {...attributes}>{children}</strong> return <strong {...attributes}>{children}</strong>

View File

@@ -242,6 +242,7 @@ class RichTextExample extends React.Component {
const parent = value.document.getParent(value.blocks.first().key) const parent = value.document.getParent(value.blocks.first().key)
isActive = this.hasBlock('list-item') && parent && parent.type === type isActive = this.hasBlock('list-item') && parent && parent.type === type
} }
const onMouseDown = event => this.onClickBlock(event, type) const onMouseDown = event => this.onClickBlock(event, type)
return ( return (
@@ -284,6 +285,7 @@ class RichTextExample extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node } = props const { attributes, children, node } = props
switch (node.type) { switch (node.type) {
case 'block-quote': case 'block-quote':
return <blockquote {...attributes}>{children}</blockquote> return <blockquote {...attributes}>{children}</blockquote>
@@ -309,6 +311,7 @@ class RichTextExample extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'bold': case 'bold':
return <strong {...attributes}>{children}</strong> return <strong {...attributes}>{children}</strong>

View File

@@ -75,6 +75,7 @@ class RTL extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node } = props const { attributes, children, node } = props
switch (node.type) { switch (node.type) {
case 'block-quote': case 'block-quote':
return <blockquote {...attributes}>{children}</blockquote> return <blockquote {...attributes}>{children}</blockquote>

View File

@@ -142,6 +142,7 @@ class SearchHighlighting extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'highlight': case 'highlight':
return ( return (

View File

@@ -198,6 +198,7 @@ class SyncingEditor extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'bold': case 'bold':
return <strong {...attributes}>{children}</strong> return <strong {...attributes}>{children}</strong>

View File

@@ -142,6 +142,7 @@ class Tables extends React.Component {
renderNode = props => { renderNode = props => {
const { attributes, children, node } = props const { attributes, children, node } = props
switch (node.type) { switch (node.type) {
case 'table': case 'table':
return ( return (
@@ -165,6 +166,7 @@ class Tables extends React.Component {
renderMark = props => { renderMark = props => {
const { children, mark, attributes } = props const { children, mark, attributes } = props
switch (mark.type) { switch (mark.type) {
case 'bold': case 'bold':
return <strong {...attributes}>{children}</strong> return <strong {...attributes}>{children}</strong>

View File

@@ -19,7 +19,7 @@
"copy-webpack-plugin": "^4.4.1", "copy-webpack-plugin": "^4.4.1",
"cross-env": "^5.1.3", "cross-env": "^5.1.3",
"css-loader": "^0.28.9", "css-loader": "^0.28.9",
"eslint": "^4.16.0", "eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0", "eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.8.0", "eslint-plugin-import": "^2.8.0",
"eslint-plugin-prettier": "^2.5.0", "eslint-plugin-prettier": "^2.5.0",

View File

@@ -201,6 +201,7 @@ class Html {
elements.filter(this.cruftNewline).forEach(element => { elements.filter(this.cruftNewline).forEach(element => {
const node = this.deserializeElement(element) const node = this.deserializeElement(element)
switch (typeOf(node)) { switch (typeOf(node)) {
case 'array': case 'array':
nodes = nodes.concat(node) nodes = nodes.concat(node)

View File

@@ -7,6 +7,7 @@ export const rules = [
{ {
serialize(obj, children) { serialize(obj, children) {
if (obj.object != 'block') return if (obj.object != 'block') return
switch (obj.type) { switch (obj.type) {
case 'paragraph': case 'paragraph':
return React.createElement('p', {}, children) return React.createElement('p', {}, children)

View File

@@ -106,6 +106,7 @@ const CREATORS = {
} }
const nodes = createChildren(children, { key: attributes.key }) const nodes = createChildren(children, { key: attributes.key })
nodes[0].__decorations = (nodes[0].__decorations || []).concat([ nodes[0].__decorations = (nodes[0].__decorations || []).concat([
{ {
anchorOffset: 0, anchorOffset: 0,
@@ -159,6 +160,7 @@ const CREATORS = {
}) })
) )
) )
// store or combine partial decorations (keyed with anchor / focus) // store or combine partial decorations (keyed with anchor / focus)
text.__decorations text.__decorations
.filter(d => d._key !== undefined) .filter(d => d._key !== undefined)
@@ -169,9 +171,11 @@ const CREATORS = {
partial.withKey(text.key) partial.withKey(text.key)
) )
) )
delete partialDecorations[partial._key] delete partialDecorations[partial._key]
return return
} }
partialDecorations[partial._key] = partial.withKey(text.key) partialDecorations[partial._key] = partial.withKey(text.key)
}) })
} }
@@ -287,6 +291,7 @@ function createChildren(children, options = {}) {
children.forEach((child, index) => { children.forEach((child, index) => {
const isLast = index === children.length - 1 const isLast = index === children.length - 1
// If the child is a non-text node, push the current node and the new child // If the child is a non-text node, push the current node and the new child
// onto the array, then creating a new node for future selection tracking. // onto the array, then creating a new node for future selection tracking.
if (Node.isNode(child) && !Text.isText(child)) { if (Node.isNode(child) && !Text.isText(child)) {
@@ -298,10 +303,13 @@ function createChildren(children, options = {}) {
) { ) {
array.push(node) array.push(node)
} }
array.push(child) array.push(child)
node = isLast node = isLast
? null ? null
: Text.create({ leaves: [{ text: '', marks: options.marks }] }) : Text.create({ leaves: [{ text: '', marks: options.marks }] })
length = 0 length = 0
} }
@@ -331,6 +339,7 @@ function createChildren(children, options = {}) {
if (__anchor != null) node.__anchor = __anchor + length if (__anchor != null) node.__anchor = __anchor + length
if (__focus != null) node.__focus = __focus + length if (__focus != null) node.__focus = __focus + length
if (__decorations != null) { if (__decorations != null) {
node.__decorations = (node.__decorations || []).concat( node.__decorations = (node.__decorations || []).concat(
__decorations.map( __decorations.map(

View File

@@ -381,6 +381,7 @@ class Content extends React.Component {
change.splitBlockAtRange(range) change.splitBlockAtRange(range)
} }
}) })
break break
} }

View File

@@ -135,6 +135,7 @@ class Node extends React.Component {
const childrenDecorations = getChildrenDecorations(node, decs) const childrenDecorations = getChildrenDecorations(node, decs)
let children = [] let children = []
node.nodes.forEach((child, i) => { node.nodes.forEach((child, i) => {
const isChildSelected = !!indexes && indexes.start <= i && i < indexes.end const isChildSelected = !!indexes && indexes.start <= i && i < indexes.end
@@ -169,6 +170,7 @@ class Node extends React.Component {
placeholder = React.cloneElement(placeholder, { placeholder = React.cloneElement(placeholder, {
key: `${node.key}-placeholder`, key: `${node.key}-placeholder`,
}) })
children = [placeholder, ...children] children = [placeholder, ...children]
} }

View File

@@ -438,6 +438,7 @@ function AfterPlugin() {
const { document, isInVoid, previousText, startText } = value const { document, isInVoid, previousText, startText } = value
const isPreviousInVoid = const isPreviousInVoid =
previousText && document.hasVoidParent(previousText.key) previousText && document.hasVoidParent(previousText.key)
if (isInVoid || isPreviousInVoid || startText.text == '') { if (isInVoid || isPreviousInVoid || startText.text == '') {
event.preventDefault() event.preventDefault()
return change.collapseCharBackward() return change.collapseCharBackward()
@@ -447,6 +448,7 @@ function AfterPlugin() {
if (Hotkeys.isCollapseCharForward(event)) { if (Hotkeys.isCollapseCharForward(event)) {
const { document, isInVoid, nextText, startText } = value const { document, isInVoid, nextText, startText } = value
const isNextInVoid = nextText && document.hasVoidParent(nextText.key) const isNextInVoid = nextText && document.hasVoidParent(nextText.key)
if (isInVoid || isNextInVoid || startText.text == '') { if (isInVoid || isNextInVoid || startText.text == '') {
event.preventDefault() event.preventDefault()
return change.collapseCharForward() return change.collapseCharForward()
@@ -457,6 +459,7 @@ function AfterPlugin() {
const { document, isInVoid, previousText, startText } = value const { document, isInVoid, previousText, startText } = value
const isPreviousInVoid = const isPreviousInVoid =
previousText && document.hasVoidParent(previousText.key) previousText && document.hasVoidParent(previousText.key)
if (isInVoid || isPreviousInVoid || startText.text == '') { if (isInVoid || isPreviousInVoid || startText.text == '') {
event.preventDefault() event.preventDefault()
return change.extendCharBackward() return change.extendCharBackward()
@@ -466,6 +469,7 @@ function AfterPlugin() {
if (Hotkeys.isExtendCharForward(event)) { if (Hotkeys.isExtendCharForward(event)) {
const { document, isInVoid, nextText, startText } = value const { document, isInVoid, nextText, startText } = value
const isNextInVoid = nextText && document.hasVoidParent(nextText.key) const isNextInVoid = nextText && document.hasVoidParent(nextText.key)
if (isInVoid || isNextInVoid || startText.text == '') { if (isInVoid || isNextInVoid || startText.text == '') {
event.preventDefault() event.preventDefault()
return change.extendCharForward() return change.extendCharForward()

View File

@@ -59,6 +59,7 @@ function cloneFragment(event, value, fragment = value.fragment) {
// Remove any zero-width space spans from the cloned DOM so that they don't // Remove any zero-width space spans from the cloned DOM so that they don't
// show up elsewhere when pasted. // show up elsewhere when pasted.
// eslint-disable-next-line padding-line-between-statements
;[].slice.call(contents.querySelectorAll(ZERO_WIDTH_SELECTOR)).forEach(zw => { ;[].slice.call(contents.querySelectorAll(ZERO_WIDTH_SELECTOR)).forEach(zw => {
const isNewline = zw.getAttribute(ZERO_WIDTH_ATTRIBUTE) === 'n' const isNewline = zw.getAttribute(ZERO_WIDTH_ATTRIBUTE) === 'n'
zw.textContent = isNewline ? '\n' : '' zw.textContent = isNewline ? '\n' : ''

View File

@@ -62,6 +62,7 @@ function orderChildDecorations(node, decorations) {
// Map each key to its global order // Map each key to its global order
const keyOrders = { [node.key]: 0 } const keyOrders = { [node.key]: 0 }
let globalOrder = 1 let globalOrder = 1
node.forEachDescendant(child => { node.forEachDescendant(child => {
keyOrders[child.key] = globalOrder keyOrders[child.key] = globalOrder
globalOrder = globalOrder + 1 globalOrder = globalOrder + 1
@@ -84,6 +85,7 @@ function orderChildDecorations(node, decorations) {
startKeyOrder === undefined startKeyOrder === undefined
? 0 ? 0
: getContainingChildOrder(childNodes, keyOrders, startKeyOrder) : getContainingChildOrder(childNodes, keyOrders, startKeyOrder)
endPoints.push({ endPoints.push({
isRangeStart: true, isRangeStart: true,
order: containingChildOrder - 0.5, order: containingChildOrder - 0.5,
@@ -92,6 +94,7 @@ function orderChildDecorations(node, decorations) {
// Range end. // Range end.
const endKeyOrder = (keyOrders[decoration.endKey] || globalOrder) + 0.5 const endKeyOrder = (keyOrders[decoration.endKey] || globalOrder) + 0.5
endPoints.push({ endPoints.push({
isRangeEnd: true, isRangeEnd: true,
order: endKeyOrder, order: endKeyOrder,

View File

@@ -8,6 +8,7 @@
function removeAllRanges(selection) { function removeAllRanges(selection) {
const doc = window.document const doc = window.document
if (doc && doc.body.createTextRange) { if (doc && doc.body.createTextRange) {
// All IE but Edge // All IE but Edge
const range = doc.body.createTextRange() const range = doc.body.createTextRange()

View File

@@ -133,10 +133,13 @@ function scrollToSelection(selection) {
height = offsetHeight height = offsetHeight
scrollerTop = scrollerRect.top + parseInt(borderTopWidth, 10) scrollerTop = scrollerRect.top + parseInt(borderTopWidth, 10)
scrollerLeft = scrollerRect.left + parseInt(borderLeftWidth, 10) scrollerLeft = scrollerRect.left + parseInt(borderLeftWidth, 10)
scrollerBordersY = scrollerBordersY =
parseInt(borderTopWidth, 10) + parseInt(borderBottomWidth, 10) parseInt(borderTopWidth, 10) + parseInt(borderBottomWidth, 10)
scrollerBordersX = scrollerBordersX =
parseInt(borderLeftWidth, 10) + parseInt(borderRightWidth, 10) parseInt(borderLeftWidth, 10) + parseInt(borderRightWidth, 10)
scrollerPaddingTop = parseInt(paddingTop, 10) scrollerPaddingTop = parseInt(paddingTop, 10)
scrollerPaddingBottom = parseInt(paddingBottom, 10) scrollerPaddingBottom = parseInt(paddingBottom, 10)
scrollerPaddingLeft = parseInt(paddingLeft, 10) scrollerPaddingLeft = parseInt(paddingLeft, 10)

View File

@@ -40,6 +40,7 @@ PROXY_TRANSFORMS.forEach(method => {
const { selection } = value const { selection } = value
const methodAtRange = `${method}AtRange` const methodAtRange = `${method}AtRange`
change[methodAtRange](selection, ...args) change[methodAtRange](selection, ...args)
if (method.match(/Backward$/)) { if (method.match(/Backward$/)) {
change.collapseToStart() change.collapseToStart()
} else if (method.match(/Forward$/)) { } else if (method.match(/Forward$/)) {
@@ -53,6 +54,7 @@ Changes.setBlock = (...args) => {
'slate@0.33.0', 'slate@0.33.0',
'The `setBlock` method of Slate changes has been renamed to `setBlocks`.' 'The `setBlock` method of Slate changes has been renamed to `setBlocks`.'
) )
Changes.setBlocks(...args) Changes.setBlocks(...args)
} }
@@ -61,6 +63,7 @@ Changes.setInline = (...args) => {
'slate@0.33.0', 'slate@0.33.0',
'The `setInline` method of Slate changes has been renamed to `setInlines`.' 'The `setInline` method of Slate changes has been renamed to `setInlines`.'
) )
Changes.setInlines(...args) Changes.setInlines(...args)
} }
@@ -230,6 +233,7 @@ Changes.splitBlock = (change, depth = 1) => {
const { selection, document } = value const { selection, document } = value
const marks = selection.marks || document.getInsertMarksAtRange(selection) const marks = selection.marks || document.getInsertMarksAtRange(selection)
change.splitBlockAtRange(selection, depth).collapseToEnd() change.splitBlockAtRange(selection, depth).collapseToEnd()
if (marks && marks.size !== 0) { if (marks && marks.size !== 0) {
change.select({ marks }) change.select({ marks })
} }

View File

@@ -370,6 +370,7 @@ Changes.deleteBackwardAtRange = (change, range, n = 1, options = {}) => {
// If the range is at the start of the text node, we need to figure out what // If the range is at the start of the text node, we need to figure out what
// is behind it to know how to delete... // is behind it to know how to delete...
const text = document.getDescendant(startKey) const text = document.getDescendant(startKey)
if (range.isAtStartOf(text)) { if (range.isAtStartOf(text)) {
const prev = document.getPreviousText(text.key) const prev = document.getPreviousText(text.key)
const prevBlock = document.getClosestBlock(prev.key) const prevBlock = document.getClosestBlock(prev.key)
@@ -414,6 +415,7 @@ Changes.deleteBackwardAtRange = (change, range, n = 1, options = {}) => {
while (n > traversed) { while (n > traversed) {
node = document.getPreviousText(node.key) node = document.getPreviousText(node.key)
const next = traversed + node.text.length const next = traversed + node.text.length
if (n <= next) { if (n <= next) {
offset = next - n offset = next - n
break break
@@ -529,6 +531,7 @@ Changes.deleteForwardAtRange = (change, range, n = 1, options = {}) => {
if (block && block.isEmpty && document.nodes.size !== 1) { if (block && block.isEmpty && document.nodes.size !== 1) {
const nextBlock = document.getNextBlock(block.key) const nextBlock = document.getNextBlock(block.key)
change.removeNodeByKey(block.key, { normalize }) change.removeNodeByKey(block.key, { normalize })
if (nextBlock && nextBlock.key) { if (nextBlock && nextBlock.key) {
change.moveToStartOf(nextBlock) change.moveToStartOf(nextBlock)
} }
@@ -543,6 +546,7 @@ Changes.deleteForwardAtRange = (change, range, n = 1, options = {}) => {
// If the range is at the start of the text node, we need to figure out what // If the range is at the start of the text node, we need to figure out what
// is behind it to know how to delete... // is behind it to know how to delete...
const text = document.getDescendant(startKey) const text = document.getDescendant(startKey)
if (range.isAtEndOf(text)) { if (range.isAtEndOf(text)) {
const next = document.getNextText(text.key) const next = document.getNextText(text.key)
const nextBlock = document.getClosestBlock(next.key) const nextBlock = document.getClosestBlock(next.key)
@@ -587,6 +591,7 @@ Changes.deleteForwardAtRange = (change, range, n = 1, options = {}) => {
while (n > traversed) { while (n > traversed) {
node = document.getNextText(node.key) node = document.getNextText(node.key)
const next = traversed + node.text.length const next = traversed + node.text.length
if (n <= next) { if (n <= next) {
offset = n - traversed offset = n - traversed
break break
@@ -649,6 +654,7 @@ Changes.insertBlockAtRange = (change, range, block, options = {}) => {
change.splitDescendantsByKey(startBlock.key, startKey, startOffset, { change.splitDescendantsByKey(startBlock.key, startKey, startOffset, {
normalize: false, normalize: false,
}) })
change.insertNodeByKey(parent.key, index + 1, block, { normalize }) change.insertNodeByKey(parent.key, index + 1, block, { normalize })
} }
@@ -673,6 +679,7 @@ Changes.insertFragmentAtRange = (change, range, fragment, options = {}) => {
// If the range is expanded, delete it first. // If the range is expanded, delete it first.
if (range.isExpanded) { if (range.isExpanded) {
change.deleteAtRange(range, { normalize: false }) change.deleteAtRange(range, { normalize: false })
if (change.value.document.getDescendant(range.startKey)) { if (change.value.document.getDescendant(range.startKey)) {
range = range.collapseToStart() range = range.collapseToStart()
} else { } else {
@@ -764,6 +771,7 @@ Changes.insertFragmentAtRange = (change, range, fragment, options = {}) => {
nextNodes.forEach((node, i) => { nextNodes.forEach((node, i) => {
const newIndex = lastIndex + i const newIndex = lastIndex + i
change.moveNodeByKey(node.key, lastBlock.key, newIndex, { change.moveNodeByKey(node.key, lastBlock.key, newIndex, {
normalize: false, normalize: false,
}) })
@@ -784,6 +792,7 @@ Changes.insertFragmentAtRange = (change, range, fragment, options = {}) => {
firstBlock.nodes.forEach((inline, i) => { firstBlock.nodes.forEach((inline, i) => {
const o = startOffset == 0 ? 0 : 1 const o = startOffset == 0 ? 0 : 1
const newIndex = inlineIndex + i + o const newIndex = inlineIndex + i + o
change.insertNodeByKey(startBlock.key, newIndex, inline, { change.insertNodeByKey(startBlock.key, newIndex, inline, {
normalize: false, normalize: false,
}) })
@@ -868,6 +877,7 @@ Changes.insertTextAtRange = (change, range, text, marks, options = {}) => {
if (normalize === undefined) { if (normalize === undefined) {
normalize = range.isExpanded && marks.size !== 0 normalize = range.isExpanded && marks.size !== 0
} }
change.insertTextByKey(key, offset, text, marks, { normalize: false }) change.insertTextByKey(key, offset, text, marks, { normalize: false })
if (normalize) { if (normalize) {
@@ -963,6 +973,7 @@ Changes.setBlockAtRange = (...args) => {
'slate@0.33.0', 'slate@0.33.0',
'The `setBlockAtRange` method of Slate changes has been renamed to `setBlocksAtRange`.' 'The `setBlockAtRange` method of Slate changes has been renamed to `setBlocksAtRange`.'
) )
Changes.setBlocksAtRange(...args) Changes.setBlocksAtRange(...args)
} }
@@ -992,6 +1003,7 @@ Changes.setInlineAtRange = (...args) => {
'slate@0.33.0', 'slate@0.33.0',
'The `setInlineAtRange` method of Slate changes has been renamed to `setInlinesAtRange`.' 'The `setInlineAtRange` method of Slate changes has been renamed to `setInlinesAtRange`.'
) )
Changes.setInlinesAtRange(...args) Changes.setInlinesAtRange(...args)
} }
@@ -1029,9 +1041,11 @@ Changes.splitBlockAtRange = (change, range, height = 1, options = {}) => {
if (range.isBackward) range = range.flip() if (range.isBackward) range = range.flip()
const nextBlock = change.value.document.getNextBlock(node.key) const nextBlock = change.value.document.getNextBlock(node.key)
range = range.moveAnchorToStartOf(nextBlock) range = range.moveAnchorToStartOf(nextBlock)
if (startKey === endKey) { if (startKey === endKey) {
range = range.moveFocusTo(range.anchorKey, endOffset - startOffset) range = range.moveFocusTo(range.anchorKey, endOffset - startOffset)
} }
change.deleteAtRange(range, { normalize }) change.deleteAtRange(range, { normalize })
} }
} }
@@ -1176,9 +1190,11 @@ Changes.unwrapBlockAtRange = (change, range, properties, options = {}) => {
}) })
} else { } else {
const firstText = firstMatch.getFirstText() const firstText = firstMatch.getFirstText()
change.splitDescendantsByKey(block.key, firstText.key, 0, { change.splitDescendantsByKey(block.key, firstText.key, 0, {
normalize: false, normalize: false,
}) })
document = change.value.document document = change.value.document
children.forEach((child, i) => { children.forEach((child, i) => {
@@ -1340,6 +1356,7 @@ Changes.wrapInlineAtRange = (change, range, inline, options = {}) => {
if (range.isCollapsed) { if (range.isCollapsed) {
// Wrapping an inline void // Wrapping an inline void
const inlineParent = document.getClosestInline(startKey) const inlineParent = document.getClosestInline(startKey)
if (!inlineParent.isVoid) { if (!inlineParent.isVoid) {
return return
} }
@@ -1359,6 +1376,7 @@ Changes.wrapInlineAtRange = (change, range, inline, options = {}) => {
change.splitDescendantsByKey(endChild.key, endKey, endOffset, { change.splitDescendantsByKey(endChild.key, endKey, endOffset, {
normalize: false, normalize: false,
}) })
change.splitDescendantsByKey(startChild.key, startKey, startOffset, { change.splitDescendantsByKey(startChild.key, startKey, startOffset, {
normalize: false, normalize: false,
}) })
@@ -1407,6 +1425,7 @@ Changes.wrapInlineAtRange = (change, range, inline, options = {}) => {
change.insertNodeByKey(startBlock.key, startIndex + 1, startNode, { change.insertNodeByKey(startBlock.key, startIndex + 1, startNode, {
normalize: false, normalize: false,
}) })
change.insertNodeByKey(endBlock.key, endIndex, endNode, { change.insertNodeByKey(endBlock.key, endIndex, endNode, {
normalize: false, normalize: false,
}) })

View File

@@ -387,9 +387,11 @@ Changes.replaceTextByKey = (
) => { ) => {
const { document } = change.value const { document } = change.value
const textNode = document.getDescendant(key) const textNode = document.getDescendant(key)
if (length + offset > textNode.text.length) { if (length + offset > textNode.text.length) {
length = textNode.text.length - offset length = textNode.text.length - offset
} }
const range = Range.create({ const range = Range.create({
anchorKey: key, anchorKey: key,
focusKey: key, focusKey: key,
@@ -399,6 +401,7 @@ Changes.replaceTextByKey = (
let activeMarks = document.getActiveMarksAtRange(range) let activeMarks = document.getActiveMarksAtRange(range)
change.removeTextByKey(key, offset, length, { normalize: false }) change.removeTextByKey(key, offset, length, { normalize: false })
if (!marks) { if (!marks) {
// Do not use mark at index when marks and activeMarks are both empty // Do not use mark at index when marks and activeMarks are both empty
marks = activeMarks ? activeMarks : [] marks = activeMarks ? activeMarks : []
@@ -407,8 +410,10 @@ Changes.replaceTextByKey = (
activeMarks = activeMarks.filter( activeMarks = activeMarks.filter(
activeMark => !marks.find(m => activeMark.type === m.type) activeMark => !marks.find(m => activeMark.type === m.type)
) )
marks = activeMarks.merge(marks) marks = activeMarks.merge(marks)
} }
change.insertTextByKey(key, offset, text, marks, options) change.insertTextByKey(key, offset, text, marks, options)
} }
@@ -490,6 +495,7 @@ Changes.replaceNodeByKey = (change, key, newNode, options = {}) => {
const index = parent.nodes.indexOf(node) const index = parent.nodes.indexOf(node)
change.removeNodeByKey(key, { normalize: false }) change.removeNodeByKey(key, { normalize: false })
change.insertNodeByKey(parent.key, index, newNode, { normalize: false }) change.insertNodeByKey(parent.key, index, newNode, { normalize: false })
if (normalize) { if (normalize) {
change.normalizeNodeByKey(parent.key) change.normalizeNodeByKey(parent.key)
} }
@@ -644,6 +650,7 @@ Changes.splitDescendantsByKey = (
const prevIndex = index == null ? null : index const prevIndex = index == null ? null : index
index = previous ? node.nodes.indexOf(previous) + 1 : textOffset index = previous ? node.nodes.indexOf(previous) + 1 : textOffset
previous = node previous = node
change.splitNodeByKey(node.key, index, { change.splitNodeByKey(node.key, index, {
normalize: false, normalize: false,
target: prevIndex, target: prevIndex,
@@ -727,6 +734,7 @@ Changes.unwrapNodeByKey = (change, key, options = {}) => {
change.moveNodeByKey(key, parentParent.key, parentIndex, { change.moveNodeByKey(key, parentParent.key, parentIndex, {
normalize: false, normalize: false,
}) })
change.removeNodeByKey(parent.key, options) change.removeNodeByKey(parent.key, options)
} else if (isFirst) { } else if (isFirst) {
// Just move the node before its parent. // Just move the node before its parent.

View File

@@ -69,9 +69,11 @@ function normalizeNodeAndChildren(change, node, schema) {
let child = node.getFirstInvalidDescendant(schema) let child = node.getFirstInvalidDescendant(schema)
let path = change.value.document.getPath(node.key) let path = change.value.document.getPath(node.key)
while (node && child) { while (node && child) {
normalizeNodeAndChildren(change, child, schema) normalizeNodeAndChildren(change, child, schema)
node = change.value.document.refindNode(path, node.key) node = change.value.document.refindNode(path, node.key)
if (!node) { if (!node) {
path = [] path = []
child = null child = null

View File

@@ -167,6 +167,7 @@ const CORE_SCHEMA_RULES = [
change.insertNodeByKey(node.key, shift + index, Text.create(), { change.insertNodeByKey(node.key, shift + index, Text.create(), {
normalize: false, normalize: false,
}) })
shift++ shift++
} }
@@ -174,6 +175,7 @@ const CORE_SCHEMA_RULES = [
change.insertNodeByKey(node.key, shift + index + 1, Text.create(), { change.insertNodeByKey(node.key, shift + index + 1, Text.create(), {
normalize: false, normalize: false,
}) })
shift++ shift++
} }
}) })

View File

@@ -44,6 +44,7 @@ class Change {
const { value } = attrs const { value } = attrs
this.value = value this.value = value
this.operations = new List() this.operations = new List()
this.flags = { this.flags = {
normalize: true, normalize: true,
...pick(attrs, ['merge', 'save', 'normalize']), ...pick(attrs, ['merge', 'save', 'normalize']),
@@ -152,6 +153,7 @@ class Change {
withoutNormalization(customChange) { withoutNormalization(customChange) {
const original = this.flags.normalize const original = this.flags.normalize
this.setOperationFlag('normalize', false) this.setOperationFlag('normalize', false)
try { try {
customChange(this) customChange(this)
// if the change function worked then run normalization // if the change function worked then run normalization

View File

@@ -249,6 +249,7 @@ class Leaf extends Record(DEFAULTS) {
'slate@0.34.0', 'slate@0.34.0',
'The `characters` property of Slate objects is deprecated' 'The `characters` property of Slate objects is deprecated'
) )
const { marks } = this const { marks } = this
const characters = Character.createList( const characters = Character.createList(
this.text.split('').map(char => { this.text.split('').map(char => {

View File

@@ -43,6 +43,7 @@ class Node {
'slate@0.32.0', 'slate@0.32.0',
'The `kind` property of Slate objects has been renamed to `object`.' 'The `kind` property of Slate objects has been renamed to `object`.'
) )
object = attrs.kind object = attrs.kind
} }
@@ -55,6 +56,7 @@ class Node {
return Inline.create(attrs) return Inline.create(attrs)
case 'text': case 'text':
return Text.create(attrs) return Text.create(attrs)
default: { default: {
throw new Error('`Node.create` requires a `object` string.') throw new Error('`Node.create` requires a `object` string.')
} }
@@ -132,6 +134,7 @@ class Node {
'slate@0.32.0', 'slate@0.32.0',
'The `kind` property of Slate objects has been renamed to `object`.' 'The `kind` property of Slate objects has been renamed to `object`.'
) )
object = value.kind object = value.kind
} }
@@ -144,6 +147,7 @@ class Node {
return Inline.fromJSON(value) return Inline.fromJSON(value)
case 'text': case 'text':
return Text.fromJSON(value) return Text.fromJSON(value)
default: { default: {
throw new Error( throw new Error(
`\`Node.fromJSON\` requires an \`object\` of either 'block', 'document', 'inline' or 'text', but you passed: ${value}` `\`Node.fromJSON\` requires an \`object\` of either 'block', 'document', 'inline' or 'text', but you passed: ${value}`
@@ -350,6 +354,7 @@ class Node {
if (this.hasChild(key)) return List([this]) if (this.hasChild(key)) return List([this])
let ancestors let ancestors
this.nodes.find(node => { this.nodes.find(node => {
if (node.object == 'text') return false if (node.object == 'text') return false
ancestors = node.getAncestors(key) ancestors = node.getAncestors(key)
@@ -480,6 +485,7 @@ class Node {
range = range.normalize(this) range = range.normalize(this)
if (range.isUnset) return List() if (range.isUnset) return List()
const { startKey, endKey, startOffset, endOffset } = range const { startKey, endKey, startOffset, endOffset } = range
if (startKey === endKey) { if (startKey === endKey) {
const endText = this.getDescendant(endKey) const endText = this.getDescendant(endKey)
return endText.characters.slice(startOffset, endOffset) return endText.characters.slice(startOffset, endOffset)
@@ -489,6 +495,7 @@ class Node {
if (t.key === startKey) { if (t.key === startKey) {
return t.characters.slice(startOffset) return t.characters.slice(startOffset)
} }
if (t.key === endKey) { if (t.key === endKey) {
return t.characters.slice(0, endOffset) return t.characters.slice(0, endOffset)
} }
@@ -519,6 +526,7 @@ class Node {
getClosest(key, iterator) { getClosest(key, iterator) {
key = assertKey(key) key = assertKey(key)
const ancestors = this.getAncestors(key) const ancestors = this.getAncestors(key)
if (!ancestors) { if (!ancestors) {
throw new Error(`Could not find a descendant node with key "${key}".`) throw new Error(`Could not find a descendant node with key "${key}".`)
} }
@@ -760,6 +768,7 @@ class Node {
getFurthest(key, iterator) { getFurthest(key, iterator) {
const ancestors = this.getAncestors(key) const ancestors = this.getAncestors(key)
if (!ancestors) { if (!ancestors) {
key = assertKey(key) key = assertKey(key)
throw new Error(`Could not find a descendant node with key "${key}".`) throw new Error(`Could not find a descendant node with key "${key}".`)
@@ -856,6 +865,7 @@ class Node {
this.nodes.forEach(child => { this.nodes.forEach(child => {
if (child.object == 'text') return if (child.object == 'text') return
if (child.isLeafInline()) { if (child.isLeafInline()) {
array.push(child) array.push(child)
} else { } else {
@@ -1004,6 +1014,7 @@ class Node {
// PERF: use only one concat rather than multiple concat // PERF: use only one concat rather than multiple concat
// becuase one concat is faster // becuase one concat is faster
const result = [] const result = []
this.nodes.forEach(node => { this.nodes.forEach(node => {
result.push(node.getMarksAsArray()) result.push(node.getMarksAsArray())
}) })
@@ -1031,6 +1042,7 @@ class Node {
getInsertMarksAtRange(range) { getInsertMarksAtRange(range) {
range = range.normalize(this) range = range.normalize(this)
if (range.isUnset) return Set() if (range.isUnset) return Set()
if (range.isCollapsed) { if (range.isCollapsed) {
// PERF: range is not cachable, use key and offset as proxies for cache // PERF: range is not cachable, use key and offset as proxies for cache
return this.getMarksAtPosition(range.startKey, range.startOffset) return this.getMarksAtPosition(range.startKey, range.startOffset)
@@ -1051,6 +1063,7 @@ class Node {
getOrderedMarksAtRange(range) { getOrderedMarksAtRange(range) {
range = range.normalize(this) range = range.normalize(this)
if (range.isUnset) return OrderedSet() if (range.isUnset) return OrderedSet()
if (range.isCollapsed) { if (range.isCollapsed) {
// PERF: range is not cachable, use key and offset as proxies for cache // PERF: range is not cachable, use key and offset as proxies for cache
return this.getMarksAtPosition(range.startKey, range.startOffset) return this.getMarksAtPosition(range.startKey, range.startOffset)
@@ -1109,6 +1122,7 @@ class Node {
getActiveMarksAtRange(range) { getActiveMarksAtRange(range) {
range = range.normalize(this) range = range.normalize(this)
if (range.isUnset) return Set() if (range.isUnset) return Set()
if (range.isCollapsed) { if (range.isCollapsed) {
const { startKey, startOffset } = range const { startKey, startOffset } = range
return this.getMarksAtPosition(startKey, startOffset).toSet() return this.getMarksAtPosition(startKey, startOffset).toSet()
@@ -1147,11 +1161,13 @@ class Node {
if (marks.size === 0) return marks if (marks.size === 0) return marks
let text = this.getNextText(startKey) let text = this.getNextText(startKey)
while (text.key !== endKey) { while (text.key !== endKey) {
if (text.text.length !== 0) { if (text.text.length !== 0) {
marks = marks.intersect(text.getActiveMarks()) marks = marks.intersect(text.getActiveMarks())
if (marks.size === 0) return Set() if (marks.size === 0) return Set()
} }
text = this.getNextText(text.key) text = this.getNextText(text.key)
} }
return marks return marks
@@ -1402,6 +1418,7 @@ class Node {
refindPath(path, key) { refindPath(path, key) {
const node = this.getDescendantAtPath(path) const node = this.getDescendantAtPath(path)
if (node && node.key === key) { if (node && node.key === key) {
return path return path
} }
@@ -1420,6 +1437,7 @@ class Node {
refindNode(path, key) { refindNode(path, key) {
const node = this.getDescendantAtPath(path) const node = this.getDescendantAtPath(path)
if (node && node.key === key) { if (node && node.key === key) {
return node return node
} }
@@ -2041,6 +2059,7 @@ class Node {
getFirstInvalidDescendant(schema) { getFirstInvalidDescendant(schema) {
let result = null let result = null
this.nodes.find(n => { this.nodes.find(n => {
result = n.validate(schema) ? n : n.getFirstInvalidDescendant(schema) result = n.validate(schema) ? n : n.getFirstInvalidDescendant(schema)
return result return result

View File

@@ -687,6 +687,7 @@ class Range extends Record(DEFAULTS) {
const anchorOffsetType = typeof anchorOffset const anchorOffsetType = typeof anchorOffset
const focusOffsetType = typeof focusOffset const focusOffsetType = typeof focusOffset
if (anchorOffsetType != 'number' || focusOffsetType != 'number') { if (anchorOffsetType != 'number' || focusOffsetType != 'number') {
logger.warn( logger.warn(
`The range offsets should be numbers, but they were of type "${anchorOffsetType}" and "${focusOffsetType}".` `The range offsets should be numbers, but they were of type "${anchorOffsetType}" and "${focusOffsetType}".`
@@ -714,6 +715,7 @@ class Range extends Record(DEFAULTS) {
'The range was invalid and was reset. The range in question was:', 'The range was invalid and was reset. The range in question was:',
range range
) )
const first = node.getFirstText() const first = node.getFirstText()
return range.merge({ return range.merge({
anchorKey: first ? first.key : null, anchorKey: first ? first.key : null,
@@ -730,6 +732,7 @@ class Range extends Record(DEFAULTS) {
'The range anchor was set to a Node that is not a Text node. This should not happen and can degrade performance. The node in question was:', 'The range anchor was set to a Node that is not a Text node. This should not happen and can degrade performance. The node in question was:',
anchorNode anchorNode
) )
const anchorText = anchorNode.getTextAtOffset(anchorOffset) const anchorText = anchorNode.getTextAtOffset(anchorOffset)
const offset = anchorNode.getOffset(anchorText.key) const offset = anchorNode.getOffset(anchorText.key)
anchorOffset = anchorOffset - offset anchorOffset = anchorOffset - offset
@@ -742,6 +745,7 @@ class Range extends Record(DEFAULTS) {
'The range focus was set to a Node that is not a Text node. This should not happen and can degrade performance. The node in question was:', 'The range focus was set to a Node that is not a Text node. This should not happen and can degrade performance. The node in question was:',
focusNode focusNode
) )
const focusText = focusNode.getTextAtOffset(focusOffset) const focusText = focusNode.getTextAtOffset(focusOffset)
const offset = focusNode.getOffset(focusText.key) const offset = focusNode.getOffset(focusText.key)
focusOffset = focusOffset - offset focusOffset = focusOffset - offset

View File

@@ -369,6 +369,7 @@ class Schema extends Record(DEFAULTS) {
if (max != null && offset == max) nextDef() if (max != null && offset == max) nextDef()
return !!child return !!child
} }
function rewind() { function rewind() {
offset -= 1 offset -= 1
index -= 1 index -= 1

View File

@@ -754,6 +754,7 @@ class Text extends Record(DEFAULTS) {
if (result.size === 1) { if (result.size === 1) {
const first = result.first() const first = result.first()
if (!first.marks || first.marks.size === 0) { if (!first.marks || first.marks.size === 0) {
if (first.text === '') { if (first.text === '') {
return this.set('leaves', List()) return this.set('leaves', List())

View File

@@ -665,12 +665,15 @@ class Value extends Record(DEFAULTS) {
if (options.preserveSelection && !options.preserveKeys) { if (options.preserveSelection && !options.preserveKeys) {
const { document, selection } = this const { document, selection } = this
object.selection.anchorPath = selection.isSet object.selection.anchorPath = selection.isSet
? document.getPath(selection.anchorKey) ? document.getPath(selection.anchorKey)
: null : null
object.selection.focusPath = selection.isSet object.selection.focusPath = selection.isSet
? document.getPath(selection.focusKey) ? document.getPath(selection.focusKey)
: null : null
delete object.selection.anchorKey delete object.selection.anchorKey
delete object.selection.focusKey delete object.selection.focusKey
} }
@@ -681,6 +684,7 @@ class Value extends Record(DEFAULTS) {
!options.preserveKeys !options.preserveKeys
) { ) {
const { document } = this const { document } = this
object.decorations = object.decorations.map(decoration => { object.decorations = object.decorations.map(decoration => {
const withPath = { const withPath = {
...decoration, ...decoration,

View File

@@ -26,6 +26,7 @@ function applyRangeAdjustments(value, checkAffected, adjustRange) {
if (value.selection && checkAffected(value.selection)) { if (value.selection && checkAffected(value.selection)) {
value = value.set('selection', adjustRange(value.selection)) value = value.set('selection', adjustRange(value.selection))
} }
if (!value.decorations) return value if (!value.decorations) return value
// check all ranges, apply adjustment if affected // check all ranges, apply adjustment if affected
@@ -312,11 +313,13 @@ const APPLIERS = {
? range.moveStartTo(prev.key, prev.text.length) ? range.moveStartTo(prev.key, prev.text.length)
: next ? range.moveStartTo(next.key, 0) : range.deselect() : next ? range.moveStartTo(next.key, 0) : range.deselect()
} }
if (node.hasNode(endKey)) { if (node.hasNode(endKey)) {
range = prev range = prev
? range.moveEndTo(prev.key, prev.text.length) ? range.moveEndTo(prev.key, prev.text.length)
: next ? range.moveEndTo(next.key, 0) : range.deselect() : next ? range.moveEndTo(next.key, 0) : range.deselect()
} }
// If the range wasn't deselected, normalize it. // If the range wasn't deselected, normalize it.
if (range.isSet) return range.normalize(document) if (range.isSet) return range.normalize(document)
return range return range
@@ -489,12 +492,15 @@ const APPLIERS = {
// Split the node by its parent. // Split the node by its parent.
parent = parent.splitNode(index, position) parent = parent.splitNode(index, position)
if (properties) { if (properties) {
const splitNode = parent.nodes.get(index + 1) const splitNode = parent.nodes.get(index + 1)
if (splitNode.object !== 'text') { if (splitNode.object !== 'text') {
parent = parent.updateNode(splitNode.merge(properties)) parent = parent.updateNode(splitNode.merge(properties))
} }
} }
document = document.updateNode(parent) document = document.updateNode(parent)
const next = document.getNextText(node.key) const next = document.getNextText(node.key)

View File

@@ -201,6 +201,7 @@ function invertOperation(op) {
inverseProps.anchorKey === null inverseProps.anchorKey === null
? null ? null
: document.getPath(inverseProps.anchorKey) : document.getPath(inverseProps.anchorKey)
delete inverseProps.anchorKey delete inverseProps.anchorKey
} }
@@ -209,6 +210,7 @@ function invertOperation(op) {
inverseProps.focusKey === null inverseProps.focusKey === null
? null ? null
: document.getPath(inverseProps.focusKey) : document.getPath(inverseProps.focusKey)
delete inverseProps.focusKey delete inverseProps.focusKey
} }

View File

@@ -70,6 +70,7 @@ function memoize(object, properties) {
if (!this.__cache) { if (!this.__cache) {
this.__cache = new Map() // eslint-disable-line no-undef,no-restricted-globals this.__cache = new Map() // eslint-disable-line no-undef,no-restricted-globals
} }
if (!this.__cache_no_args) { if (!this.__cache_no_args) {
this.__cache_no_args = {} this.__cache_no_args = {}
} }

View File

@@ -13,6 +13,7 @@ export default function(change) {
data: { thing: 'value' }, data: { thing: 'value' },
}) })
) )
marks.push( marks.push(
Mark.create({ Mark.create({
type: 'italic', type: 'italic',

View File

@@ -9,6 +9,7 @@ export default function(change) {
type: 'bold', type: 'bold',
data: { thing: 'value' }, data: { thing: 'value' },
}) })
marks.push({ marks.push({
type: 'italic', type: 'italic',
data: { thing2: 'value2' }, data: { thing2: 'value2' },

View File

@@ -9,6 +9,7 @@ const fragment = (
<paragraph>fragment two</paragraph> <paragraph>fragment two</paragraph>
</document> </document>
) )
export default function(change) { export default function(change) {
change.insertFragment(fragment) change.insertFragment(fragment)
} }

View File

@@ -4,6 +4,7 @@ import h from '../../../helpers/h'
export default function(change) { export default function(change) {
const { anchorKey, anchorOffset } = change.value const { anchorKey, anchorOffset } = change.value
change.replaceTextByKey(anchorKey, anchorOffset, 3, 'cat is cute', [ change.replaceTextByKey(anchorKey, anchorOffset, 3, 'cat is cute', [
{ type: 'font-size', data: { size: 16 } }, { type: 'font-size', data: { size: 16 } },
]) ])

View File

@@ -4,6 +4,7 @@ import h from '../../../helpers/h'
export default function(change) { export default function(change) {
const { anchorKey, anchorOffset } = change.value const { anchorKey, anchorOffset } = change.value
change.replaceTextByKey(anchorKey, anchorOffset, 3, 'cat is cute', [ change.replaceTextByKey(anchorKey, anchorOffset, 3, 'cat is cute', [
{ type: 'italic' }, { type: 'italic' },
]) ])

View File

@@ -5,6 +5,7 @@ import h from '../../../helpers/h'
export default function(change) { export default function(change) {
const { value } = change const { value } = change
const { startText } = value const { startText } = value
change.select({ change.select({
anchorKey: startText.key, anchorKey: startText.key,
anchorOffset: 0, anchorOffset: 0,

View File

@@ -12,11 +12,13 @@ export const schema = {
if (reason == CHILD_UNKNOWN) { if (reason == CHILD_UNKNOWN) {
const previous = node.getPreviousSibling(child.key) const previous = node.getPreviousSibling(child.key)
const offset = previous.nodes.size const offset = previous.nodes.size
child.nodes.forEach((n, i) => child.nodes.forEach((n, i) =>
change.moveNodeByKey(n.key, previous.key, offset + i, { change.moveNodeByKey(n.key, previous.key, offset + i, {
normalize: false, normalize: false,
}) })
) )
change.removeNodeByKey(child.key) change.removeNodeByKey(child.key)
} }
}, },

259
yarn.lock
View File

@@ -116,10 +116,14 @@ acorn@^5.0.0:
version "5.0.3" version "5.0.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d"
acorn@^5.1.2, acorn@^5.2.1: acorn@^5.1.2:
version "5.3.0" version "5.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822"
acorn@^5.2.1, acorn@^5.5.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
add-stream@^1.0.0: add-stream@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
@@ -173,8 +177,8 @@ amdefine@>=0.0.4:
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
ansi-escapes@^3.0.0: ansi-escapes@^3.0.0:
version "3.0.0" version "3.1.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30"
ansi-html@0.0.7: ansi-html@0.0.7:
version "0.0.7" version "0.0.7"
@@ -192,12 +196,18 @@ ansi-styles@^2.2.1:
version "2.2.1" version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
ansi-styles@^3.1.0, ansi-styles@^3.2.0: ansi-styles@^3.2.0:
version "3.2.0" version "3.2.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
dependencies: dependencies:
color-convert "^1.9.0" color-convert "^1.9.0"
ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
dependencies:
color-convert "^1.9.0"
any-promise@^1.0.0: any-promise@^1.0.0:
version "1.3.0" version "1.3.0"
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
@@ -228,8 +238,8 @@ are-we-there-yet@~1.1.2:
readable-stream "^2.0.6" readable-stream "^2.0.6"
argparse@^1.0.7: argparse@^1.0.7:
version "1.0.9" version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
dependencies: dependencies:
sprintf-js "~1.0.2" sprintf-js "~1.0.2"
@@ -416,15 +426,7 @@ babel-cli@^6.26.0:
optionalDependencies: optionalDependencies:
chokidar "^1.6.1" chokidar "^1.6.1"
babel-code-frame@^6.22.0: babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4"
dependencies:
chalk "^1.1.0"
esutils "^2.0.2"
js-tokens "^3.0.0"
babel-code-frame@^6.26.0:
version "6.26.0" version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
dependencies: dependencies:
@@ -1298,13 +1300,20 @@ boom@5.x.x:
dependencies: dependencies:
hoek "4.x.x" hoek "4.x.x"
brace-expansion@^1.0.0, brace-expansion@^1.1.7: brace-expansion@^1.0.0:
version "1.1.8" version "1.1.8"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
dependencies: dependencies:
balanced-match "^1.0.0" balanced-match "^1.0.0"
concat-map "0.0.1" concat-map "0.0.1"
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
braces@^1.8.2: braces@^1.8.2:
version "1.8.5" version "1.8.5"
resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
@@ -1415,6 +1424,10 @@ buffer-es6@^4.9.1, buffer-es6@^4.9.2:
version "4.9.3" version "4.9.3"
resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404" resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404"
buffer-from@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04"
buffer-indexof@^1.0.0: buffer-indexof@^1.0.0:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c"
@@ -1569,7 +1582,7 @@ center-align@^0.1.1:
align-text "^0.1.3" align-text "^0.1.3"
lazy-cache "^1.0.3" lazy-cache "^1.0.3"
chalk@^1.1.0, chalk@^1.1.3: chalk@^1.1.3:
version "1.1.3" version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies: dependencies:
@@ -1580,12 +1593,12 @@ chalk@^1.1.0, chalk@^1.1.3:
supports-color "^2.0.0" supports-color "^2.0.0"
chalk@^2.0.0, chalk@^2.1.0: chalk@^2.0.0, chalk@^2.1.0:
version "2.3.0" version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
dependencies: dependencies:
ansi-styles "^3.1.0" ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5" escape-string-regexp "^1.0.5"
supports-color "^4.0.0" supports-color "^5.3.0"
chalk@^2.3.1: chalk@^2.3.1:
version "2.3.1" version "2.3.1"
@@ -1648,8 +1661,8 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
safe-buffer "^5.0.1" safe-buffer "^5.0.1"
circular-json@^0.3.1: circular-json@^0.3.1:
version "0.3.1" version "0.3.3"
resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66"
clap@^1.0.9: clap@^1.0.9:
version "1.2.3" version "1.2.3"
@@ -1748,12 +1761,22 @@ collections@^0.2.0:
dependencies: dependencies:
weak-map "1.0.0" weak-map "1.0.0"
color-convert@^1.3.0, color-convert@^1.9.0: color-convert@^1.3.0:
version "1.9.1" version "1.9.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
dependencies: dependencies:
color-name "^1.1.1" color-name "^1.1.1"
color-convert@^1.9.0:
version "1.9.2"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147"
dependencies:
color-name "1.1.1"
color-name@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689"
color-name@^1.0.0, color-name@^1.1.1: color-name@^1.0.0, color-name@^1.1.1:
version "1.1.3" version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
@@ -1860,7 +1883,7 @@ concat-map@0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
concat-stream@^1.4.10, concat-stream@^1.4.4, concat-stream@^1.5.0, concat-stream@^1.6.0: concat-stream@^1.4.10, concat-stream@^1.4.4, concat-stream@^1.5.0:
version "1.6.0" version "1.6.0"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7"
dependencies: dependencies:
@@ -1868,6 +1891,15 @@ concat-stream@^1.4.10, concat-stream@^1.4.4, concat-stream@^1.5.0, concat-stream
readable-stream "^2.2.2" readable-stream "^2.2.2"
typedarray "^0.0.6" typedarray "^0.0.6"
concat-stream@^1.6.0:
version "1.6.2"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
dependencies:
buffer-from "^1.0.0"
inherits "^2.0.3"
readable-stream "^2.2.2"
typedarray "^0.0.6"
connect-history-api-fallback@^1.3.0: connect-history-api-fallback@^1.3.0:
version "1.5.0" version "1.5.0"
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a"
@@ -2875,9 +2907,9 @@ eslint-visitor-keys@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
eslint@^4.16.0: eslint@^4.19.1:
version "4.16.0" version "4.19.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.16.0.tgz#934ada9e98715e1d7bbfd6f6f0519ed2fab35cc1" resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300"
dependencies: dependencies:
ajv "^5.3.0" ajv "^5.3.0"
babel-code-frame "^6.22.0" babel-code-frame "^6.22.0"
@@ -2888,7 +2920,7 @@ eslint@^4.16.0:
doctrine "^2.1.0" doctrine "^2.1.0"
eslint-scope "^3.7.1" eslint-scope "^3.7.1"
eslint-visitor-keys "^1.0.0" eslint-visitor-keys "^1.0.0"
espree "^3.5.2" espree "^3.5.4"
esquery "^1.0.0" esquery "^1.0.0"
esutils "^2.0.2" esutils "^2.0.2"
file-entry-cache "^2.0.0" file-entry-cache "^2.0.0"
@@ -2910,18 +2942,19 @@ eslint@^4.16.0:
path-is-inside "^1.0.2" path-is-inside "^1.0.2"
pluralize "^7.0.0" pluralize "^7.0.0"
progress "^2.0.0" progress "^2.0.0"
regexpp "^1.0.1"
require-uncached "^1.0.3" require-uncached "^1.0.3"
semver "^5.3.0" semver "^5.3.0"
strip-ansi "^4.0.0" strip-ansi "^4.0.0"
strip-json-comments "~2.0.1" strip-json-comments "~2.0.1"
table "^4.0.1" table "4.0.2"
text-table "~0.2.0" text-table "~0.2.0"
espree@^3.5.2: espree@^3.5.4:
version "3.5.2" version "3.5.4"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
dependencies: dependencies:
acorn "^5.2.1" acorn "^5.5.0"
acorn-jsx "^3.0.0" acorn-jsx "^3.0.0"
esprima@^2.6.0: esprima@^2.6.0:
@@ -2937,30 +2970,25 @@ esprima@^4.0.0:
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
esquery@^1.0.0: esquery@^1.0.0:
version "1.0.0" version "1.0.1"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
dependencies: dependencies:
estraverse "^4.0.0" estraverse "^4.0.0"
esrecurse@^4.1.0: esrecurse@^4.1.0:
version "4.1.0" version "4.2.1"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
dependencies: dependencies:
estraverse "~4.1.0" estraverse "^4.1.0"
object-assign "^4.0.1"
esrever@^0.2.0: esrever@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/esrever/-/esrever-0.2.0.tgz#96e9d28f4f1b1a76784cd5d490eaae010e7407b8" resolved "https://registry.yarnpkg.com/esrever/-/esrever-0.2.0.tgz#96e9d28f4f1b1a76784cd5d490eaae010e7407b8"
estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
version "4.2.0" version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
estraverse@~4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2"
estree-walker@^0.2.1: estree-walker@^0.2.1:
version "0.2.1" version "0.2.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
@@ -3122,8 +3150,8 @@ extend@~3.0.0, extend@~3.0.1:
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
external-editor@^2.0.4: external-editor@^2.0.4:
version "2.1.0" version "2.2.0"
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5"
dependencies: dependencies:
chardet "^0.4.0" chardet "^0.4.0"
iconv-lite "^0.4.17" iconv-lite "^0.4.17"
@@ -3166,8 +3194,8 @@ faker@^3.1.0:
resolved "https://registry.yarnpkg.com/faker/-/faker-3.1.0.tgz#0f908faf4e6ec02524e54a57e432c5c013e08c9f" resolved "https://registry.yarnpkg.com/faker/-/faker-3.1.0.tgz#0f908faf4e6ec02524e54a57e432c5c013e08c9f"
fast-deep-equal@^1.0.0: fast-deep-equal@^1.0.0:
version "1.0.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
fast-diff@^1.1.1: fast-diff@^1.1.1:
version "1.1.2" version "1.1.2"
@@ -3291,8 +3319,8 @@ find-up@^2.0.0, find-up@^2.1.0:
locate-path "^2.0.0" locate-path "^2.0.0"
flat-cache@^1.2.1: flat-cache@^1.2.1:
version "1.2.2" version "1.3.0"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481"
dependencies: dependencies:
circular-json "^0.3.1" circular-json "^0.3.1"
del "^2.0.2" del "^2.0.2"
@@ -3613,7 +3641,11 @@ global@^4.3.0:
min-document "^2.19.0" min-document "^2.19.0"
process "~0.5.1" process "~0.5.1"
globals@^11.0.1, globals@^11.1.0: globals@^11.0.1:
version "11.7.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673"
globals@^11.1.0:
version "11.2.0" version "11.2.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.2.0.tgz#aa2ece052a787563ba70a3dcd9dc2eb8a9a0488c" resolved "https://registry.yarnpkg.com/globals/-/globals-11.2.0.tgz#aa2ece052a787563ba70a3dcd9dc2eb8a9a0488c"
@@ -4006,10 +4038,16 @@ iconv-lite@0.4.13:
version "0.4.13" version "0.4.13"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@~0.4.13: iconv-lite@0.4.19, iconv-lite@~0.4.13:
version "0.4.19" version "0.4.19"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
iconv-lite@^0.4.17:
version "0.4.23"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
dependencies:
safer-buffer ">= 2.1.2 < 3"
icss-replace-symbols@^1.1.0: icss-replace-symbols@^1.1.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded"
@@ -4032,7 +4070,11 @@ iferr@^0.1.5:
version "0.1.5" version "0.1.5"
resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
ignore@^3.3.3, ignore@^3.3.5: ignore@^3.3.3:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
ignore@^3.3.5:
version "3.3.7" version "3.3.7"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
@@ -4326,14 +4368,14 @@ is-path-cwd@^1.0.0:
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
is-path-in-cwd@^1.0.0: is-path-in-cwd@^1.0.0:
version "1.0.0" version "1.0.1"
resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
dependencies: dependencies:
is-path-inside "^1.0.0" is-path-inside "^1.0.0"
is-path-inside@^1.0.0: is-path-inside@^1.0.0:
version "1.0.0" version "1.0.1"
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
dependencies: dependencies:
path-is-inside "^1.0.1" path-is-inside "^1.0.1"
@@ -4370,10 +4412,8 @@ is-regex@^1.0.3, is-regex@^1.0.4:
has "^1.0.1" has "^1.0.1"
is-resolvable@^1.0.0: is-resolvable@^1.0.0:
version "1.0.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
dependencies:
tryit "^1.0.1"
is-retry-allowed@^1.0.0: is-retry-allowed@^1.0.0:
version "1.1.0" version "1.1.0"
@@ -4493,17 +4533,13 @@ js-base64@^2.1.9:
version "2.4.3" version "2.4.3"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582"
js-tokens@^3.0.0: js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.1"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
js-tokens@^3.0.2:
version "3.0.2" version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
js-yaml@^3.9.1: js-yaml@^3.9.1:
version "3.10.0" version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
dependencies: dependencies:
argparse "^1.0.7" argparse "^1.0.7"
esprima "^4.0.0" esprima "^4.0.0"
@@ -4903,7 +4939,7 @@ lodash.uniq@^4.5.0:
version "4.5.0" version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
lodash@^4.0.0, lodash@^4.1.0, lodash@^4.1.1, lodash@^4.13.1, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: lodash@^4.0.0, lodash@^4.1.0, lodash@^4.1.1, lodash@^4.13.1, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1:
version "4.17.4" version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
@@ -4911,6 +4947,10 @@ lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.6.1:
version "4.17.5" version "4.17.5"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
lodash@^4.3.0:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
loglevel@^1.4.1: loglevel@^1.4.1:
version "1.6.1" version "1.6.1"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa"
@@ -4944,7 +4984,14 @@ lru-cache@2:
version "2.7.3" version "2.7.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
lru-cache@^4.0.1, lru-cache@^4.1.1: lru-cache@^4.0.1:
version "4.1.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c"
dependencies:
pseudomap "^1.0.2"
yallist "^2.1.2"
lru-cache@^4.1.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
dependencies: dependencies:
@@ -5141,8 +5188,8 @@ mimeparse@^0.1.4:
resolved "https://registry.yarnpkg.com/mimeparse/-/mimeparse-0.1.4.tgz#dafb02752370fd226093ae3152c271af01ac254a" resolved "https://registry.yarnpkg.com/mimeparse/-/mimeparse-0.1.4.tgz#dafb02752370fd226093ae3152c271af01ac254a"
mimic-fn@^1.0.0: mimic-fn@^1.0.0:
version "1.1.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
min-document@^2.19.0: min-document@^2.19.0:
version "2.19.0" version "2.19.0"
@@ -6554,7 +6601,7 @@ readable-stream@^1.0.26-4:
isarray "0.0.1" isarray "0.0.1"
string_decoder "~0.10.x" string_decoder "~0.10.x"
readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2: readable-stream@^2.0.6, readable-stream@^2.1.5:
version "2.3.3" version "2.3.3"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c"
dependencies: dependencies:
@@ -6566,6 +6613,18 @@ readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2:
string_decoder "~1.0.3" string_decoder "~1.0.3"
util-deprecate "~1.0.1" util-deprecate "~1.0.1"
readable-stream@^2.2.2:
version "2.3.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.3"
isarray "~1.0.0"
process-nextick-args "~2.0.0"
safe-buffer "~5.1.1"
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
readdirp@^2.0.0: readdirp@^2.0.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78"
@@ -6642,6 +6701,10 @@ regex-not@^1.0.0:
dependencies: dependencies:
extend-shallow "^2.0.1" extend-shallow "^2.0.1"
regexpp@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab"
regexpu-core@^1.0.0: regexpu-core@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b"
@@ -6841,18 +6904,12 @@ right-align@^0.1.1:
dependencies: dependencies:
align-text "^0.1.1" align-text "^0.1.1"
rimraf@2, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
version "2.6.2" version "2.6.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
dependencies: dependencies:
glob "^7.0.5" glob "^7.0.5"
rimraf@^2.2.8:
version "2.6.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d"
dependencies:
glob "^7.0.5"
ripemd160@^2.0.0, ripemd160@^2.0.1: ripemd160@^2.0.0, ripemd160@^2.0.1:
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7"
@@ -6977,10 +7034,18 @@ rx-lite@*, rx-lite@^4.0.8:
version "4.0.8" version "4.0.8"
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1:
version "5.1.1" version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
"safer-buffer@>= 2.1.2 < 3":
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
sax@^1.2.1: sax@^1.2.1:
version "1.2.2" version "1.2.2"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828"
@@ -7020,14 +7085,10 @@ selfsigned@^1.9.1:
dependencies: dependencies:
node-forge "0.7.1" node-forge "0.7.1"
"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.1.0, semver@^5.4.1: "semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1:
version "5.5.0" version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
semver@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
semver@~2.3.1: semver@~2.3.1:
version "2.3.2" version "2.3.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-2.3.2.tgz#b9848f25d6cf36333073ec9ef8856d42f1233e52" resolved "https://registry.yarnpkg.com/semver/-/semver-2.3.2.tgz#b9848f25d6cf36333073ec9ef8856d42f1233e52"
@@ -7494,6 +7555,12 @@ string_decoder@~0.10.x:
version "0.10.31" version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
string_decoder@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
dependencies:
safe-buffer "~5.1.0"
stringstream@~0.0.4, stringstream@~0.0.5: stringstream@~0.0.4, stringstream@~0.0.5:
version "0.0.5" version "0.0.5"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
@@ -7565,7 +7632,7 @@ supports-color@^3.2.3:
dependencies: dependencies:
has-flag "^1.0.0" has-flag "^1.0.0"
supports-color@^4.0.0, supports-color@^4.2.1: supports-color@^4.2.1:
version "4.5.0" version "4.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b"
dependencies: dependencies:
@@ -7577,6 +7644,12 @@ supports-color@^5.1.0, supports-color@^5.2.0:
dependencies: dependencies:
has-flag "^3.0.0" has-flag "^3.0.0"
supports-color@^5.3.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
dependencies:
has-flag "^3.0.0"
svgo@^0.7.0: svgo@^0.7.0:
version "0.7.2" version "0.7.2"
resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
@@ -7593,7 +7666,7 @@ symbol-tree@^3.2.1:
version "3.2.2" version "3.2.2"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
table@^4.0.1: table@4.0.2:
version "4.0.2" version "4.0.2"
resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36"
dependencies: dependencies:
@@ -7805,10 +7878,6 @@ trim-right@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
tryit@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb"
tty-browserify@0.0.0: tty-browserify@0.0.0:
version "0.0.0" version "0.0.0"
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
@@ -8257,8 +8326,8 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
which@^1.2.9: which@^1.2.9:
version "1.3.0" version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
dependencies: dependencies:
isexe "^2.0.0" isexe "^2.0.0"