From e4ff1972d79911baf8a6aed683765b66107b09a4 Mon Sep 17 00:00:00 2001 From: Jinxuan Zhu Date: Thu, 21 Jun 2018 22:27:10 -0400 Subject: [PATCH] Ensure multi-line expressions are padded by eslint (#1924) * Fix eslint rule and upgrade eslint * Fix for switch case * Linting files --- .eslintrc | 14 +- examples/code-highlighting/index.js | 1 + examples/emojis/index.js | 1 + examples/forced-layout/index.js | 1 + examples/hovering-menu/index.js | 2 + examples/huge-document/index.js | 2 + examples/images/index.js | 1 + examples/links/index.js | 2 + examples/markdown-preview/index.js | 1 + examples/markdown-shortcuts/index.js | 1 + examples/paste-html/index.js | 4 + examples/rich-text/index.js | 3 + examples/rtl/index.js | 1 + examples/search-highlighting/index.js | 1 + examples/syncing-operations/index.js | 1 + examples/tables/index.js | 2 + package.json | 2 +- packages/slate-html-serializer/src/index.js | 1 + .../test/serialize/block-nested.js | 1 + packages/slate-hyperscript/src/index.js | 9 + .../slate-react/src/components/content.js | 1 + packages/slate-react/src/components/node.js | 2 + packages/slate-react/src/plugins/after.js | 4 + .../slate-react/src/utils/clone-fragment.js | 1 + .../src/utils/get-children-decorations.js | 3 + .../src/utils/remove-all-ranges.js | 1 + .../src/utils/scroll-to-selection.js | 3 + .../slate/src/changes/at-current-range.js | 4 + packages/slate/src/changes/at-range.js | 19 ++ packages/slate/src/changes/by-key.js | 8 + packages/slate/src/changes/with-schema.js | 2 + .../slate/src/constants/core-schema-rules.js | 2 + packages/slate/src/models/change.js | 2 + packages/slate/src/models/leaf.js | 1 + packages/slate/src/models/node.js | 19 ++ packages/slate/src/models/range.js | 4 + packages/slate/src/models/schema.js | 1 + packages/slate/src/models/text.js | 1 + packages/slate/src/models/value.js | 4 + packages/slate/src/operations/apply.js | 6 + packages/slate/src/operations/invert.js | 2 + packages/slate/src/utils/memoize.js | 1 + .../add-marks/with-mark-object.js | 1 + .../add-marks/with-plain-object.js | 1 + .../hanging-selection-single-block.js | 1 + .../replace-with-active-marks-with-data.js | 1 + .../replace-with-mark-and-active-mark.js | 1 + .../on-selection/move-to/with-object.js | 1 + .../schema/custom/child-unknown-custom.js | 2 + yarn.lock | 259 +++++++++++------- 50 files changed, 312 insertions(+), 97 deletions(-) diff --git a/.eslintrc b/.eslintrc index e48b87ac4..47894b952 100644 --- a/.eslintrc +++ b/.eslintrc @@ -142,6 +142,18 @@ ], "valid-typeof": "error", "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" } + ] } } diff --git a/examples/code-highlighting/index.js b/examples/code-highlighting/index.js index d24b50e00..380b05e22 100644 --- a/examples/code-highlighting/index.js +++ b/examples/code-highlighting/index.js @@ -137,6 +137,7 @@ class CodeHighlighting extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'comment': return ( diff --git a/examples/emojis/index.js b/examples/emojis/index.js index 3a386698d..f53a620d9 100644 --- a/examples/emojis/index.js +++ b/examples/emojis/index.js @@ -154,6 +154,7 @@ class Emojis extends React.Component { renderNode = props => { const { attributes, children, node, isSelected } = props + switch (node.type) { case 'paragraph': { return

{children}

diff --git a/examples/forced-layout/index.js b/examples/forced-layout/index.js index dec1027c8..b198992ad 100644 --- a/examples/forced-layout/index.js +++ b/examples/forced-layout/index.js @@ -90,6 +90,7 @@ class ForcedLayout extends React.Component { renderNode = props => { const { attributes, children, node } = props + switch (node.type) { case 'title': return

{children}

diff --git a/examples/hovering-menu/index.js b/examples/hovering-menu/index.js index e659e6c43..7a7c30443 100644 --- a/examples/hovering-menu/index.js +++ b/examples/hovering-menu/index.js @@ -127,6 +127,7 @@ class HoveringMenu extends React.Component { const rect = range.getBoundingClientRect() menu.style.opacity = 1 menu.style.top = `${rect.top + window.pageYOffset - menu.offsetHeight}px` + menu.style.left = `${rect.left + window.pageXOffset - menu.offsetWidth / 2 + @@ -188,6 +189,7 @@ class HoveringMenu extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'bold': return {children} diff --git a/examples/huge-document/index.js b/examples/huge-document/index.js index a0817da3b..001a9e799 100644 --- a/examples/huge-document/index.js +++ b/examples/huge-document/index.js @@ -96,6 +96,7 @@ class HugeDocument extends React.Component { renderNode = props => { const { attributes, children, node } = props + switch (node.type) { case 'heading': return

{children}

@@ -111,6 +112,7 @@ class HugeDocument extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'bold': return {children} diff --git a/examples/images/index.js b/examples/images/index.js index a78bf17f3..93f707305 100644 --- a/examples/images/index.js +++ b/examples/images/index.js @@ -137,6 +137,7 @@ class Images extends React.Component { renderNode = props => { const { attributes, node, isSelected } = props + switch (node.type) { case 'image': { const src = node.data.get('src') diff --git a/examples/links/index.js b/examples/links/index.js index 953408764..65e9b835c 100644 --- a/examples/links/index.js +++ b/examples/links/index.js @@ -90,6 +90,7 @@ class Links extends React.Component { } else { const href = window.prompt('Enter the URL of the link:') const text = window.prompt('Enter the text for the link:') + change .insertText(text) .extend(0 - text.length) @@ -187,6 +188,7 @@ class Links extends React.Component { renderNode = props => { const { attributes, children, node } = props + switch (node.type) { case 'link': { const { data } = node diff --git a/examples/markdown-preview/index.js b/examples/markdown-preview/index.js index a86f14a91..1e2f2d401 100644 --- a/examples/markdown-preview/index.js +++ b/examples/markdown-preview/index.js @@ -70,6 +70,7 @@ class MarkdownPreview extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'bold': return {children} diff --git a/examples/markdown-shortcuts/index.js b/examples/markdown-shortcuts/index.js index 1d3717dd0..57ed7d19a 100644 --- a/examples/markdown-shortcuts/index.js +++ b/examples/markdown-shortcuts/index.js @@ -83,6 +83,7 @@ class MarkdownShortcuts extends React.Component { renderNode = props => { const { attributes, children, node } = props + switch (node.type) { case 'block-quote': return
{children}
diff --git a/examples/paste-html/index.js b/examples/paste-html/index.js index c3d08f359..48e5b2c03 100644 --- a/examples/paste-html/index.js +++ b/examples/paste-html/index.js @@ -50,6 +50,7 @@ const RULES = [ { deserialize(el, next) { const block = BLOCK_TAGS[el.tagName.toLowerCase()] + if (block) { return { object: 'block', @@ -62,6 +63,7 @@ const RULES = [ { deserialize(el, next) { const mark = MARK_TAGS[el.tagName.toLowerCase()] + if (mark) { return { object: 'mark', @@ -202,6 +204,7 @@ class PasteHtml extends React.Component { renderNode = props => { const { attributes, children, node, isSelected } = props + switch (node.type) { case 'quote': return
{children}
@@ -258,6 +261,7 @@ class PasteHtml extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'bold': return {children} diff --git a/examples/rich-text/index.js b/examples/rich-text/index.js index 4fdff7382..0f7a50cec 100644 --- a/examples/rich-text/index.js +++ b/examples/rich-text/index.js @@ -242,6 +242,7 @@ class RichTextExample extends React.Component { const parent = value.document.getParent(value.blocks.first().key) isActive = this.hasBlock('list-item') && parent && parent.type === type } + const onMouseDown = event => this.onClickBlock(event, type) return ( @@ -284,6 +285,7 @@ class RichTextExample extends React.Component { renderNode = props => { const { attributes, children, node } = props + switch (node.type) { case 'block-quote': return
{children}
@@ -309,6 +311,7 @@ class RichTextExample extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'bold': return {children} diff --git a/examples/rtl/index.js b/examples/rtl/index.js index 34bd46c02..10532aebb 100644 --- a/examples/rtl/index.js +++ b/examples/rtl/index.js @@ -75,6 +75,7 @@ class RTL extends React.Component { renderNode = props => { const { attributes, children, node } = props + switch (node.type) { case 'block-quote': return
{children}
diff --git a/examples/search-highlighting/index.js b/examples/search-highlighting/index.js index 2815f2d05..456e636ee 100644 --- a/examples/search-highlighting/index.js +++ b/examples/search-highlighting/index.js @@ -142,6 +142,7 @@ class SearchHighlighting extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'highlight': return ( diff --git a/examples/syncing-operations/index.js b/examples/syncing-operations/index.js index 611eac221..ecd60c91a 100644 --- a/examples/syncing-operations/index.js +++ b/examples/syncing-operations/index.js @@ -198,6 +198,7 @@ class SyncingEditor extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'bold': return {children} diff --git a/examples/tables/index.js b/examples/tables/index.js index 3a2338656..d950c1e42 100644 --- a/examples/tables/index.js +++ b/examples/tables/index.js @@ -142,6 +142,7 @@ class Tables extends React.Component { renderNode = props => { const { attributes, children, node } = props + switch (node.type) { case 'table': return ( @@ -165,6 +166,7 @@ class Tables extends React.Component { renderMark = props => { const { children, mark, attributes } = props + switch (mark.type) { case 'bold': return {children} diff --git a/package.json b/package.json index 6dc0f5878..165cfde8b 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "copy-webpack-plugin": "^4.4.1", "cross-env": "^5.1.3", "css-loader": "^0.28.9", - "eslint": "^4.16.0", + "eslint": "^4.19.1", "eslint-config-prettier": "^2.9.0", "eslint-plugin-import": "^2.8.0", "eslint-plugin-prettier": "^2.5.0", diff --git a/packages/slate-html-serializer/src/index.js b/packages/slate-html-serializer/src/index.js index 2da99649f..f4be5b56b 100644 --- a/packages/slate-html-serializer/src/index.js +++ b/packages/slate-html-serializer/src/index.js @@ -201,6 +201,7 @@ class Html { elements.filter(this.cruftNewline).forEach(element => { const node = this.deserializeElement(element) + switch (typeOf(node)) { case 'array': nodes = nodes.concat(node) diff --git a/packages/slate-html-serializer/test/serialize/block-nested.js b/packages/slate-html-serializer/test/serialize/block-nested.js index 9fe07ff25..bb3b07d5e 100644 --- a/packages/slate-html-serializer/test/serialize/block-nested.js +++ b/packages/slate-html-serializer/test/serialize/block-nested.js @@ -7,6 +7,7 @@ export const rules = [ { serialize(obj, children) { if (obj.object != 'block') return + switch (obj.type) { case 'paragraph': return React.createElement('p', {}, children) diff --git a/packages/slate-hyperscript/src/index.js b/packages/slate-hyperscript/src/index.js index 29b9a3a7f..3423efa9a 100644 --- a/packages/slate-hyperscript/src/index.js +++ b/packages/slate-hyperscript/src/index.js @@ -106,6 +106,7 @@ const CREATORS = { } const nodes = createChildren(children, { key: attributes.key }) + nodes[0].__decorations = (nodes[0].__decorations || []).concat([ { anchorOffset: 0, @@ -159,6 +160,7 @@ const CREATORS = { }) ) ) + // store or combine partial decorations (keyed with anchor / focus) text.__decorations .filter(d => d._key !== undefined) @@ -169,9 +171,11 @@ const CREATORS = { partial.withKey(text.key) ) ) + delete partialDecorations[partial._key] return } + partialDecorations[partial._key] = partial.withKey(text.key) }) } @@ -287,6 +291,7 @@ function createChildren(children, options = {}) { children.forEach((child, index) => { const isLast = index === children.length - 1 + // 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. if (Node.isNode(child) && !Text.isText(child)) { @@ -298,10 +303,13 @@ function createChildren(children, options = {}) { ) { array.push(node) } + array.push(child) + node = isLast ? null : Text.create({ leaves: [{ text: '', marks: options.marks }] }) + length = 0 } @@ -331,6 +339,7 @@ function createChildren(children, options = {}) { if (__anchor != null) node.__anchor = __anchor + length if (__focus != null) node.__focus = __focus + length + if (__decorations != null) { node.__decorations = (node.__decorations || []).concat( __decorations.map( diff --git a/packages/slate-react/src/components/content.js b/packages/slate-react/src/components/content.js index d6731bd64..a250cebe3 100644 --- a/packages/slate-react/src/components/content.js +++ b/packages/slate-react/src/components/content.js @@ -381,6 +381,7 @@ class Content extends React.Component { change.splitBlockAtRange(range) } }) + break } diff --git a/packages/slate-react/src/components/node.js b/packages/slate-react/src/components/node.js index 6bbf37e3f..8da0f04ce 100644 --- a/packages/slate-react/src/components/node.js +++ b/packages/slate-react/src/components/node.js @@ -135,6 +135,7 @@ class Node extends React.Component { const childrenDecorations = getChildrenDecorations(node, decs) let children = [] + node.nodes.forEach((child, i) => { const isChildSelected = !!indexes && indexes.start <= i && i < indexes.end @@ -169,6 +170,7 @@ class Node extends React.Component { placeholder = React.cloneElement(placeholder, { key: `${node.key}-placeholder`, }) + children = [placeholder, ...children] } diff --git a/packages/slate-react/src/plugins/after.js b/packages/slate-react/src/plugins/after.js index 2bb32c148..3bc6f4981 100644 --- a/packages/slate-react/src/plugins/after.js +++ b/packages/slate-react/src/plugins/after.js @@ -438,6 +438,7 @@ function AfterPlugin() { const { document, isInVoid, previousText, startText } = value const isPreviousInVoid = previousText && document.hasVoidParent(previousText.key) + if (isInVoid || isPreviousInVoid || startText.text == '') { event.preventDefault() return change.collapseCharBackward() @@ -447,6 +448,7 @@ function AfterPlugin() { if (Hotkeys.isCollapseCharForward(event)) { const { document, isInVoid, nextText, startText } = value const isNextInVoid = nextText && document.hasVoidParent(nextText.key) + if (isInVoid || isNextInVoid || startText.text == '') { event.preventDefault() return change.collapseCharForward() @@ -457,6 +459,7 @@ function AfterPlugin() { const { document, isInVoid, previousText, startText } = value const isPreviousInVoid = previousText && document.hasVoidParent(previousText.key) + if (isInVoid || isPreviousInVoid || startText.text == '') { event.preventDefault() return change.extendCharBackward() @@ -466,6 +469,7 @@ function AfterPlugin() { if (Hotkeys.isExtendCharForward(event)) { const { document, isInVoid, nextText, startText } = value const isNextInVoid = nextText && document.hasVoidParent(nextText.key) + if (isInVoid || isNextInVoid || startText.text == '') { event.preventDefault() return change.extendCharForward() diff --git a/packages/slate-react/src/utils/clone-fragment.js b/packages/slate-react/src/utils/clone-fragment.js index 56ce6cee5..6777ee53a 100644 --- a/packages/slate-react/src/utils/clone-fragment.js +++ b/packages/slate-react/src/utils/clone-fragment.js @@ -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 // show up elsewhere when pasted. + // eslint-disable-next-line padding-line-between-statements ;[].slice.call(contents.querySelectorAll(ZERO_WIDTH_SELECTOR)).forEach(zw => { const isNewline = zw.getAttribute(ZERO_WIDTH_ATTRIBUTE) === 'n' zw.textContent = isNewline ? '\n' : '' diff --git a/packages/slate-react/src/utils/get-children-decorations.js b/packages/slate-react/src/utils/get-children-decorations.js index 9426d3da3..bb3ac48ad 100644 --- a/packages/slate-react/src/utils/get-children-decorations.js +++ b/packages/slate-react/src/utils/get-children-decorations.js @@ -62,6 +62,7 @@ function orderChildDecorations(node, decorations) { // Map each key to its global order const keyOrders = { [node.key]: 0 } let globalOrder = 1 + node.forEachDescendant(child => { keyOrders[child.key] = globalOrder globalOrder = globalOrder + 1 @@ -84,6 +85,7 @@ function orderChildDecorations(node, decorations) { startKeyOrder === undefined ? 0 : getContainingChildOrder(childNodes, keyOrders, startKeyOrder) + endPoints.push({ isRangeStart: true, order: containingChildOrder - 0.5, @@ -92,6 +94,7 @@ function orderChildDecorations(node, decorations) { // Range end. const endKeyOrder = (keyOrders[decoration.endKey] || globalOrder) + 0.5 + endPoints.push({ isRangeEnd: true, order: endKeyOrder, diff --git a/packages/slate-react/src/utils/remove-all-ranges.js b/packages/slate-react/src/utils/remove-all-ranges.js index 7807b520f..045b9f2b0 100644 --- a/packages/slate-react/src/utils/remove-all-ranges.js +++ b/packages/slate-react/src/utils/remove-all-ranges.js @@ -8,6 +8,7 @@ function removeAllRanges(selection) { const doc = window.document + if (doc && doc.body.createTextRange) { // All IE but Edge const range = doc.body.createTextRange() diff --git a/packages/slate-react/src/utils/scroll-to-selection.js b/packages/slate-react/src/utils/scroll-to-selection.js index d05cc94af..5b6cae2bb 100644 --- a/packages/slate-react/src/utils/scroll-to-selection.js +++ b/packages/slate-react/src/utils/scroll-to-selection.js @@ -133,10 +133,13 @@ function scrollToSelection(selection) { height = offsetHeight scrollerTop = scrollerRect.top + parseInt(borderTopWidth, 10) scrollerLeft = scrollerRect.left + parseInt(borderLeftWidth, 10) + scrollerBordersY = parseInt(borderTopWidth, 10) + parseInt(borderBottomWidth, 10) + scrollerBordersX = parseInt(borderLeftWidth, 10) + parseInt(borderRightWidth, 10) + scrollerPaddingTop = parseInt(paddingTop, 10) scrollerPaddingBottom = parseInt(paddingBottom, 10) scrollerPaddingLeft = parseInt(paddingLeft, 10) diff --git a/packages/slate/src/changes/at-current-range.js b/packages/slate/src/changes/at-current-range.js index 6a996d23a..bee3fc7f8 100644 --- a/packages/slate/src/changes/at-current-range.js +++ b/packages/slate/src/changes/at-current-range.js @@ -40,6 +40,7 @@ PROXY_TRANSFORMS.forEach(method => { const { selection } = value const methodAtRange = `${method}AtRange` change[methodAtRange](selection, ...args) + if (method.match(/Backward$/)) { change.collapseToStart() } else if (method.match(/Forward$/)) { @@ -53,6 +54,7 @@ Changes.setBlock = (...args) => { 'slate@0.33.0', 'The `setBlock` method of Slate changes has been renamed to `setBlocks`.' ) + Changes.setBlocks(...args) } @@ -61,6 +63,7 @@ Changes.setInline = (...args) => { 'slate@0.33.0', 'The `setInline` method of Slate changes has been renamed to `setInlines`.' ) + Changes.setInlines(...args) } @@ -230,6 +233,7 @@ Changes.splitBlock = (change, depth = 1) => { const { selection, document } = value const marks = selection.marks || document.getInsertMarksAtRange(selection) change.splitBlockAtRange(selection, depth).collapseToEnd() + if (marks && marks.size !== 0) { change.select({ marks }) } diff --git a/packages/slate/src/changes/at-range.js b/packages/slate/src/changes/at-range.js index 1255cfaee..bad772efc 100644 --- a/packages/slate/src/changes/at-range.js +++ b/packages/slate/src/changes/at-range.js @@ -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 // is behind it to know how to delete... const text = document.getDescendant(startKey) + if (range.isAtStartOf(text)) { const prev = document.getPreviousText(text.key) const prevBlock = document.getClosestBlock(prev.key) @@ -414,6 +415,7 @@ Changes.deleteBackwardAtRange = (change, range, n = 1, options = {}) => { while (n > traversed) { node = document.getPreviousText(node.key) const next = traversed + node.text.length + if (n <= next) { offset = next - n break @@ -529,6 +531,7 @@ Changes.deleteForwardAtRange = (change, range, n = 1, options = {}) => { if (block && block.isEmpty && document.nodes.size !== 1) { const nextBlock = document.getNextBlock(block.key) change.removeNodeByKey(block.key, { normalize }) + if (nextBlock && nextBlock.key) { 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 // is behind it to know how to delete... const text = document.getDescendant(startKey) + if (range.isAtEndOf(text)) { const next = document.getNextText(text.key) const nextBlock = document.getClosestBlock(next.key) @@ -587,6 +591,7 @@ Changes.deleteForwardAtRange = (change, range, n = 1, options = {}) => { while (n > traversed) { node = document.getNextText(node.key) const next = traversed + node.text.length + if (n <= next) { offset = n - traversed break @@ -649,6 +654,7 @@ Changes.insertBlockAtRange = (change, range, block, options = {}) => { change.splitDescendantsByKey(startBlock.key, startKey, startOffset, { normalize: false, }) + 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 (range.isExpanded) { change.deleteAtRange(range, { normalize: false }) + if (change.value.document.getDescendant(range.startKey)) { range = range.collapseToStart() } else { @@ -764,6 +771,7 @@ Changes.insertFragmentAtRange = (change, range, fragment, options = {}) => { nextNodes.forEach((node, i) => { const newIndex = lastIndex + i + change.moveNodeByKey(node.key, lastBlock.key, newIndex, { normalize: false, }) @@ -784,6 +792,7 @@ Changes.insertFragmentAtRange = (change, range, fragment, options = {}) => { firstBlock.nodes.forEach((inline, i) => { const o = startOffset == 0 ? 0 : 1 const newIndex = inlineIndex + i + o + change.insertNodeByKey(startBlock.key, newIndex, inline, { normalize: false, }) @@ -868,6 +877,7 @@ Changes.insertTextAtRange = (change, range, text, marks, options = {}) => { if (normalize === undefined) { normalize = range.isExpanded && marks.size !== 0 } + change.insertTextByKey(key, offset, text, marks, { normalize: false }) if (normalize) { @@ -963,6 +973,7 @@ Changes.setBlockAtRange = (...args) => { 'slate@0.33.0', 'The `setBlockAtRange` method of Slate changes has been renamed to `setBlocksAtRange`.' ) + Changes.setBlocksAtRange(...args) } @@ -992,6 +1003,7 @@ Changes.setInlineAtRange = (...args) => { 'slate@0.33.0', 'The `setInlineAtRange` method of Slate changes has been renamed to `setInlinesAtRange`.' ) + Changes.setInlinesAtRange(...args) } @@ -1029,9 +1041,11 @@ Changes.splitBlockAtRange = (change, range, height = 1, options = {}) => { if (range.isBackward) range = range.flip() const nextBlock = change.value.document.getNextBlock(node.key) range = range.moveAnchorToStartOf(nextBlock) + if (startKey === endKey) { range = range.moveFocusTo(range.anchorKey, endOffset - startOffset) } + change.deleteAtRange(range, { normalize }) } } @@ -1176,9 +1190,11 @@ Changes.unwrapBlockAtRange = (change, range, properties, options = {}) => { }) } else { const firstText = firstMatch.getFirstText() + change.splitDescendantsByKey(block.key, firstText.key, 0, { normalize: false, }) + document = change.value.document children.forEach((child, i) => { @@ -1340,6 +1356,7 @@ Changes.wrapInlineAtRange = (change, range, inline, options = {}) => { if (range.isCollapsed) { // Wrapping an inline void const inlineParent = document.getClosestInline(startKey) + if (!inlineParent.isVoid) { return } @@ -1359,6 +1376,7 @@ Changes.wrapInlineAtRange = (change, range, inline, options = {}) => { change.splitDescendantsByKey(endChild.key, endKey, endOffset, { normalize: false, }) + change.splitDescendantsByKey(startChild.key, startKey, startOffset, { normalize: false, }) @@ -1407,6 +1425,7 @@ Changes.wrapInlineAtRange = (change, range, inline, options = {}) => { change.insertNodeByKey(startBlock.key, startIndex + 1, startNode, { normalize: false, }) + change.insertNodeByKey(endBlock.key, endIndex, endNode, { normalize: false, }) diff --git a/packages/slate/src/changes/by-key.js b/packages/slate/src/changes/by-key.js index 4a2cee528..e72a60bb6 100644 --- a/packages/slate/src/changes/by-key.js +++ b/packages/slate/src/changes/by-key.js @@ -387,9 +387,11 @@ Changes.replaceTextByKey = ( ) => { const { document } = change.value const textNode = document.getDescendant(key) + if (length + offset > textNode.text.length) { length = textNode.text.length - offset } + const range = Range.create({ anchorKey: key, focusKey: key, @@ -399,6 +401,7 @@ Changes.replaceTextByKey = ( let activeMarks = document.getActiveMarksAtRange(range) change.removeTextByKey(key, offset, length, { normalize: false }) + if (!marks) { // Do not use mark at index when marks and activeMarks are both empty marks = activeMarks ? activeMarks : [] @@ -407,8 +410,10 @@ Changes.replaceTextByKey = ( activeMarks = activeMarks.filter( activeMark => !marks.find(m => activeMark.type === m.type) ) + marks = activeMarks.merge(marks) } + change.insertTextByKey(key, offset, text, marks, options) } @@ -490,6 +495,7 @@ Changes.replaceNodeByKey = (change, key, newNode, options = {}) => { const index = parent.nodes.indexOf(node) change.removeNodeByKey(key, { normalize: false }) change.insertNodeByKey(parent.key, index, newNode, { normalize: false }) + if (normalize) { change.normalizeNodeByKey(parent.key) } @@ -644,6 +650,7 @@ Changes.splitDescendantsByKey = ( const prevIndex = index == null ? null : index index = previous ? node.nodes.indexOf(previous) + 1 : textOffset previous = node + change.splitNodeByKey(node.key, index, { normalize: false, target: prevIndex, @@ -727,6 +734,7 @@ Changes.unwrapNodeByKey = (change, key, options = {}) => { change.moveNodeByKey(key, parentParent.key, parentIndex, { normalize: false, }) + change.removeNodeByKey(parent.key, options) } else if (isFirst) { // Just move the node before its parent. diff --git a/packages/slate/src/changes/with-schema.js b/packages/slate/src/changes/with-schema.js index 91aeca0ef..a9f0583b8 100644 --- a/packages/slate/src/changes/with-schema.js +++ b/packages/slate/src/changes/with-schema.js @@ -69,9 +69,11 @@ function normalizeNodeAndChildren(change, node, schema) { let child = node.getFirstInvalidDescendant(schema) let path = change.value.document.getPath(node.key) + while (node && child) { normalizeNodeAndChildren(change, child, schema) node = change.value.document.refindNode(path, node.key) + if (!node) { path = [] child = null diff --git a/packages/slate/src/constants/core-schema-rules.js b/packages/slate/src/constants/core-schema-rules.js index 285deca0d..7709c827d 100644 --- a/packages/slate/src/constants/core-schema-rules.js +++ b/packages/slate/src/constants/core-schema-rules.js @@ -167,6 +167,7 @@ const CORE_SCHEMA_RULES = [ change.insertNodeByKey(node.key, shift + index, Text.create(), { normalize: false, }) + shift++ } @@ -174,6 +175,7 @@ const CORE_SCHEMA_RULES = [ change.insertNodeByKey(node.key, shift + index + 1, Text.create(), { normalize: false, }) + shift++ } }) diff --git a/packages/slate/src/models/change.js b/packages/slate/src/models/change.js index 9f6fae2bd..a7404de9d 100644 --- a/packages/slate/src/models/change.js +++ b/packages/slate/src/models/change.js @@ -44,6 +44,7 @@ class Change { const { value } = attrs this.value = value this.operations = new List() + this.flags = { normalize: true, ...pick(attrs, ['merge', 'save', 'normalize']), @@ -152,6 +153,7 @@ class Change { withoutNormalization(customChange) { const original = this.flags.normalize this.setOperationFlag('normalize', false) + try { customChange(this) // if the change function worked then run normalization diff --git a/packages/slate/src/models/leaf.js b/packages/slate/src/models/leaf.js index 40ee50f11..e6e371da7 100644 --- a/packages/slate/src/models/leaf.js +++ b/packages/slate/src/models/leaf.js @@ -249,6 +249,7 @@ class Leaf extends Record(DEFAULTS) { 'slate@0.34.0', 'The `characters` property of Slate objects is deprecated' ) + const { marks } = this const characters = Character.createList( this.text.split('').map(char => { diff --git a/packages/slate/src/models/node.js b/packages/slate/src/models/node.js index bbfc29ac7..ed1213f53 100644 --- a/packages/slate/src/models/node.js +++ b/packages/slate/src/models/node.js @@ -43,6 +43,7 @@ class Node { 'slate@0.32.0', 'The `kind` property of Slate objects has been renamed to `object`.' ) + object = attrs.kind } @@ -55,6 +56,7 @@ class Node { return Inline.create(attrs) case 'text': return Text.create(attrs) + default: { throw new Error('`Node.create` requires a `object` string.') } @@ -132,6 +134,7 @@ class Node { 'slate@0.32.0', 'The `kind` property of Slate objects has been renamed to `object`.' ) + object = value.kind } @@ -144,6 +147,7 @@ class Node { return Inline.fromJSON(value) case 'text': return Text.fromJSON(value) + default: { throw new Error( `\`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]) let ancestors + this.nodes.find(node => { if (node.object == 'text') return false ancestors = node.getAncestors(key) @@ -480,6 +485,7 @@ class Node { range = range.normalize(this) if (range.isUnset) return List() const { startKey, endKey, startOffset, endOffset } = range + if (startKey === endKey) { const endText = this.getDescendant(endKey) return endText.characters.slice(startOffset, endOffset) @@ -489,6 +495,7 @@ class Node { if (t.key === startKey) { return t.characters.slice(startOffset) } + if (t.key === endKey) { return t.characters.slice(0, endOffset) } @@ -519,6 +526,7 @@ class Node { getClosest(key, iterator) { key = assertKey(key) const ancestors = this.getAncestors(key) + if (!ancestors) { throw new Error(`Could not find a descendant node with key "${key}".`) } @@ -760,6 +768,7 @@ class Node { getFurthest(key, iterator) { const ancestors = this.getAncestors(key) + if (!ancestors) { key = assertKey(key) throw new Error(`Could not find a descendant node with key "${key}".`) @@ -856,6 +865,7 @@ class Node { this.nodes.forEach(child => { if (child.object == 'text') return + if (child.isLeafInline()) { array.push(child) } else { @@ -1004,6 +1014,7 @@ class Node { // PERF: use only one concat rather than multiple concat // becuase one concat is faster const result = [] + this.nodes.forEach(node => { result.push(node.getMarksAsArray()) }) @@ -1031,6 +1042,7 @@ class Node { getInsertMarksAtRange(range) { range = range.normalize(this) if (range.isUnset) return Set() + if (range.isCollapsed) { // PERF: range is not cachable, use key and offset as proxies for cache return this.getMarksAtPosition(range.startKey, range.startOffset) @@ -1051,6 +1063,7 @@ class Node { getOrderedMarksAtRange(range) { range = range.normalize(this) if (range.isUnset) return OrderedSet() + if (range.isCollapsed) { // PERF: range is not cachable, use key and offset as proxies for cache return this.getMarksAtPosition(range.startKey, range.startOffset) @@ -1109,6 +1122,7 @@ class Node { getActiveMarksAtRange(range) { range = range.normalize(this) if (range.isUnset) return Set() + if (range.isCollapsed) { const { startKey, startOffset } = range return this.getMarksAtPosition(startKey, startOffset).toSet() @@ -1147,11 +1161,13 @@ class Node { if (marks.size === 0) return marks let text = this.getNextText(startKey) + while (text.key !== endKey) { if (text.text.length !== 0) { marks = marks.intersect(text.getActiveMarks()) if (marks.size === 0) return Set() } + text = this.getNextText(text.key) } return marks @@ -1402,6 +1418,7 @@ class Node { refindPath(path, key) { const node = this.getDescendantAtPath(path) + if (node && node.key === key) { return path } @@ -1420,6 +1437,7 @@ class Node { refindNode(path, key) { const node = this.getDescendantAtPath(path) + if (node && node.key === key) { return node } @@ -2041,6 +2059,7 @@ class Node { getFirstInvalidDescendant(schema) { let result = null + this.nodes.find(n => { result = n.validate(schema) ? n : n.getFirstInvalidDescendant(schema) return result diff --git a/packages/slate/src/models/range.js b/packages/slate/src/models/range.js index e6a6dd726..090c4878c 100644 --- a/packages/slate/src/models/range.js +++ b/packages/slate/src/models/range.js @@ -687,6 +687,7 @@ class Range extends Record(DEFAULTS) { const anchorOffsetType = typeof anchorOffset const focusOffsetType = typeof focusOffset + if (anchorOffsetType != 'number' || focusOffsetType != 'number') { logger.warn( `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:', range ) + const first = node.getFirstText() return range.merge({ 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:', anchorNode ) + const anchorText = anchorNode.getTextAtOffset(anchorOffset) const offset = anchorNode.getOffset(anchorText.key) 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:', focusNode ) + const focusText = focusNode.getTextAtOffset(focusOffset) const offset = focusNode.getOffset(focusText.key) focusOffset = focusOffset - offset diff --git a/packages/slate/src/models/schema.js b/packages/slate/src/models/schema.js index 0792b1ed9..2fd7913b9 100644 --- a/packages/slate/src/models/schema.js +++ b/packages/slate/src/models/schema.js @@ -369,6 +369,7 @@ class Schema extends Record(DEFAULTS) { if (max != null && offset == max) nextDef() return !!child } + function rewind() { offset -= 1 index -= 1 diff --git a/packages/slate/src/models/text.js b/packages/slate/src/models/text.js index 4a9c077a2..aa929d7f0 100644 --- a/packages/slate/src/models/text.js +++ b/packages/slate/src/models/text.js @@ -754,6 +754,7 @@ class Text extends Record(DEFAULTS) { if (result.size === 1) { const first = result.first() + if (!first.marks || first.marks.size === 0) { if (first.text === '') { return this.set('leaves', List()) diff --git a/packages/slate/src/models/value.js b/packages/slate/src/models/value.js index 5c475ff7c..b5af7a2ad 100644 --- a/packages/slate/src/models/value.js +++ b/packages/slate/src/models/value.js @@ -665,12 +665,15 @@ class Value extends Record(DEFAULTS) { if (options.preserveSelection && !options.preserveKeys) { const { document, selection } = this + object.selection.anchorPath = selection.isSet ? document.getPath(selection.anchorKey) : null + object.selection.focusPath = selection.isSet ? document.getPath(selection.focusKey) : null + delete object.selection.anchorKey delete object.selection.focusKey } @@ -681,6 +684,7 @@ class Value extends Record(DEFAULTS) { !options.preserveKeys ) { const { document } = this + object.decorations = object.decorations.map(decoration => { const withPath = { ...decoration, diff --git a/packages/slate/src/operations/apply.js b/packages/slate/src/operations/apply.js index 620570c05..f20d14bb1 100644 --- a/packages/slate/src/operations/apply.js +++ b/packages/slate/src/operations/apply.js @@ -26,6 +26,7 @@ function applyRangeAdjustments(value, checkAffected, adjustRange) { if (value.selection && checkAffected(value.selection)) { value = value.set('selection', adjustRange(value.selection)) } + if (!value.decorations) return value // check all ranges, apply adjustment if affected @@ -312,11 +313,13 @@ const APPLIERS = { ? range.moveStartTo(prev.key, prev.text.length) : next ? range.moveStartTo(next.key, 0) : range.deselect() } + if (node.hasNode(endKey)) { range = prev ? range.moveEndTo(prev.key, prev.text.length) : next ? range.moveEndTo(next.key, 0) : range.deselect() } + // If the range wasn't deselected, normalize it. if (range.isSet) return range.normalize(document) return range @@ -489,12 +492,15 @@ const APPLIERS = { // Split the node by its parent. parent = parent.splitNode(index, position) + if (properties) { const splitNode = parent.nodes.get(index + 1) + if (splitNode.object !== 'text') { parent = parent.updateNode(splitNode.merge(properties)) } } + document = document.updateNode(parent) const next = document.getNextText(node.key) diff --git a/packages/slate/src/operations/invert.js b/packages/slate/src/operations/invert.js index 40245e810..50107923c 100644 --- a/packages/slate/src/operations/invert.js +++ b/packages/slate/src/operations/invert.js @@ -201,6 +201,7 @@ function invertOperation(op) { inverseProps.anchorKey === null ? null : document.getPath(inverseProps.anchorKey) + delete inverseProps.anchorKey } @@ -209,6 +210,7 @@ function invertOperation(op) { inverseProps.focusKey === null ? null : document.getPath(inverseProps.focusKey) + delete inverseProps.focusKey } diff --git a/packages/slate/src/utils/memoize.js b/packages/slate/src/utils/memoize.js index e760d5dba..2e43e11d0 100644 --- a/packages/slate/src/utils/memoize.js +++ b/packages/slate/src/utils/memoize.js @@ -70,6 +70,7 @@ function memoize(object, properties) { if (!this.__cache) { this.__cache = new Map() // eslint-disable-line no-undef,no-restricted-globals } + if (!this.__cache_no_args) { this.__cache_no_args = {} } diff --git a/packages/slate/test/changes/at-current-range/add-marks/with-mark-object.js b/packages/slate/test/changes/at-current-range/add-marks/with-mark-object.js index 4c562f3a3..e74dbd60a 100644 --- a/packages/slate/test/changes/at-current-range/add-marks/with-mark-object.js +++ b/packages/slate/test/changes/at-current-range/add-marks/with-mark-object.js @@ -13,6 +13,7 @@ export default function(change) { data: { thing: 'value' }, }) ) + marks.push( Mark.create({ type: 'italic', diff --git a/packages/slate/test/changes/at-current-range/add-marks/with-plain-object.js b/packages/slate/test/changes/at-current-range/add-marks/with-plain-object.js index a759e2b2c..acbdbf5fd 100644 --- a/packages/slate/test/changes/at-current-range/add-marks/with-plain-object.js +++ b/packages/slate/test/changes/at-current-range/add-marks/with-plain-object.js @@ -9,6 +9,7 @@ export default function(change) { type: 'bold', data: { thing: 'value' }, }) + marks.push({ type: 'italic', data: { thing2: 'value2' }, diff --git a/packages/slate/test/changes/at-current-range/insert-fragment/hanging-selection-single-block.js b/packages/slate/test/changes/at-current-range/insert-fragment/hanging-selection-single-block.js index 66e8df7dd..7c677c776 100644 --- a/packages/slate/test/changes/at-current-range/insert-fragment/hanging-selection-single-block.js +++ b/packages/slate/test/changes/at-current-range/insert-fragment/hanging-selection-single-block.js @@ -9,6 +9,7 @@ const fragment = ( fragment two ) + export default function(change) { change.insertFragment(fragment) } diff --git a/packages/slate/test/changes/by-key/replace-text-by-key/replace-with-active-marks-with-data.js b/packages/slate/test/changes/by-key/replace-text-by-key/replace-with-active-marks-with-data.js index 1d9b8fcaa..9b6673121 100644 --- a/packages/slate/test/changes/by-key/replace-text-by-key/replace-with-active-marks-with-data.js +++ b/packages/slate/test/changes/by-key/replace-text-by-key/replace-with-active-marks-with-data.js @@ -4,6 +4,7 @@ import h from '../../../helpers/h' export default function(change) { const { anchorKey, anchorOffset } = change.value + change.replaceTextByKey(anchorKey, anchorOffset, 3, 'cat is cute', [ { type: 'font-size', data: { size: 16 } }, ]) diff --git a/packages/slate/test/changes/by-key/replace-text-by-key/replace-with-mark-and-active-mark.js b/packages/slate/test/changes/by-key/replace-text-by-key/replace-with-mark-and-active-mark.js index 54f65cd60..c1ce898cf 100644 --- a/packages/slate/test/changes/by-key/replace-text-by-key/replace-with-mark-and-active-mark.js +++ b/packages/slate/test/changes/by-key/replace-text-by-key/replace-with-mark-and-active-mark.js @@ -4,6 +4,7 @@ import h from '../../../helpers/h' export default function(change) { const { anchorKey, anchorOffset } = change.value + change.replaceTextByKey(anchorKey, anchorOffset, 3, 'cat is cute', [ { type: 'italic' }, ]) diff --git a/packages/slate/test/changes/on-selection/move-to/with-object.js b/packages/slate/test/changes/on-selection/move-to/with-object.js index f05120747..00121b400 100644 --- a/packages/slate/test/changes/on-selection/move-to/with-object.js +++ b/packages/slate/test/changes/on-selection/move-to/with-object.js @@ -5,6 +5,7 @@ import h from '../../../helpers/h' export default function(change) { const { value } = change const { startText } = value + change.select({ anchorKey: startText.key, anchorOffset: 0, diff --git a/packages/slate/test/schema/custom/child-unknown-custom.js b/packages/slate/test/schema/custom/child-unknown-custom.js index d63eaca74..f42fa488c 100644 --- a/packages/slate/test/schema/custom/child-unknown-custom.js +++ b/packages/slate/test/schema/custom/child-unknown-custom.js @@ -12,11 +12,13 @@ export const schema = { if (reason == CHILD_UNKNOWN) { const previous = node.getPreviousSibling(child.key) const offset = previous.nodes.size + child.nodes.forEach((n, i) => change.moveNodeByKey(n.key, previous.key, offset + i, { normalize: false, }) ) + change.removeNodeByKey(child.key) } }, diff --git a/yarn.lock b/yarn.lock index 5f476d004..c35f8f47f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -116,10 +116,14 @@ acorn@^5.0.0: version "5.0.3" 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" 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: version "1.0.0" 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" ansi-escapes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" ansi-html@0.0.7: version "0.0.7" @@ -192,12 +196,18 @@ ansi-styles@^2.2.1: version "2.2.1" 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" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" dependencies: 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: version "1.3.0" 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" argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" dependencies: sprintf-js "~1.0.2" @@ -416,15 +426,7 @@ babel-cli@^6.26.0: optionalDependencies: chokidar "^1.6.1" -babel-code-frame@^6.22.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: +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -1298,13 +1300,20 @@ boom@5.x.x: dependencies: hoek "4.x.x" -brace-expansion@^1.0.0, brace-expansion@^1.1.7: +brace-expansion@^1.0.0: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" dependencies: balanced-match "^1.0.0" 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: version "1.8.5" 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" 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: version "1.1.1" 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" lazy-cache "^1.0.3" -chalk@^1.1.0, chalk@^1.1.3: +chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1580,12 +1593,12 @@ chalk@^1.1.0, chalk@^1.1.3: supports-color "^2.0.0" chalk@^2.0.0, chalk@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: - ansi-styles "^3.1.0" + ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" - supports-color "^4.0.0" + supports-color "^5.3.0" chalk@^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" circular-json@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" clap@^1.0.9: version "1.2.3" @@ -1748,12 +1761,22 @@ collections@^0.2.0: dependencies: weak-map "1.0.0" -color-convert@^1.3.0, color-convert@^1.9.0: +color-convert@^1.3.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: 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: version "1.1.3" 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" 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" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" 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" 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: version "1.5.0" 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" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^4.16.0: - version "4.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.16.0.tgz#934ada9e98715e1d7bbfd6f6f0519ed2fab35cc1" +eslint@^4.19.1: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" dependencies: ajv "^5.3.0" babel-code-frame "^6.22.0" @@ -2888,7 +2920,7 @@ eslint@^4.16.0: doctrine "^2.1.0" eslint-scope "^3.7.1" eslint-visitor-keys "^1.0.0" - espree "^3.5.2" + espree "^3.5.4" esquery "^1.0.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -2910,18 +2942,19 @@ eslint@^4.16.0: path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" + regexpp "^1.0.1" require-uncached "^1.0.3" semver "^5.3.0" strip-ansi "^4.0.0" strip-json-comments "~2.0.1" - table "^4.0.1" + table "4.0.2" text-table "~0.2.0" -espree@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" +espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" dependencies: - acorn "^5.2.1" + acorn "^5.5.0" acorn-jsx "^3.0.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" esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" dependencies: estraverse "^4.0.0" esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" dependencies: - estraverse "~4.1.0" - object-assign "^4.0.1" + estraverse "^4.1.0" esrever@^0.2.0: version "0.2.0" 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" 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: version "0.2.1" 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" external-editor@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" dependencies: chardet "^0.4.0" 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" fast-deep-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" fast-diff@^1.1.1: version "1.1.2" @@ -3291,8 +3319,8 @@ find-up@^2.0.0, find-up@^2.1.0: locate-path "^2.0.0" flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" dependencies: circular-json "^0.3.1" del "^2.0.2" @@ -3613,7 +3641,11 @@ global@^4.3.0: min-document "^2.19.0" 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" 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" 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" 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: version "1.1.0" 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" 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" 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" is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" dependencies: is-path-inside "^1.0.0" is-path-inside@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" dependencies: path-is-inside "^1.0.1" @@ -4370,10 +4412,8 @@ is-regex@^1.0.3, is-regex@^1.0.4: has "^1.0.1" is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" - dependencies: - tryit "^1.0.1" + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" is-retry-allowed@^1.0.0: version "1.1.0" @@ -4493,17 +4533,13 @@ js-base64@^2.1.9: version "2.4.3" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" - -js-tokens@^3.0.2: +js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" js-yaml@^3.9.1: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -4903,7 +4939,7 @@ lodash.uniq@^4.5.0: version "4.5.0" 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" 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" 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: version "1.6.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" @@ -4944,7 +4984,14 @@ lru-cache@2: version "2.7.3" 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" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" dependencies: @@ -5141,8 +5188,8 @@ mimeparse@^0.1.4: resolved "https://registry.yarnpkg.com/mimeparse/-/mimeparse-0.1.4.tgz#dafb02752370fd226093ae3152c271af01ac254a" mimic-fn@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" min-document@^2.19.0: version "2.19.0" @@ -6554,7 +6601,7 @@ readable-stream@^1.0.26-4: isarray "0.0.1" 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" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" 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" 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: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" @@ -6642,6 +6701,10 @@ regex-not@^1.0.0: dependencies: 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: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -6841,18 +6904,12 @@ right-align@^0.1.1: dependencies: 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" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: 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: version "2.0.1" 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" 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" 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: version "1.2.2" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" @@ -7020,14 +7085,10 @@ selfsigned@^1.9.1: dependencies: 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" 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: version "2.3.2" 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" 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: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -7565,7 +7632,7 @@ supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.0.0, supports-color@^4.2.1: +supports-color@^4.2.1: version "4.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" dependencies: @@ -7577,6 +7644,12 @@ supports-color@^5.1.0, supports-color@^5.2.0: dependencies: 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: version "0.7.2" 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" 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" resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" dependencies: @@ -7805,10 +7878,6 @@ trim-right@^1.0.1: version "1.0.1" 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: version "0.0.0" 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" which@^1.2.9: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" dependencies: isexe "^2.0.0"