From f709fa153e01c63725168233ffc2d927bf2db1b0 Mon Sep 17 00:00:00 2001 From: mnater Date: Fri, 11 Jan 2019 10:28:08 +0100 Subject: [PATCH 01/19] fix indent --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb46006e..fc7d4577 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ # Version History ## Version 2.6.1 (Jan 09, 2018) -* dontHyphenateClass is configurable (issue #48) -* fixed issue with StringDecoder in older node versions (issue #45) -* small refactorings for smaller codesize -* fixed a StateError in IE 11 +* dontHyphenateClass is configurable (issue #48) +* fixed issue with StringDecoder in older node versions (issue #45) +* small refactorings for smaller codesize +* fixed a StateError in IE 11 ## Version 2.6.0 (Dec 01, 2018) * improve hiding of elements while hyphenating (issue #40) From dc1d8ee304d079ac9011d3feb1a572a3f410aa9f Mon Sep 17 00:00:00 2001 From: Mathias Nater Date: Sun, 13 Jan 2019 23:55:24 +0100 Subject: [PATCH 02/19] Fix issues mentioned by codacy (#51) Some issues are actually fixed. Some issues are not really fixed but handled with a eslint-disable comment. These "issues" are likely false positives. --- Hyphenopoly.js | 191 +++++++++++++++++++++++++---------------- Hyphenopoly_Loader.js | 143 +++++++++++++++++------------- example.js | 8 +- hyphenopoly.module.js | 183 +++++++++++++++++++-------------------- package.json | 12 ++- test/basic.js | 13 ++- test/configurations.js | 17 ++-- test/events.js | 3 +- 8 files changed, 325 insertions(+), 245 deletions(-) diff --git a/Hyphenopoly.js b/Hyphenopoly.js index 2a8cbf94..0f9e0464 100644 --- a/Hyphenopoly.js +++ b/Hyphenopoly.js @@ -7,7 +7,7 @@ * http://mnater.github.io/Hyphenopoly/LICENSE */ -/* globals asmHyphenEngine */ +/* globals asmHyphenEngine, Hyphenopoly */ (function mainWrapper(w) { "use strict"; @@ -73,7 +73,9 @@ const r = empty(); const list = "abbr,acronym,audio,br,button,code,img,input,kbd,label,math,option,pre,samp,script,style,sub,sup,svg,textarea,var,video"; list.split(",").forEach(function add(value) { + /* eslint-disable security/detect-object-injection */ r[value] = true; + /* eslint-enable security/detect-object-injection */ }); return r; }()), 2), @@ -107,11 +109,13 @@ ); selectors.forEach(function copySelectors(sel) { const tmp = empty(); + /* eslint-disable security/detect-object-injection */ Object.keys(H.setup.selectors[sel]).forEach( function copySelectorSettings(k) { tmp[k] = setProp(H.setup.selectors[sel][k], 2); } ); + /* eslint-enable security/detect-object-injection */ Object.defineProperty( settings, sel, @@ -122,7 +126,9 @@ const tmp = empty(); Object.keys(H.setup.dontHyphenate).forEach( function copyTagNames(k) { + /* eslint-disable security/detect-object-injection */ tmp[k] = setProp(H.setup.dontHyphenate[k], 2); + /* eslint-enable security/detect-object-injection */ } ); Object.defineProperty( @@ -133,11 +139,13 @@ ) ); } else { + /* eslint-disable security/detect-object-injection */ Object.defineProperty( settings, key, setProp(H.setup[key], 3) ); + /* eslint-enable security/detect-object-injection */ } }); H.c = settings; @@ -153,7 +161,7 @@ * @returns {Object} elements-object */ function makeElementCollection() { - const list = empty(); + const list = new Map(); /* * Counter counts the elements to be hyphenated. @@ -173,10 +181,10 @@ "element": el, "selector": sel }; - if (!list[lang]) { - list[lang] = []; + if (!list.has(lang)) { + list.set(lang, []); } - list[lang].push(elo); + list.get(lang).push(elo); counter[0] += 1; return elo; } @@ -187,8 +195,8 @@ * @returns {undefined} */ function each(fn) { - Object.keys(list).forEach(function forEachElem(k) { - fn(k, list[k]); + list.forEach(function eachElement(val, key) { + fn(key, val); }); } @@ -209,7 +217,9 @@ el.addEventListener("copy", function oncopy(e) { e.preventDefault(); const selectedText = window.getSelection().toString(); + /* eslint-disable security/detect-non-literal-regexp */ e.clipboardData.setData("text/plain", selectedText.replace(new RegExp(SOFTHYPHEN, "g"), "")); + /* eslint-enable security/detect-non-literal-regexp */ }, true); } @@ -270,14 +280,31 @@ let s = "." + H.c.dontHyphenateClass; let k = null; for (k in C.dontHyphenate) { + /* eslint-disable security/detect-object-injection */ if (C.dontHyphenate[k]) { s += ", " + k; } + /* eslint-enable security/detect-object-injection */ } return s; }()); const matchingSelectors = C.selectors.join(", ") + ", " + dontHyphenateSelector; + /** + * Get Language of Element or of one of its ancestors. + * @param {Object} el The element to scan + * @param {string} pLang The language of the parent element + * @returns {string} the language + */ + function getElementLanguage(el, pLang) { + if (el.lang && typeof el.lang === "string") { + return el.lang.toLowerCase(); + } else if (pLang && pLang !== "") { + return pLang.toLowerCase(); + } + return getLang(el, true); + } + /** * Recursively walk all elements in el, lending lang and selName * add them to elements if necessary. @@ -288,15 +315,9 @@ * @returns {undefined} */ function processElements(el, pLang, sel, isChild) { - let eLang = null; isChild = isChild || false; - if (el.lang && typeof el.lang === "string") { - eLang = el.lang.toLowerCase(); - } else if (pLang && pLang !== "") { - eLang = pLang.toLowerCase(); - } else { - eLang = getLang(el, true); - } + const eLang = getElementLanguage(el, pLang); + /* eslint-disable security/detect-object-injection */ if (H.clientFeat.langs[eLang] === "H9Y") { elements.add(el, eLang, sel); if (!isChild && C.safeCopy) { @@ -305,7 +326,7 @@ } else if (!H.clientFeat.langs[eLang]) { H.events.dispatch("error", {"msg": "Element with '" + eLang + "' found, but '" + eLang + ".hpb' not loaded. Check language tags!"}); } - + /* eslint-enable security/detect-object-injection */ const cn = el.childNodes; Array.prototype.forEach.call(cn, function eachChildNode(n) { if (n.nodeType === 1 && @@ -323,7 +344,7 @@ H.elementsReady = true; } - const wordHyphenatorPool = empty(); + const wordHyphenatorPool = new Map(); /** * Factory for hyphenatorFunctions for a specific language and class @@ -333,10 +354,10 @@ * @returns {function} The hyphenate function */ function createWordHyphenator(lo, lang, sel) { + /* eslint-disable-next-line security/detect-object-injection */ const classSettings = C[sel]; const hyphen = classSettings.hyphen; - - lo.cache[sel] = empty(); + lo.cache.set(sel, new Map()); /** * HyphenateFunction for compound words @@ -346,19 +367,17 @@ function hyphenateCompound(word) { const zeroWidthSpace = String.fromCharCode(8203); let parts = null; - let i = 0; let wordHyphenator = null; let hw = word; if (classSettings.compound === "auto" || classSettings.compound === "all") { - parts = word.split("-"); wordHyphenator = createWordHyphenator(lo, lang, sel); - while (i < parts.length) { - if (parts[i].length >= classSettings.minWordLength) { - parts[i] = wordHyphenator(parts[i]); + parts = word.split("-").map(function h7eParts(p) { + if (p.length >= classSettings.minWordLength) { + return wordHyphenator(p); } - i += 1; - } + return p; + }); if (classSettings.compound === "auto") { hw = parts.join("-"); } else { @@ -376,32 +395,39 @@ * @returns {string} The hyphenated word */ function hyphenator(word) { - let hw = lo.cache[sel][word]; + let hw = lo.cache.get(sel).get(word); if (!hw) { - if (lo.exceptions[word]) { - hw = lo.exceptions[word].replace( + if (lo.exceptions.has(word)) { + hw = lo.exceptions.get(word).replace( /-/g, classSettings.hyphen ); } else if (word.indexOf("-") === -1) { - hw = lo.hyphenateFunction( - word, - hyphen, - classSettings.leftminPerLang[lang], - classSettings.rightminPerLang[lang] - ); + if (word.length > 61) { + H.events.dispatch("error", {"msg": "found word longer than 61 characters"}); + hw = word; + } else { + /* eslint-disable security/detect-object-injection */ + hw = lo.hyphenateFunction( + word, + hyphen, + classSettings.leftminPerLang[lang], + classSettings.rightminPerLang[lang] + ); + /* eslint-enable security/detect-object-injection */ + } } else { hw = hyphenateCompound(word); } - lo.cache[sel][word] = hw; + lo.cache.get(sel).set(word, hw); } return hw; } - wordHyphenatorPool[lang + "-" + sel] = hyphenator; + wordHyphenatorPool.set(lang + "-" + sel, hyphenator); return hyphenator; } - const orphanControllerPool = empty(); + const orphanControllerPool = new Map(); /** * Factory for function that handles orphans @@ -423,7 +449,9 @@ lastWord, trailingWhiteSpace ) { + /* eslint-disable security/detect-object-injection */ const classSettings = C[sel]; + /* eslint-enable security/detect-object-injection */ let h = classSettings.hyphen; if (".\\+*?[^]$(){}=!<>|:-".indexOf(classSettings.hyphen) !== -1) { h = "\\" + classSettings.hyphen; @@ -431,9 +459,11 @@ if (classSettings.orphanControl === 3 && leadingWhiteSpace === " ") { leadingWhiteSpace = String.fromCharCode(160); } + /* eslint-disable security/detect-non-literal-regexp */ return leadingWhiteSpace + lastWord.replace(new RegExp(h, "g"), "") + trailingWhiteSpace; + /* eslint-enable security/detect-non-literal-regexp */ } - orphanControllerPool[sel] = controlOrphans; + orphanControllerPool.set(sel, controlOrphans); return controlOrphans; } @@ -445,19 +475,21 @@ * @returns {string | null} hyphenated str according to setting of sel */ function hyphenate(lang, sel, entity) { - const lo = H.languages[lang]; + const lo = H.languages.get(lang); + /* eslint-disable security/detect-object-injection */ const classSettings = C[sel]; + /* eslint-enable security/detect-object-injection */ const minWordLength = classSettings.minWordLength; const normalize = C.normalize && Boolean(String.prototype.normalize); const poolKey = lang + "-" + sel; - const wordHyphenator = (wordHyphenatorPool[poolKey]) - ? wordHyphenatorPool[poolKey] + const wordHyphenator = (wordHyphenatorPool.has(poolKey)) + ? wordHyphenatorPool.get(poolKey) : createWordHyphenator(lo, lang, sel); - const orphanController = (orphanControllerPool[sel]) - ? orphanControllerPool[sel] + const orphanController = (orphanControllerPool.has(sel)) + ? orphanControllerPool.get(sel) : createOrphanController(sel); - const re = lo.genRegExps[sel]; + const re = lo.genRegExps.get(sel); /** * Hyphenate text according to setting in sel @@ -546,14 +578,29 @@ * @returns {Object} Map of exceptions */ function convertExceptions(exc) { - const r = empty(); + const r = new Map(); exc.split(", ").forEach(function eachExc(e) { const key = e.replace(/-/g, ""); - r[key] = e; + r.set(key, e); }); return r; } + /** + * Create lang Object + * @param {string} lang The language + * @returns {Object} The newly + */ + function createLangObj(lang) { + if (!H.languages) { + H.languages = new Map(); + } + if (!H.languages.has(lang)) { + H.languages.set(lang, empty()); + } + return H.languages.get(lang); + } + /** * Setup lo * @param {string} lang The language @@ -571,15 +618,10 @@ rightmin ) { alphabet = alphabet.replace(/-/g, ""); - if (!H.languages) { - H.languages = empty(); - } - if (!H.languages[lang]) { - H.languages[lang] = empty(); - } - const lo = H.languages[lang]; + const lo = createLangObj(lang); if (!lo.engineReady) { - lo.cache = empty(); + lo.cache = new Map(); + /* eslint-disable security/detect-object-injection */ if (H.c.exceptions.global) { if (H.c.exceptions[lang]) { H.c.exceptions[lang] += ", " + H.c.exceptions.global; @@ -591,14 +633,17 @@ lo.exceptions = convertExceptions(H.c.exceptions[lang]); delete H.c.exceptions[lang]; } else { - lo.exceptions = empty(); + lo.exceptions = new Map(); } - lo.genRegExps = empty(); + /* eslint-enable security/detect-object-injection */ + lo.genRegExps = new Map(); lo.leftmin = leftmin; lo.rightmin = rightmin; lo.hyphenateFunction = hyphenateFunction; C.selectors.forEach(function eachSelector(sel) { + /* eslint-disable security/detect-object-injection */ const classSettings = C[sel]; + /* eslint-enable security/detect-object-injection */ if (classSettings.leftminPerLang === 0) { Object.defineProperty( classSettings, @@ -613,6 +658,7 @@ setProp(empty(), 2) ); } + /* eslint-disable security/detect-object-injection */ if (classSettings.leftminPerLang[lang]) { classSettings.leftminPerLang[lang] = Math.max( lo.leftmin, @@ -637,6 +683,7 @@ classSettings.rightmin ); } + /* eslint-enable security/detect-object-injection */ /* * Find words with characters from `alphabet` and @@ -646,7 +693,9 @@ * that follow a character that is not in the `alphabet`. * Word delimiters are not taken in account. */ - lo.genRegExps[sel] = new RegExp("[\\w" + alphabet + String.fromCharCode(8204) + "-]{" + classSettings.minWordLength + ",}", "gi"); + /* eslint-disable security/detect-non-literal-regexp */ + lo.genRegExps.set(sel, new RegExp("[\\w" + alphabet + String.fromCharCode(8204) + "-]{" + classSettings.minWordLength + ",}", "gi")); + /* eslint-enable security/detect-non-literal-regexp */ }); lo.engineReady = true; } @@ -807,10 +856,6 @@ return function enclHyphenate(word, hyphenchar, leftmin, rightmin) { let i = 0; const wordLength = word.length; - if (wordLength > 61) { - H.events.dispatch("error", {"msg": "found word longer than 61 characters"}); - return word; - } leftmin = leftmin || defLeftmin; rightmin = rightmin || defRightmin; wordStore[0] = wordLength + 2; @@ -837,15 +882,16 @@ * @returns {undefined} */ function instantiateWasmEngine(lang) { - Promise.all([H.binaries[lang], H.binaries.hyphenEngine]).then( + Promise.all([H.binaries.get(lang), H.binaries.get("hyphenEngine")]).then( function onAll(binaries) { const hpbBuf = binaries[0]; const baseData = calculateBaseData(hpbBuf); const wasmModule = binaries[1]; + const specMem = H.specMems.get(lang); const wasmMemory = ( - H.specMems[lang].buffer.byteLength >= baseData.heapSize + specMem.buffer.byteLength >= baseData.heapSize ) - ? H.specMems[lang] + ? specMem : new WebAssembly.Memory({ "initial": baseData.heapSize / 65536, "maximum": 256 @@ -891,12 +937,11 @@ * @returns {undefined} */ function instantiateAsmEngine(lang) { - const hpbBuf = H.binaries[lang]; + const hpbBuf = H.binaries.get(lang); const baseData = calculateBaseData(hpbBuf); - const heapBuffer = ( - H.specMems[lang].byteLength >= baseData.heapSize - ) - ? H.specMems[lang] + const specMem = H.specMems.get(lang); + const heapBuffer = (specMem.byteLength >= baseData.heapSize) + ? specMem : new ArrayBuffer(baseData.heapSize); const ui8Heap = new Uint8Array(heapBuffer); const ui8Patterns = new Uint8Array(hpbBuf); @@ -966,8 +1011,8 @@ function onElementsReady() { elements.each(function eachElem(lang, values) { if (H.languages && - H.languages[lang] && - H.languages[lang].engineReady + H.languages.has(lang) && + H.languages.get(lang).engineReady ) { hyphenateLangElements(lang, values); } @@ -996,7 +1041,7 @@ "engineReady", function onEngineReady(e) { if (H.elementsReady) { - hyphenateLangElements(e.msg, elements.list[e.msg]); + hyphenateLangElements(e.msg, elements.list.get(e.msg)); } }, false diff --git a/Hyphenopoly_Loader.js b/Hyphenopoly_Loader.js index 68e0b024..7dd7eaff 100644 --- a/Hyphenopoly_Loader.js +++ b/Hyphenopoly_Loader.js @@ -7,6 +7,8 @@ * http://mnater.github.io/Hyphenopoly/LICENSE */ +/* global Hyphenopoly */ + (function H9YL() { "use strict"; const d = document; @@ -31,7 +33,7 @@ Object.keys(obj).forEach(fn); } - (function config() { + (function configFeat() { // Set H.clientFeat (either from sessionStorage or empty) if (H.cacheFeatureTests && sessionStorage.getItem("Hyphenopoly_Loader")) { H.clientFeat = JSON.parse(sessionStorage.getItem("Hyphenopoly_Loader")); @@ -42,23 +44,31 @@ "wasm": null }; } + }()); + (function configPaths() { // Set defaults for paths and setup H.dfltPaths = Object.create({ "maindir": "../Hyphenopoly/", "patterndir": "../Hyphenopoly/patterns/" }); - if (H.paths && H.paths.patterndir) { - H.dfltPaths.patterndir = H.paths.patterndir; - } - if (H.paths && H.paths.maindir) { - H.dfltPaths.maindir = H.paths.maindir; + if (H.paths) { + if (H.paths.patterndir) { + H.dfltPaths.patterndir = H.paths.patterndir; + } + if (H.paths.maindir) { + H.dfltPaths.maindir = H.paths.maindir; + } } - + }()); + (function configSetup() { if (H.setup) { H.setup.selectors = H.setup.selectors || {".hyphenate": {}}; if (H.setup.classnames) { + // Convert classnames to selectors eachKey(H.setup.classnames, function cn2sel(cn) { + /* eslint-disable security/detect-object-injection */ H.setup.selectors["." + cn] = H.setup.classnames[cn]; + /* eslint-enable security/detect-object-injection */ }); H.setup.classnames = null; delete H.setup.classnames; @@ -72,14 +82,23 @@ "timeout": 1000 }; } - H.lcRequire = empty(); + }()); + (function configRequire() { + H.lcRequire = new Map(); eachKey(H.require, function copyRequire(k) { - H.lcRequire[k.toLowerCase()] = H.require[k]; + /* eslint-disable security/detect-object-injection */ + H.lcRequire.set(k.toLowerCase(), H.require[k]); + /* eslint-enable security/detect-object-injection */ }); if (H.fallbacks) { - H.lcFallbacks = empty(); + H.lcFallbacks = new Map(); eachKey(H.fallbacks, function copyFallbacks(k) { - H.lcFallbacks[k.toLowerCase()] = H.fallbacks[k].toLowerCase(); + /* eslint-disable security/detect-object-injection */ + H.lcFallbacks.set( + k.toLowerCase(), + H.fallbacks[k].toLowerCase() + ); + /* eslint-enable security/detect-object-injection */ }); } }()); @@ -117,7 +136,7 @@ (function setupEvents() { // Events known to the system - const definedEvents = empty(); + const definedEvents = new Map(); // Default events, execution deferred to Hyphenopoly.js const deferred = []; @@ -135,11 +154,11 @@ * @returns {undefined} */ function define(name, defFunc, cancellable) { - definedEvents[name] = { + definedEvents.set(name, { "cancellable": cancellable, "default": defFunc, "register": [] - }; + }); } define( @@ -204,19 +223,21 @@ function dispatch(name, data) { data = data || empty(); let defaultPrevented = false; - definedEvents[name].register.forEach(function call(currentHandler) { - data.preventDefault = function preventDefault() { - if (definedEvents[name].cancellable) { - defaultPrevented = true; - } - }; - currentHandler(data); - }); + definedEvents.get(name).register.forEach( + function call(currentHandler) { + data.preventDefault = function preventDefault() { + if (definedEvents.get(name).cancellable) { + defaultPrevented = true; + } + }; + currentHandler(data); + } + ); if ( !defaultPrevented && - definedEvents[name].default + definedEvents.get(name).default ) { - definedEvents[name].default(data); + definedEvents.get(name).default(data); } } @@ -228,8 +249,8 @@ * @returns {undefined} */ function addListener(name, handler, defer) { - if (definedEvents[name]) { - definedEvents[name].register.push(handler); + if (definedEvents.has(name)) { + definedEvents.get(name).register.push(handler); } else if (defer) { tempRegister.push({ "handler": handler, @@ -245,7 +266,9 @@ if (H.handleEvent) { eachKey(H.handleEvent, function add(name) { + /* eslint-disable security/detect-object-injection */ addListener(name, H.handleEvent[name], true); + /* eslint-enable security/detect-object-injection */ }); } @@ -315,7 +338,7 @@ } const scriptLoader = (function scriptLoader() { - const loadedScripts = empty(); + const loadedScripts = new Map(); /** * Load script by adding + + + + + +

