diff --git a/README.md b/README.md index b59562b..3e7b281 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,9 @@ Features * JSONP support * Fast, even on long pages * Works on any valid JSON page – URL doesn't matter -* Syntax highlighting +* Syntax highlighting with 36 light and dark themes * Collapsible trees, with indent guides +* Line numbers * Clickable URLs * Buttons for switching between raw and parsed JSON * Parsed JSON is exported as a global variable, `json`, so you can inspect it in the console @@ -43,23 +44,7 @@ Edge 7. Click on the ellipsis (...) menu, click "Extensions", and click "Load extension" 8. Select the `build` folder created in step 3 -FAQ ---- +**Some URLs to try it on:** -### Why are large numbers not displayed accurately? - -This is a [limitation of JavaScript](http://www.ecma-international.org/ecma-262/5.1/#sec-15.7.3.2). The largest possible number is `Number.MAX_SAFE_INTEGER`, or **9007199254740991**. If you try to use a number larger than this in JavaScript, you'll lose accuracy. - -The idea of JSON Formatter is to show you how the computer sees your JSON, so we don't attempt to circumvent this limitation, otherwise that would give a misleading representation of your data. It's better to see exactly what the JavaScript engine sees. - -If you want to use long sequences of digits in your JSON, then **quote them as strings**. - -### Why are object keys sometimes in the wrong order? - -What you see in JSON Formatter is a representation of the **parsed** object/array. You see what the browser engine sees. - -Plain JavaScript objects are [unordered collections of properties](http://www.ecma-international.org/ecma-262/5.1/#sec-12.6.4). If you go through them with `for...in`, for example, there is no guarantee of any particular order. In practice, most engines maintain the order in which the keys were first declared, but V8 moves any numeric keys (e.g. `"1234"`) to the front, for a small performance gain. This was a [controversial issue](https://code.google.com/p/v8/issues/detail?id=164) – a lot of people think it sucks that you can't predict key enumeration order in Chrome – but the V8 team refused to 'fix' it, because it's not a bug, and they're right. If you want your values to be in a certain order, and you're relying on the non-standard key-ordering logic of a particular engine, then your code is broken. Restructure your data to use arrays. - -##### But I just want it to be in order for readability - -That would require tokenising the JSON string manually instead of using `JSON.parse`, which would be too slow. And it's not a good idea to go down the road of representing the data differently from how the engine actually sees it. +* https://en.wikipedia.org/w/api.php?action=query&titles=Main%20Page&prop=contributors&format=json +* http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=jsonp&tags=json&tagmode=any&format=json diff --git a/package.json b/package.json index 807714e..df92fb7 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "gulp-sourcemaps": "^2.6.0", "gulp-uglify": "^2.1.2", "gulp-zip": "^4.0.0", + "json-tokenizer": "^1.0.1", "node-sass": "^4.5.2", "postcss-loader": "^1.3.3", "sass-loader": "^6.0.3", @@ -27,5 +28,8 @@ "vinyl-named": "^1.1.0", "webpack": "^2.4.1", "webpack-stream": "^3.2.0" + }, + "devDependencies": { + "babel-preset-es2015": "^6.24.1" } } diff --git a/src/js/background.js b/src/js/background.js index dec4d85..bc7cd48 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -3,7 +3,7 @@ import browser from './lib/browser'; import { listen } from './lib/messaging'; import { removeComments, firstJSONCharIndex } from './lib/utilities'; -import { jsonObjectToHTML } from './lib/dom-builder'; +import { jsonStringToHTML } from './lib/dom-builder'; // Record current version (in case a future update wants to know) browser.storage.local.set({appVersion: browser.runtime.getManifest().version}); @@ -91,10 +91,8 @@ listen((port, msg) => { port.postMessage(['FORMATTING']); // Do formatting - const html = jsonObjectToHTML(obj, jsonpFunctionName); - - // Post the HTML string to the content script - port.postMessage(['FORMATTED', html, validJsonText]); + jsonStringToHTML(validJsonText, jsonpFunctionName) + .then(html => port.postMessage(['FORMATTED', html, validJsonText])); } else if (msg.type === 'GET STORED THEME') { browser.storage.sync.get('theme', (data) => { port.postMessage({type: 'STORED THEME', themeName: data && data.theme}) diff --git a/src/js/lib/dom-builder.js b/src/js/lib/dom-builder.js index dc1648c..37b35b8 100644 --- a/src/js/lib/dom-builder.js +++ b/src/js/lib/dom-builder.js @@ -1,209 +1,206 @@ 'use strict'; import { createSpan, Templates } from './template'; - -const TOKEN_TYPES = { - STRING: 'STRING', - NUMBER: 'NUMBER', - OBJECT: 'OBJECT', - ARRAY: 'ARRAY', - BOOL: 'BOOL', - NULL: 'NULL', -}; +import JsonTokenizer from 'json-tokenizer'; let lineNumber; -export function jsonObjectToHTML(obj, jsonpFunctionName) { - // Format object (using recursive keyValueOrValue builder) +export function jsonStringToHTML(jsonString, jsonpFunctionName) { lineNumber = jsonpFunctionName === null ? 1 : 2; - const rootKeyValueOrValue = getKeyValueOrValueDom(obj, false); - - // The whole DOM is now built. - - // Set class on root node to identify it - rootKeyValueOrValue.classList.add('rootKeyValueOrValue'); - - const gutterWidth = 1 + (lineNumber.toString().length * 0.5) + 'rem'; - const gutter = document.createElement('div'); - gutter.id = 'gutter'; - gutter.style.width = gutterWidth; - - // Make div#formattedJson and append the root keyValueOrValue - const divFormattedJson = document.createElement('div'); - divFormattedJson.id = 'formattedJson'; - divFormattedJson.style.marginLeft = gutterWidth; - divFormattedJson.appendChild(rootKeyValueOrValue); - - // Top and tail with JSONP padding if necessary - if (jsonpFunctionName !== null) { - divFormattedJson.innerHTML = - `
${jsonpFunctionName}(
- ${divFormattedJson.innerHTML} -
)
`; - } - - // Return the HTML - return gutter.outerHTML + divFormattedJson.outerHTML; + return tokenize(jsonString) + .then((rootKeyValueOrValue) => { + const gutterWidth = 1 + (lineNumber.toString().length * 0.5) + 'rem'; + const gutter = document.createElement('div'); + gutter.id = 'gutter'; + gutter.style.width = gutterWidth; + + // Make div#formattedJson and append the root keyValueOrValue + const divFormattedJson = document.createElement('div'); + divFormattedJson.id = 'formattedJson'; + divFormattedJson.style.marginLeft = gutterWidth; + divFormattedJson.appendChild(rootKeyValueOrValue); + + // Top and tail with JSONP padding if necessary + if (jsonpFunctionName !== null) { + divFormattedJson.innerHTML = + `
${jsonpFunctionName}(
+ ${divFormattedJson.innerHTML} +
)
`; + } + + // Return the HTML + return gutter.outerHTML + divFormattedJson.outerHTML; + }); } -// Core recursive DOM-building function -function getKeyValueOrValueDom(value, keyName) { +function tokenize(jsonString) { const templates = Templates; - let type, nonZeroSize; - - // Establish value type - if (typeof value === 'string') { - type = TOKEN_TYPES.STRING; - } else if (typeof value === 'number') { - type = TOKEN_TYPES.NUMBER; - } else if (value === false || value === true) { - type = TOKEN_TYPES.BOOL; - } else if (value === null) { - type = TOKEN_TYPES.NULL; - } else if (value instanceof Array) { - type = TOKEN_TYPES.ARRAY; - } else { - type = TOKEN_TYPES.OBJECT; - } - - // Root node for this keyValueOrValue - const keyValueOrValue = templates.keyValueOrValue(); - keyValueOrValue.setAttribute('line-number', lineNumber++); - - // Add an 'expander' first (if this is object/array with non-zero size) - if (type === TOKEN_TYPES.OBJECT || type === TOKEN_TYPES.ARRAY) { - nonZeroSize = Object.keys(value).some((key) => value.hasOwnProperty(key)); - - if (nonZeroSize) { - keyValueOrValue.appendChild(templates.expander()); + + let currentNode = templates.keyValueOrValue(); + currentNode.classList.add('rootKeyValueOrValue'); + + const tokenizer = new JsonTokenizer(); + tokenizer.on('data', (token) => { + if (currentNode.tokenType === 'array') { + const keyValueOrValue = templates.keyValueOrValue(); + keyValueOrValue.classList.add('arrayElement'); + keyValueOrValue.setAttribute('line-number', lineNumber++); + currentNode.appendChild(keyValueOrValue); + currentNode = keyValueOrValue; } - } - - // If there's a key, add that before the value - if (keyName !== false) { // NB: "" is a legal keyname in JSON - // This keyValueOrValue must be an object property - keyValueOrValue.classList.add('objectProperty'); - // Create a span for the key name - const keySpan = templates.key(); - keySpan.textContent = JSON.stringify(keyName); - keyValueOrValue.appendChild(keySpan); - // Also add ": " (colon and non-breaking space) - keyValueOrValue.appendChild(templates.colonAndSpace()); - } - else { - // This is an array element instead - keyValueOrValue.classList.add('arrayElement'); - } - - // Generate DOM for this value - let blockInner, childKeyValueOrValue, valueElement; - switch (type) { - case TOKEN_TYPES.STRING: - // If string is a URL, get a link, otherwise get a span - const innerStringEl = createSpan(); - let escapedString = JSON.stringify(value); - escapedString = escapedString.substring(1, escapedString.length - 1); // remove quotes - if (value[0] === 'h' && value.substring(0, 4) === 'http') { // crude but fast - some false positives, but rare, and UX doesn't suffer terribly from them. - const innerStringA = document.createElement('A'); - innerStringA.href = value; - innerStringA.innerText = escapedString; - innerStringEl.appendChild(innerStringA); - } - else { - innerStringEl.innerText = escapedString; - } - valueElement = templates.string(); - valueElement.appendChild(templates.doubleQuoteText()); - valueElement.appendChild(innerStringEl); - valueElement.appendChild(templates.doubleQuoteText()); - keyValueOrValue.appendChild(valueElement); - break; - - case TOKEN_TYPES.NUMBER: - // Simply add a number element (span.n) - valueElement = templates.number(); - valueElement.innerText = value; - keyValueOrValue.appendChild(valueElement); - break; - - case TOKEN_TYPES.OBJECT: - // Add opening brace - keyValueOrValue.appendChild(templates.openingBrace()); - // If any properties, add a blockInner containing k/v pair(s) - if (nonZeroSize) { - // Add ellipsis (empty, but will be made to do something when keyValueOrValue is collapsed) - keyValueOrValue.appendChild(templates.ellipsis()); - // Create blockInner, which indents (don't attach yet) - blockInner = templates.blockInner(); - // For each key/value pair, add as a keyValueOrValue to blockInner - let count = 0, comma; - for (let k in value) { - if (value.hasOwnProperty(k)) { - count++; - childKeyValueOrValue = getKeyValueOrValueDom(value[k], k); - // Add comma - comma = templates.commaText(); - childKeyValueOrValue.appendChild(comma); - blockInner.appendChild(childKeyValueOrValue); - } + + switch (token.type) { + case 'comma': + currentNode.appendChild(templates.commaText()); + if (currentNode.classList.contains('keyValueOrValue')) { + currentNode = currentNode.parentNode; } - // Now remove the last comma - childKeyValueOrValue.removeChild(comma); - // Add blockInner - keyValueOrValue.appendChild(blockInner); - } + break; - // Add closing brace - const closingBrace = templates.closingBrace(); - keyValueOrValue.appendChild(closingBrace); - if (nonZeroSize) { - closingBrace.setAttribute('line-number', lineNumber++); - } - break; - - case TOKEN_TYPES.ARRAY: - // Add opening bracket - keyValueOrValue.appendChild(templates.openingBracket()); - // If non-zero length array, add blockInner containing inner vals - if (nonZeroSize) { - // Add ellipsis - keyValueOrValue.appendChild(templates.ellipsis()); - // Create blockInner (which indents) (don't attach yet) - blockInner = templates.blockInner(); - // For each key/value pair, add the markup - for (let i = 0, length = value.length, lastIndex = length - 1; i < length; i++) { - // Make a new keyValueOrValue, with no key - childKeyValueOrValue = getKeyValueOrValueDom(value[i], false); - // Add comma if not last one - if (i < lastIndex) { - childKeyValueOrValue.appendChild(templates.commaText()); - } - // Append the child keyValueOrValue - blockInner.appendChild(childKeyValueOrValue); + case 'end-label': + currentNode.appendChild(templates.colonAndSpace()); + break; + + case 'begin-object': + if (!currentNode.classList.contains('objectProperty')) { + currentNode.setAttribute('line-number', lineNumber++); } - // Add blockInner - keyValueOrValue.appendChild(blockInner); - } - // Add closing bracket - const closingBracket = templates.closingBracket(); - keyValueOrValue.appendChild(closingBracket); - if (nonZeroSize) { - closingBracket.setAttribute('line-number', lineNumber++); - } - break; - case TOKEN_TYPES.BOOL: - if (value) { - keyValueOrValue.appendChild(templates.true); - } else { - keyValueOrValue.appendChild(templates.false()); - } - break; + currentNode.appendChild(templates.expander()); + currentNode.appendChild(templates.openingBrace()); + currentNode.appendChild(templates.ellipsis()); + + const objectInner = templates.blockInner(); + objectInner.tokenType = 'object'; + + currentNode.appendChild(objectInner); + currentNode = objectInner; + break; + + case 'end-object': + if (currentNode.classList.contains('objectProperty')) { + currentNode = currentNode.parentNode; + } + + const objectContentNode = currentNode; + currentNode = currentNode.parentNode; + + const closingBrace = templates.closingBrace(); + currentNode.appendChild(closingBrace); + + if (objectContentNode.childNodes.length) { + closingBrace.setAttribute('line-number', lineNumber++); + } else { + objectContentNode.remove(); + currentNode.parentNode.querySelector('.expander').remove(); + currentNode.parentNode.querySelector('.ellipsis').remove(); + } + break; + + case 'begin-array': + if (!currentNode.classList.contains('objectProperty')) { + currentNode.setAttribute('line-number', lineNumber++); + } + + currentNode.appendChild(templates.expander()); + currentNode.appendChild(templates.openingBracket()); + currentNode.appendChild(templates.ellipsis()); + + const arrayInner = templates.blockInner(); + arrayInner.tokenType = 'array'; + + currentNode.appendChild(arrayInner); + currentNode = arrayInner; + break; + + case 'end-array': + if (currentNode.classList.contains('arrayElement')) { + currentNode = currentNode.parentNode; + } + + const arrayContentNode = currentNode; + currentNode = currentNode.parentNode; + + const closingBracket = templates.closingBracket(); + currentNode.appendChild(closingBracket); + + if (arrayContentNode.innerText.length) { + closingBracket.setAttribute('line-number', lineNumber++); + } else { + arrayContentNode.remove(); + currentNode.parentNode.querySelector('.expander').remove(); + currentNode.parentNode.querySelector('.ellipsis').remove(); + } + break; + + case 'string': + case 'maybe-string': + if (currentNode.tokenType === 'object') { + const keyValueOrValue = templates.keyValueOrValue(); + keyValueOrValue.setAttribute('line-number', lineNumber++); + keyValueOrValue.classList.add('objectProperty'); + + const keySpan = templates.key(); + keySpan.textContent = token.content; + keyValueOrValue.appendChild(keySpan); + + currentNode.appendChild(keyValueOrValue); + currentNode = keyValueOrValue; + } else { + const innerStringEl = createSpan(); + const content = JSON.parse(token.content); + let escapedValue = JSON.stringify(content); + escapedValue = escapedValue.substring(1, escapedValue.length - 1); + + // crude but fast - some false positives, but rare, and UX doesn't suffer terribly from them. + if (content[0] === 'h' && content.substring(0, 4) === 'http') { + const innerStringA = document.createElement('A'); + innerStringA.href = escapedValue; + innerStringA.innerText = escapedValue; + innerStringEl.appendChild(innerStringA); + } else { + innerStringEl.innerText = escapedValue; + } + + const valueElement = templates.string(); + valueElement.appendChild(templates.doubleQuoteText()); + valueElement.appendChild(innerStringEl); + valueElement.appendChild(templates.doubleQuoteText()); + currentNode.appendChild(valueElement); + } + break; + + case 'null': + currentNode.appendChild(templates.null()); + break; + + case 'boolean': + const boolean = templates.boolean(); + boolean.innerText = token.content; + currentNode.appendChild(boolean); + break; + + case 'number': + case 'maybe-decimal-number': + case 'maybe-negative-number': + case 'maybe-exponential-number': + case 'maybe-exponential-number-negative': + const numberElement = templates.number(); + numberElement.innerText = token.content; + currentNode.appendChild(numberElement); + break; + + case 'symbol': + const symbolElement = templates.createSpan(); + symbolElement.innerText = token.content; + currentNode.appendChild(symbolElement); + break; + } + }); - case TOKEN_TYPES.NULL: - keyValueOrValue.appendChild(templates.null()); - break; - } + tokenizer.end(jsonString); - return keyValueOrValue; + return new Promise((resolve) => { + tokenizer.on('end', () => resolve(currentNode)); + }); } diff --git a/src/js/lib/template.js b/src/js/lib/template.js index 938563e..c0b6257 100644 --- a/src/js/lib/template.js +++ b/src/js/lib/template.js @@ -26,10 +26,8 @@ export const Templates = { key: createSpanWithClass('key'), string: createSpanWithClass('string'), number: createSpanWithClass('number'), - + boolean: createSpanWithClass('bool'), null: createSpanWithTextAndClass('null', 'null'), - true: createSpanWithTextAndClass('true', 'bool'), - false: createSpanWithTextAndClass('false', 'bool'), openingBrace: createSpanWithTextAndClass('{', 'brace'), closingBrace: createSpanWithTextAndClass('}', 'brace'), diff --git a/webpack.config.js b/webpack.config.js index 33fd0e7..1fd2e97 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,7 +7,9 @@ module.exports = { use: { loader: 'babel-loader', options: { - presets: ['env'] + presets: [ + ['env', {modules: false}] + ] } } }, diff --git a/yarn.lock b/yarn.lock index e2b4b56..f4b31ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -417,7 +417,7 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoping@^6.23.0: +babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" dependencies: @@ -427,7 +427,7 @@ babel-plugin-transform-es2015-block-scoping@^6.23.0: babel-types "^6.24.1" lodash "^4.2.0" -babel-plugin-transform-es2015-classes@^6.23.0: +babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" dependencies: @@ -441,33 +441,33 @@ babel-plugin-transform-es2015-classes@^6.23.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-computed-properties@^6.22.0: +babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-destructuring@^6.23.0: +babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: +babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-plugin-transform-es2015-for-of@^6.23.0: +babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-function-name@^6.22.0: +babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" dependencies: @@ -498,7 +498,7 @@ babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-e babel-template "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-modules-systemjs@^6.23.0: +babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" dependencies: @@ -506,7 +506,7 @@ babel-plugin-transform-es2015-modules-systemjs@^6.23.0: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-modules-umd@^6.23.0: +babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" dependencies: @@ -514,14 +514,14 @@ babel-plugin-transform-es2015-modules-umd@^6.23.0: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-object-super@^6.22.0: +babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" dependencies: babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@^6.23.0: +babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" dependencies: @@ -532,7 +532,7 @@ babel-plugin-transform-es2015-parameters@^6.23.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: +babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" dependencies: @@ -545,7 +545,7 @@ babel-plugin-transform-es2015-spread@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-sticky-regex@^6.22.0: +babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" dependencies: @@ -559,13 +559,13 @@ babel-plugin-transform-es2015-template-literals@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-typeof-symbol@^6.23.0: +babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-unicode-regex@^6.22.0: +babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" dependencies: @@ -581,7 +581,7 @@ babel-plugin-transform-exponentiation-operator@^6.22.0: babel-plugin-syntax-exponentiation-operator "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-regenerator@^6.22.0: +babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" dependencies: @@ -628,6 +628,35 @@ babel-preset-env@^1.4.0: browserslist "^1.4.0" invariant "^2.2.2" +babel-preset-es2015@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.24.1" + babel-plugin-transform-es2015-classes "^6.24.1" + babel-plugin-transform-es2015-computed-properties "^6.24.1" + babel-plugin-transform-es2015-destructuring "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.24.1" + babel-plugin-transform-es2015-for-of "^6.22.0" + babel-plugin-transform-es2015-function-name "^6.24.1" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-plugin-transform-es2015-modules-systemjs "^6.24.1" + babel-plugin-transform-es2015-modules-umd "^6.24.1" + babel-plugin-transform-es2015-object-super "^6.24.1" + babel-plugin-transform-es2015-parameters "^6.24.1" + babel-plugin-transform-es2015-shorthand-properties "^6.24.1" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.24.1" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.24.1" + babel-plugin-transform-regenerator "^6.24.1" + babel-register@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" @@ -1318,6 +1347,10 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +disect@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/disect/-/disect-1.1.1.tgz#b2b520fab720abed83ec1a41f61979f4f318aca7" + domain-browser@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" @@ -2241,6 +2274,12 @@ json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" +json-tokenizer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-tokenizer/-/json-tokenizer-1.0.1.tgz#c4515496cd253e92a4ae71adbf05b75dc0ecc6c9" + dependencies: + tokenizer "~1.1.2" + json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -3982,6 +4021,12 @@ to-string-loader@^1.1.5: dependencies: loader-utils "^0.2.16" +tokenizer@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/tokenizer/-/tokenizer-1.1.2.tgz#0058bdc229affaed05b29333675ccf53eae34f5d" + dependencies: + disect "~1.1.0" + tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a"