diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..78c6ddee2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 2 diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..24ae98e9d --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,29 @@ +{ + "extends": [ + "eslint:recommended", + "plugin:import/errors", + "prettier" + ], + "rules": { + "no-console": [ + "error", + { + "allow": [ + "info", + "error" + ] + } + ] + }, + "plugins": [ + "import" + ], + "parserOptions": { + "ecmaVersion": 2021 + }, + "env": { + "es6": true, + "browser": true, + "node": true + } +} \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..1b8ac8894 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# Ignore artifacts: +build +coverage diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 6e90746cc..000000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - tabWidth: 4, - singleQuote: true -} diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/editor/js/editable-css.js b/editor/js/editable-css.js index 0e2f616d3..4920d1fef 100644 --- a/editor/js/editable-css.js +++ b/editor/js/editable-css.js @@ -1,133 +1,111 @@ -(function() { - 'use strict'; +(function () { + "use strict"; - var clippy = require('./editor-libs/clippy'); - var mceEvents = require('./editor-libs/events'); - var mceUtils = require('./editor-libs/mce-utils'); + var clippy = require("./editor-libs/clippy"); + var mceEvents = require("./editor-libs/events"); + var mceUtils = require("./editor-libs/mce-utils"); - var exampleChoiceList = document.getElementById('example-choice-list'); - var exampleChoices = exampleChoiceList.querySelectorAll('.example-choice'); - var header = document.querySelector('header'); - var initialChoice = 0; - var originalChoices = []; - var output = document.getElementById('output'); + var exampleChoiceList = document.getElementById("example-choice-list"); + var exampleChoices = exampleChoiceList.querySelectorAll(".example-choice"); + var header = document.querySelector("header"); + var initialChoice = 0; + var originalChoices = []; + var output = document.getElementById("output"); - /** - * Enables and initializes the live code editor - */ - function enableLiveEditor() { - header.classList.remove('hidden'); - exampleChoiceList.classList.add('live'); - output.classList.remove('hidden'); + /** + * Enables and initializes the live code editor + */ + function enableLiveEditor() { + header.classList.remove("hidden"); + exampleChoiceList.classList.add("live"); + output.classList.remove("hidden"); - for (var i = 0, l = exampleChoices.length; i < l; i++) { - var exampleChoice = exampleChoices[i]; + for (var i = 0, l = exampleChoices.length; i < l; i++) { + var exampleChoice = exampleChoices[i]; - originalChoices.push( - exampleChoice.querySelector('code').textContent - ); + originalChoices.push(exampleChoice.querySelector("code").textContent); - if (exampleChoice.getAttribute('initial-choice')) { - initialChoice = indexOf(exampleChoices, exampleChoice); - } - } - - mceEvents.register(); - handleResetEvents(); - handleChoiceHover(); - - clippy.addClippy(); + if (exampleChoice.getAttribute("initial-choice")) { + initialChoice = indexOf(exampleChoices, exampleChoice); + } } - /** - * Attached an event handler on the reset button, and handles - * reset all the CSS examples to their original state - */ - function handleResetEvents() { - var resetButton = document.getElementById('reset'); + mceEvents.register(); + handleResetEvents(); + handleChoiceHover(); - resetButton.addEventListener('click', function() { - for (var i = 0, l = exampleChoices.length; i < l; i++) { - var highlighted = Prism.highlight( - originalChoices[i], - Prism.languages.css - ); - // IE11 does not support multiple selectors in `remove` - exampleChoices[i].classList.remove('invalid'); - exampleChoices[i].classList.remove('selected'); - exampleChoices[i].querySelector('code').innerHTML = highlighted; - } + clippy.addClippy(); + } - // if there is an initial choice set, set it as selected - if (initialChoice) { - mceEvents.onChoose(exampleChoices[initialChoice]); - clippy.toggleClippy(exampleChoices[initialChoice]); - } else { - mceEvents.onChoose(exampleChoices[0]); - clippy.toggleClippy(exampleChoices[0]); - } - }); - } + /** + * Attached an event handler on the reset button, and handles + * reset all the CSS examples to their original state + */ + function handleResetEvents() { + var resetButton = document.getElementById("reset"); + + resetButton.addEventListener("click", function () { + for (var i = 0, l = exampleChoices.length; i < l; i++) { + var highlighted = Prism.highlight( + originalChoices[i], + Prism.languages.css + ); + // IE11 does not support multiple selectors in `remove` + exampleChoices[i].classList.remove("invalid"); + exampleChoices[i].classList.remove("selected"); + exampleChoices[i].querySelector("code").innerHTML = highlighted; + } + + // if there is an initial choice set, set it as selected + if (initialChoice) { + mceEvents.onChoose(exampleChoices[initialChoice]); + clippy.toggleClippy(exampleChoices[initialChoice]); + } else { + mceEvents.onChoose(exampleChoices[0]); + clippy.toggleClippy(exampleChoices[0]); + } + }); + } - function indexOf(exampleChoices, choice) { - for (var i = 0, l = exampleChoices.length; i < l; i++) { - if (exampleChoices[i] === choice) { - return i; - } - } - return -1; + function indexOf(exampleChoices, choice) { + for (var i = 0, l = exampleChoices.length; i < l; i++) { + if (exampleChoices[i] === choice) { + return i; + } } + return -1; + } - /** - * Attach mouse events to example choices - * for allowing clippy button to display on hover - * and otherwise return to intial hidden state - */ - function handleChoiceHover() { - for (var i = 0, l = exampleChoices.length; i < l; i++) { - var choice = exampleChoices[i]; - var copyBtn = choice.querySelector('.copy'); - copyBtn.setAttribute('aria-label', 'Copy to clipboard'); - - choice.addEventListener('mouseover', () => { - copyBtn.setAttribute('aria-hidden', false); - }); - choice.addEventListener('mouseout', () => { - copyBtn.setAttribute('aria-hidden', true); - }); - } + /** + * Attach mouse events to example choices + * for allowing clippy button to display on hover + * and otherwise return to intial hidden state + */ + function handleChoiceHover() { + for (var i = 0, l = exampleChoices.length; i < l; i++) { + var choice = exampleChoices[i]; + var copyBtn = choice.querySelector(".copy"); + copyBtn.setAttribute("aria-label", "Copy to clipboard"); + + choice.addEventListener("mouseover", () => { + copyBtn.setAttribute("aria-hidden", false); + }); + choice.addEventListener("mouseout", () => { + copyBtn.setAttribute("aria-hidden", true); + }); } + } - /* only show the live code view if JS is enabled and the property is supported. + /* only show the live code view if JS is enabled and the property is supported. Also, only execute JS in our supported browsers. As `document.all` is a non standard object available only in IE10 and older, this will stop JS from executing in those versions. */ - if ( - mceUtils.isPropertySupported(exampleChoiceList.dataset) && - !document.all - ) { - enableLiveEditor(); - mceEvents.onChoose(exampleChoices[initialChoice]); - clippy.toggleClippy(exampleChoices[initialChoice]); - } - - /* Ensure that performance is supported before - gathering the performance metric */ - if (performance !== undefined) { - document.addEventListener('readystatechange', function(event) { - if (event.target.readyState === 'complete') { - /* loadEventEnd happens a split second after we - reached complete. So we wait an additional - 100ms before getting it’ value */ - setTimeout(function() { - mceEvents.trackloadEventEnd( - 'CSS editor load time', - performance.timing.loadEventEnd - ); - // Posts mark to set on the Kuma side and used in measure - mceUtils.postToKuma({ markName: 'css-ie-load-event-end' }); - }, 100); - } - }); - } + if ( + mceUtils.isPropertySupported(exampleChoiceList.dataset) && + !document.all + ) { + enableLiveEditor(); + mceEvents.onChoose(exampleChoices[initialChoice]); + clippy.toggleClippy(exampleChoices[initialChoice]); + } })(); diff --git a/editor/js/editable-js.js b/editor/js/editable-js.js index 09b5fd733..10d6456a2 100644 --- a/editor/js/editable-js.js +++ b/editor/js/editable-js.js @@ -1,126 +1,105 @@ (function () { - 'use strict'; - - var featureDetector = require('./editor-libs/feature-detector.js'); - var mceConsole = require('./editor-libs/console'); - var mceEvents = require('./editor-libs/events.js'); - var mceUtils = require('./editor-libs/mce-utils'); - - var codeBlock = document.getElementById('static-js'); - var exampleFeature = codeBlock.dataset['feature']; - var execute = document.getElementById('execute'); - var liveContainer = ''; - var output = document.querySelector('#console code'); - var reset = document.getElementById('reset'); - - var codeMirror; - var staticContainer; - - /** - * Reads the textContent from the interactiveCodeBlock, sends the - * textContent to executeLiveExample, and logs the output to the - * output container - */ - function applyCode() { - var codeMirrorDoc = codeMirror.getDoc(); - updateOutput(codeMirrorDoc.getValue()); + "use strict"; + + var featureDetector = require("./editor-libs/feature-detector.js"); + var mceConsole = require("./editor-libs/console"); + var mceEvents = require("./editor-libs/events.js"); + var mceUtils = require("./editor-libs/mce-utils"); + + var codeBlock = document.getElementById("static-js"); + var exampleFeature = codeBlock.dataset["feature"]; + var execute = document.getElementById("execute"); + var liveContainer = ""; + var output = document.querySelector("#console code"); + var reset = document.getElementById("reset"); + + var codeMirror; + var staticContainer; + + /** + * Reads the textContent from the interactiveCodeBlock, sends the + * textContent to executeLiveExample, and logs the output to the + * output container + */ + function applyCode() { + var codeMirrorDoc = codeMirror.getDoc(); + updateOutput(codeMirrorDoc.getValue()); + } + + /** + * Initialize CodeMirror + */ + function initCodeMirror() { + var editorContainer = document.getElementById("editor"); + // eslint-disable-next-line new-cap + codeMirror = CodeMirror(editorContainer, { + inputStyle: "contenteditable", + lineNumbers: true, + mode: "javascript", + undoDepth: 5, + tabindex: 0, + value: codeBlock.textContent, + }); + } + + /** + * Initialize the interactive editor + */ + function initInteractiveEditor() { + /* If the `data-height` attribute is defined on the `codeBlock`, set + the value of this attribute as a class on the editor element. */ + if (codeBlock.dataset["height"]) { + var editor = document.getElementById("editor"); + editor.classList.add(codeBlock.dataset["height"]); } - /** - * Initialize CodeMirror - */ - function initCodeMirror() { - var editorContainer = document.getElementById('editor'); - // eslint-disable-next-line new-cap - codeMirror = CodeMirror(editorContainer, { - inputStyle: 'contenteditable', - lineNumbers: true, - mode: 'javascript', - undoDepth: 5, - tabindex: 0, - value: codeBlock.textContent, - }); - } + staticContainer = document.getElementById("static"); + staticContainer.classList.add("hidden"); - /** - * Initialize the interactive editor - */ - function initInteractiveEditor() { - /* If the `data-height` attribute is defined on the `codeBlock`, set - the value of this attribute as a class on the editor element. */ - if (codeBlock.dataset['height']) { - var editor = document.getElementById('editor'); - editor.classList.add(codeBlock.dataset['height']); - } + liveContainer = document.getElementById("live"); + liveContainer.classList.remove("hidden"); - staticContainer = document.getElementById('static'); - staticContainer.classList.add('hidden'); + mceConsole(); + mceEvents.register(); - liveContainer = document.getElementById('live'); - liveContainer.classList.remove('hidden'); + initCodeMirror(); + } - mceConsole(); - mceEvents.register(); + /** + * Executes the provided code snippet and logs the result + * to the output container. + * @param {String} exampleCode - The code to execute + */ + function updateOutput(exampleCode) { + output.classList.add("fade-in"); - initCodeMirror(); + try { + // Create a new Function from the code, and immediately execute it. + new Function(exampleCode)(); + } catch (event) { + output.textContent = "Error: " + event.message; } - /** - * Executes the provided code snippet and logs the result - * to the output container. - * @param {String} exampleCode - The code to execute - */ - function updateOutput(exampleCode) { - output.classList.add('fade-in'); - - try { - // Create a new Function from the code, and immediately execute it. - new Function(exampleCode)(); - } catch (event) { - output.textContent = 'Error: ' + event.message; - } - - output.addEventListener('animationend', function () { - output.classList.remove('fade-in'); - }); - } + output.addEventListener("animationend", function () { + output.classList.remove("fade-in"); + }); + } - /* only execute JS in supported browsers. As `document.all` + /* only execute JS in supported browsers. As `document.all` is a non standard object available only in IE10 and older, this will stop JS from executing in those versions. */ - if (!document.all && featureDetector.isDefined(exampleFeature)) { - document.documentElement.classList.add('js'); + if (!document.all && featureDetector.isDefined(exampleFeature)) { + document.documentElement.classList.add("js"); - initInteractiveEditor(); + initInteractiveEditor(); - execute.addEventListener('click', function () { - output.textContent = ''; - applyCode(); - }); + execute.addEventListener("click", function () { + output.textContent = ""; + applyCode(); + }); - reset.addEventListener('click', function () { - window.location.reload(); - }); - } - - /* Ensure that performance is supported before - gathering the performance metric */ - if (performance !== undefined) { - document.addEventListener('readystatechange', function (event) { - if (event.target.readyState === 'complete') { - /* loadEventEnd happens a split second after we - reached complete. So we wait an additional - 100ms before getting it’s value */ - setTimeout(function () { - mceEvents.trackloadEventEnd( - 'JS editor load time', - performance.timing.loadEventEnd - ); - // Posts mark to set on the Kuma side and used in measure - mceUtils.postToKuma({ markName: 'js-ie-load-event-end' }); - codeMirror.refresh(); - }, 200); - } - }); - } + reset.addEventListener("click", function () { + window.location.reload(); + }); + } })(); diff --git a/editor/js/editor-libs/analytics.js b/editor/js/editor-libs/analytics.js deleted file mode 100644 index 7decf3d96..000000000 --- a/editor/js/editor-libs/analytics.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - /** - * Posts a message to the parent with the data object to be sent - * to GA - */ - trackEvent: function(eventDetails) { - 'use strict'; - // We use '*' as the origin so that we can post messages to - // developer.mozilla.org or wiki.developer.mozilla.org or the - // staging site. There is no confidential data being sent so - // this is not a security risk. - window.parent.postMessage(eventDetails, '*'); - }, - /** - * Creates an object that is passed to trackEvent, recording - * the users selecting a different CSS example - */ - trackCSSExampleSelection: function() { - 'use strict'; - this.trackEvent({ - category: 'Interactive Example - CSS', - action: 'New CSS example selected', - label: 'Interaction Events' - }); - }, - /** - * Creates an object that is passed to trackEvent, recording - * the clicks on the JS examples run button. - */ - trackRunClicks: function() { - 'use strict'; - this.trackEvent({ - category: 'Interactive Example - JS', - action: 'Clicked run', - label: 'Interaction Events' - }); - } -}; diff --git a/editor/js/editor-libs/events.js b/editor/js/editor-libs/events.js index b82731430..e4cdfa1e0 100644 --- a/editor/js/editor-libs/events.js +++ b/editor/js/editor-libs/events.js @@ -1,69 +1,48 @@ -var clippy = require('./clippy'); -var cssEditorUtils = require('./css-editor-utils'); -var mceAnalytics = require('./analytics'); +var clippy = require("./clippy"); +var cssEditorUtils = require("./css-editor-utils"); /** * Adds listeners for events from the CSS live examples * @param {Object} exampleChoiceList - The object to which events are added */ function addCSSEditorEventListeners(exampleChoiceList) { - 'use strict'; - exampleChoiceList.addEventListener('cut', copyTextOnly); - exampleChoiceList.addEventListener('copy', copyTextOnly); - exampleChoiceList.addEventListener('paste', handlePasteEvents); - - exampleChoiceList.addEventListener('keyup', function(event) { - var exampleChoiceParent = event.target.parentElement; - - cssEditorUtils.applyCode( - exampleChoiceParent.textContent, - exampleChoiceParent - ); - }); - - var exampleChoices = exampleChoiceList.querySelectorAll('.example-choice'); - Array.from(exampleChoices).forEach((choice) => { - choice.addEventListener('click', handleChoiceEvent); - }); -} + "use strict"; + exampleChoiceList.addEventListener("cut", copyTextOnly); + exampleChoiceList.addEventListener("copy", copyTextOnly); + exampleChoiceList.addEventListener("paste", handlePasteEvents); -/** - * Adds listeners for events from the JS live examples - * @param {Object} liveEditor - The object to which events are added - */ -function addJSEditorEventListeners(liveEditor) { - 'use strict'; + exampleChoiceList.addEventListener("keyup", function (event) { + var exampleChoiceParent = event.target.parentElement; - liveEditor.addEventListener('click', function(event) { - if (event.target.id === 'execute') { - mceAnalytics.trackRunClicks(); - } - }); + cssEditorUtils.applyCode( + exampleChoiceParent.textContent, + exampleChoiceParent + ); + }); + + var exampleChoices = exampleChoiceList.querySelectorAll(".example-choice"); + Array.from(exampleChoices).forEach((choice) => { + choice.addEventListener("click", handleChoiceEvent); + }); } /** * Adds listener for JavaScript errors, and logs them to GA */ function addJSErrorListener() { - 'use strict'; - /** - * Catches JavaScript errors from the editor that bubble up to the - * window and passes them on to GA - */ - window.onerror = function(msg, url, lineNo, columnNo, error) { - var errorDetails = [ - 'URL: ' + url, - 'Line: ' + lineNo, - 'Column: ' + columnNo, - 'Error object: ' + JSON.stringify(error) - ].join(' - '); - - mceAnalytics.trackEvent({ - category: 'Interactive Example - JavaScript Errors', - action: errorDetails, - label: msg - }); - }; + "use strict"; + /** + * Catches JavaScript errors from the editor that bubble up to the + * window and passes them on to GA + */ + window.onerror = function (msg, url, lineNo, columnNo, error) { + var errorDetails = [ + "URL: " + url, + "Line: " + lineNo, + "Column: " + columnNo, + "Error object: " + JSON.stringify(error), + ].join(" - "); + }; } /** @@ -71,29 +50,32 @@ function addJSErrorListener() { * Currently only used by the CSS editor. */ function addPostMessageListener() { - 'use strict'; - // listens for post message from Kuma - window.addEventListener( - 'message', - function(event) { - // Ignore any events that don't define the smallViewport property. - // Note that we are not checking the origin property to verify - // the source of the message. This is because we can't know if - // we're on developer.mozilla.org or wiki.developer.mozilla.org. - // Since we're just setting a CSS style based on the message - // there is no security risk. - if (event.data.smallViewport !== undefined) { - var editorWrapper = document.querySelector('.editor-wrapper'); - - if (event.data.smallViewport) { - editorWrapper.classList.add('small-desktop-and-below'); - } else { - editorWrapper.classList.remove('small-desktop-and-below'); - } - } - }, - false - ); + "use strict"; + + window.addEventListener( + "message", + function (event) { + // Note that we are not checking the origin property to verify + // the source of the message. This is because we can't know if + // we're on developer.mozilla.org or wiki.developer.mozilla.org. + // Since we're just setting a CSS style based on the message + // there is no security risk. + if (event.data.smallViewport !== undefined) { + var editorWrapper = document.querySelector(".editor-wrapper"); + + if (event.data.smallViewport) { + editorWrapper.classList.add("small-desktop-and-below"); + } else { + editorWrapper.classList.remove("small-desktop-and-below"); + } + } + + if (event.data.theme !== undefined) { + document.querySelector("body").classList.add(event.data.theme); + } + }, + false + ); } /** @@ -103,15 +85,15 @@ function addPostMessageListener() { * @param {Object} event - The copy event */ function copyTextOnly(event) { - 'use strict'; - var selection = window.getSelection(); - var range = selection.getRangeAt(0); + "use strict"; + var selection = window.getSelection(); + var range = selection.getRangeAt(0); - event.preventDefault(); - event.stopPropagation(); + event.preventDefault(); + event.stopPropagation(); - event.clipboardData.setData('text/plain', range.toString()); - event.clipboardData.setData('text/html', range.toString()); + event.clipboardData.setData("text/plain", range.toString()); + event.clipboardData.setData("text/html", range.toString()); } /** @@ -121,89 +103,60 @@ function copyTextOnly(event) { * @param {Object} event - The paste event object */ function handlePasteEvents(event) { - 'use strict'; - var clipboardText = event.clipboardData.getData('text/plain'); - var parentPre = event.target.offsetParent; - var parentCodeElem = parentPre.querySelector('code'); - var startValue = parentCodeElem.textContent; + "use strict"; + var clipboardText = event.clipboardData.getData("text/plain"); + var parentPre = event.target.offsetParent; + var parentCodeElem = parentPre.querySelector("code"); + var startValue = parentCodeElem.textContent; - event.preventDefault(); - event.stopPropagation(); + event.preventDefault(); + event.stopPropagation(); - parentCodeElem.innerText = startValue + '\n' + clipboardText; + parentCodeElem.innerText = startValue + "\n" + clipboardText; - Prism.highlightElement(parentCodeElem); + Prism.highlightElement(parentCodeElem); } function handleChoiceEvent() { - if (this.classList.contains('copy')) { - mceAnalytics.trackEvent({ - category: 'Interactive Example - CSS', - action: 'Copy to clipboard clicked', - label: 'Interaction Events', - }); - } - - module.exports.onChoose(this); + module.exports.onChoose(this); } module.exports = { - /** - * Called when a new `example-choice` has been selected. - * @param {Object} choice - The selected `example-choice` element - */ - onChoose: function(choice) { - var selected = document.querySelector('.selected'); - - // highlght the code we are leaving - if (selected && !choice.classList.contains('selected')) { - var highlighted = Prism.highlight( - selected.firstChild.textContent, - Prism.languages.css - ); - selected.firstChild.innerHTML = highlighted; - - mceAnalytics.trackCSSExampleSelection(); - - cssEditorUtils.resetDefault(); - } - - cssEditorUtils.choose(choice); - clippy.toggleClippy(choice); - }, - /** - * Called by the main JS file after all other initialization - * has been completed. - */ - register: function() { - 'use strict'; - var exampleChoiceList = document.getElementById('example-choice-list'); - var liveEditor = document.getElementById('editor'); - - addJSErrorListener(); - - // only bind events if the `exampleChoiceList` container exist - if (exampleChoiceList) { - addPostMessageListener(); - addCSSEditorEventListeners(exampleChoiceList); - } + /** + * Called when a new `example-choice` has been selected. + * @param {Object} choice - The selected `example-choice` element + */ + onChoose: function (choice) { + var selected = document.querySelector(".selected"); + + // highlght the code we are leaving + if (selected && !choice.classList.contains("selected")) { + var highlighted = Prism.highlight( + selected.firstChild.textContent, + Prism.languages.css + ); + selected.firstChild.innerHTML = highlighted; + + cssEditorUtils.resetDefault(); + } - if (liveEditor) { - addJSEditorEventListeners(liveEditor); - } - }, - /** - * Calls trackEvent and sends the loadEventEnd time for - * the iframe to the parent page via postMessage - * @param {String} action - The action that took place - * @param {Number} loadTime - The loadEventEnd time in milliseconds - */ - trackloadEventEnd: function(action, loadTime) { - mceAnalytics.trackEvent({ - category: 'Interactive Examples', - action: action, - label: 'Performance Events', - value: loadTime - }); + cssEditorUtils.choose(choice); + clippy.toggleClippy(choice); + }, + /** + * Called by the main JS file after all other initialization + * has been completed. + */ + register: function () { + "use strict"; + var exampleChoiceList = document.getElementById("example-choice-list"); + + addJSErrorListener(); + addPostMessageListener(); + + // only bind events if the `exampleChoiceList` container exist + if (exampleChoiceList) { + addCSSEditorEventListeners(exampleChoiceList); } + }, }; diff --git a/editor/js/editor-libs/mce-utils.js b/editor/js/editor-libs/mce-utils.js index a981e2ac6..2be27edf5 100644 --- a/editor/js/editor-libs/mce-utils.js +++ b/editor/js/editor-libs/mce-utils.js @@ -1,102 +1,90 @@ module.exports = { - /** - * Find and return the `example-choice` parent of the provided element - * @param {Object} element - The child element for which to find the - * `example-choice` parent - * - * @return The parent `example-choice` element - */ - findParentChoiceElem: function(element) { - 'use strict'; - var parent = element.parentElement; - var parentClassList = parent.classList; - while (parent && !parentClassList.contains('example-choice')) { - // get the next parent - parent = parent.parentElement; - // get the new parent's `classList` - parentClassList = parent.classList; - } - return parent; - }, - /** - * Creates a temporary element and tests whether the passed - * property exists on the `style` property of the element. - * @param {Object} dataset = The dataset from which to get the property - */ - isPropertySupported: function(dataset) { - 'use strict'; + /** + * Find and return the `example-choice` parent of the provided element + * @param {Object} element - The child element for which to find the + * `example-choice` parent + * + * @return The parent `example-choice` element + */ + findParentChoiceElem: function (element) { + "use strict"; + var parent = element.parentElement; + var parentClassList = parent.classList; + while (parent && !parentClassList.contains("example-choice")) { + // get the next parent + parent = parent.parentElement; + // get the new parent's `classList` + parentClassList = parent.classList; + } + return parent; + }, + /** + * Creates a temporary element and tests whether the passed + * property exists on the `style` property of the element. + * @param {Object} dataset = The dataset from which to get the property + */ + isPropertySupported: function (dataset) { + "use strict"; - /* If there are no 'property' attributes, + /* If there are no 'property' attributes, there is nothing to test, so return true. */ - if (dataset['property'] === undefined) { - return true; - } + if (dataset["property"] === undefined) { + return true; + } - // `property` may be a space-separated list of properties. - var properties = dataset['property'].split(' '); - /* Iterate through properties: if any of them apply, + // `property` may be a space-separated list of properties. + var properties = dataset["property"].split(" "); + /* Iterate through properties: if any of them apply, the browser supports this example. */ - var supported = false; - var tmpElem = document.createElement('div'); + var supported = false; + var tmpElem = document.createElement("div"); - for (var i = 0, l = properties.length; i < l; i++) { - if (tmpElem.style[properties[i]] !== undefined) { - supported = true; - } - } + for (var i = 0, l = properties.length; i < l; i++) { + if (tmpElem.style[properties[i]] !== undefined) { + supported = true; + } + } - return supported; - }, - /** - * Interrupts the default click event on external links inside - * the shadow dom and opens them in a new tab instead - * @param {Array} externalLinks - all external links inside the shadow dom - */ - openLinksInNewTab: function(externalLinks) { - externalLinks.forEach(function(externalLink) { - externalLink.addEventListener('click', function(event) { - event.preventDefault(); - window.open(externalLink.href); - }); - }); - }, - /** - * Posts a name to set as a mark to Kuma for - * processing and beaconing to GA - * @param {Object} perf - The performance object sent to Kuma - */ - postToKuma: function(perf) { - // We use '*' as the origin so that we can post messages to - // developer.mozilla.org or wiki.developer.mozilla.org or the - // staging site. There is no confidential data being sent so - // this is not a security risk. - window.parent.postMessage(perf, '*'); - }, - /** - * Interrupts the default click event on relative links inside - * the shadow dom and scrolls to the targeted anchor - * @param {Object} shadow - the shadow dom root - * @param {Array} relativeLinks - all relative links inside the shadow dom - */ - scrollToAnchors: function(shadow, relativeLinks) { - relativeLinks.forEach(function(relativeLink) { - relativeLink.addEventListener('click', function(event) { - event.preventDefault(); - shadow.querySelector(relativeLink.hash).scrollIntoView(); - }); - }); - }, - /** - * Hides the default example and shows the custom block - * @param {object} customBlock - The HTML section to show - */ - showCustomExampleHTML: function(customBlock) { - 'use strict'; - var defaultExample = document.getElementById('default-example'); - defaultExample.classList.add('hidden'); - defaultExample.setAttribute('aria-hidden', true); + return supported; + }, + /** + * Interrupts the default click event on external links inside + * the shadow dom and opens them in a new tab instead + * @param {Array} externalLinks - all external links inside the shadow dom + */ + openLinksInNewTab: function (externalLinks) { + externalLinks.forEach(function (externalLink) { + externalLink.addEventListener("click", function (event) { + event.preventDefault(); + window.open(externalLink.href); + }); + }); + }, + /** + * Interrupts the default click event on relative links inside + * the shadow dom and scrolls to the targeted anchor + * @param {Object} shadow - the shadow dom root + * @param {Array} relativeLinks - all relative links inside the shadow dom + */ + scrollToAnchors: function (shadow, relativeLinks) { + relativeLinks.forEach(function (relativeLink) { + relativeLink.addEventListener("click", function (event) { + event.preventDefault(); + shadow.querySelector(relativeLink.hash).scrollIntoView(); + }); + }); + }, + /** + * Hides the default example and shows the custom block + * @param {object} customBlock - The HTML section to show + */ + showCustomExampleHTML: function (customBlock) { + "use strict"; + var defaultExample = document.getElementById("default-example"); + defaultExample.classList.add("hidden"); + defaultExample.setAttribute("aria-hidden", true); - customBlock.classList.remove('hidden'); - customBlock.setAttribute('aria-hidden', false); - } + customBlock.classList.remove("hidden"); + customBlock.setAttribute("aria-hidden", false); + }, }; diff --git a/editor/js/editor-libs/perf.js b/editor/js/editor-libs/perf.js deleted file mode 100644 index 22ea452aa..000000000 --- a/editor/js/editor-libs/perf.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/** - * Posts a name to set as a mark to Kuma for - * processing and beaconing to GA - * @param {Object} perf - The performance object sent to Kuma - */ -function postToKuma(perf) { - // We use '*' as the origin so that we can post messages to - // developer.mozilla.org or wiki.developer.mozilla.org or the - // staging site. There is no confidential data being sent so - // this is not a security risk. - window.parent.postMessage(perf, '*'); -} - -postToKuma({ markName: 'interactive-editor-loading' }); - -/** - * Posts marks to set on the Kuma side, based on certain - * events during document loading. These will then be made - * available in performance tools, and beaconed to GA - */ -document.addEventListener('readystatechange', function(event) { - switch (event.target.readyState) { - case 'interactive': - postToKuma({ - markName: 'interactive-editor-interactive', - measureName: 'ie-time-to-interactive', - startMark: 'interactive-editor-loading', - endMark: 'interactive-editor-interactive' - }); - break; - case 'complete': - postToKuma({ - markName: 'interactive-editor-complete', - measureName: 'ie-time-to-complete', - startMark: 'interactive-editor-loading', - endMark: 'interactive-editor-complete' - }); - break; - } -}); diff --git a/editor/js/editor.js b/editor/js/editor.js index 710903491..a303e42c0 100644 --- a/editor/js/editor.js +++ b/editor/js/editor.js @@ -1,190 +1,169 @@ -(function() { - 'use strict'; - - var mceConsole = require('./editor-libs/console'); - var mceEvents = require('./editor-libs/events.js'); - var mceUtils = require('./editor-libs/mce-utils'); - var shadowOutput = require('./editor-libs/shadow-output'); - var templateUtils = require('./editor-libs/template-utils'); - var tabby = require('./editor-libs/tabby'); - - var cssEditor = document.getElementById('css-editor'); - var clearConsole = document.getElementById('clear'); - var editorContainer = document.getElementById('editor-container'); - var header = document.querySelector('.output-header'); - var htmlEditor = document.getElementById('html-editor'); - var jsEditor = document.getElementById('js-editor'); - var staticCSSCode = cssEditor.querySelector('pre'); - var staticHTMLCode = htmlEditor.querySelector('pre'); - var staticJSCode = jsEditor.querySelector('pre'); - var timer; - - /** - * Called by the tabbed editor to combine code from all tabs in an Object - * @returns Object with code from each tab panel - * Example - * -------- - * { - * cssContent: 'h1 { background-color: #333; }', - * htmlContent: '