Test 032

+

Make hyphenation viewport dependent (resize window!)

+
+
+

Silbentrennungsalgorithmus

+

Sil•ben•tren•nungs•al•go•rith•mus

+

Silbentrennungsalgorithmus

+ +

Silbentrennungsalgorithmus Donaudampfschiff

+

Sil•ben•tren•nungs•al•go•rith•mus Do•nau•dampf•schiff

+

Silbentrennungsalgorithmus Donaudampfschiff

+ +

Silbentrennungsalgorithmus Donaudampfschiff

+

Sil•ben•tren•nungs•al•go•rith•mus Donaudampfschiff

+

Silbentrennungsalgorithmus Donaudampfschiff

+ +

Silbentrennungsalgorithmus hyphenation

+

Sil•ben•tren•nungs•al•go•rith•mus hy•phen•ation

+

Silbentrennungsalgorithmus hyphenation

+
+
Test Ref
+ + + \ No newline at end of file diff --git a/testsuite/testdriver.js b/testsuite/testdriver.js index f6a8d8f1..5f1ccb71 100644 --- a/testsuite/testdriver.js +++ b/testsuite/testdriver.js @@ -36,7 +36,8 @@ {exec: true, path: "test28.html"}, {exec: true, path: "test29.html"}, {exec: true, path: "test30.html"}, - {exec: true, path: "test31.html"} + {exec: true, path: "test31.html"}, + {exec: true, path: "test32.html"} ]; var testframe = document.getElementById("testframe"); var currentTest = 1; From 1fddc205ba84c74d164bb333ee06e31e0dd93a46 Mon Sep 17 00:00:00 2001 From: mnater Date: Tue, 29 Jan 2019 20:42:57 +0100 Subject: [PATCH 15/19] add sync example and test --- exampleSync.js | 26 ++++++++++++++++++++++++++ test/basic.js | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 exampleSync.js diff --git a/exampleSync.js b/exampleSync.js new file mode 100644 index 00000000..11901121 --- /dev/null +++ b/exampleSync.js @@ -0,0 +1,26 @@ +// For RunKit: +//const hyphenopoly = require("hyphenopoly"); + +// For local node: +console.time("req"); + const hyphenopoly = require("./hyphenopoly.module.js"); +console.timeEnd("req"); +console.time("conf"); +const hyphenator = hyphenopoly.config({ + "sync": true, + "require": ["de", "en-us"], + "hyphen": "•", + "exceptions": { + "en-us": "en-han-ces" + } +}); +console.timeEnd("conf"); + +console.time("hyp"); +const hy1 = hyphenator.get("en-us")("hyphenation enhances justification."); +const hy2 = hyphenator.get("de")("Silbentrennung verbessert den Blocksatz."); + + +console.log(hy1); +console.log(hy2); +console.timeEnd("hyp"); \ No newline at end of file diff --git a/test/basic.js b/test/basic.js index 34f38dcf..dcf68f76 100644 --- a/test/basic.js +++ b/test/basic.js @@ -59,13 +59,13 @@ t.test("run config with two languages", async function (t) { t.end(); }); t.test("hyphenate one word of the second language", async function (t) { - const deHyphenator = await hyphenators.get("de"); - t.equal(deHyphenator("Silbentrennung"), "Sil\u00ADben\u00ADtren\u00ADnung", deHyphenator("Silbentrennung")); + const enHyphenator = await hyphenators.get("en-us"); + t.equal(enHyphenator("hyphenation"), "hy\u00ADphen\u00ADation", enHyphenator("hyphenation")); t.end(); }); t.test("hyphenate two words of the second language", async function (t) { - const deHyphenator = await hyphenators.get("de"); - t.equal(deHyphenator("Silbentrennung Algorithmus"), "Sil\u00ADben\u00ADtren\u00ADnung Al\u00ADgo\u00ADrith\u00ADmus", deHyphenator("Silbentrennung Algorithmus")); + const deHyphenator = await hyphenators.get("en-us"); + t.equal(deHyphenator("hyphenation algorithm"), "hy\u00ADphen\u00ADation al\u00ADgo\u00ADrithm", deHyphenator("hyphenation algorithm")); t.end(); }); t.end(); @@ -87,3 +87,45 @@ t.test("run config with two same languages", async function (t) { }); t.end(); }); + +t.test("execute synchronically with one language", function (t) { + const deHyphenator = H9Y.config({ + "require": ["de"], + "sync": true + }); + t.test("return a function", function (t) { + t.equal(typeof deHyphenator, "function", typeof deHyphenator); + t.end(); + }); + t.test("hyphenate one word", function (t) { + t.equal(deHyphenator("Silbentrennung"), "Sil\u00ADben\u00ADtren\u00ADnung", deHyphenator("Silbentrennung")); + t.end(); + }); + t.test("hyphenate two words", function (t) { + t.equal(deHyphenator("Silbentrennung Algorithmus"), "Sil\u00ADben\u00ADtren\u00ADnung Al\u00ADgo\u00ADrith\u00ADmus", deHyphenator("Silbentrennung Algorithmus")); + t.end(); + }); + t.end(); +}); + +t.test("execute synchronically with two languages", function (t) { + const hyphenators = H9Y.config({ + "require": ["de", "en-us"], + "sync": true + }); + t.test("return a Map", function (t) { + t.type(hyphenators, Map); + t.end(); + }); + t.test("get the hyphenator function for a language", function (t) { + const deHyphenator = hyphenators.get("de"); + t.type(deHyphenator, Function); + t.end(); + }); + t.test("hyphenate one word of the first language", function (t) { + const deHyphenator = hyphenators.get("de"); + t.equal(deHyphenator("Silbentrennung"), "Sil\u00ADben\u00ADtren\u00ADnung", deHyphenator("Silbentrennung")); + t.end(); + }); + t.end(); +}); From 3eb2e8c4df436cd2b747b7125bf48f2e0e0dec5b Mon Sep 17 00:00:00 2001 From: mnater Date: Tue, 29 Jan 2019 21:18:36 +0100 Subject: [PATCH 16/19] implemnent sync mode (fixes #47) --- exampleSync.js | 12 +--- hyphenopoly.module.js | 157 +++++++++++++++++++++++++++--------------- 2 files changed, 105 insertions(+), 64 deletions(-) diff --git a/exampleSync.js b/exampleSync.js index 11901121..9f7e6847 100644 --- a/exampleSync.js +++ b/exampleSync.js @@ -1,11 +1,8 @@ // For RunKit: -//const hyphenopoly = require("hyphenopoly"); +const hyphenopoly = require("hyphenopoly"); // For local node: -console.time("req"); - const hyphenopoly = require("./hyphenopoly.module.js"); -console.timeEnd("req"); -console.time("conf"); +// const hyphenopoly = require("./hyphenopoly.module.js"); const hyphenator = hyphenopoly.config({ "sync": true, "require": ["de", "en-us"], @@ -14,13 +11,10 @@ const hyphenator = hyphenopoly.config({ "en-us": "en-han-ces" } }); -console.timeEnd("conf"); -console.time("hyp"); const hy1 = hyphenator.get("en-us")("hyphenation enhances justification."); const hy2 = hyphenator.get("de")("Silbentrennung verbessert den Blocksatz."); console.log(hy1); -console.log(hy2); -console.timeEnd("hyp"); \ No newline at end of file +console.log(hy2); \ No newline at end of file diff --git a/hyphenopoly.module.js b/hyphenopoly.module.js index b815ff94..97f3e795 100644 --- a/hyphenopoly.module.js +++ b/hyphenopoly.module.js @@ -100,20 +100,28 @@ function readFile(file, cb) { * @returns {undefined} */ function loadWasm() { - readFile( - `${H.c.paths.maindir}hyphenEngine.wasm`, - function cb(err, data) { - if (err) { - H.events.dispatch("error", { - "key": "hyphenEngine", - "msg": `${H.c.paths.maindir}hyphenEngine.wasm not found.` - }); - } else { - H.binaries.set("hyphenEngine", new Uint8Array(data).buffer); - H.events.dispatch("engineLoaded"); + if (H.c.sync) { + /* eslint-disable security/detect-non-literal-fs-filename, no-sync */ + const data = fs.readFileSync(`${H.c.paths.maindir}hyphenEngine.wasm`); + /* eslint-enable security/detect-non-literal-fs-filename, no-sync */ + H.binaries.set("hyphenEngine", new Uint8Array(data).buffer); + H.events.dispatch("engineLoaded"); + } else { + readFile( + `${H.c.paths.maindir}hyphenEngine.wasm`, + function cb(err, data) { + if (err) { + H.events.dispatch("error", { + "key": "hyphenEngine", + "msg": `${H.c.paths.maindir}hyphenEngine.wasm not found.` + }); + } else { + H.binaries.set("hyphenEngine", new Uint8Array(data).buffer); + H.events.dispatch("engineLoaded"); + } } - } - ); + ); + } } /** @@ -122,20 +130,28 @@ function loadWasm() { * @returns {undefined} */ function loadHpb(lang) { - readFile( - `${H.c.paths.patterndir}${lang}.hpb`, - function cb(err, data) { - if (err) { - H.events.dispatch("error", { - "key": lang, - "msg": `${H.c.paths.patterndir}${lang}.hpb not found.` - }); - } else { - H.binaries.set(lang, new Uint8Array(data).buffer); - H.events.dispatch("hpbLoaded", {"msg": lang}); + if (H.c.sync) { + /* eslint-disable security/detect-non-literal-fs-filename, no-sync */ + const data = fs.readFileSync(`${H.c.paths.patterndir}${lang}.hpb`); + /* eslint-enable security/detect-non-literal-fs-filename, no-sync */ + H.binaries.set(lang, new Uint8Array(data).buffer); + H.events.dispatch("hpbLoaded", {"msg": lang}); + } else { + readFile( + `${H.c.paths.patterndir}${lang}.hpb`, + function cb(err, data) { + if (err) { + H.events.dispatch("error", { + "key": lang, + "msg": `${H.c.paths.patterndir}${lang}.hpb not found.` + }); + } else { + H.binaries.set(lang, new Uint8Array(data).buffer); + H.events.dispatch("hpbLoaded", {"msg": lang}); + } } - } - ); + ); + } } /** @@ -390,7 +406,7 @@ function instantiateWasmEngine(lang) { baseData.hpbOffset >> 2 ); baseData.wasmMemory = wasmMemory; - WebAssembly.instantiate(H.binaries.get("hyphenEngine"), { + const importObj = { "env": { "memory": baseData.wasmMemory, "memoryBase": 0 @@ -406,24 +422,46 @@ function instantiateWasmEngine(lang) { "valueStoreOffset": baseData.valueStoreOffset, "wordOffset": baseData.wordOffset } - }).then( - function runWasm(result) { - result.instance.exports.convert(); - prepareLanguagesObj( - lang, - encloseHyphenateFunction( - baseData, - result.instance.exports.hyphenate - ), - decode( - (new Uint8Array(wasmMemory.buffer)). - subarray(768, 1280) - ), - baseData.leftmin, - baseData.rightmin - ); - } - ); + }; + if (H.c.sync) { + const heInstance = new WebAssembly.Instance( + new WebAssembly.Module(H.binaries.get("hyphenEngine")), + importObj + ); + heInstance.exports.convert(); + prepareLanguagesObj( + lang, + encloseHyphenateFunction( + baseData, + heInstance.exports.hyphenate + ), + decode( + (new Uint8Array(wasmMemory.buffer)). + subarray(768, 1280) + ), + baseData.leftmin, + baseData.rightmin + ); + } else { + WebAssembly.instantiate(H.binaries.get("hyphenEngine"), importObj).then( + function runWasm(result) { + result.instance.exports.convert(); + prepareLanguagesObj( + lang, + encloseHyphenateFunction( + baseData, + result.instance.exports.hyphenate + ), + decode( + (new Uint8Array(wasmMemory.buffer)). + subarray(768, 1280) + ), + baseData.leftmin, + baseData.rightmin + ); + } + ); + } } @@ -694,7 +732,8 @@ H.config = function config(userConfig) { "patterndir": setProp(`${__dirname}/patterns/`, 2) }), 2), "require": setProp([], 2), - "rightmin": setProp(0, 2) + "rightmin": setProp(0, 2), + "sync": setProp(false, 2) }); const settings = Object.create(defaults); Object.keys(userConfig).forEach(function each(key) { @@ -723,20 +762,28 @@ H.config = function config(userConfig) { } H.c.require.forEach(function each(lang) { loadHpb(lang); - const prom = new Promise(function pro(resolve, reject) { + if (H.c.sync) { H.events.addListener("engineReady", function handler(e) { if (e.msg === lang) { - resolve(createTextHyphenator(lang)); + result.set(lang, createTextHyphenator(lang)); } }); - H.events.addListener("error", function handler(e) { - e.preventDefault(); - if (e.key === lang || e.key === "hyphenEngine") { - reject(e.msg); - } + } else { + const prom = new Promise(function pro(resolve, reject) { + H.events.addListener("engineReady", function handler(e) { + if (e.msg === lang) { + resolve(createTextHyphenator(lang)); + } + }); + H.events.addListener("error", function handler(e) { + e.preventDefault(); + if (e.key === lang || e.key === "hyphenEngine") { + reject(e.msg); + } + }); }); - }); - result.set(lang, prom); + result.set(lang, prom); + } }); loadWasm(); return (result.size === 1) From 4fee971563b38741997e4d137aa8a4cf0c140133 Mon Sep 17 00:00:00 2001 From: mnater Date: Wed, 30 Jan 2019 16:40:01 +0100 Subject: [PATCH 17/19] update devDeps --- package-lock.json | 2094 +++++++++------------------------------------ package.json | 2 +- 2 files changed, 389 insertions(+), 1707 deletions(-) diff --git a/package-lock.json b/package-lock.json index 619274b0..c677748a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,48 @@ "@babel/highlight": "^7.0.0" } }, + "@babel/generator": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.0.tgz", + "integrity": "sha512-dZTwMvTgWfhmibq4V9X+LMf6Bgl7zAodRn9PvcPdhlzFMbvUutx74dbEv7Atz3ToeEpevYEJtAwfxq/bDCzHWg==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", + "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, "@babel/highlight": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", @@ -24,6 +66,51 @@ "js-tokens": "^4.0.0" } }, + "@babel/parser": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.1.tgz", + "integrity": "sha512-ATz6yX/L8LEnC3dtLQnIx4ydcPxhLcoy9Vl6re00zb2w5lG6itY6Vhnr1KFRPq/FHNsgl/gh2mjNN20f9iJTTA==", + "dev": true + }, + "@babel/template": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", + "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.2.2", + "@babel/types": "^7.2.2" + } + }, + "@babel/traverse": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", + "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.2.2", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/parser": "^7.2.3", + "@babel/types": "^7.2.2", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.10" + } + }, + "@babel/types": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.0.tgz", + "integrity": "sha512-QkFPw68QqWU1/RVPyBe8SO7lXbPfjtqAxRYQKpFpaB8yMq7X2qAqfwK5LKoQufEkSmO5NQ70O6Kc3Afk03RwXw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, "@types/node": { "version": "10.12.18", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", @@ -137,6 +224,12 @@ "readable-stream": "^2.0.6" } }, + "arg": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", + "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -315,12 +408,6 @@ "integrity": "sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw==", "dev": true }, - "bluebird": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", - "dev": true - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -899,6 +986,12 @@ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, + "esm": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.0.tgz", + "integrity": "sha512-yK4IiHmmInOk9q4xbJXdUfPV0ju7GbRCbhtpe5/gH7nRiD6RAb12Ix7zfsqQkDL5WERwzFlq/eT6zTXDWwIk+w==", + "dev": true + }, "espree": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.0.tgz", @@ -1878,6 +1971,27 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, + "istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.0.tgz", + "integrity": "sha512-eQY9vN9elYjdgN9Iv6NS/00bptm02EBBk70lRMaVjeA6QYocQgenVrSgC28TJurdnZa80AGO3ASdFN+w/njGiQ==", + "dev": true, + "requires": { + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.1", + "semver": "^5.5.0" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1900,6 +2014,12 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -2033,6 +2153,12 @@ } } }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -2370,38 +2496,36 @@ "optional": true }, "nyc": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.9.0.tgz", - "integrity": "sha512-w8OdJAhXL5izerzZMdqzYKMj/pgHJyY3qEPYBjLLxrhcVoHEY9pU5ENIiZyCgG9OR7x3VcUMoD40o6PtVpfR4g==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.1.0.tgz", + "integrity": "sha512-3GyY6TpQ58z9Frpv4GMExE1SV2tAgYqC7HSy2omEhNiCT3mhT9NyiOvIE8zkbuJVFzmvvNTnE4h/7/wQae7xLg==", "dev": true, "requires": { "archy": "^1.0.0", "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", + "caching-transform": "^2.0.0", + "convert-source-map": "^1.6.0", "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.1.2", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.10.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.3", - "istanbul-reports": "^1.4.0", - "md5-hex": "^1.2.0", + "find-cache-dir": "^2.0.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.1", + "istanbul-lib-hook": "^2.0.1", + "istanbul-lib-instrument": "^3.0.0", + "istanbul-lib-report": "^2.0.2", + "istanbul-lib-source-maps": "^2.0.1", + "istanbul-reports": "^2.0.1", + "make-dir": "^1.3.0", "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", + "resolve-from": "^4.0.0", "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", + "signal-exit": "^3.0.2", "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", + "test-exclude": "^5.0.0", + "uuid": "^3.3.2", "yargs": "11.1.0", - "yargs-parser": "^8.0.0" + "yargs-parser": "^9.0.2" }, "dependencies": { "align-text": { @@ -2420,21 +2544,16 @@ "dev": true }, "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", + "version": "3.0.0", "bundled": true, "dev": true }, "append-transform": { - "version": "0.4.0", + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "default-require-extensions": "^1.0.0" + "default-require-extensions": "^2.0.0" } }, "archy": { @@ -2442,197 +2561,21 @@ "bundled": true, "dev": true }, - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, "arrify": { "version": "1.0.1", "bundled": true, "dev": true }, - "assign-symbols": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "async": { "version": "1.5.2", "bundled": true, "dev": true }, - "atob": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-generator": { - "version": "6.26.1", - "bundled": true, - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, "balanced-match": { "version": "1.0.0", "bundled": true, "dev": true }, - "base": { - "version": "0.11.2", - "bundled": true, - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, "brace-expansion": { "version": "1.1.11", "bundled": true, @@ -2642,69 +2585,20 @@ "concat-map": "0.0.1" } }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "builtin-modules": { "version": "1.1.1", "bundled": true, "dev": true }, - "cache-base": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } - } - }, "caching-transform": { - "version": "1.0.1", + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" + "make-dir": "^1.0.0", + "md5-hex": "^2.0.0", + "package-hash": "^2.0.0", + "write-file-atomic": "^2.0.0" } }, "camelcase": { @@ -2723,44 +2617,6 @@ "lazy-cache": "^1.0.3" } }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "class-utils": { - "version": "0.3.6", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } - } - }, "cliui": { "version": "2.1.0", "bundled": true, @@ -2785,44 +2641,23 @@ "bundled": true, "dev": true }, - "collection-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "commondir": { "version": "1.0.1", "bundled": true, "dev": true }, - "component-emitter": { - "version": "1.2.1", - "bundled": true, - "dev": true - }, "concat-map": { "version": "0.0.1", "bundled": true, "dev": true }, "convert-source-map": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "core-js": { - "version": "2.5.6", + "version": "1.6.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } }, "cross-spawn": { "version": "4.0.2", @@ -2834,7 +2669,7 @@ } }, "debug": { - "version": "2.6.9", + "version": "3.1.0", "bundled": true, "dev": true, "requires": { @@ -2851,89 +2686,24 @@ "bundled": true, "dev": true }, - "decode-uri-component": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, "default-require-extensions": { - "version": "1.0.0", + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "^3.0.0" } }, - "define-property": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "error-ex": { - "version": "1.3.1", + "error-ex": { + "version": "1.3.2", "bundled": true, "dev": true, "requires": { "is-arrayish": "^0.2.1" } }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", + "es6-error": { + "version": "4.1.1", "bundled": true, "dev": true }, @@ -2963,165 +2733,24 @@ } } }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "find-cache-dir": { - "version": "0.1.1", + "version": "2.0.0", "bundled": true, "dev": true, "requires": { "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" } }, "find-up": { - "version": "2.1.0", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "^3.0.0" } }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, "foreground-child": { "version": "1.5.6", "bundled": true, @@ -3131,21 +2760,13 @@ "signal-exit": "^3.0.0" } }, - "fragment-cache": { - "version": "0.2.1", - "bundled": true, - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, "fs.realpath": { "version": "1.0.0", "bundled": true, "dev": true }, "get-caller-file": { - "version": "1.0.2", + "version": "1.0.3", "bundled": true, "dev": true }, @@ -3154,13 +2775,8 @@ "bundled": true, "dev": true }, - "get-value": { - "version": "2.0.6", - "bundled": true, - "dev": true - }, "glob": { - "version": "7.1.2", + "version": "7.1.3", "bundled": true, "dev": true, "requires": { @@ -3172,11 +2788,6 @@ "path-is-absolute": "^1.0.0" } }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, "graceful-fs": { "version": "4.1.11", "bundled": true, @@ -3203,75 +2814,13 @@ } } }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, "has-flag": { - "version": "1.0.0", + "version": "3.0.0", "bundled": true, "dev": true }, - "has-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } - } - }, - "has-values": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "hosted-git-info": { - "version": "2.6.0", + "version": "2.7.1", "bundled": true, "dev": true }, @@ -3294,27 +2843,11 @@ "bundled": true, "dev": true }, - "invariant": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, "invert-kv": { "version": "1.0.0", "bundled": true, "dev": true }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, "is-arrayish": { "version": "0.2.1", "bundled": true, @@ -3333,202 +2866,73 @@ "builtin-modules": "^1.0.0" } }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, "is-fullwidth-code-point": { "version": "2.0.0", "bundled": true, "dev": true }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-odd": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "bundled": true, - "dev": true - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } - } - }, "is-stream": { "version": "1.1.0", "bundled": true, "dev": true }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "isexe": { "version": "2.0.0", "bundled": true, "dev": true }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "istanbul-lib-coverage": { - "version": "1.2.0", + "version": "2.0.1", "bundled": true, "dev": true }, "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.1", + "version": "2.0.1", "bundled": true, "dev": true, "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", - "semver": "^5.3.0" + "append-transform": "^1.0.0" } }, "istanbul-lib-report": { - "version": "1.1.3", + "version": "2.0.2", "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } + "istanbul-lib-coverage": "^2.0.1", + "make-dir": "^1.3.0", + "supports-color": "^5.4.0" } }, "istanbul-lib-source-maps": { - "version": "1.2.3", + "version": "2.0.1", "bundled": true, "dev": true, "requires": { "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "istanbul-lib-coverage": "^2.0.1", + "make-dir": "^1.3.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" }, "dependencies": { - "debug": { - "version": "3.1.0", + "source-map": { + "version": "0.6.1", "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } + "dev": true } } }, "istanbul-reports": { - "version": "1.4.0", + "version": "2.0.1", "bundled": true, "dev": true, "requires": { - "handlebars": "^4.0.3" + "handlebars": "^4.0.11" } }, - "js-tokens": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "jsesc": { - "version": "1.3.0", + "json-parse-better-errors": { + "version": "1.0.2", "bundled": true, "dev": true }, @@ -3555,35 +2959,27 @@ } }, "load-json-file": { - "version": "1.1.0", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, "locate-path": { - "version": "2.0.0", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "p-locate": "^2.0.0", + "p-locate": "^3.0.0", "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } } }, - "lodash": { - "version": "4.17.10", + "lodash.flattendeep": { + "version": "4.4.0", "bundled": true, "dev": true }, @@ -3592,14 +2988,6 @@ "bundled": true, "dev": true }, - "loose-envify": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "js-tokens": "^3.0.0" - } - }, "lru-cache": { "version": "4.1.3", "bundled": true, @@ -3609,21 +2997,16 @@ "yallist": "^2.1.2" } }, - "map-cache": { - "version": "0.2.2", - "bundled": true, - "dev": true - }, - "map-visit": { - "version": "1.0.0", + "make-dir": { + "version": "1.3.0", "bundled": true, "dev": true, "requires": { - "object-visit": "^1.0.0" + "pify": "^3.0.0" } }, "md5-hex": { - "version": "1.3.0", + "version": "2.0.0", "bundled": true, "dev": true, "requires": { @@ -3658,33 +3041,6 @@ } } }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, "mimic-fn": { "version": "1.2.0", "bundled": true, @@ -3699,78 +3055,30 @@ } }, "minimist": { - "version": "0.0.8", + "version": "0.0.10", "bundled": true, "dev": true }, - "mixin-deep": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "nanomatch": { - "version": "1.2.9", + "version": "0.5.1", "bundled": true, "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "minimist": "0.0.8" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "6.0.2", + "minimist": { + "version": "0.0.8", "bundled": true, "dev": true } } }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, "normalize-package-data": { "version": "2.4.0", "bundled": true, @@ -3795,61 +3103,6 @@ "bundled": true, "dev": true }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } - } - }, - "object.pick": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } - } - }, "once": { "version": "1.4.0", "bundled": true, @@ -3888,47 +3141,51 @@ "dev": true }, "p-limit": { - "version": "1.2.0", + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.0.0" } }, "p-try": { - "version": "1.0.0", + "version": "2.0.0", "bundled": true, "dev": true }, - "parse-json": { - "version": "2.2.0", + "package-hash": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "error-ex": "^1.2.0" + "graceful-fs": "^4.1.11", + "lodash.flattendeep": "^4.4.0", + "md5-hex": "^2.0.0", + "release-zalgo": "^1.0.0" } }, - "pascalcase": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "path-exists": { - "version": "2.1.0", + "parse-json": { + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "bundled": true, @@ -3939,130 +3196,64 @@ "bundled": true, "dev": true }, - "path-parse": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, "path-type": { - "version": "1.1.0", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "pify": "^3.0.0" } }, "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", + "version": "3.0.0", "bundled": true, "dev": true }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, "pkg-dir": { - "version": "1.0.0", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } + "find-up": "^3.0.0" } }, - "posix-character-classes": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, "pseudomap": { "version": "1.0.2", "bundled": true, "dev": true }, "read-pkg": { - "version": "1.1.0", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "load-json-file": "^1.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "path-type": "^3.0.0" } }, "read-pkg-up": { - "version": "1.0.1", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" } }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true, - "dev": true - }, - "regex-not": { - "version": "1.0.2", + "release-zalgo": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "es6-error": "^4.0.1" } }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, "repeat-string": { "version": "1.6.1", "bundled": true, "dev": true }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, "require-directory": { "version": "2.1.1", "bundled": true, @@ -4074,17 +3265,7 @@ "dev": true }, "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "ret": { - "version": "0.1.15", + "version": "4.0.0", "bundled": true, "dev": true }, @@ -4105,13 +3286,10 @@ "glob": "^7.0.5" } }, - "safe-regex": { - "version": "1.1.0", + "safe-buffer": { + "version": "5.1.2", "bundled": true, - "dev": true, - "requires": { - "ret": "~0.1.10" - } + "dev": true }, "semver": { "version": "5.5.0", @@ -4123,27 +3301,6 @@ "bundled": true, "dev": true }, - "set-value": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "shebang-command": { "version": "1.2.0", "bundled": true, @@ -4162,129 +3319,11 @@ "bundled": true, "dev": true }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, "source-map": { "version": "0.5.7", "bundled": true, - "dev": true - }, - "source-map-resolve": { - "version": "0.5.1", - "bundled": true, "dev": true, - "requires": { - "atob": "^2.0.0", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "bundled": true, - "dev": true + "optional": true }, "spawn-wrap": { "version": "1.4.2", @@ -4318,41 +3357,14 @@ "bundled": true, "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "split-string": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "static-extend": { - "version": "0.1.2", + "spdx-license-ids": { + "version": "3.0.0", "bundled": true, - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } + "dev": true }, "string-width": { "version": "2.1.1", @@ -4361,38 +3373,20 @@ "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } } }, "strip-ansi": { - "version": "3.0.1", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "^3.0.0" } }, "strip-bom": { - "version": "2.0.0", + "version": "3.0.0", "bundled": true, - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } + "dev": true }, "strip-eof": { "version": "1.0.0", @@ -4400,320 +3394,24 @@ "dev": true }, "supports-color": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } - } - }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", + "version": "5.4.0", "bundled": true, "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "has-flag": "^3.0.0" } }, - "to-regex-range": { - "version": "2.1.1", + "test-exclude": { + "version": "5.0.0", "bundled": true, "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - } + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" } }, - "trim-right": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, "uglify-js": { "version": "2.8.29", "bundled": true, @@ -4745,99 +3443,11 @@ "dev": true, "optional": true }, - "union-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", + "uuid": { + "version": "3.3.2", "bundled": true, "dev": true }, - "use": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, "validate-npm-package-license": { "version": "3.0.3", "bundled": true, @@ -4848,7 +3458,7 @@ } }, "which": { - "version": "1.3.0", + "version": "1.3.1", "bundled": true, "dev": true, "requires": { @@ -4880,6 +3490,11 @@ "strip-ansi": "^3.0.1" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, @@ -4897,6 +3512,14 @@ "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0" } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } } } }, @@ -4906,13 +3529,13 @@ "dev": true }, "write-file-atomic": { - "version": "1.3.4", + "version": "2.3.0", "bundled": true, "dev": true, "requires": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "signal-exit": "^3.0.2" } }, "y18n": { @@ -4944,16 +3567,6 @@ "yargs-parser": "^9.0.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, "cliui": { "version": "4.1.0", "bundled": true, @@ -4964,26 +3577,48 @@ "wrap-ansi": "^2.0.0" } }, - "strip-ansi": { - "version": "4.0.0", + "find-up": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, - "yargs-parser": { - "version": "9.0.2", + "p-limit": { + "version": "1.3.0", "bundled": true, "dev": true, "requires": { - "camelcase": "^4.1.0" + "p-try": "^1.0.0" } + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "bundled": true, + "dev": true } } }, "yargs-parser": { - "version": "8.1.0", + "version": "9.0.2", "bundled": true, "dev": true, "requires": { @@ -6030,9 +4665,9 @@ "dev": true }, "sshpk": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz", - "integrity": "sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -6147,41 +4782,43 @@ } }, "tap": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/tap/-/tap-12.1.2.tgz", - "integrity": "sha512-bSxKjA6Pchgt7Ho1V/hbRvU9aoJgCTD9Gwxl1D4gw5NiV093Kbi+eXsOXpY8dNaXkLeE+YiMU142cOj2DojHUA==", + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/tap/-/tap-12.5.0.tgz", + "integrity": "sha512-/QjrHGHIpxYBlojgl0mjj5lPA3+JSTWpHVvxtS8c0Gz3tv8mQ07nTV58WyzlqnLqSp03a9A5nP92hXCOTuiflg==", "dev": true, "requires": { "bind-obj-methods": "^2.0.0", - "bluebird": "^3.5.3", "browser-process-hrtime": "^1.0.0", "capture-stack-trace": "^1.0.0", "clean-yaml-object": "^0.1.0", "color-support": "^1.1.0", "coveralls": "^3.0.2", "domain-browser": "^1.2.0", + "esm": "^3.1.4", "foreground-child": "^1.3.3", "fs-exists-cached": "^1.0.0", "function-loop": "^1.0.1", "glob": "^7.1.3", "isexe": "^2.0.0", - "js-yaml": "^3.12.0", + "js-yaml": "^3.12.1", "minipass": "^2.3.5", "mkdirp": "^0.5.1", - "nyc": "^11.9.0", + "nyc": "^13.1.0", "opener": "^1.5.1", "os-homedir": "^1.0.2", "own-or": "^1.0.0", "own-or-env": "^1.0.1", - "rimraf": "^2.6.2", + "rimraf": "^2.6.3", "signal-exit": "^3.0.0", - "source-map-support": "^0.5.9", - "stack-utils": "^1.0.0", + "source-map-support": "^0.5.10", + "stack-utils": "^1.0.2", "tap-mocha-reporter": "^3.0.7", "tap-parser": "^7.0.0", "tmatch": "^4.0.0", "trivial-deferred": "^1.0.1", + "ts-node": "^8.0.1", "tsame": "^2.0.1", + "typescript": "^3.2.4", "write-file-atomic": "^2.3.0", "yapool": "^1.0.0" } @@ -6304,6 +4941,12 @@ "os-tmpdir": "~1.0.2" } }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -6386,6 +5029,12 @@ "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", "dev": true }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, "trim-trailing-lines": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.1.tgz", @@ -6404,6 +5053,27 @@ "integrity": "sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==", "dev": true }, + "ts-node": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", + "integrity": "sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "source-map-support": "^0.5.6", + "yn": "^3.0.0" + }, + "dependencies": { + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + } + } + }, "tsame": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/tsame/-/tsame-2.0.1.tgz", @@ -6446,6 +5116,12 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "typescript": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", + "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", + "dev": true + }, "unherit": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.1.tgz", @@ -6891,9 +5567,9 @@ } }, "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", + "integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -6924,6 +5600,12 @@ "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz", "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=", "dev": true + }, + "yn": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.0.0.tgz", + "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 6784d412..de5aa189 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "eslint-plugin-security": "^1.4.0", "remark-cli": "^6.0.1", "remark-preset-lint-recommended": "^3.0.2", - "tap": "^12.1.2", + "tap": "^12.5.0", "terser": "^3.14.1" }, "eslintConfig": { From 6ed07e6cf4df46cbc133501792174c0db3dd3efc Mon Sep 17 00:00:00 2001 From: mnater Date: Fri, 1 Feb 2019 01:07:37 +0100 Subject: [PATCH 18/19] cleanup comments --- hyphenopoly.module.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/hyphenopoly.module.js b/hyphenopoly.module.js index 97f3e795..e7d46b17 100644 --- a/hyphenopoly.module.js +++ b/hyphenopoly.module.js @@ -70,31 +70,6 @@ function readFile(file, cb) { /* eslint-enable security/detect-non-literal-fs-filename */ } -/** - * Before using browserify comment-out or delete the readFile-function above - * and un-comment the following function. - * Also change `const fs = require("fs");` to `const http = require("http");` - * at the top of the file - */ - -/** - * Browserify-compatible readFile: - * function readFile(file, cb) { - * const rawData = []; - * http.get(file, function c(res) { - * res.on("data", function onData(chunk) { - * rawData.push(chunk); - * }); - * res.on("end", function onEnd() { - * cb(null, Buffer.concat(rawData)); - * }); - * res.on("error", function onErr(err) { - * cb(err, rawData); - * }); - * }); - * } - */ - /** * Read a wasm file, dispatch "engineLoaded" on success * @returns {undefined} From 2693af762802ff40e5e7318c25ba55d71c6eed8e Mon Sep 17 00:00:00 2001 From: mnater Date: Fri, 1 Feb 2019 01:11:37 +0100 Subject: [PATCH 19/19] update CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc7d4577..e173e09e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Version History +## Version 2.7.0 (Feb 01, 2019) +* implement sync mode for node module (issue #43) +* implement sync mode for hyphenopoly.module.js (issue #47) +* fixed issue with Hyphenopoly.config sometimes not resolving (issue #52) +* enable viewport dependent hyphenation (isse #53) +* get good grades in codacy.com + ## Version 2.6.1 (Jan 09, 2018) * dontHyphenateClass is configurable (issue #48) * fixed issue with StringDecoder in older node versions (issue #45)