Title

' - * } - */ - function getOutput() { - var editorContents = { - htmlContent: tabby.editors.html.editor.getValue(), - cssContent: tabby.editors.css.editor.getValue() - }; - - // not all editor instances have a JS panel - if (tabby.editors.js.editor) { - editorContents.jsContent = tabby.editors.js.editor.getValue(); - } - - return editorContents; +(function () { + "use strict"; + + var mceConsole = require("./editor-libs/console"); + var mceEvents = require("./editor-libs/events.js"); + var mceUtils = require("./editor-libs/mce-utils"); + var shadowOutput = require("./editor-libs/shadow-output"); + var templateUtils = require("./editor-libs/template-utils"); + var tabby = require("./editor-libs/tabby"); + + var cssEditor = document.getElementById("css-editor"); + var clearConsole = document.getElementById("clear"); + var editorContainer = document.getElementById("editor-container"); + var header = document.querySelector(".output-header"); + var htmlEditor = document.getElementById("html-editor"); + var jsEditor = document.getElementById("js-editor"); + var staticCSSCode = cssEditor.querySelector("pre"); + var staticHTMLCode = htmlEditor.querySelector("pre"); + var staticJSCode = jsEditor.querySelector("pre"); + var timer; + + /** + * Called by the tabbed editor to combine code from all tabs in an Object + * @returns Object with code from each tab panel + * Example + * -------- + * { + * cssContent: 'h1 { background-color: #333; }', + * htmlContent: '

Title

' + * } + */ + function getOutput() { + var editorContents = { + htmlContent: tabby.editors.html.editor.getValue(), + cssContent: tabby.editors.css.editor.getValue(), + }; + + // not all editor instances have a JS panel + if (tabby.editors.js.editor) { + editorContents.jsContent = tabby.editors.js.editor.getValue(); } - /** - * Sets the height of the output container inside the shadow dom - * based on the class present on the editor container - * @param {Object} outputContainer - the output container inside the shadow dom - */ - function setOutputHeight(outputContainer) { - // styling for the polyfilled shadow is different - if (typeof ShadyDOM !== 'undefined' && ShadyDOM.inUse) { - outputContainer.style.height = '92%'; - } else if (editorContainer.classList.contains('tabbed-shorter')) { - outputContainer.style.height = '62%'; - } else if (editorContainer.classList.contains('tabbed-standard')) { - outputContainer.style.height = '67%'; - } else if (editorContainer.classList.contains('tabbed-taller')) { - outputContainer.style.height = '76%'; - } + return editorContents; + } + + /** + * Sets the height of the output container inside the shadow dom + * based on the class present on the editor container + * @param {Object} outputContainer - the output container inside the shadow dom + */ + function setOutputHeight(outputContainer) { + // styling for the polyfilled shadow is different + if (typeof ShadyDOM !== "undefined" && ShadyDOM.inUse) { + outputContainer.style.height = "92%"; + } else if (editorContainer.classList.contains("tabbed-shorter")) { + outputContainer.style.height = "62%"; + } else if (editorContainer.classList.contains("tabbed-standard")) { + outputContainer.style.height = "67%"; + } else if (editorContainer.classList.contains("tabbed-taller")) { + outputContainer.style.height = "76%"; } - - /** - * Set or update the CSS and HTML in the output pane. - * @param {Object} content - The content of the template element. - */ - function render(content) { - let shadow = document.querySelector('shadow-output').shadowRoot; - let shadowChildren = shadow.children; - - if (shadowChildren.length) { - if (typeof ShadyDOM !== 'undefined' && ShadyDOM.inUse) { - shadow.innerHTML = ''; - } else { - var output = shadow.querySelector('.output'); - output && shadow.removeChild(output); - var styleElements = shadow.querySelectorAll('style'); - - for (var styleElement in styleElements) { - if (styleElements.hasOwnProperty(styleElement) && styleElements[styleElement]) { - shadow.removeChild(styleElements[styleElement]); - } - } - } + } + + /** + * Set or update the CSS and HTML in the output pane. + * @param {Object} content - The content of the template element. + */ + function render(content) { + let shadow = document.querySelector("shadow-output").shadowRoot; + let shadowChildren = shadow.children; + + if (shadowChildren.length) { + if (typeof ShadyDOM !== "undefined" && ShadyDOM.inUse) { + shadow.innerHTML = ""; + } else { + var output = shadow.querySelector(".output"); + output && shadow.removeChild(output); + var styleElements = shadow.querySelectorAll("style"); + + for (var styleElement in styleElements) { + if ( + styleElements.hasOwnProperty(styleElement) && + styleElements[styleElement] + ) { + shadow.removeChild(styleElements[styleElement]); + } } - - shadow.appendChild(document.importNode(content, true)); - setOutputHeight(shadow.querySelector('div')); - mceUtils.openLinksInNewTab(shadow.querySelectorAll('a[href^="http"]')); - mceUtils.scrollToAnchors( - shadow, - shadow.querySelectorAll('a[href^="#"]') - ); + } } - /** - * Called from the editors on keyup events. Starts a 500 millisecond timer. - * If no other keyup events happens before the 500 millisecond have elapsed, - * update the output - */ - function autoUpdate() { - // clear the existing timer - clearTimeout(timer); - - timer = setTimeout(function() { - templateUtils.createTemplate(getOutput()); - render(templateUtils.getTemplateOutput()); - }, 500); + shadow.appendChild(document.importNode(content, true)); + setOutputHeight(shadow.querySelector("div")); + mceUtils.openLinksInNewTab(shadow.querySelectorAll('a[href^="http"]')); + mceUtils.scrollToAnchors(shadow, shadow.querySelectorAll('a[href^="#"]')); + } + + /** + * Called from the editors on keyup events. Starts a 500 millisecond timer. + * If no other keyup events happens before the 500 millisecond have elapsed, + * update the output + */ + function autoUpdate() { + // clear the existing timer + clearTimeout(timer); + + timer = setTimeout(function () { + templateUtils.createTemplate(getOutput()); + render(templateUtils.getTemplateOutput()); + }, 500); + } + + header.addEventListener("click", function (event) { + if (event.target.classList.contains("reset")) { + window.location.reload(); } - - header.addEventListener('click', function(event) { - if (event.target.classList.contains('reset')) { - window.location.reload(); - } - }); - - htmlEditor.addEventListener('keyup', function() { - autoUpdate(); - }); - - cssEditor.addEventListener('keyup', function() { - autoUpdate(); - }); - - jsEditor.addEventListener('keyup', function() { - autoUpdate(); - }); - - clearConsole.addEventListener('click', function() { - var webapiConsole = document.querySelector('#console code'); - webapiConsole.textContent = ''; - }); - - // hide the static example when JS enabled - staticHTMLCode.classList.add('hidden'); - // hide the static CSS example - staticCSSCode.classList.add('hidden'); - // hide the static JS example - staticJSCode.classList.add('hidden'); - // show the header - header.classList.remove('hidden'); - - /* Initialise the editors. If there is a `dataset` property + }); + + htmlEditor.addEventListener("keyup", function () { + autoUpdate(); + }); + + cssEditor.addEventListener("keyup", function () { + autoUpdate(); + }); + + jsEditor.addEventListener("keyup", function () { + autoUpdate(); + }); + + clearConsole.addEventListener("click", function () { + var webapiConsole = document.querySelector("#console code"); + webapiConsole.textContent = ""; + }); + + // hide the static example when JS enabled + staticHTMLCode.classList.add("hidden"); + // hide the static CSS example + staticCSSCode.classList.add("hidden"); + // hide the static JS example + staticJSCode.classList.add("hidden"); + // show the header + header.classList.remove("hidden"); + + /* Initialise the editors. If there is a `dataset` property of type `tabs` on the `editorContainer`, pass its value to `initEditor` */ - if (editorContainer.dataset && editorContainer.dataset.tabs) { - tabby.initEditor( - editorContainer.dataset.tabs.split(','), - document.getElementById('js') - ); - } else { - tabby.initEditor(['html', 'css'], document.getElementById('html')); - } + if (editorContainer.dataset && editorContainer.dataset.tabs) { + tabby.initEditor( + editorContainer.dataset.tabs.split(","), + document.getElementById("js") + ); + } else { + tabby.initEditor(["html", "css"], document.getElementById("html")); + } - mceConsole(); - - tabby.registerEventListeners(); - - // register the custom output element - customElements.define('shadow-output', shadowOutput); - - templateUtils.createTemplate(getOutput()); - - document.addEventListener('WebComponentsReady', function() { - render(templateUtils.getTemplateOutput()); - }); - - /* Ensure that performance is supported before - gathering the performance metric */ - if (performance !== undefined) { - document.addEventListener('readystatechange', function(event) { - if (event.target.readyState === 'complete') { - /* loadEventEnd happens a split second after we - reached complete. So we wait an additional - 100ms before getting it’ value */ - setTimeout(function() { - mceEvents.trackloadEventEnd( - 'Tabbed editor load time', - performance.timing.loadEventEnd - ); - // Posts mark to set on the Kuma side and used in measure - mceUtils.postToKuma({ - markName: 'tabbed-ie-load-event-end' - }); - }, 100); - } - }); - } + mceConsole(); + + tabby.registerEventListeners(); + mceEvents.register(); + + // register the custom output element + customElements.define("shadow-output", shadowOutput); + + templateUtils.createTemplate(getOutput()); + + document.addEventListener("WebComponentsReady", function () { + render(templateUtils.getTemplateOutput()); + }); })(); diff --git a/editor/tmpl/live-css-tmpl.html b/editor/tmpl/live-css-tmpl.html index 4d34e5ebd..01d5cfef0 100644 --- a/editor/tmpl/live-css-tmpl.html +++ b/editor/tmpl/live-css-tmpl.html @@ -9,7 +9,6 @@ %example-css-src% - diff --git a/editor/tmpl/live-js-tmpl.html b/editor/tmpl/live-js-tmpl.html index 627f62d6d..5afe69df2 100644 --- a/editor/tmpl/live-js-tmpl.html +++ b/editor/tmpl/live-js-tmpl.html @@ -1,36 +1,40 @@ - - - - %title% - - - - %example-css-src% - - - -
- %example-code% -
- + +
+ %example-code% +
- %example-js-src% + + + %example-js-src% + + + + - - - diff --git a/editor/tmpl/live-tabbed-tmpl.html b/editor/tmpl/live-tabbed-tmpl.html index 0abc6e7d9..128a9bf0b 100644 --- a/editor/tmpl/live-tabbed-tmpl.html +++ b/editor/tmpl/live-tabbed-tmpl.html @@ -1,57 +1,75 @@ - + + %title% - - - - +
+
+
+ + + +
+ + + +
+

Output

+
+ +
+
-
-

Console Output

- -
-
+
+

Console Output

+ +
+
- + + diff --git a/lib/pageBuilder.js b/lib/pageBuilder.js index ce754421b..8329936d4 100644 --- a/lib/pageBuilder.js +++ b/lib/pageBuilder.js @@ -1,14 +1,14 @@ -const crypto = require('crypto'); -const fs = require('fs'); -const path = require('path'); +const crypto = require("crypto"); +const fs = require("fs"); +const path = require("path"); -const fse = require('fs-extra'); -const glob = require('glob'); +const fse = require("fs-extra"); +const glob = require("glob"); -const getConfig = require('./config'); -const pageBuilderUtils = require('./pageBuilderUtils'); -const processor = require('./processor'); -const tabbedPageBuilder = require('./tabbedPageBuilder'); +const getConfig = require("./config"); +const pageBuilderUtils = require("./pageBuilderUtils"); +const processor = require("./processor"); +const tabbedPageBuilder = require("./tabbedPageBuilder"); const config = getConfig(); @@ -28,62 +28,59 @@ const config = getConfig(); * } * */ -function build(pages, selfVersion = '') { - for (let page in pages) { - let currentPage = pages[page]; - let cssSource = currentPage.cssExampleSrc; - let jsSource = currentPage.jsExampleSrc; - let type = currentPage.type; - let tmpl = pageBuilderUtils.getPageTmpl(type); - let outputHTML = ''; - - const outputPath = - config.pagesDir + currentPage.type + '/' + currentPage.fileName; - - // inject the perf script in the head of the template - tmpl = pageBuilderUtils.injectPerf(tmpl); - - // Inject the cache buster - tmpl = pageBuilderUtils.setCacheBuster(`?v=${selfVersion}`, tmpl); - - // handle both standard and webapi tabbed examples - if (type.indexOf('tabbed') > -1) { - fse.outputFileSync( - outputPath, - tabbedPageBuilder.buildTabbedExample(tmpl, currentPage) - ); - } else { - // is there a linked CSS file - if (cssSource) { - // inject the link tag into the source - tmpl = processor.processInclude('css', tmpl, cssSource); - } else { - // clear out the template string - tmpl = tmpl.replace('%example-css-src%', ''); - } - - // is there a linked JS file - if (jsSource) { - // inject the script tag into the source - tmpl = processor.processInclude('js', tmpl, jsSource); - } else { - // clear out the template string - tmpl = tmpl.replace('%example-js-src%', ''); - } - - // set main title - tmpl = pageBuilderUtils.setMainTitle(currentPage, tmpl); - - const exampleCode = processor.processExampleCode( - currentPage.type, - currentPage.exampleCode - ); - - outputHTML = tmpl.replace('%example-code%', () => exampleCode); - - fse.outputFileSync(outputPath, outputHTML); - } +function build(pages, selfVersion = "") { + for (let page in pages) { + let currentPage = pages[page]; + let cssSource = currentPage.cssExampleSrc; + let jsSource = currentPage.jsExampleSrc; + let type = currentPage.type; + let tmpl = pageBuilderUtils.getPageTmpl(type); + let outputHTML = ""; + + const outputPath = + config.pagesDir + currentPage.type + "/" + currentPage.fileName; + + // Inject the cache buster + tmpl = pageBuilderUtils.setCacheBuster(`?v=${selfVersion}`, tmpl); + + // handle both standard and webapi tabbed examples + if (type.indexOf("tabbed") > -1) { + fse.outputFileSync( + outputPath, + tabbedPageBuilder.buildTabbedExample(tmpl, currentPage) + ); + } else { + // is there a linked CSS file + if (cssSource) { + // inject the link tag into the source + tmpl = processor.processInclude("css", tmpl, cssSource); + } else { + // clear out the template string + tmpl = tmpl.replace("%example-css-src%", ""); + } + + // is there a linked JS file + if (jsSource) { + // inject the script tag into the source + tmpl = processor.processInclude("js", tmpl, jsSource); + } else { + // clear out the template string + tmpl = tmpl.replace("%example-js-src%", ""); + } + + // set main title + tmpl = pageBuilderUtils.setMainTitle(currentPage, tmpl); + + const exampleCode = processor.processExampleCode( + currentPage.type, + currentPage.exampleCode + ); + + outputHTML = tmpl.replace("%example-code%", () => exampleCode); + + fse.outputFileSync(outputPath, outputHTML); } + } } /** @@ -92,22 +89,22 @@ function build(pages, selfVersion = '') { * versions we need to gather both from that and from the relevant .js files. */ function getSelfVersion(length = 7) { - const root = path.resolve(__dirname, '..'); - const filepaths = [ - path.join(root, 'package.json'), - // This is broad but let's make it depend on every .js file - // in this file's folder - ...glob.sync(path.join(root, 'lib', '**', '*.js')), - // And every every other file too - ...glob.sync(path.join(root, 'editor', '**', '*.js')), - ...glob.sync(path.join(root, 'editor', '**', '*.css')), - ...glob.sync(path.join(root, 'editor', '**', '*.html')) - ]; - const hasher = crypto.createHash('md5'); - filepaths - .map(fp => fs.readFileSync(fp, 'utf8')) - .forEach(content => hasher.update(content)); - return hasher.digest('hex').slice(0, length); + const root = path.resolve(__dirname, ".."); + const filepaths = [ + path.join(root, "package.json"), + // This is broad but let's make it depend on every .js file + // in this file's folder + ...glob.sync(path.join(root, "lib", "**", "*.js")), + // And every every other file too + ...glob.sync(path.join(root, "editor", "**", "*.js")), + ...glob.sync(path.join(root, "editor", "**", "*.css")), + ...glob.sync(path.join(root, "editor", "**", "*.html")), + ]; + const hasher = crypto.createHash("md5"); + filepaths + .map((fp) => fs.readFileSync(fp, "utf8")) + .forEach((content) => hasher.update(content)); + return hasher.digest("hex").slice(0, length); } /** @@ -115,29 +112,29 @@ function getSelfVersion(length = 7) { * it passes the list of pages to the `build` function. */ function buildPages() { - const selfVersion = getSelfVersion(); - return new Promise((resolve, reject) => { - const metaJSONArray = glob.sync(config.metaGlob, {}); - - for (const metaJson of metaJSONArray) { - const file = fse.readJsonSync(metaJson); - try { - build(file.pages, selfVersion); - } catch (error) { - console.error( - `MDN-BOB: (pageBuilder.js/@buildPages) Error while building pages ${metaJson}: ${error}` - ); - reject( - Error( - `MDN-BOB: (pageBuilder.js/@buildPages) Error while building pages: ${metaJson}: ${error}` - ) - ); - } - } - resolve('MDN-BOB: Pages built successfully'); - }); + const selfVersion = getSelfVersion(); + return new Promise((resolve, reject) => { + const metaJSONArray = glob.sync(config.metaGlob, {}); + + for (const metaJson of metaJSONArray) { + const file = fse.readJsonSync(metaJson); + try { + build(file.pages, selfVersion); + } catch (error) { + console.error( + `MDN-BOB: (pageBuilder.js/@buildPages) Error while building pages ${metaJson}: ${error}` + ); + reject( + Error( + `MDN-BOB: (pageBuilder.js/@buildPages) Error while building pages: ${metaJson}: ${error}` + ) + ); + } + } + resolve("MDN-BOB: Pages built successfully"); + }); } module.exports = { - buildPages + buildPages, }; diff --git a/lib/pageBuilderUtils.js b/lib/pageBuilderUtils.js index 768f83c16..9f2b806df 100644 --- a/lib/pageBuilderUtils.js +++ b/lib/pageBuilderUtils.js @@ -1,155 +1,133 @@ -const fse = require('fs-extra'); -const path = require('path'); -const uglify = require('uglify-es'); +const fse = require("fs-extra"); +const path = require("path"); -const processor = require('./processor'); +const processor = require("./processor"); module.exports = { - /** - * Based on the provided `tmplType`, return the relevant - * template as a string. - * @param {String} tmplType - The template type - * @returns The appropriate template as a string - */ - getPageTmpl: function(tmplType) { - switch (tmplType) { - case 'css': - try { - return fse.readFileSync( - path.join( - __dirname, - '../editor/tmpl/live-css-tmpl.html' - ), - 'utf8' - ); - } catch (error) { - console.error('Error loading file', error); - } - case 'js': - try { - return fse.readFileSync( - path.join( - __dirname, - '../editor/tmpl/live-js-tmpl.html' - ), - 'utf8' - ); - } catch (error) { - console.error('Error loading file', error); - } - case 'tabbed': - case 'webapi-tabbed': - try { - return fse.readFileSync( - path.join( - __dirname, - '../editor/tmpl/live-tabbed-tmpl.html' - ), - 'utf8' - ); - } catch (error) { - console.error('Error loading file', error); - } - default: - console.error( - `MDN-BOB: No template found for template type ${tmplType}` - ); - process.exit(1); + /** + * Based on the provided `tmplType`, return the relevant + * template as a string. + * @param {String} tmplType - The template type + * @returns The appropriate template as a string + */ + getPageTmpl: function (tmplType) { + switch (tmplType) { + case "css": + try { + return fse.readFileSync( + path.join(__dirname, "../editor/tmpl/live-css-tmpl.html"), + "utf8" + ); + } catch (error) { + console.error("Error loading file", error); } - }, - /** - * Load, minifies, and then injects the contents of - * `js/editor-libs/perf.js` into the head of the document - * @param {string} tmpl - The template as a string - * @return {string} The template as a string with the perf script injected - */ - injectPerf(tmpl) { - const regex = /%inject-perf%/g; - const perfJs = path.join(__dirname, '../editor/js/editor-libs/perf.js'); - let minified = uglify.minify(fse.readFileSync(perfJs, 'utf8')).code; - return tmpl.replace(regex, minified); - }, - /** - * Sets the active tabs in a comma separated string. - * @param {Object} currentPage - The current page object - * @param {String} tmpl - The template as a string - * - * @returns The processed template with the active tabs set - */ - setActiveTabs: function(currentPage, tmpl) { - const regex = /%active-tabs%/g; - - if (currentPage.tabs) { - return tmpl.replace(regex, `data-tabs="${currentPage.tabs}"`); - } else { - return tmpl.replace(regex, ''); + case "js": + try { + return fse.readFileSync( + path.join(__dirname, "../editor/tmpl/live-js-tmpl.html"), + "utf8" + ); + } catch (error) { + console.error("Error loading file", error); } - }, - /** - * If the `currentPage.type` is of type webapi-tabbed, - * show the console, else hide. Also set the appropriate - * `aria-hidden` state - * @param {Object} currentPage - The current page object - * @param {String} tmpl - The template as a string - * - * @returns The processed template with console state set - */ - setConsoleState: function(currentPage, tmpl) { - const stateRegEx = /%console-state%/g; - const ariaHiddenStateRegEx = /%console-aria-state%/g; - - if (currentPage.type === 'webapi-tabbed') { - // no class to add, simple clear the pattern - tmpl = tmpl.replace(stateRegEx, ''); - return tmpl.replace(ariaHiddenStateRegEx, false); - } else { - tmpl = tmpl.replace(stateRegEx, 'hidden'); - return tmpl.replace(ariaHiddenStateRegEx, true); + case "tabbed": + case "webapi-tabbed": + try { + return fse.readFileSync( + path.join(__dirname, "../editor/tmpl/live-tabbed-tmpl.html"), + "utf8" + ); + } catch (error) { + console.error("Error loading file", error); } - }, - /** - * Sets the appropriate class on the tabbed editor’s container - * element based on the height property defined in the example’s - * meta data - * @param {Object} currentPage - The current page object - * @param {String} tmpl - The template as a string - * - * @returns The processed template with the height class set - */ - setEditorHeight: function(currentPage, tmpl) { - const regex = /%editor-height%/g; + default: + console.error( + `MDN-BOB: No template found for template type ${tmplType}` + ); + process.exit(1); + } + }, + /** + * Sets the active tabs in a comma separated string. + * @param {Object} currentPage - The current page object + * @param {String} tmpl - The template as a string + * + * @returns The processed template with the active tabs set + */ + setActiveTabs: function (currentPage, tmpl) { + const regex = /%active-tabs%/g; - if (currentPage.height === undefined) { - console.error( - `[BoB] Required height property of ${currentPage.title} is not defined` - ); - process.exit(1); - } + if (currentPage.tabs) { + return tmpl.replace(regex, `data-tabs="${currentPage.tabs}"`); + } else { + return tmpl.replace(regex, ""); + } + }, + /** + * If the `currentPage.type` is of type webapi-tabbed, + * show the console, else hide. Also set the appropriate + * `aria-hidden` state + * @param {Object} currentPage - The current page object + * @param {String} tmpl - The template as a string + * + * @returns The processed template with console state set + */ + setConsoleState: function (currentPage, tmpl) { + const stateRegEx = /%console-state%/g; + const ariaHiddenStateRegEx = /%console-aria-state%/g; - return tmpl.replace(regex, currentPage.height); - }, - /** - * Sets the `` and `<h4>` main page title - * @param {Object} currentPage - The current page object - * @param {String} tmpl - The template as a string - * - * @returns The processed template with the titles set - */ - setMainTitle: function(currentPage, tmpl) { - const regex = /%title%/g; - let resultsArray = []; + if (currentPage.type === "webapi-tabbed") { + // no class to add, simple clear the pattern + tmpl = tmpl.replace(stateRegEx, ""); + return tmpl.replace(ariaHiddenStateRegEx, false); + } else { + tmpl = tmpl.replace(stateRegEx, "hidden"); + return tmpl.replace(ariaHiddenStateRegEx, true); + } + }, + /** + * Sets the appropriate class on the tabbed editor’s container + * element based on the height property defined in the example’s + * meta data + * @param {Object} currentPage - The current page object + * @param {String} tmpl - The template as a string + * + * @returns The processed template with the height class set + */ + setEditorHeight: function (currentPage, tmpl) { + const regex = /%editor-height%/g; - // replace all instances of `%title` with the `currentPage.title` - while ((resultsArray = regex.exec(tmpl)) !== null) { - tmpl = tmpl.replace( - resultsArray[0].trim(), - processor.preprocessHTML(currentPage.title) - ); - } - return tmpl; - }, - setCacheBuster: function(string, tmpl) { - const regex = /%cache-buster%/g; - return tmpl.replace(regex, string); + if (currentPage.height === undefined) { + console.error( + `[BoB] Required height property of ${currentPage.title} is not defined` + ); + process.exit(1); + } + + return tmpl.replace(regex, currentPage.height); + }, + /** + * Sets the `<title>` and `<h4>` main page title + * @param {Object} currentPage - The current page object + * @param {String} tmpl - The template as a string + * + * @returns The processed template with the titles set + */ + setMainTitle: function (currentPage, tmpl) { + const regex = /%title%/g; + let resultsArray = []; + + // replace all instances of `%title` with the `currentPage.title` + while ((resultsArray = regex.exec(tmpl)) !== null) { + tmpl = tmpl.replace( + resultsArray[0].trim(), + processor.preprocessHTML(currentPage.title) + ); } + return tmpl; + }, + setCacheBuster: function (string, tmpl) { + const regex = /%cache-buster%/g; + return tmpl.replace(regex, string); + }, }; diff --git a/package.json b/package.json index ea0092291..e46748ed6 100644 --- a/package.json +++ b/package.json @@ -80,10 +80,14 @@ ], "devDependencies": { "bundlesize": "0.18.1", + "eslint": "^8.2.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.25.3", "http-server": "14.0.0", "jest": "27.3.1", "jest-puppeteer": "6.0.0", "npm-run-all": "4.1.5", + "prettier": "^2.4.1", "prettier-eslint": "13.0.0", "puppeteer": "11.0.0" }, diff --git a/yarn.lock b/yarn.lock index 0d94c8567..c9905aa6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -481,6 +481,21 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@eslint/eslintrc@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.4.tgz#dfe0ff7ba270848d10c5add0715e04964c034b31" + integrity sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.0.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + "@hapi/hoek@^9.0.0": version "9.2.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.0.tgz#f3933a44e365864f4dad5db94158106d511e8131" @@ -493,6 +508,20 @@ dependencies: "@hapi/hoek" "^9.0.0" +"@humanwhocodes/config-array@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.6.0.tgz#b5621fdb3b32309d2d16575456cbc277fa8f021a" + integrity sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" @@ -856,6 +885,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/node@*": version "13.1.6" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.6.tgz#076028d0b0400be8105b89a0a55550c86684ffec" @@ -974,6 +1008,11 @@ acorn-jsx@^5.2.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== +acorn-jsx@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2, acorn-node@^1.6.1: version "1.8.2" resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8" @@ -1003,6 +1042,11 @@ acorn@^8.2.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.3.0.tgz#1193f9b96c4e8232f00b11a9edff81b2c8b98b88" integrity sha512-tqPKHZ5CaBJw0Xmy0ZZvLs1qTV+BNFSyvn77ASXkpBNfIRk8ev26fKrD9iLGwGA9zedPao52GSHzq8lyZG0NUw== +acorn@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" + integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== + agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -1130,6 +1174,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" @@ -1140,6 +1189,26 @@ array-filter@^1.0.0: resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM= +array-includes@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" + integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + +array.prototype.flat@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13" + integrity sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + asn1.js@^4.0.0: version "4.10.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" @@ -1530,6 +1599,14 @@ cached-path-relative@^1.0.0, cached-path-relative@^1.0.2: resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.2.tgz#a13df4196d26776220cc3356eb147a52dba2c6db" integrity sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg== +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -1953,13 +2030,20 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -debug@4, debug@4.3.2, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: +debug@4, debug@4.3.2, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== dependencies: ms "2.1.2" +debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@^3.0.0, debug@^3.1.1: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -1967,6 +2051,13 @@ debug@^3.0.0, debug@^3.1.1: dependencies: ms "^2.1.1" +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + decimal.js@^10.2.1: version "10.2.1" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3" @@ -2082,6 +2173,13 @@ dlv@^1.1.0: resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -2219,6 +2317,32 @@ es-abstract@^1.18.0-next.0: string.prototype.trimend "^1.0.1" string.prototype.trimstart "^1.0.1" +es-abstract@^1.19.0, es-abstract@^1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" + integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.1" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.1" + is-string "^1.0.7" + is-weakref "^1.0.1" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -2243,6 +2367,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" @@ -2255,6 +2384,47 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" +eslint-config-prettier@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" + integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== + +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + +eslint-module-utils@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz#b435001c9f8dd4ab7f6d0efcae4b9696d4c24b7c" + integrity sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ== + dependencies: + debug "^3.2.7" + find-up "^2.1.0" + pkg-dir "^2.0.0" + +eslint-plugin-import@^2.25.3: + version "2.25.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz#a554b5f66e08fb4f6dc99221866e57cfff824766" + integrity sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.1" + has "^1.0.3" + is-core-module "^2.8.0" + is-glob "^4.0.3" + minimatch "^3.0.4" + object.values "^1.1.5" + resolve "^1.20.0" + tsconfig-paths "^3.11.0" + eslint-scope@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5" @@ -2271,6 +2441,14 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-6.0.0.tgz#9cf45b13c5ac8f3d4c50f46a5121f61b3e318978" + integrity sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" @@ -2278,6 +2456,13 @@ eslint-utils@^2.0.0, eslint-utils@^2.1.0: dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" @@ -2293,6 +2478,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== +eslint-visitor-keys@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz#eee4acea891814cda67a7d8812d9647dd0179af2" + integrity sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA== + eslint@^7.9.0: version "7.14.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.14.0.tgz#2d2cac1d28174c510a97b377f122a5507958e344" @@ -2336,6 +2526,50 @@ eslint@^7.9.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +eslint@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.2.0.tgz#44d3fb506d0f866a506d97a0fc0e90ee6d06a815" + integrity sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw== + dependencies: + "@eslint/eslintrc" "^1.0.4" + "@humanwhocodes/config-array" "^0.6.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^6.0.0" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.0.0" + espree "^9.0.0" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.2.0" + semver "^7.2.1" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + espree@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" @@ -2354,6 +2588,15 @@ espree@^7.3.0: acorn-jsx "^5.2.0" eslint-visitor-keys "^1.3.0" +espree@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.0.0.tgz#e90a2965698228502e771c7a58489b1a9d107090" + integrity sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ== + dependencies: + acorn "^8.5.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^3.0.0" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -2373,6 +2616,13 @@ esquery@^1.2.0: dependencies: estraverse "^5.1.0" +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" @@ -2485,7 +2735,7 @@ fast-deep-equal@^2.0.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -2526,6 +2776,13 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -2557,6 +2814,13 @@ find-process@^1.4.5: commander "^5.1.0" debug "^4.1.1" +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -2574,11 +2838,24 @@ flat-cache@^2.0.1: rimraf "2.6.3" write "1.0.3" +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + flatted@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== +flatted@^3.1.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.4.tgz#28d9969ea90661b5134259f312ab6aa7929ac5e2" + integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw== + follow-redirects@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f" @@ -2695,6 +2972,15 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -2707,6 +2993,14 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + github-build@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/github-build/-/github-build-1.2.2.tgz#d5d5d989dc8cead0d46e2bb0864be7fddd50be15" @@ -2726,6 +3020,13 @@ glob-parent@^5.0.0: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@7.2.0, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" @@ -2768,6 +3069,13 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" +globals@^13.6.0, globals@^13.9.0: + version "13.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.12.0.tgz#4d733760304230a0082ed96e21e5c565f898089e" + integrity sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg== + dependencies: + type-fest "^0.20.2" + graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" @@ -2788,6 +3096,11 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" @@ -2808,6 +3121,18 @@ has-symbols@^1.0.0, has-symbols@^1.0.1: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -3061,6 +3386,15 @@ insert-module-globals@^7.2.1: undeclared-identifiers "^1.1.2" xtend "^4.0.0" +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + is-arguments@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" @@ -3071,6 +3405,21 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-buffer@^1.0.2, is-buffer@^1.1.0, is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -3086,6 +3435,11 @@ is-callable@^1.2.2: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + is-ci@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.0.tgz#c7e7be3c9d8eef7d0fa144390bd1e4b88dc4c994" @@ -3100,6 +3454,13 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" +is-core-module@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.0.tgz#0321336c3d0925e497fd97f5d95cb114a5ccd548" + integrity sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw== + dependencies: + has "^1.0.3" + is-date-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" @@ -3154,11 +3515,30 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-negative-zero@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number-object@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -3190,11 +3570,31 @@ is-regex@^1.1.1: dependencies: has-symbols "^1.0.1" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" + integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== + is-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -3202,6 +3602,13 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" +is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + is-typed-array@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d" @@ -3217,6 +3624,13 @@ is-typedarray@^1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-weakref@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" + integrity sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ== + dependencies: + call-bind "^1.0.0" + is-windows@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" @@ -3804,6 +4218,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsdom@^16.6.0: version "16.6.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.6.0.tgz#f79b3786682065492a3da6a60a4695da983805ac" @@ -3857,6 +4278,13 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" @@ -3958,6 +4386,14 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -3970,7 +4406,7 @@ lodash.memoize@~3.0.3: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" integrity sha1-LcvSwofLwKVcxCMovQxzYVDVPj8= -lodash.merge@^4.6.0: +lodash.merge@^4.6.0, lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== @@ -4153,6 +4589,11 @@ module-deps@^6.2.3: through2 "^2.0.0" xtend "^4.0.0" +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + ms@2.1.2, ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -4281,6 +4722,11 @@ object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= +object-inspect@^1.11.0, object-inspect@^1.9.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== + object-inspect@^1.7.0, object-inspect@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" @@ -4311,6 +4757,25 @@ object.assign@^4.1.1: has-symbols "^1.0.1" object-keys "^1.1.1" +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -4364,6 +4829,13 @@ os-homedir@^1.0.1: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + p-limit@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" @@ -4371,6 +4843,13 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -4378,6 +4857,11 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -4447,6 +4931,11 @@ path-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -4539,6 +5028,13 @@ pkg-dir@4.2.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + portfinder@^1.0.28: version "1.0.28" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" @@ -4602,6 +5098,11 @@ prettier@^2.0.0: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== +prettier@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" + integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== + pretty-format@^23.0.1: version "23.6.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" @@ -4819,6 +5320,11 @@ regexpp@^3.1.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -4891,7 +5397,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@3.0.2, rimraf@^3.0.0: +rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -5016,6 +5522,15 @@ shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -5227,6 +5742,14 @@ string.prototype.trimend@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + string.prototype.trimstart@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" @@ -5235,6 +5758,14 @@ string.prototype.trimstart@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -5277,6 +5808,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -5483,6 +6021,16 @@ tree-kill@^1.2.2: resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== +tsconfig-paths@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" + integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + tslib@^1.8.1: version "1.13.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" @@ -5531,6 +6079,11 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -5566,6 +6119,16 @@ umd@^3.0.0: resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.3.tgz#aa9fe653c42b9097678489c01000acb69f0b26cf" integrity sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow== +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + unbzip2-stream@1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" @@ -5790,6 +6353,17 @@ whatwg-url@^8.5.0: tr46 "^2.0.2" webidl-conversions "^6.1.0" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + which-pm-runs@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"