diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 00000000..b26807e0 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,19 @@ +[bumpversion] +current_version = 1, 0, 0, 'alpha', 6 +commit = False +tag = False +parse = (?P\d+)\,\ (?P\d+)\,\ (?P\d+)\,\ \'(?P\S+)\'\,\ (?P\d+) +serialize = + {major}, {minor}, {patch}, '{release}', {build} + +[bumpversion:part:release] +optional_value = final +values = + alpha + candidate + final + +[bumpversion:part:build] + +[bumpversion:file:jupyterlab/_version.py] + diff --git a/.eslintignore b/.eslintignore index 20700c60..89f571a6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -17,6 +17,7 @@ dev_mode/workspaces examples/app/build examples/app/themes examples/app/schemas +examples/chrome-example-test.js tests/**/coverage docs/_build docs/api diff --git a/.eslintrc b/.eslintrc index e9b61604..210d8b9c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,7 +7,7 @@ "extends": ["eslint:recommended", "prettier"], "plugins": ["prettier"], "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 2017, "sourceType": "module", "ecmaFeatures": { "modules": true, diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d5c0e606..b289e910 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,26 @@ -Fixes # + -**Screenshots** -If applicable, add before and after screenshots to help show the issue being fixed, or the appearance of a new feature. +## References + + + + + +## Code changes + + + +## User-facing changes + + + + + +## Backwards-incompatible changes + + diff --git a/.gitignore b/.gitignore index 58eb0f49..7a702c2e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,16 +2,20 @@ MANIFEST build dist lib + jupyterlab/static jupyterlab/schemas jupyterlab/themes jupyterlab/geckodriver + dev_mode/schemas dev_mode/static dev_mode/themes dev_mode/workspaces dev_mode/stats.json +packages/nbconvert-css/style/ + packages/theme-*/static node_modules .cache @@ -46,3 +50,5 @@ lerna-debug.log yarn-error.log junit.xml + +*.tsbuildinfo diff --git a/.prettierignore b/.prettierignore index ca3e7368..8b925a82 100644 --- a/.prettierignore +++ b/.prettierignore @@ -19,4 +19,5 @@ examples/app/schemas tests/**/coverage docs/_build docs/api -**/package.json \ No newline at end of file +**/package.json +.eggs diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69d40fc9..e1601ea1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,20 +4,22 @@ If you're reading this section, you're probably interested in contributing to JupyterLab. Welcome and thanks for your interest in contributing! Please take a look at the Contributor documentation, familiarize yourself with -using JupyterLab, and introduce yourself on the mailing list and share -what area of the project you are interested in working on. Please see also the -Jupyter [Community Guides](https://jupyter.readthedocs.io/en/latest/community/content-community.html). +using JupyterLab, and introduce yourself to the community (on the mailing list +or discourse) and share what area of the project you are interested in working +on. Please also see the Jupyter [Community Guides](https://jupyter.readthedocs.io/en/latest/community/content-community.html). We have labeled some issues as [good first issue](https://github.com/jupyterlab/jupyterlab/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or [help wanted](https://github.com/jupyterlab/jupyterlab/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) that we believe are good examples of small, self-contained changes. We encourage those that are new to the code base to implement and/or ask questions about these issues. -## Tag Issues with Labels +If you believe you’ve found a security vulnerability in JupyterLab or any +Jupyter project, please report it to +[security@ipython.org](mailto:security@ipython.org). If you prefer to encrypt your +security reports, you can use [this PGP public +key](https://jupyter-notebook.readthedocs.io/en/stable/_downloads/ipython_security.asc). -Users without the commit rights to the jupyterlab repository can also tag the issues with labels. For example: To apply the label `foo` and `bar baz` to an issue, comment `@meeseeksdev tag foo "bar baz"` on the issue. - -## General Guidelines +## General Guidelines for Contributing For general documentation about contributing to Jupyter projects, see the [Project Jupyter Contributor Documentation](https://jupyter.readthedocs.io/en/latest/contributor/content-contributor.html) and [Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md). @@ -39,6 +41,20 @@ installing a prettier extension for your code editor and configuring it to format your code with a keyboard shortcut or automatically on save. +## Submitting a Pull Request Contribution + +Generally, an issue should be opened describing a piece of proposed work and the +issues it solves before a pull request is opened. This lets community members +participate in the design discussion, makes others aware of work being done, and +sets the stage for a fruitful community interaction. A pull request should +reference the issue it is addressing. + +### Tag Issues with Labels + +Users without the commit rights to the JupyterLab repository can tag issues with +labels using the `@meeseeksdev` bot. For example: To apply the label `foo` and +`bar baz` to an issue, comment `@meeseeksdev tag foo "bar baz"` on the issue. + ## Setting Up a Development Environment You can launch a binder with the latest JupyterLab master to test something (this may take a few minutes to load): [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyterlab/jupyterlab/master?urlpath=lab-dev/) @@ -138,9 +154,11 @@ jupyter lab --dev-mode ``` Development mode ensures that you are running the JavaScript assets that are -built in the dev-installed Python package. When running in dev mode, a red -stripe will appear at the top of the page; this is to indicate running -an unreleased version. +built in the dev-installed Python package. Note that when running in dev mode, +extensions will not be activated by default. + +When running in dev mode, a red stripe will appear at the top of the page; +this is to indicate running an unreleased version. ### Build and Run the Tests @@ -194,8 +212,8 @@ jlpm create:test #### Running Jest Tests For those test folders that use `jest`, they can be run as `jlpm test` to run the files -directly. You can also use `jlpm test --namePattern=` to specify specific test -suite names, and `jlpm test --pathPattern=` to specify specific test module names. In order to watch the code, add a `debugger` line in your code and run `jlpm watch`. This will start a node V8 debugger, which can be debugged +directly. You can also use `jlpm test --testNamePattern=` to specify specific test +suite names, and `jlpm test --testPathPattern=` to specify specific test module names. In order to watch the code, add a `debugger` line in your code and run `jlpm watch`. This will start a node V8 debugger, which can be debugged in Chrome by browsing to `chrome://inspect/` and launching the remote session. ### Build and run the stand-alone examples @@ -345,7 +363,10 @@ a package by importing from it in the TypeScript file, and then running: `jlpm run integrity` from the repo root. We also have scripts for creating and removing packages in `packages/`, -`jlpm run create:package` and `jlpm run remove:package`. +`jlpm run create:package` and `jlpm run remove:package`. When creating a package, +if it is meant to be included in the core bundle, add the `jupyterlab: { coreDependency: true }` +metadata to the `package.json`. Packages with `extension` or `mimeExtension` metadata +are considered to be a core dependency unless they are explicitly marked otherwise. ## Testing Changes to External Packages diff --git a/README.md b/README.md index fa372b5b..319014c5 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ # [JupyterLab](http://jupyterlab.github.io/jupyterlab/) [![PyPI version](https://badge.fury.io/py/jupyterlab.svg)](https://badge.fury.io/py/jupyterlab) +[![Downloads](https://pepy.tech/badge/jupyterlab/month)](https://pepy.tech/project/jupyterlab/month) [![Build Status](https://dev.azure.com/jupyterlab/jupyterlab/_apis/build/status/jupyterlab.jupyterlab?branchName=master)](https://dev.azure.com/jupyterlab/jupyterlab/_build/latest?definitionId=1&branchName=master) [![Documentation Status](https://readthedocs.org/projects/jupyterlab/badge/?version=stable)](http://jupyterlab.readthedocs.io/en/stable/) [![GitHub](https://img.shields.io/badge/issue_tracking-github-blue.svg)](https://github.com/jupyterlab/jupyterlab/issues) @@ -56,7 +57,7 @@ conda install -c conda-forge jupyterlab #### pip -pip is a package management system for installing and updating Python packages, and comes with any Python installation. On Ubuntu and Fedora Linux, use the system package manager to install the `python3-pip` package. [\_The Hitchhiker's Guide to Python_provides guidance on how to install Python](https://docs.python-guide.org/starting/installation/); Another option is to [install Python directly from python.org](https://www.python.org/getit/). We suggest you [upgrade pip](https://pip.pypa.io/en/stable/installing/) before using it to install other programs. +pip is a package management system for installing and updating Python packages, and comes with any Python installation. On Ubuntu, SUSE Enterprise Linux, openSUSE, and Fedora Linux, use the system package manager to install the `python3-pip` package. [\_The Hitchhiker's Guide to Python_provides guidance on how to install Python](https://docs.python-guide.org/starting/installation/); Another option is to [install Python directly from python.org](https://www.python.org/getit/). We suggest you [upgrade pip](https://pip.pypa.io/en/stable/installing/) before using it to install other programs. JupyterLab requires Python 3.5 or higher. @@ -79,7 +80,7 @@ Adding `--user` after `pip install` will install the files to a local user insta #### pipenv -`Pipenv` provides users and developers of applications with an easy method to setup a working environment, however Python must be installed first. See the [pipenv installation documentation](https://docs.pipenv.org/install) to use Pipenv if it is not installed. +`Pipenv` provides users and developers of applications with an easy method to setup a working environment, however Python must be installed first. See the [pipenv installation documentation](https://docs.pipenv.org/en/latest/install/) to use Pipenv if it is not installed. `pipenv` can be installed as: @@ -172,7 +173,7 @@ JupyterLab's current maintainers are listed in alphabetical order, with affiliat architecture). - Jason Grout, Bloomberg (co-creator, vision, general development). - Fernando Perez, UC Berkeley (co-creator, vision). -- Ian Rose, UC Berkeley (Real-time collaboration, document architecture). +- Ian Rose, Quansight/City of LA (general core development, extensions). - Saul Shanabrook, Quansight (general development, extensions) - Steven Silvester, JPMorgan Chase (co-creator, release management, packaging, prolific contributions throughout the code base). @@ -198,6 +199,6 @@ We have videoconference meetings every week where we discuss what we have been w Anyone is welcome to attend, if they would like to discuss a topic or just to listen in. -- When: Wednesdays 9AM PT +- When: Wednesdays [9AM Pacific Time](https://www.thetimezoneconverter.com/?t=9%3A00%20am&tz=San%20Francisco&) - Where: [`calpoly/jupyter` Zoom](https://calpoly.zoom.us/my/jupyter) - What: [Meeting notes on Dropbox Paper](https://paper.dropbox.com/doc/JLab-Dev-Meeting-Minutes-2019--AZlv6L3jnv8ntl6kJK88y5M5Ag-Lj0P4kI2JrbA0eXHZSdY5) diff --git a/RELEASE.md b/RELEASE.md index b4c36bfc..ed496843 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,20 +2,27 @@ This document guides a contributor through creating a release of JupyterLab. -## Check installed tools - Review `CONTRIBUTING.md`. Make sure all the tools needed to generate the built JavaScript files are properly installed. ## Creating a full release -We publish the npm packages, a Python source package, and a Python universal binary wheel. We also publish a conda package on conda-forge (see below). -See the Python docs on [package uploading](https://packaging.python.org/guides/tool-recommendations/) -for twine setup instructions and for why twine is the recommended method. +We publish the npm packages, a Python source package, and a Python universal +binary wheel. We also publish a conda package on conda-forge (see below). See +the Python docs on [package +uploading](https://packaging.python.org/guides/tool-recommendations/) for twine +setup instructions and for why twine is the recommended method. ## Getting a clean environment -For convenience, here are commands for getting a completely clean repo. This makes sure that we don't have any extra tags or commits in our repo (especially since we will push our tags later in the process), and that we are on the master branch. +For convenience, here are commands for getting a completely clean repo. This +makes sure that we don't have any extra tags or commits in our repo (especially +since we will push our tags later in the process), and that we are on the master +branch. + +Note that right now, we pin tornado to version 5 because there are some +incompatibilities with tornado 6. See +https://github.com/jupyterlab/jupyterlab/issues/6131. ```bash cd release @@ -23,47 +30,55 @@ conda deactivate conda remove --all -y -n jlabrelease rm -rf jupyterlab -conda create -c conda-forge -y -n jlabrelease notebook nodejs twine +conda create -c conda-forge -y -n jlabrelease notebook nodejs twine 'tornado<6' conda activate jlabrelease git clone git@github.com:jupyterlab/jupyterlab.git cd jupyterlab pip install -ve . ``` -### Publish the npm packages +## How Python and NPM versions increment -The command below ensures the latest dependencies and built files, -then prompts you to select package versions. When one package has an -effective major release, the packages that depend on it should also get a -major release, to prevent consumers that are using the `^` semver -requirement from getting a conflict. Note that we publish the -JavaScript packages using the `next` tag until we are ready for the -final release. +Here is an example of how version numbers progress through a release process. -```bash -jlpm run publish:next -``` +| Command | Python Version Change | NPM Version change | +| ---------------------------------- | --------------------- | ---------------------------------- | +| `jlpm bumpversion minor` | x.y.z-> x.(y+1).0.a0 | All a.b.c -> a.(b+1).0-alpha.0 | +| `jlpm bumpversion build` | x.y.z.a0-> x.y.z.a1 | All a.b.c-alpha.0 -> a.b.c-alpha.1 | +| `jlpm bumpversion release` | x.y.z.a1-> x.y.z.rc0 | All a.b.c-alpha.1 -> a.b.c-rc.0 | +| `jlpm bumpversion release` | x.y.z.rc0-> x.y.z | All a.b.c-rc0 -> a.b.c | +| `jlpm patch:release [...packages]` | x.y.z -> x.y.(z+1) | Selected a.b.c -> a.b.(c+1) | -### Publish the Python package +### JS major release(s) -- Update `jupyterlab/_version.py` with an `rc` version -- Prep the static assets for release: +Command: +`jlpm bump:js:major [...packages]` -```bash -jlpm run build:update -``` +Results: -- Commit and tag and push the tag -- Create the Python release artifacts: +- Python package is not affected. +- JS dependencies are also bumped a major version. +- Packages that have already had a major bump in this prerelease cycle are not affected. +- All affected packages changed to match the current release type of the Python package (`alpha` or `rc`). -```bash -rm -rf dist build -python setup.py sdist -python setup.py bdist_wheel --universal -twine upload dist/* -``` +### Publishing Packages + +We use [bump2version](https://github.com/c4urself/bump2version) to manage the Python +version, and we keep the JS versions and tags in sync with the release cycle. +For a backwards-incompatible changes to JS packages, bump the major version number(s) +using `jlpm run bump:js:major` with the package name(s). For a major release of +JupyterLab itself, run `jlpm run bumpversion major`. + +- Run `jlpm run bumpversion build` to create a new `alpha` version. +- Push the commits and tags as prompted. +- Run `jlpm run publish:all` to publish the JS and Python packages. + Execute the suggested commands after doing a quick sanity check. + If there is a network error during JS publish, run `jlpm run publish:all --skip-build` to resume publish without requiring another + clean and build phase of the JS packages. +- Run `jlpm run bumpversion release` to switch to an `rc` version. + (running `jlpm run bumpversion build` will then increment `rc` versions). -### Post prerelease checklist +### Post release candidate checklist - [ ] Modify and run `python scripts/milestone_check.py` to check the issues assigned to this milestone - [ ] Write [release highlights](https://github.com/jupyterlab/jupyterlab/blob/master/docs/source/getting_started/changelog.rst), starting with: @@ -89,24 +104,23 @@ twine upload dist/* - [ ] [Notebook toolbar button](https://github.com/jupyterlab/jupyterlab/blob/master/docs/source/developer/notebook.rst#adding-a-button-to-the-toolbar) - [ ] Update the [xkcd tutorial](https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#updating-the-xkcd-tutorial) - [ ] At this point, there may have been some more commits merged. Run `python scripts/milestone_check.py` to check the issues assigned to this milestone one more time. Update changelog if necessary. -- [ ] Publish the final (not prerelease) JavaScript packages using `jlpm run publish:next` at some point. Now do the actual final release: -- [ ] Update `jupyterlab/_version.py` with a final version -- [ ] Make a final Python release +- [ ] Run `jlpm run bumpversion release` to switch to final release +- [ ] Push the commit and tags to master +- [ ] Run `jlpm run publish:all` to publish the packages - [ ] Create a branch for the release and push to GitHub - [ ] Merge the PRs on the other repos and set the default branch of the xckd repo -- [ ] Update the `latest` npm tags by running `jlpm run update:dist-tags` and running the commands it prints out - [ ] Publish to [conda-forge](https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#publishing-to-conda-forge). After a few days (to allow for possible patch releases), set up development for the next release: -- [ ] Update `jupyterlab/_version.py` with a `dev` version -- [ ] Run `jlpm integrity` to update the `dev_mode` version -- [ ] Commit and push the version update to master +- [ ] Run `jlpm run bumpversion minor` to bump to alpha for the next alpha release +- [ ] Put the commit and tags to master +- [ ] Run `jlpm run publish:all` to publish the packages - [ ] Release the other repos as appropriate - [ ] Update version for [binder](https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#update-version-for-binder) @@ -203,21 +217,16 @@ shasum -a 256 dist/*.tar.gz - Create a PR with the version bump - Update `recipe/meta.yaml` with the new version and md5 and reset the build number to 0. -## Making a patch release JavaScript package(s) +## Making a patch release - Backport the change to the previous release branch -- Make a new PR against the previous branch -- Run the following script, where the package is in `/packages/package-folder-name` (note that multiple packages can be given): +- Run the following script, where the package is in `/packages/package-folder-name` (note that multiple packages can be given, or no packages for a Python-only patch release): ```bash jlpm run patch:release package-folder-name ``` -- Push the resulting commit and tag. -- Create a new Python release on the previous branch -- Cherry pick the patch commit to the master branch -- Update the dev version of the master branch in `_version.py` -- Update the `package.json` file in `dev_mode` with the new JupyterLab version in the `jupyterlab` metadata section. +- Push the resulting commit and tag ## Update version for binder diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8b9bbdca..59099c05 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,8 +15,8 @@ jobs: Python: group: 'python' testResultsFiles: 'junit.xml' - CLI: - group: 'cli' + Usage: + group: 'usage' python.version: '3.5' Docs: group: 'docs' diff --git a/buildutils/README.md b/buildutils/README.md new file mode 100644 index 00000000..5ab7882b --- /dev/null +++ b/buildutils/README.md @@ -0,0 +1,6 @@ +# @jupyterlab/buildutils + +A JupyterLab package which provides utility functions that are used to compile +and build JupyterLab. + +This package is only intended for use within Node.js environments. diff --git a/buildutils/package.json b/buildutils/package.json index 67659fbf..35425201 100644 --- a/buildutils/package.json +++ b/buildutils/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/buildutils", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Build Utilities", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -27,10 +31,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc", "clean": "rimraf lib", @@ -41,26 +41,25 @@ "@phosphor/coreutils": "^1.3.0", "@yarnpkg/lockfile": "^1.1.0", "child_process": "~1.0.2", - "commander": "~2.18.0", - "fs-extra": "~4.0.2", + "commander": "~2.20.0", + "fs-extra": "^8.0.1", "glob": "~7.1.2", - "inquirer": "~3.3.0", - "mini-css-extract-plugin": "~0.4.4", - "package-json": "~5.0.0", + "inquirer": "^6.3.1", + "mini-css-extract-plugin": "~0.6.0", + "package-json": "^6.3.0", "path": "~0.12.7", - "semver": "^5.5.0", - "sort-package-json": "~1.7.1", - "typescript": "~3.3.1", - "webpack": "~4.12.0" + "semver": "^6.1.0", + "sort-package-json": "~1.22.1", + "typescript": "~3.5.1", + "webpack": "^4.32.2" }, "devDependencies": { - "@types/fs-extra": "~4.0.3", - "@types/glob": "~5.0.33", - "@types/inquirer": "0.0.36", + "@types/fs-extra": "^7.0.0", + "@types/glob": "^7.1.1", + "@types/inquirer": "^6.0.3", "@types/mini-css-extract-plugin": "^0.2.0", - "@types/node": "~8.0.47", - "@types/webpack": "^4.4.17", + "@types/node": "^12.0.2", + "@types/webpack": "^4.4.32", "rimraf": "~2.6.2" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + } } diff --git a/buildutils/src/bump-js-major.ts b/buildutils/src/bump-js-major.ts new file mode 100644 index 00000000..246c20a6 --- /dev/null +++ b/buildutils/src/bump-js-major.ts @@ -0,0 +1,104 @@ +/*----------------------------------------------------------------------------- +| Copyright (c) Jupyter Development Team. +| Distributed under the terms of the Modified BSD License. +|----------------------------------------------------------------------------*/ + +import commander from 'commander'; +import semver from 'semver'; +import path from 'path'; +import * as utils from './utils'; + +/** + * Get the packages that depend on a given package, recursively. + */ +export function getDeps( + pkgName: string, + lut: { [key: string]: { [key: string]: string } } +): Set { + const deps: Set = new Set(); + for (let name in lut) { + if ('@jupyterlab/' + pkgName in lut[name]) { + const otherName = name.replace('@jupyterlab/', ''); + deps.add(otherName); + const otherDeps = getDeps(otherName, lut); + otherDeps.forEach(dep => { + deps.add(dep); + }); + } + } + return deps; +} + +// Specify the program signature. +commander + .description('Bump the major version of JS package(s)') + .arguments(' [others...]') + .option('--force', 'Force the upgrade') + .option('--dry-run', 'Show what would be executed') + .action((pkg: string, others: Array, options: any) => { + others.push(pkg); + const toBump: Set = new Set(); + const ignoreBump: Set = new Set(); + const maybeBump = (pkg: string) => { + if (pkg in toBump || pkg in ignoreBump) { + return; + } + const version = utils.getJSVersion(pkg); + if (semver.minor(version) === 0 && semver.prerelease(version)) { + console.warn(`${pkg} has already been bumped`); + ignoreBump.add(pkg); + } else { + toBump.add(pkg); + } + }; + others.forEach(pkg => { + maybeBump(pkg); + }); + + // Create a lut of dependencies + const lut: { [key: string]: { [key: string]: string } } = {}; + utils.getCorePaths().forEach(corePath => { + const pkgDataPath = path.join(corePath, 'package.json'); + const data = utils.readJSONFile(pkgDataPath); + lut[data.name] = data.dependencies || {}; + }); + + // Look for dependencies of bumped packages + Array.from(toBump).forEach(val => { + const deps = getDeps(val, lut); + deps.forEach(dep => { + maybeBump(dep); + }); + }); + + if (!toBump.size) { + console.warn('No packages found to bump!'); + return; + } + + const pyVersion = utils.getPythonVersion(); + let preId = ''; + if (pyVersion.includes('a')) { + preId = 'alpha'; + } else if (pyVersion.includes('rc')) { + preId = 'rc'; + } else { + throw new Error( + 'Cannot bump JS packages until we switch to prerelease mode' + ); + } + const pkgs = Array.from(toBump).join(','); + let cmd = `lerna version premajor --preid=${preId} --force-publish=${pkgs} --no-push`; + if (options.force) { + cmd += ' --yes'; + } + + if (options.dryRun) { + console.log('Would run:'); + console.log(cmd); + return; + } + utils.run(cmd); + }); + +commander.parse(process.argv); diff --git a/buildutils/src/bumpversion.ts b/buildutils/src/bumpversion.ts new file mode 100644 index 00000000..d8463111 --- /dev/null +++ b/buildutils/src/bumpversion.ts @@ -0,0 +1,105 @@ +/*----------------------------------------------------------------------------- +| Copyright (c) Jupyter Development Team. +| Distributed under the terms of the Modified BSD License. +|----------------------------------------------------------------------------*/ + +import commander from 'commander'; +import * as utils from './utils'; + +// Specify the program signature. +commander + .description('Update the version and publish') + .option('--dry-run', 'Dry run') + .option('--force', 'Force the upgrade') + .arguments('') + .action((spec: any, opts: any) => { + // Get the previous version. + const prev = utils.getPythonVersion(); + + // Make sure we have a valid version spec. + const options = ['major', 'minor', 'release', 'build']; + if (options.indexOf(spec) === -1) { + throw new Error(`Version spec must be one of: ${options}`); + } + if ( + prev.indexOf('a') === -1 && + prev.indexOf('rc') === -1 && + spec === 'release' + ) { + throw new Error('Use "major" or "minor" to switch back to alpha release'); + } + if ( + prev.indexOf('a') === -1 && + prev.indexOf('rc') === -1 && + spec === 'build' + ) { + throw new Error('Cannot increment a build on a final release'); + } + + // Run pre-bump script. + utils.prebump(); + + // Handle dry runs. + if (opts.dryRun) { + utils.run(`bumpversion --dry-run --verbose ${spec}`); + return; + } + + // If this is a major release during the alpha cycle, bump + // just the Python version. + if (prev.indexOf('a') !== -1 && spec === 'major') { + // Bump the version. + utils.run(`bumpversion ${spec}`); + + // Run the post-bump script. + utils.postbump(); + + return; + } + + // Determine the version spec to use for lerna. + let lernaVersion = 'preminor'; + if (spec === 'build') { + lernaVersion = 'prerelease'; + // a -> rc + } else if (spec === 'release' && prev.indexOf('a') !== -1) { + lernaVersion = 'prerelease --preid=rc'; + // rc -> final + } else if (spec === 'release' && prev.indexOf('rc') !== -1) { + lernaVersion = 'patch'; + } + let cmd = `lerna version -m \"New version\" --force-publish=* --no-push ${lernaVersion}`; + if (opts.force) { + cmd += ' --yes'; + } + + let oldVersion = utils.run( + 'git rev-parse HEAD', + { + stdio: 'pipe', + encoding: 'utf8' + }, + true + ); + utils.run(cmd); + let newVersion = utils.run( + 'git rev-parse HEAD', + { + stdio: 'pipe', + encoding: 'utf8' + }, + true + ); + if (oldVersion === newVersion) { + // lerna didn't version anything, so we assume the user aborted + throw new Error('Lerna aborted'); + } + + // Bump the version. + utils.run(`bumpversion ${spec}`); + + // Run the post-bump script. + utils.postbump(); + }); + +commander.parse(process.argv); diff --git a/buildutils/src/create-package.ts b/buildutils/src/create-package.ts index e6418582..6749e4eb 100644 --- a/buildutils/src/create-package.ts +++ b/buildutils/src/create-package.ts @@ -8,7 +8,7 @@ import * as inquirer from 'inquirer'; import * as path from 'path'; import * as utils from './utils'; -let questions = [ +let questions: inquirer.Question[] = [ { type: 'input', name: 'name', @@ -21,7 +21,7 @@ let questions = [ } ]; -inquirer.prompt(questions).then(answers => { +void inquirer.prompt(questions).then(answers => { let { name, description } = answers; let dest = path.resolve(path.join('.', 'packages', name)); if (fs.existsSync(dest)) { diff --git a/buildutils/src/create-test-package.ts b/buildutils/src/create-test-package.ts index c88465bb..4cd35598 100644 --- a/buildutils/src/create-test-package.ts +++ b/buildutils/src/create-test-package.ts @@ -33,5 +33,5 @@ if (require.main === module) { } data.name = name; utils.writePackageData(jsonPath, data); - fs.ensureDir(path.join(dest, 'src')); + fs.ensureDirSync(path.join(dest, 'src')); } diff --git a/buildutils/src/create-theme.ts b/buildutils/src/create-theme.ts index ed6c155c..5fdc2fe3 100644 --- a/buildutils/src/create-theme.ts +++ b/buildutils/src/create-theme.ts @@ -8,7 +8,7 @@ import * as inquirer from 'inquirer'; import * as path from 'path'; import * as utils from './utils'; -let questions = [ +let questions: inquirer.Question[] = [ { type: 'input', name: 'name', @@ -57,7 +57,7 @@ const plugin: JupyterFrontEndPlugin = { export default plugin; `; -inquirer.prompt(questions).then(answers => { +void inquirer.prompt(questions).then(answers => { let { name, title, description } = answers; let dest = path.resolve(path.join('.', name)); if (fs.existsSync(dest)) { @@ -81,7 +81,7 @@ inquirer.prompt(questions).then(answers => { ['lib', 'node_modules', 'static'].forEach(folder => { let folderPath = path.join('.', name, folder); if (fs.existsSync(folderPath)) { - fs.remove(folderPath); + fs.removeSync(folderPath); } }); diff --git a/buildutils/src/ensure-package.ts b/buildutils/src/ensure-package.ts index 060b48a1..10e24b78 100644 --- a/buildutils/src/ensure-package.ts +++ b/buildutils/src/ensure-package.ts @@ -212,6 +212,16 @@ export async function ensurePackage( delete data.devDependencies; } + // Make sure there are no gitHead keys, which are only temporary keys used + // when a package is actually being published. + delete data.gitHead; + + // Ensure there is a minimal prepublishOnly script + if (!data.private && !data.scripts.prepublishOnly) { + messages.push(`prepublishOnly script missing in ${pkgPath}`); + data.scripts.prepublishOnly = 'npm run build'; + } + if (utils.writePackageData(path.join(pkgPath, 'package.json'), data)) { messages.push('Updated package.json'); } diff --git a/buildutils/src/ensure-repo.ts b/buildutils/src/ensure-repo.ts index 87889d33..81302bb4 100644 --- a/buildutils/src/ensure-repo.ts +++ b/buildutils/src/ensure-repo.ts @@ -27,7 +27,7 @@ let UNUSED: { [key: string]: string[] } = { '@jupyterlab/services': ['node-fetch', 'ws'], '@jupyterlab/testutils': ['node-fetch', 'identity-obj-proxy'], '@jupyterlab/test-csvviewer': ['csv-spectrum'], - '@jupyterlab/vega4-extension': ['vega', 'vega-lite'] + '@jupyterlab/vega5-extension': ['vega', 'vega-lite'] }; let pkgData: { [key: string]: any } = {}; @@ -95,17 +95,12 @@ function ensureMetaPackage(): string[] { * Ensure the jupyterlab application package. */ function ensureJupyterlab(): string[] { - // Get the current version of JupyterLab - let cmd = 'python setup.py --version'; - let version = utils.run(cmd, { stdio: 'pipe' }, true); - let basePath = path.resolve('.'); let corePath = path.join(basePath, 'dev_mode', 'package.json'); let corePackage = utils.readJSONFile(corePath); corePackage.jupyterlab.extensions = {}; corePackage.jupyterlab.mimeExtensions = {}; - corePackage.jupyterlab.version = version; corePackage.jupyterlab.linkedPackages = {}; corePackage.dependencies = {}; @@ -120,7 +115,23 @@ function ensureJupyterlab(): string[] { } catch (e) { return; } - if (data.private === true || data.name === '@jupyterlab/metapackage') { + // Determine whether to include the package. + if (!data.jupyterlab) { + return; + } + // Skip if explicitly marked as not a core dep. + if ( + 'coreDependency' in data.jupyterlab && + !data.jupyterlab.coreDependency + ) { + return; + } + // Skip if it is not marked as an extension or a core dep. + if ( + !data.jupyterlab.coreDependency && + !data.jupyterlab.extension && + !data.jupyterlab.mimeExtension + ) { return; } @@ -268,5 +279,5 @@ export async function ensureIntegrity(): Promise { } if (require.main === module) { - ensureIntegrity(); + void ensureIntegrity(); } diff --git a/buildutils/src/get-dependency.ts b/buildutils/src/get-dependency.ts index 2148db2b..9f8c0000 100644 --- a/buildutils/src/get-dependency.ts +++ b/buildutils/src/get-dependency.ts @@ -84,7 +84,7 @@ if (require.main === module) { process.exit(1); } let name = process.argv[2]; - getDependency(name).then(version => { + void getDependency(name).then(version => { console.log('dependency of: ', allDeps); console.log('devDependency of:', allDevDeps); console.log(`\n "${name}": "${version}"`); diff --git a/buildutils/src/patch-release.ts b/buildutils/src/patch-release.ts index 742432c8..16843cc7 100755 --- a/buildutils/src/patch-release.ts +++ b/buildutils/src/patch-release.ts @@ -3,50 +3,62 @@ | Distributed under the terms of the Modified BSD License. |----------------------------------------------------------------------------*/ -import * as fs from 'fs-extra'; -import * as path from 'path'; +import commander from 'commander'; import * as utils from './utils'; -// Make sure we have required command line arguments. -if (process.argv.length < 3) { - let msg = '** Must supply a target package'; - process.stderr.write(msg); - process.exit(1); -} +// Specify the program signature. +commander + .description('Create a patch release with optional patch JS releases') + .arguments('[pkgs...]') + .option('--force', 'Force the upgrade') + .action((pkgNames: Array, options: any) => { + // Make sure we can patch release. + const pyVersion = utils.getPythonVersion(); + if (pyVersion.includes('a') || pyVersion.includes('rc')) { + throw new Error('Can only make a patch release from a final version'); + } -// Use npm here so this file can be used outside of JupyterLab. -utils.run('npm run build:packages'); + // Run pre-bump actions. + utils.prebump(); -// Extract the desired package target(s). -process.argv.slice(2).forEach(target => { - let packagePath = path.resolve(path.join('packages', target)); + // Version the desired packages + const pkgs = pkgNames.join(','); + if (pkgs) { + let cmd = `lerna version patch -m \"New version\" --force-publish=${pkgs} --no-push`; + if (options.force) { + cmd += ' --yes'; + } + let oldVersion = utils.run( + 'git rev-parse HEAD', + { + stdio: 'pipe', + encoding: 'utf8' + }, + true + ); + utils.run(cmd); + let newVersion = utils.run( + 'git rev-parse HEAD', + { + stdio: 'pipe', + encoding: 'utf8' + }, + true + ); + if (oldVersion === newVersion) { + console.log('aborting'); + // lerna didn't version anything, so we assume the user aborted + throw new Error('Lerna aborted'); + } + } - if (!fs.existsSync(packagePath)) { - console.log('Invalid package path', packagePath); - process.exit(1); - } + // Patch the python version + utils.run('bumpversion patch'); // switches to alpha + utils.run('bumpversion release --allow-dirty'); // switches to rc + utils.run('bumpversion release --allow-dirty'); // switches to final. - // Perform the patch operations. - console.log('Patching', target, '...'); + // Run post-bump actions. + utils.postbump(); + }); - utils.run('npm version patch', { cwd: packagePath }); - utils.run('npm publish', { cwd: packagePath }); - - // Extract the new package info. - let data = utils.readJSONFile(path.join(packagePath, 'package.json')); - let name = data.name; - let version = data.version; - - // Make the release commit - utils.run('git commit -a -m "Release ' + name + '@' + version + '"'); - utils.run('git tag ' + name + '@' + version); -}); - -// Update the static folder. -utils.run('npm run build:update'); - -// Integrity update -utils.run('npm run integrity'); -utils.run('git commit -a -m "Integrity update"'); - -console.log('\n\nFinished, make sure to push the commit(s) and tag(s).'); +commander.parse(process.argv); diff --git a/buildutils/src/prepublish-check.ts b/buildutils/src/prepublish-check.ts new file mode 100644 index 00000000..e2dc0d17 --- /dev/null +++ b/buildutils/src/prepublish-check.ts @@ -0,0 +1,41 @@ +/*----------------------------------------------------------------------------- +| Copyright (c) Jupyter Development Team. +| Distributed under the terms of the Modified BSD License. +|----------------------------------------------------------------------------*/ + +import * as fs from 'fs-extra'; +import * as glob from 'glob'; +import * as path from 'path'; +import * as utils from './utils'; + +utils.run('jlpm run clean:slate'); +utils.run('lerna run prepublishOnly'); + +utils.getLernaPaths().forEach(pkgPath => { + const pkgData = utils.readJSONFile(path.join(pkgPath, 'package.json')); + const name = pkgData.name; + + // Skip private packages. + if (!pkgData.public) { + return; + } + console.log(`Checking ${name}...`); + + // Make sure each glob resolves to at least one file. + pkgData.files.forEach((fGlob: string) => { + const result = glob.sync(fGlob); + if (result.length === 0) { + throw new Error(`${name} has missing file(s) "${fGlob}"`); + } + }); + + // Make sure there is a main and that it exists. + const main = pkgData.main; + if (!main) { + throw new Error(`No "main" entry for ${name}`); + } + const mainPath = path.join(pkgPath, main); + if (!fs.existsSync(mainPath)) { + throw new Error(`"main" entry "${main}" not found for ${name}`); + } +}); diff --git a/buildutils/src/prepublish.ts b/buildutils/src/prepublish.ts deleted file mode 100644 index 24fae6ba..00000000 --- a/buildutils/src/prepublish.ts +++ /dev/null @@ -1,9 +0,0 @@ -/*----------------------------------------------------------------------------- -| Copyright (c) Jupyter Development Team. -| Distributed under the terms of the Modified BSD License. -|----------------------------------------------------------------------------*/ -import * as utils from './utils'; - -utils.run('npm run clean:slate'); -utils.run('jlpm run build:packages'); -utils.run('jlpm integrity'); diff --git a/buildutils/src/publish.ts b/buildutils/src/publish.ts new file mode 100644 index 00000000..5d447245 --- /dev/null +++ b/buildutils/src/publish.ts @@ -0,0 +1,67 @@ +/*----------------------------------------------------------------------------- +| Copyright (c) Jupyter Development Team. +| Distributed under the terms of the Modified BSD License. +|----------------------------------------------------------------------------*/ + +import commander from 'commander'; +import * as path from 'path'; +import { handlePackage } from './update-dist-tag'; +import * as utils from './utils'; + +// Specify the program signature. +commander + .description('Publish the JS packages and prep the Python package') + .option( + '--skip-build', + 'Skip the clean and build step (if there was a network error during a JS publish' + ) + .action(async (options: any) => { + // Make sure we are logged in. + if (utils.checkStatus('npm whoami') !== 0) { + console.error('Please run `npm login`'); + } + + // Optionally clean and build the python packages. + if (!options.skipBuild) { + // Ensure a clean state. + utils.run('jlpm run clean:slate'); + } + + // Publish JS to the appropriate tag. + const curr = utils.getPythonVersion(); + if (curr.indexOf('rc') === -1 && curr.indexOf('a') === -1) { + utils.run('lerna publish from-package -m "Publish"'); + } else { + utils.run('lerna publish from-package --npm-tag=next -m "Publish"'); + } + + // Fix up any tagging issues. + const basePath = path.resolve('.'); + const paths = utils.getLernaPaths(basePath).sort(); + const cmds = await Promise.all(paths.map(handlePackage)); + cmds.forEach(cmdList => { + cmdList.forEach(cmd => { + utils.run(cmd); + }); + }); + + // Update core mode. This cannot be done until the JS packages are + // released. + utils.run('node buildutils/lib/update-core-mode.js'); + + // Make the Python release. + utils.run('python setup.py sdist'); + utils.run('python setup.py bdist_wheel'); + utils.run('python -m pip install -U twine'); + utils.run('twine check dist/*'); + + // Prompt the user to finalize. + console.log('*'.repeat(40)); + console.log('Ready to publish!'); + console.log('Run these command when ready:'); + console.log(`git tag v${curr}`); + console.log(`git commit -am "Publish ${curr}"`); + console.log('twine upload dist/*'); + }); + +commander.parse(process.argv); diff --git a/buildutils/src/remove-package.ts b/buildutils/src/remove-package.ts index 42010d34..0c1faaa2 100755 --- a/buildutils/src/remove-package.ts +++ b/buildutils/src/remove-package.ts @@ -29,7 +29,9 @@ let basePath = path.resolve('.'); // Get the package.json of the extension. let packagePath = path.join(basePath, 'packages', target, 'package.json'); if (!fs.existsSync(packagePath)) { - packagePath = require.resolve(path.join(target, 'package.json')); + let msg = '** Absolute paths for packages are not allowed.'; + process.stderr.write(msg); + process.exit(1); } // Remove the package from the local tree. diff --git a/buildutils/src/update-core-mode.ts b/buildutils/src/update-core-mode.ts index 5e684c0f..36429be7 100644 --- a/buildutils/src/update-core-mode.ts +++ b/buildutils/src/update-core-mode.ts @@ -35,6 +35,15 @@ utils.writePackageData(path.join(staging, 'package.json'), data); // Create a new yarn.lock file to ensure it is correct. fs.removeSync(path.join(staging, 'yarn.lock')); utils.run('jlpm', { cwd: staging }); +try { + utils.run('jlpm yarn-deduplicate -s fewer --fail', { cwd: staging }); +} catch { + // re-run install if we deduped packages! + utils.run('jlpm', { cwd: staging }); +} // Build the core assets. utils.run('jlpm run build:prod', { cwd: staging }); + +// Run integrity +utils.run('jlpm integrity'); diff --git a/buildutils/src/update-dist-tag.ts b/buildutils/src/update-dist-tag.ts index d2ae5fcf..b57d3e96 100755 --- a/buildutils/src/update-dist-tag.ts +++ b/buildutils/src/update-dist-tag.ts @@ -12,7 +12,7 @@ import semver from 'semver'; /** * Handle an individual package on the path - update the dependency. */ -async function handlePackage(packagePath: string): Promise { +export async function handlePackage(packagePath: string): Promise { const cmds: string[] = []; // Read in the package.json. @@ -82,4 +82,6 @@ points to the latest prerelease after it.` } }); -commander.parse(process.argv); +if (require.main === module) { + commander.parse(process.argv); +} diff --git a/buildutils/src/utils.ts b/buildutils/src/utils.ts index a7805fd9..ea9ab35a 100644 --- a/buildutils/src/utils.ts +++ b/buildutils/src/utils.ts @@ -54,7 +54,11 @@ export function writePackageData(pkgJsonPath: string, data: any): boolean { * Read a json file. */ export function readJSONFile(filePath: string): any { - return JSON.parse(fs.readFileSync(filePath, 'utf8')); + try { + return JSON.parse(fs.readFileSync(filePath, 'utf8')); + } catch (e) { + throw `Cannot read JSON for path ${filePath}: ${e}`; + } } /** @@ -89,6 +93,70 @@ export function writeJSONFile(filePath: string, data: any): boolean { return false; } +/** + * + * Call a command, checking its status. + */ +export function checkStatus(cmd: string) { + const data = childProcess.spawnSync(cmd, { shell: true }); + return data.status; +} + +/** + * Get the current version of JupyterLab + */ +export function getPythonVersion() { + const cmd = 'python setup.py --version'; + return run(cmd, { stdio: 'pipe' }, true); +} + +/** + * Get the current version of a package + */ +export function getJSVersion(pkg: string) { + const filePath = path.resolve( + path.join('.', 'packages', pkg, 'package.json') + ); + const data = readJSONFile(filePath); + return data.version; +} + +/** + * Pre-bump. + */ +export function prebump() { + // Ensure bump2version is installed (active fork of bumpversion) + run('python -m pip install bump2version'); + + // Make sure we start in a clean git state. + let status = run('git status --porcelain', { + stdio: 'pipe', + encoding: 'utf8' + }); + if (status.length > 0) { + throw new Error( + `Must be in a clean git state with no untracked files. +Run "git status" to see the issues. + +${status}` + ); + } +} + +/** + * Post-bump. + */ +export function postbump() { + // Get the current version. + const curr = getPythonVersion(); + + // Update the dev mode version. + let filePath = path.resolve(path.join('.', 'dev_mode', 'package.json')); + let data = readJSONFile(filePath); + data.jupyterlab.version = curr; + writeJSONFile(filePath, data); +} + /** * Run a command with terminal output. * diff --git a/buildutils/template/package.json b/buildutils/template/package.json index 708518c2..8c87ac54 100644 --- a/buildutils/template/package.json +++ b/buildutils/template/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/template", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Package Template", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -18,10 +22,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc", "clean": "rimraf lib", @@ -30,10 +30,9 @@ }, "devDependencies": { "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + } } diff --git a/buildutils/test-template/package.json b/buildutils/test-template/package.json index cec3e532..d9dcab8b 100644 --- a/buildutils/test-template/package.json +++ b/buildutils/test-template/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/template-for-tests", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc", @@ -15,8 +15,8 @@ "watch:src": "tsc -w --listEmittedFiles" }, "devDependencies": { - "karma": "~2.0.4", + "karma": "^4.1.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/buildutils/tsconfig.json b/buildutils/tsconfig.json index c68707ed..f3f3e9b0 100644 --- a/buildutils/tsconfig.json +++ b/buildutils/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../tsconfigbase", "compilerOptions": { "outDir": "lib", - "rootDir": "src" + "rootDir": "src", + "module": "commonjs" }, "include": ["src/*"] } diff --git a/dev_mode/index.js b/dev_mode/index.js index cf70ca9e..5ed61582 100644 --- a/dev_mode/index.js +++ b/dev_mode/index.js @@ -9,7 +9,7 @@ import { PageConfig, URLExt } from '@jupyterlab/coreutils'; -__webpack_public_path__ = PageConfig.getOption('bundleUrl'); +__webpack_public_path__ = PageConfig.getOption('frontendUrl'); // This needs to come after __webpack_public_path__ is set. require('font-awesome/css/font-awesome.min.css'); diff --git a/dev_mode/package.json b/dev_mode/package.json index 83bcad4e..86b79eb8 100644 --- a/dev_mode/package.json +++ b/dev_mode/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/application-top", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.10", "private": true, "scripts": { "build": "webpack", @@ -12,130 +12,104 @@ "watch": "webpack --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/application-extension": "^1.0.0-alpha.3", - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/apputils-extension": "^1.0.0-alpha.3", - "@jupyterlab/attachments": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/codemirror-extension": "^1.0.0-alpha.3", - "@jupyterlab/completer": "^1.0.0-alpha.3", - "@jupyterlab/completer-extension": "^1.0.0-alpha.3", - "@jupyterlab/console": "^1.0.0-alpha.3", - "@jupyterlab/console-extension": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/csvviewer": "^1.0.0-alpha.3", - "@jupyterlab/csvviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/docmanager": "^1.0.0-alpha.3", - "@jupyterlab/docmanager-extension": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/documentsearch": "^1.0.0-alpha.3", - "@jupyterlab/documentsearch-extension": "^1.0.0-alpha.4", - "@jupyterlab/extensionmanager": "^1.0.0-alpha.3", - "@jupyterlab/extensionmanager-extension": "^1.0.0-alpha.3", - "@jupyterlab/faq-extension": "^1.0.0-alpha.3", - "@jupyterlab/filebrowser": "^1.0.0-alpha.3", - "@jupyterlab/filebrowser-extension": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor-extension": "^1.0.0-alpha.3", - "@jupyterlab/help-extension": "^1.0.0-alpha.3", - "@jupyterlab/htmlviewer": "^1.0.0-alpha.3", - "@jupyterlab/htmlviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/imageviewer": "^1.0.0-alpha.3", - "@jupyterlab/imageviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/inspector": "^1.0.0-alpha.3", - "@jupyterlab/inspector-extension": "^1.0.0-alpha.3", - "@jupyterlab/javascript-extension": "^1.0.0-alpha.3", - "@jupyterlab/json-extension": "^1.0.0-alpha.3", - "@jupyterlab/launcher": "^1.0.0-alpha.3", - "@jupyterlab/launcher-extension": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu-extension": "^1.0.0-alpha.3", - "@jupyterlab/markdownviewer": "^1.0.0-alpha.3", - "@jupyterlab/markdownviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/mathjax2": "^1.0.0-alpha.3", - "@jupyterlab/mathjax2-extension": "^1.0.0-alpha.3", - "@jupyterlab/notebook": "^1.0.0-alpha.4", - "@jupyterlab/notebook-extension": "^1.0.0-alpha.3", - "@jupyterlab/observables": "^2.2.0-alpha.3", - "@jupyterlab/outputarea": "^1.0.0-alpha.3", - "@jupyterlab/pdf-extension": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/rendermime-extension": "^1.0.0-alpha.3", - "@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.3", - "@jupyterlab/running": "^1.0.0-alpha.3", - "@jupyterlab/running-extension": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/settingeditor": "^1.0.0-alpha.3", - "@jupyterlab/settingeditor-extension": "^1.0.0-alpha.3", - "@jupyterlab/shortcuts-extension": "^1.0.0-alpha.3", - "@jupyterlab/statusbar": "^1.0.0-alpha.3", - "@jupyterlab/statusbar-extension": "^1.0.0-alpha.3", - "@jupyterlab/tabmanager-extension": "^1.0.0-alpha.3", - "@jupyterlab/terminal": "^1.0.0-alpha.3", - "@jupyterlab/terminal-extension": "^1.0.0-alpha.3", - "@jupyterlab/theme-dark-extension": "^1.0.0-alpha.4", - "@jupyterlab/theme-light-extension": "^1.0.0-alpha.4", - "@jupyterlab/tooltip": "^1.0.0-alpha.3", - "@jupyterlab/tooltip-extension": "^1.0.0-alpha.3", - "@jupyterlab/ui-components": "^1.0.0-alpha.3", - "@jupyterlab/vdom-extension": "^1.0.0-alpha.3", - "@jupyterlab/vega4-extension": "^1.0.0-alpha.3", + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/application-extension": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/apputils-extension": "^1.0.0-alpha.9", + "@jupyterlab/codemirror-extension": "^1.0.0-alpha.9", + "@jupyterlab/completer-extension": "^1.0.0-alpha.9", + "@jupyterlab/console": "^1.0.0-alpha.9", + "@jupyterlab/console-extension": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/csvviewer-extension": "^1.0.0-alpha.10", + "@jupyterlab/docmanager": "^1.0.0-alpha.9", + "@jupyterlab/docmanager-extension": "^1.0.0-alpha.9", + "@jupyterlab/documentsearch-extension": "^1.0.0-alpha.11", + "@jupyterlab/extensionmanager": "^1.0.0-alpha.9", + "@jupyterlab/extensionmanager-extension": "^1.0.0-alpha.9", + "@jupyterlab/faq-extension": "^1.0.0-alpha.9", + "@jupyterlab/filebrowser": "^1.0.0-alpha.9", + "@jupyterlab/filebrowser-extension": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor-extension": "^1.0.0-alpha.9", + "@jupyterlab/help-extension": "^1.0.0-alpha.9", + "@jupyterlab/htmlviewer-extension": "^1.0.0-alpha.10", + "@jupyterlab/imageviewer": "^1.0.0-alpha.9", + "@jupyterlab/imageviewer-extension": "^1.0.0-alpha.9", + "@jupyterlab/inspector-extension": "^1.0.0-alpha.9", + "@jupyterlab/javascript-extension": "^1.0.0-alpha.9", + "@jupyterlab/json-extension": "^1.0.0-alpha.9", + "@jupyterlab/launcher": "^1.0.0-alpha.9", + "@jupyterlab/launcher-extension": "^1.0.0-alpha.9", + "@jupyterlab/mainmenu-extension": "^1.0.0-alpha.9", + "@jupyterlab/markdownviewer-extension": "^1.0.0-alpha.9", + "@jupyterlab/mathjax2-extension": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/notebook-extension": "^1.0.0-alpha.9", + "@jupyterlab/pdf-extension": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/rendermime-extension": "^1.0.0-alpha.9", + "@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.9", + "@jupyterlab/running-extension": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/settingeditor-extension": "^1.0.0-alpha.9", + "@jupyterlab/shortcuts-extension": "^1.0.0-alpha.9", + "@jupyterlab/statusbar-extension": "^1.0.0-alpha.9", + "@jupyterlab/tabmanager-extension": "^1.0.0-alpha.9", + "@jupyterlab/terminal": "^1.0.0-alpha.9", + "@jupyterlab/terminal-extension": "^1.0.0-alpha.9", + "@jupyterlab/theme-dark-extension": "^1.0.0-alpha.10", + "@jupyterlab/theme-light-extension": "^1.0.0-alpha.10", + "@jupyterlab/tooltip": "^1.0.0-alpha.9", + "@jupyterlab/tooltip-extension": "^1.0.0-alpha.9", + "@jupyterlab/vdom-extension": "^1.0.0-alpha.9", + "@jupyterlab/vega5-extension": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/application": "^1.6.0", "@phosphor/commands": "^1.6.1", "@phosphor/coreutils": "^1.3.0", "@phosphor/datagrid": "^0.1.6", "@phosphor/disposable": "^1.1.2", - "@phosphor/domutils": "^1.1.2", - "@phosphor/dragdrop": "^1.3.0", "@phosphor/messaging": "^1.2.2", "@phosphor/properties": "^1.1.2", "@phosphor/signaling": "^1.2.2", - "@phosphor/virtualdom": "^1.1.2", - "@phosphor/widgets": "^1.6.0", + "@phosphor/widgets": "^1.7.0", "ajv": "^6.5.5", - "codemirror": "~5.42.0", - "comment-json": "^1.1.3", - "es6-promise": "~4.1.1", - "marked": "0.5.1", - "moment": "~2.21.0", + "codemirror": "~5.47.0", + "es6-promise": "~4.2.6", + "json5": "^2.1.0", + "moment": "^2.24.0", "path-posix": "~1.0.0", - "react": "~16.4.2", - "react-dom": "~16.4.2", - "react-paginate": "^5.2.3", - "sanitize-html": "~1.18.2", - "semver": "^5.5.0", - "url-parse": "~1.4.3", - "xterm": "~3.10.1" + "react": "~16.8.4", + "react-dom": "~16.8.4", + "url-parse": "~1.4.3" }, "devDependencies": { - "@jupyterlab/buildutils": "^1.0.0-alpha.3", - "css-loader": "~0.28.7", + "@jupyterlab/buildutils": "^1.0.0-alpha.9", + "css-loader": "~2.1.1", "duplicate-package-checker-webpack-plugin": "^3.0.0", - "file-loader": "~1.1.11", - "fs-extra": "~4.0.2", + "file-loader": "~3.0.1", + "fs-extra": "^8.0.1", "glob": "~7.1.2", - "handlebars": "~4.0.11", - "html-loader": "^0.5.1", + "handlebars": "^4.1.2", + "html-loader": "~0.5.5", "html-webpack-plugin": "~3.2.0", - "mini-css-extract-plugin": "~0.4.4", - "raw-loader": "~0.5.1", + "mini-css-extract-plugin": "~0.6.0", + "raw-loader": "~2.0.0", "rimraf": "~2.6.2", - "sort-package-json": "~1.7.1", + "sort-package-json": "~1.22.1", "source-map-loader": "~0.2.1", - "style-loader": "~0.21.0", - "svg-url-loader": "~2.3.1", - "svgo": "~1.0.4", - "svgo-loader": "~2.1.0", - "uglifyjs-webpack-plugin": "~1.2.5", - "url-loader": "~1.0.1", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3", - "webpack-merge": "^4.1.1", - "webpack-visualizer-plugin": "^0.1.11" + "style-loader": "~0.23.1", + "svg-url-loader": "~2.3.2", + "svgo": "~1.2.1", + "svgo-loader": "~2.2.0", + "terser-webpack-plugin": "^1.3.0", + "url-loader": "~1.1.2", + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0", + "webpack-merge": "^4.2.1", + "webpack-visualizer-plugin": "^0.1.11", + "yarn-deduplicate": "^1.1.1" }, "engines": { "node": ">=6.11.5" @@ -172,14 +146,14 @@ "@jupyterlab/terminal-extension": "", "@jupyterlab/theme-dark-extension": "", "@jupyterlab/theme-light-extension": "", - "@jupyterlab/tooltip-extension": "" + "@jupyterlab/tooltip-extension": "", + "@jupyterlab/vdom-extension": "" }, "mimeExtensions": { "@jupyterlab/javascript-extension": "", "@jupyterlab/json-extension": "", "@jupyterlab/pdf-extension": "", - "@jupyterlab/vdom-extension": "", - "@jupyterlab/vega4-extension": "" + "@jupyterlab/vega5-extension": "" }, "name": "JupyterLab", "buildDir": "./static", @@ -220,7 +194,7 @@ "@phosphor/widgets", "ajv", "codemirror", - "comment-json", + "json5", "es6-promise", "marked", "moment", @@ -233,79 +207,46 @@ "url-parse", "xterm" ], - "version": "1.0.0a1", + "version": "1.0.0a6", "linkedPackages": { "@jupyterlab/application": "../packages/application", "@jupyterlab/application-extension": "../packages/application-extension", - "@jupyterlab/apputils": "../packages/apputils", "@jupyterlab/apputils-extension": "../packages/apputils-extension", - "@jupyterlab/attachments": "../packages/attachments", - "@jupyterlab/cells": "../packages/cells", - "@jupyterlab/codeeditor": "../packages/codeeditor", - "@jupyterlab/codemirror": "../packages/codemirror", "@jupyterlab/codemirror-extension": "../packages/codemirror-extension", - "@jupyterlab/completer": "../packages/completer", "@jupyterlab/completer-extension": "../packages/completer-extension", - "@jupyterlab/console": "../packages/console", "@jupyterlab/console-extension": "../packages/console-extension", "@jupyterlab/coreutils": "../packages/coreutils", - "@jupyterlab/csvviewer": "../packages/csvviewer", "@jupyterlab/csvviewer-extension": "../packages/csvviewer-extension", - "@jupyterlab/docmanager": "../packages/docmanager", "@jupyterlab/docmanager-extension": "../packages/docmanager-extension", - "@jupyterlab/docregistry": "../packages/docregistry", - "@jupyterlab/documentsearch": "../packages/documentsearch", "@jupyterlab/documentsearch-extension": "../packages/documentsearch-extension", - "@jupyterlab/extensionmanager": "../packages/extensionmanager", "@jupyterlab/extensionmanager-extension": "../packages/extensionmanager-extension", "@jupyterlab/faq-extension": "../packages/faq-extension", - "@jupyterlab/filebrowser": "../packages/filebrowser", "@jupyterlab/filebrowser-extension": "../packages/filebrowser-extension", - "@jupyterlab/fileeditor": "../packages/fileeditor", "@jupyterlab/fileeditor-extension": "../packages/fileeditor-extension", "@jupyterlab/help-extension": "../packages/help-extension", - "@jupyterlab/htmlviewer": "../packages/htmlviewer", "@jupyterlab/htmlviewer-extension": "../packages/htmlviewer-extension", - "@jupyterlab/imageviewer": "../packages/imageviewer", "@jupyterlab/imageviewer-extension": "../packages/imageviewer-extension", - "@jupyterlab/inspector": "../packages/inspector", "@jupyterlab/inspector-extension": "../packages/inspector-extension", "@jupyterlab/javascript-extension": "../packages/javascript-extension", "@jupyterlab/json-extension": "../packages/json-extension", - "@jupyterlab/launcher": "../packages/launcher", "@jupyterlab/launcher-extension": "../packages/launcher-extension", - "@jupyterlab/mainmenu": "../packages/mainmenu", "@jupyterlab/mainmenu-extension": "../packages/mainmenu-extension", - "@jupyterlab/markdownviewer": "../packages/markdownviewer", "@jupyterlab/markdownviewer-extension": "../packages/markdownviewer-extension", - "@jupyterlab/mathjax2": "../packages/mathjax2", "@jupyterlab/mathjax2-extension": "../packages/mathjax2-extension", - "@jupyterlab/notebook": "../packages/notebook", "@jupyterlab/notebook-extension": "../packages/notebook-extension", - "@jupyterlab/observables": "../packages/observables", - "@jupyterlab/outputarea": "../packages/outputarea", "@jupyterlab/pdf-extension": "../packages/pdf-extension", - "@jupyterlab/rendermime": "../packages/rendermime", "@jupyterlab/rendermime-extension": "../packages/rendermime-extension", - "@jupyterlab/rendermime-interfaces": "../packages/rendermime-interfaces", - "@jupyterlab/running": "../packages/running", "@jupyterlab/running-extension": "../packages/running-extension", - "@jupyterlab/services": "../packages/services", - "@jupyterlab/settingeditor": "../packages/settingeditor", "@jupyterlab/settingeditor-extension": "../packages/settingeditor-extension", "@jupyterlab/shortcuts-extension": "../packages/shortcuts-extension", - "@jupyterlab/statusbar": "../packages/statusbar", "@jupyterlab/statusbar-extension": "../packages/statusbar-extension", "@jupyterlab/tabmanager-extension": "../packages/tabmanager-extension", - "@jupyterlab/terminal": "../packages/terminal", "@jupyterlab/terminal-extension": "../packages/terminal-extension", "@jupyterlab/theme-dark-extension": "../packages/theme-dark-extension", "@jupyterlab/theme-light-extension": "../packages/theme-light-extension", - "@jupyterlab/tooltip": "../packages/tooltip", "@jupyterlab/tooltip-extension": "../packages/tooltip-extension", - "@jupyterlab/ui-components": "../packages/ui-components", "@jupyterlab/vdom-extension": "../packages/vdom-extension", - "@jupyterlab/vega4-extension": "../packages/vega4-extension" + "@jupyterlab/vega5-extension": "../packages/vega5-extension" } } } diff --git a/dev_mode/templates/template.html b/dev_mode/templates/template.html index 3661c53e..167557d4 100644 --- a/dev_mode/templates/template.html +++ b/dev_mode/templates/template.html @@ -28,6 +28,10 @@ var url = location.origin + location.pathname + (query !== '?' ? query : '') + location.hash; + if (url === location.href) { + return; + } + window.history.replaceState({ }, '', url); })(); diff --git a/dev_mode/webpack.config.js b/dev_mode/webpack.config.js index aa76727b..3b27f252 100644 --- a/dev_mode/webpack.config.js +++ b/dev_mode/webpack.config.js @@ -90,8 +90,8 @@ JupyterFrontEndPlugin.prototype.apply = function(compiler) { var indexPath = path.join(buildDir, 'index.html'); var indexData = fs.readFileSync(indexPath, 'utf8'); indexData = indexData - .split('{{page_config.bundleUrl}}/') - .join('{{page_config.bundleUrl}}'); + .split('{{page_config.frontendUrl}}/') + .join('{{page_config.frontendUrl}}'); fs.writeFileSync(indexPath, indexData, 'utf8'); // Copy the static assets. @@ -141,7 +141,7 @@ module.exports = [ }, output: { path: path.resolve(buildDir), - publicPath: '{{page_config.bundleUrl}}', + publicPath: '{{page_config.frontendUrl}}', filename: '[name].[chunkhash].js' }, optimization: { diff --git a/dev_mode/webpack.prod.config.js b/dev_mode/webpack.prod.config.js index 440abc2b..83a29fd3 100644 --- a/dev_mode/webpack.prod.config.js +++ b/dev_mode/webpack.prod.config.js @@ -1,4 +1,4 @@ -var UglifyJsPlugin = require('uglifyjs-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); var merge = require('webpack-merge'); var config = require('./webpack.config'); @@ -7,15 +7,17 @@ config[0] = merge(config[0], { devtool: 'source-map', optimization: { minimizer: [ - new UglifyJsPlugin({ + new TerserPlugin({ parallel: true, sourceMap: true, - uglifyOptions: { - beautify: false, - comments: false, + terserOptions: { compress: false, ecma: 6, - mangle: true + mangle: true, + output: { + beautify: false, + comments: false + } }, cache: process.platform !== 'win32' }) diff --git a/docs/source/developer/adding_content.rst b/docs/source/developer/adding_content.rst index ab3938a5..8745a8ab 100644 --- a/docs/source/developer/adding_content.rst +++ b/docs/source/developer/adding_content.rst @@ -16,8 +16,6 @@ As an example: Add a leaflet viewer plugin for geoJSON files. - If there are no typings, we must create our own. An example typings file that exports functions is `codemirror `__. - An example with a class is - `vdom `__. - Add a reference to the new library in ``src/typings.d.ts``. diff --git a/docs/source/developer/css.rst b/docs/source/developer/css.rst index 3ad6296f..6b66c625 100644 --- a/docs/source/developer/css.rst +++ b/docs/source/developer/css.rst @@ -97,6 +97,9 @@ We are organizing our CSS files in the following manner: CSS class names ~~~~~~~~~~~~~~~ +CSS class naming conventions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + We have a fairly formal method for naming our CSS classes. First, CSS class names are associated with TypeScript classes that @@ -165,7 +168,7 @@ widget: are directories Edge cases -~~~~~~~~~~ +^^^^^^^^^^ Over time, we have found that there are some edge cases that these rules don't fully address. Here, we try to clarify those edge cases. @@ -191,3 +194,47 @@ only the desired children. When in doubt, there is little harm done in parents adding selectors to children. + +Commonly used CSS selectors +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +We use CSS selectors to decide which context menu items to display and what command +to invoke when a keyboard shortcut is used. The following common CSS selectors are +intended to be used for adding context menu items and keyboard shortcuts. + +**CSS classes that target widgets and their children** + +- ``jp-Activity``: applied to elements in the main work area +- ``jp-Cell``: applied to cells +- ``jp-CodeCell``: applied to code cells +- ``jp-CodeConsole``: applied to consoles +- ``jp-CodeConsole-content``: applied to content panels in consoles +- ``jp-CodeConsole-promptCell``: applied to active prompt cells in consoles +- ``jp-DirListing-content``: applied to contents of file browser directory listings +- ``jp-DirListing-item``: applied to items in file browser directory listings +- ``jp-FileEditor``: applied to file editors +- ``jp-ImageViewer``: applied to image viewers +- ``jp-InputArea-editor``: applied to cell input area editors +- ``jp-Notebook``: applied to notebooks +- ``jp-SettingEditor``: applied to setting editors +- ``jp-SideBar``: applied to sidebars +- ``jp-Terminal``: applied to terminals + +**CSS classes that describe the state of a widget** + +- ``jp-mod-current``: applied to elements on the current document only +- ``jp-mod-completer-enabled``: applied to ediors that can host a completer +- ``jp-mod-commandMode``: applied to a notebook in command mode +- ``jp-mod-editMode``: applied to a notebook in edit mode +- ``jp-mod-has-primary-selection``: applied to editors that have a primary selection +- ``jp-mod-in-leading-whitespace``: applied to editors that have a selection within the beginning whitespace of a line +- ``jp-mod-tooltip``: applied to the body when a tooltip exists on the page + +**CSS selectors that target data attributes** + +- ``[data-jp-code-runner]``: applied to widgets that can run code +- ``[data-jp-interaction-mode="terminal"]``: applied when a code console is in terminal mode +- ``[data-jp-interaction-mode="notebook"]``: applied when a code console is in notebook mode +- ``[data-jp-isdir]``: applied to describe whether file browser items are directories +- ``[data-jp-undoer]``: applied to widgets that can undo +- ``[data-type]``: applied to describe the type of element, such as "document-title", "submenu", "inline" diff --git a/docs/source/developer/extension_dev.rst b/docs/source/developer/extension_dev.rst index 8abab55f..367ae59e 100644 --- a/docs/source/developer/extension_dev.rst +++ b/docs/source/developer/extension_dev.rst @@ -86,7 +86,6 @@ A Jupyter front-end application object is given to each plugin in its ``activate()`` function. The application object has: - commands - used to add and execute commands in the application. -- keymap - used to add keyboard shortcuts to the application. - shell - a generic Jupyter front-end shell instance. Jupyter Front-End Shell @@ -191,9 +190,8 @@ subsequently reversed by running jlpm run remove:package -This will remove the package metadata from the source tree, but will -**not** remove any files added by the ``addsibling`` script, which -should be removed manually. +This will remove the package metadata from the source tree and delete +all of the package files. The package should export EMCAScript 5 compatible JavaScript. It can import CSS using the syntax ``require('foo.css')``. The CSS files can diff --git a/docs/source/getting_started/changelog.rst b/docs/source/getting_started/changelog.rst index 51c4fbc0..139fcf42 100644 --- a/docs/source/getting_started/changelog.rst +++ b/docs/source/getting_started/changelog.rst @@ -13,8 +13,180 @@ See the `JupyterLab 1.0.0 `__ milestone on GitHub for the full list of pull requests and issues closed. -Features -^^^^^^^^ +Changes in 1.0.0a5 +^^^^^^^^^^^^^^^^^^ + +* Prepublishonly Integrity Check (`#6437 `__) +* Add Version To Vega Extension Id (`#6429 `__) +* Audit Innerhtml Usage And Sanitize Inputs. (`#6426 `__) +* Allow Raises-Exception (`#6424 `__, `#2412 `__) +* Rewrite Kernel Message Typings And Only Clear Cell Execution Prompt If Needed (`#6412 `__, `#5779 `__) +* More Granular Completion (`#6409 `__, `#5872 `__) +* Make Selected Command Palette Darker On Hover (`#6407 `__, `#279 `__) +* Hide The Last Modified Column On A Narrow Filebrowser. (`#6406 `__, `#6093 `__) +* Fix File Browser Model Autostart, Simplify Poll Start Logic. (`#6401 `__) +* Connection Lost Token (`#6399 `__, `#6176 `__, `#3324 `__) +* Update A Number Of Dependencies To The Current Version. (`#6398 `__) +* Add Smart Copy/paste In Terminal And Update Docs (`#6391 `__, `#6385 `__, `#1146 `__) +* Refresh Yarn.lock. (`#6388 `__) +* Fix Scrolling Down Running Sessions (`#6383 `__, `#6371 `__) +* Fix Duplicate Inspect Message When Typing (`#6382 `__) +* Add Missing "merge Selected Cells" Item To Context Menu (`#6375 `__, `#6318 `__) +* Clean Up Handling Of Launch Assets (`#6372 `__, `#5881 `__) +* Delete Session From Set On Terminated (`#6364 `__, `#6363 `__) +* Add Label For The Default Notebook Toolbar (`#6361 `__) +* Turn On Accessibility In Xterm.js (`#6359 `__) +* Skip Collapsed Cells When Selecting (`#6356 `__, `#3233 `__) +* Remove Extraneous 'find And Replace...' Item From The Edit Menu And Codemirror (`#6350 `__, `#6322 `__) +* Add Geojson Support To Json-Extension (`#6349 `__) +* Clean Coreutils Package, Add Rate Limiting Utilities. (`#6345 `__, `#6346 `__) +* Feature/jp 6280 Terminal Appear Twice (`#6344 `__, `#6280 `__) +* Feature/jp 6199 Use Json5 Instead Of Comment Json (`#6343 `__, `#6199 `__) +* Clean Up Examples And Add Puppeteer Tests (`#6340 `__, `#5819 `__) +* Handle Disconnect Messages From The Terminal (`#6339 `__, `#5061 `__) +* Add Metadata For Core Mode Packages (`#6338 `__, `#6317 `__) +* Default Cell Type (`#6335 `__) +* Token Refactor/cleanup (`#6334 `__, `#6333 `__, `#6302 `__) +* Correct Jest Cli Argument Names (`#6329 `__) +* Add Input Dialogs (`#6327 `__, `#6326 `__) +* Fix "rename Csv File" (`#6325 `__) +* Upgrade Codemirror From 5.42.0 To 5.46.0 (`#6321 `__) +* Nbconvert Css Bundler (`#6314 `__) +* Release Maintenance Cleanup (`#6312 `__) +* Add A Downloads/month Badge From Pypi (`#6311 `__) +* Fixes Issue #6296 Markdown (`#6308 `__) +* Fixed Issue 5803 (`#6307 `__) +* Set Tab Bar Icon Background Size So Svgs Of Other Sizes May Be Used. (`#6306 `__, `#5718 `__) +* Use New Poll Class For Filebrowser Contents Polling. (`#6305 `__, `#6157 `__) +* Carriage Return Perf (`#6304 `__, `#4202 `__) +* Remove Notion Of Default Search Providers (`#6301 `__) +* Log Out And Shut Down Are Two Words When Used As Verbs (`#6299 `__) +* More Yarn Deduplicating (`#6297 `__) +* Update Vega And Vega-Lite (`#6294 `__) +* Prevent Tooltip Flicker In Safari. (`#6292 `__, `#6091 `__) +* Refractor Updating Notebook Settings For Opened Widgets (`#6288 `__, `#6274 `__) +* Opening Console From Fileeditor Context Menu And From Tab Context Menu Not Coherent (`#6287 `__, `#6284 `__) +* Add Shutdown On Close Capability For Terminals (`#6285 `__) +* Remove Deregisterprovider From Searchproviderregistry Interface (`#6282 `__) +* Allow Passing "-" As A File To Jupyter Workspaces Import (`#6276 `__) +* Kernel Shutdown When Closing Notebook Tab (`#6275 `__) +* [Wip] Provide A Signal For Opening Items From A Dirlisting (`#6270 `__, `#6269 `__) +* `jupyterlab Extension List` Outputs With Print() Instead Of Stderr (`#6265 `__, `#6145 `__) +* Fix Pdf Scroll Position On Firefox. (`#6264 `__) +* New Markdown Reference Plays Nicely With Iframes (`#6262 `__) +* Set The Codemirror-Activeline-Background And Codemirror-Gutter Backgr… (`#6261 `__) +* Set Font Color According To Theme In Text Matching Command Palette (`#6259 `__, `#5561 `__) +* "file Changed" Dialog Includes Filename #6229 (`#6258 `__) +* Add Getinitialquery To Documentsearch Interface (`#6256 `__) +* Less Aggressive Pdf Updates 2 (`#6255 `__, `#6222 `__) +* Simplify Pr Template (`#6247 `__) +* Notify The User When A Notebook Kernel Autorestarts (`#6246 `__, `#4273 `__) +* Fix Re-Focus On Ctrl+f When Search Overlay Is Already Open (`#6241 `__) +* Support Symlinked App Directory (`#6240 `__, `#6166 `__) +* Change Documentsearch Shortcut Selector To Searchable Class (`#6237 `__) +* Fixed Documentation Formatting Issue (`#6236 `__) +* Update Workspaces To Automatically Resolve. (`#6234 `__, `#6210 `__) +* Note That Server Directories Are For Information Only. (`#6227 `__, `#5313 `__) +* Update Typescript Target To Es2017 (`#6224 `__) +* Add A Dialog For An Nbformat Conversion (`#6221 `__, `#1426 `__) +* Add Note For Windows Users About Path Length (`#6220 `__, `#5325 `__) +* Switch To Esnext Imports (`#6219 `__, `#5751 `__) +* Bring Back The Settings Table Picker Button (`#6211 `__, `#5874 `__) +* Add Vulnerability Reporting Info To Contributing.md (`#6201 `__) +* Add A Command To Enable The Extension Manager (`#6200 `__) +* Updates Changelog For Prs Merged In 1.0a2 Or 1.0a3 (`#6198 `__, `#6184 `__) +* Update To Prettier 1.17 (`#6197 `__) +* Error On Build Problem (`#6194 `__, `#6137 `__) +* Update Pull_request_template.md With Checklist (`#6182 `__) +* Add Logout Button (`#6087 `__, `#5966 `__) +* Pass Metadata From Notebook To Console (`#6063 `__) +* Add A Clone Method To Abcwidgetfactory. (`#6060 `__, `#6044 `__) +* Move Generic Tab Commands From Docmanager To Application (`#6052 `__, `#5979 `__) +* Lazy Load Xterm (Redux) (`#6012 `__) +* Add Support For Printing Widgets (`#5850 `__, `#1314 `__) +* Use Yarn-Deduplicate Instead Of Cleaning (`#5775 `__) +* Make Dev Build Arg An Alias Instead Of Flag (`#5723 `__, `#5661 `__) + + +Changes in 1.0.0a3 +^^^^^^^^^^^^^^^^^^ + +* Fix Logic Bug In Poll Promise/signal Sync. (`#6192 `__) +* Unpin Yet Again (`#6191 `__, `#6131 `__) +* Update Poll#schedule() Semantics. (`#6186 `__) +* Use @typeparam In Docstrings For Front End And Connectors. (`#6173 `__) +* Make Sure `node` Exists When Traversing Up The Dom Tree. (`#6171 `__) +* Add Details About Extension Activation In Dev-Mode (`#6168 `__) +* Add Find And Replace For Notebooks And Text Files (`#6159 `__, `#6081 `__) +* Remove Out-Of-Date Git Hooks. (`#6156 `__) +* Update Search Match Colors In Notebook And Text Document (`#6155 `__) +* Codemirror Gutter Restyling (`#6153 `__, `#6121 `__) +* Add Poll Class, Fix Some Tests, Throttle Polling. (`#6141 `__, `#3929 `__) +* Use Target=_blank For Download Links (`#6139 `__, `#6106 `__) +* Don't Set Execution Count On Markdown Cells. (`#6126 `__, `#5669 `__) +* Strict Promises (`#6125 `__) +* Point To Discourse Instead Of Gitter (`#6118 `__) +* Doc: Add Tips And Tricks (`#6114 `__, `#5926 `__) +* Let An Output Overflow With Scrollbars In Both Directions. (`#6104 `__) +* Update Communication Channels In Readme (`#6099 `__) +* Fix Csv Delimiter Dropdown Theme Handling (`#6097 `__, `#6095 `__) +* Add Tab Navigation To The Search Box (`#6094 `__) +* Use The `mousedown` Event To Trigger Toolbar Button Actions. (`#6083 `__, `#6077 `__) +* Added Css Selector Descriptions (`#6082 `__) +* Fix Restart And Run All For Text Files With A Code Console. (`#6059 `__, `#5935 `__) +* Add An 'all' Flag To Uninstall All Labextensions In The App-Dir (`#6058 `__, `#6006 `__) +* Fix Enable/disable Button In Extensionmanager (`#6051 `__, `#5973 `__) +* Clean Up Ui-Components Styles (`#6050 `__, `#6043 `__) +* Fix Deleting A Tab By Using The Indentunit Option (`#6041 `__, `#5992 `__) +* Rename Themedir To Themepath (`#6040 `__, `#6021 `__) +* "close All" Command Refers To Tabs, Not Widgets (`#6035 `__) +* Fix Codemirror Styling (`#6032 `__) +* Add "render All Markdown Cells" Command, Or Automatically Render Markdown (`#6029 `__, `#6017 `__) +* Universal (Nearly) Scrollbar Styling (`#6026 `__, `#4867 `__) +* Add Kbd Style (`#6025 `__, `#4374 `__) +* Increase Z-Index Of Search Overlay (`#6024 `__) +* Added Basic Theming For Statusbar (`#6020 `__) +* Refresh The Editor When Switching A Markdown Cell To Edit Mode. (`#6018 `__) +* Don't Prevent Default If The User Is Selecting Text In A Notebook Output. (`#6015 `__, `#4800 `__) +* Fix Global Link Hover Style (`#6011 `__, `#5970 `__) +* Add A Binder Link For Jlab Master To Contributing.md. (`#6004 `__) +* Add A Note About Webpack And Watches To The Extension Dev Docs (`#6000 `__) +* Add Ability To Toggle Status Bar Visibility (`#5990 `__, `#5982 `__) +* Avoid Activating The Non-Current Widget After Navigating To Cwd (`#5988 `__, `#5987 `__) +* Fix Completer Regression (`#5985 `__) +* Restore Cloned Output (`#5981 `__, `#5976 `__) +* Update Workspaces List Method To Conform To Idataconnector List Method. (`#5975 `__) +* Remove Appveyor And Travis Ci Support (`#5974 `__) +* Managing Notebook Metadata (`#5968 `__, `#5200 `__) +* Make Sure Api Docs Are Output To The Right Directory. (`#5967 `__) +* Inherit Terminal Theme From Lab Theme (`#5964 `__) +* Expose An Instance Tracker Token For The Html Viewer. (`#5962 `__) +* Remove Extra Padding From Mathjax Display Math. (`#5959 `__, `#5949 `__) +* Dev-Mode Binder (`#5952 `__) +* Add Autoredirect Query String Parameter To Generate New Workspaces. (`#5950 `__, `#5854 `__) +* Context Menu Hint (`#5940 `__, `#4023 `__) +* Add An Optional Header To The Application Shell (`#5936 `__) +* Improve Tab Icons In Left Panel (`#5920 `__, `#5269 `__) +* Add Event Handling Support To Vdom-Extension (`#5670 `__) + +Upgrades in 1.0.0a3 +^^^^^^^^^^^^^^^^^^^ +* Update Prettier, Lerna, And Other Top-Level Dependencies (`#6190 `__) +* Update Webpack (`#6189 `__) +* Update Yarn, Jest, And Typescript (`#6188 `__) +* Convert From Uglifyjs To Terser For Js Minification. (`#6193 `__) +* Update To Vega 5 (`#6133 `__, `#6128 `__) +* Update React And React-Dom To Let Extensions Use React Hooks (`#6057 `__) + +Upgrading extensions to support 1.0.0a3 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +There are many backwards-incompatible changes in 1.0.0a3 for extension developers. Here are some hints for upgrading an extension to support 1.0.0a3. + +* We upgraded the Webpack raw file loader. The new version of the raw loader exports ES2015 modules, so this may require changes in extensions that import files using the raw loader. For example, if you did ``require('myfile.md')`` to get the content of `myfile.md` as a string, you now should import it using ES2015 `import` syntax, or use `require('myfile.md').default`. + + +Features in 1.0.0a1 +^^^^^^^^^^^^^^^^^^^ * Enable searching notebooks, code editors, and CSV files. (`#5795 `__, `#5937 `__) * Add Commands To Open The Main Menus So That They May Be Assigned Keyboard Shortcuts. (`#5910 `__, `#3074 `__) * Add Insertbefore And Insertafter To Toolbar (`#5896 `__, `#5894 `__) @@ -46,8 +218,8 @@ Features * Add 'new Folder' Item To Filebrowser Context Menu (`#5447 `__) -Bugs Fixed -^^^^^^^^^^ +Bugs Fixed in 1.0.0a1 +^^^^^^^^^^^^^^^^^^^^^ * Fix Focus Issues When Focusing Away From A Notebook In Edit Mode. (`#5925 `__) * Start A New Terminal If Connecting To An Old One Fails. (`#5917 `__) * Remove Initialcommand From Args Of Terminal Creation. (`#5916 `__) @@ -90,15 +262,15 @@ Bugs Fixed * Replace Ansi_up With Code From Classic Notebook (`#5336 `__, `#3773 `__) -Upgrades -^^^^^^^^ +Upgrades in 1.0.0a1 +^^^^^^^^^^^^^^^^^^^ * Update Xterm.js To 3.10.1 (`#5922 `__, `#2581 `__) * Update To Typescript 3.3 (`#5929 `__) * Upgrade Codemirror From 5.39 To 5.42 (`#5692 `__, `#5588 `__) * Update Marked To 0.5.1 (`#5490 `__, `#5375 `__) -For Developers -^^^^^^^^^^^^^^ +Changes For Developers in 1.0.0a1 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Create Jupyterfrontend Class. (`#5845 `__, `#5919 `__) * Use ``markdowndocument`` As Document Widget For ``markdownviewer``. (`#5918 `__) * Rewrite ``markdownviewer`` As A Standard Extension (`#5901 `__, `#3940 `__) @@ -440,7 +612,7 @@ Command palette items .. code:: json - "notebook:run-in-console": { + { "command": "notebook:run-in-console", "keys": ["Ctrl G"], "selector": ".jp-Notebook.jp-mod-editMode" diff --git a/docs/source/getting_started/faq.rst b/docs/source/getting_started/faq.rst index bf4d9b11..c8ff2bf1 100644 --- a/docs/source/getting_started/faq.rst +++ b/docs/source/getting_started/faq.rst @@ -21,3 +21,10 @@ Development - `How can you contribute? `__ - :ref:`How can you extend or customize JupyterLab? ` + +Tips and Tricks +--------------- + +- How do I start JupyterLab with a clean workspace every time? + +Add `'c.NotebookApp.default_url = '/lab?reset'` to your `jupyter_notebook_config.py`. See [How to create a jupyter_notebook_config.py](https://jupyter-notebook.readthedocs.io/en/stable/config.html) for more information. diff --git a/docs/source/getting_started/overview.rst b/docs/source/getting_started/overview.rst index 79800891..563f3674 100644 --- a/docs/source/getting_started/overview.rst +++ b/docs/source/getting_started/overview.rst @@ -3,7 +3,7 @@ Overview -------- -JupyterLab is the next-generation web-based user interface for Project Jupyter. +JupyterLab is a next-generation web-based user interface for Project Jupyter. .. image:: ../user/images/interface_jupyterlab.png :align: center diff --git a/docs/source/user/extensions.rst b/docs/source/user/extensions.rst index af228fd6..18c02b10 100644 --- a/docs/source/user/extensions.rst +++ b/docs/source/user/extensions.rst @@ -230,6 +230,14 @@ rebuild, you can run the command: jupyter lab build + +**Note** +If using Windows, you may encounter a `FileNotFoundError` due to the default PATH length on +Windows. Node modules are stored in a nested file structure, so the path can get quite +long. If you have administrative access and are on Windows 8 or 10, you can update the +registry setting using these instructions: https://stackoverflow.com/a/37528731. + + Disabling Extensions ^^^^^^^^^^^^^^^^^^^^ @@ -263,6 +271,9 @@ environment variable. If not specified, it will default to ``/share/jupyter/lab``, where ```` is the site-specific directory prefix of the current Python environment. You can query the current application path by running ``jupyter lab path``. +Note that the application directory is expected to contain the JupyterLab +static assets (e.g. `static/index.html`). If JupyterLab is launched +and the static assets are not present, it will display an error in the console and in the browser. JupyterLab Build Process ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -335,16 +346,16 @@ The following configurations may be present in this file: 1. ``terminalsAvailable`` identifies whether a terminal (i.e. ``bash/tsch`` on Mac/Linux OR ``PowerShell`` on Windows) is available to be launched - via the Launcher. (This configuration was predominantly required for + via the Launcher. (This configuration was predominantly required for Windows prior to PowerShell access being enabled in Jupyter Lab.) The value for this field is a Boolean: ``true`` or ``false``. 2. ``disabledExtensions`` controls which extensions should not load at all. -3. ``deferredExtensions`` controls which extensions should not load until - they are required by something, irrespective of whether they set - ``autostart`` to ``true``. +3. ``deferredExtensions`` controls which extensions should not load until + they are required by something, irrespective of whether they set + ``autoStart`` to ``true``. The value for the ``disabledExtensions`` and ``deferredExtensions`` fields -are an array of strings. The following sequence of checks are performed +are an array of strings. The following sequence of checks are performed against the patterns in ``disabledExtensions`` and ``deferredExtensions``. - If an identical string match occurs between a config value and a diff --git a/docs/source/user/terminal.rst b/docs/source/user/terminal.rst index 98ce3989..47335e9e 100644 --- a/docs/source/user/terminal.rst +++ b/docs/source/user/terminal.rst @@ -47,20 +47,19 @@ re-open it using the Running tab in the left sidebar: Copy/Paste ~~~~~~~~~~~~ -For both Windows and Mac users, press ``shift`` + ``right-click`` to get to the right-click menu from inside Jupyterlab terminal. Or by using shortcut keys as follows: +For macOS users, ``Cmd+C`` and ``Cmd+V`` work as usual. -* **For Mac users:** - - **Copy** : ``Cmd`` + ``c`` - - **Paste**: ``Cmd`` + ``v`` - - -* **For Windows users (Power shell):** - - **Copy** : ``Ctrl`` + ``Insert`` - - **Paste** : ``Shift`` + ``Insert`` +For Windows users using ``PowerShell``, ``Ctrl+Insert`` and ``Shift+Insert`` work as usual. +To use the native browser Copy/Paste menu, hold ``Shift`` and right click to bring up the +context menu (note: this may not work in all browsers). +For non-macOS users, JupyterLab will interpret ``Ctrl+C`` as a copy if there is text selected. +In addition, ``Ctrl+V`` will be interpreted as a paste command unless the ``pasteWithCtrlV`` +setting is disabled. One may want to disable ``pasteWithCtrlV`` if the shortcut is needed +for something else such as the vi editor. +For anyone using a \*nix shell, the default ``Ctrl+Shift+C`` conflicts with the default +shortcut for toggling the command palette (``apputils:activate-command-palette``). +If desired, that shortcut can be changed by editing the keyboard shortcuts in setttings. +Using ``Ctrl+Shift+V`` for paste works as usual. diff --git a/examples/app/index.js b/examples/app/index.js index 7f6ca0f9..924968e3 100644 --- a/examples/app/index.js +++ b/examples/app/index.js @@ -1,11 +1,14 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -// ES6 Promise polyfill -require('es6-promise/auto'); +import { PageConfig, URLExt } from '@jupyterlab/coreutils'; +// eslint-disable-next-line +__webpack_public_path__ = URLExt.join( + PageConfig.getBaseUrl(), + 'example/static/' +); -window.addEventListener('load', function() { - require('font-awesome/css/font-awesome.min.css'); +window.addEventListener('load', async function() { var JupyterLab = require('@jupyterlab/application').JupyterLab; var mods = [ @@ -30,17 +33,19 @@ window.addEventListener('load', function() { require('@jupyterlab/running-extension'), require('@jupyterlab/settingeditor-extension'), require('@jupyterlab/shortcuts-extension'), + require('@jupyterlab/statusbar-extension'), require('@jupyterlab/tabmanager-extension'), require('@jupyterlab/terminal-extension'), require('@jupyterlab/theme-dark-extension'), require('@jupyterlab/theme-light-extension'), require('@jupyterlab/tooltip-extension') ]; - var lab = new JupyterLab({ - name: 'JupyterLab Example', - namespace: 'lab-example', - version: require('./package.json').version - }); + var lab = new JupyterLab(); lab.registerPluginModules(mods); - lab.start(); + /* eslint-disable no-console */ + console.log('Starting app'); + await lab.start(); + console.log('App started, waiting for restore'); + await lab.restored; + console.log('Example started!'); }); diff --git a/examples/app/main.py b/examples/app/main.py index 88a93335..119f38a4 100644 --- a/examples/app/main.py +++ b/examples/app/main.py @@ -2,6 +2,8 @@ # Distributed under the terms of the Modified BSD License. from jupyterlab_server import LabServerApp, LabConfig +from notebook.utils import url_path_join as ujoin +import json import os from traitlets import Unicode @@ -11,17 +13,20 @@ # not affect this app. This helps this app to truly be standalone. os.environ["JUPYTER_NO_CONFIG"]="1" -class ExampleApp(LabServerApp): +with open(os.path.join(HERE, 'package.json')) as fid: + version = json.load(fid)['version'] - default_url = Unicode('/exampleapp', +class ExampleApp(LabServerApp): + base_url = '/foo/' + default_url = Unicode('/example', help='The default URL to redirect to from `/`') lab_config = LabConfig( app_name = 'JupyterLab Example App', app_settings_dir = os.path.join(HERE, 'build', 'application_settings'), - page_url = '/exampleapp', + app_version = version, + page_url = '/example', schemas_dir = os.path.join(HERE, 'build', 'schemas'), - settings_dir = os.path.join(HERE, 'build', 'settings'), static_dir = os.path.join(HERE, 'build'), templates_dir = os.path.join(HERE, 'templates'), themes_dir = os.path.join(HERE, 'build', 'themes'), diff --git a/examples/app/package.json b/examples/app/package.json index 148f3372..05766fef 100644 --- a/examples/app/package.json +++ b/examples/app/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/example-app", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.10", "private": true, "scripts": { "build": "webpack", @@ -8,54 +8,55 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/application-extension": "^1.0.0-alpha.3", - "@jupyterlab/apputils-extension": "^1.0.0-alpha.3", - "@jupyterlab/buildutils": "^1.0.0-alpha.3", - "@jupyterlab/codemirror-extension": "^1.0.0-alpha.3", - "@jupyterlab/completer-extension": "^1.0.0-alpha.3", - "@jupyterlab/console-extension": "^1.0.0-alpha.3", - "@jupyterlab/csvviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/docmanager-extension": "^1.0.0-alpha.3", - "@jupyterlab/faq-extension": "^1.0.0-alpha.3", - "@jupyterlab/filebrowser-extension": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor-extension": "^1.0.0-alpha.3", - "@jupyterlab/help-extension": "^1.0.0-alpha.3", - "@jupyterlab/imageviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/inspector-extension": "^1.0.0-alpha.3", - "@jupyterlab/launcher-extension": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu-extension": "^1.0.0-alpha.3", - "@jupyterlab/markdownviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/mathjax2-extension": "^1.0.0-alpha.3", - "@jupyterlab/notebook-extension": "^1.0.0-alpha.3", - "@jupyterlab/rendermime-extension": "^1.0.0-alpha.3", - "@jupyterlab/running-extension": "^1.0.0-alpha.3", - "@jupyterlab/settingeditor-extension": "^1.0.0-alpha.3", - "@jupyterlab/shortcuts-extension": "^1.0.0-alpha.3", - "@jupyterlab/tabmanager-extension": "^1.0.0-alpha.3", - "@jupyterlab/terminal-extension": "^1.0.0-alpha.3", - "@jupyterlab/theme-dark-extension": "^1.0.0-alpha.4", - "@jupyterlab/theme-light-extension": "^1.0.0-alpha.4", - "@jupyterlab/tooltip-extension": "^1.0.0-alpha.3", - "es6-promise": "~4.1.1" + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/application-extension": "^1.0.0-alpha.9", + "@jupyterlab/apputils-extension": "^1.0.0-alpha.9", + "@jupyterlab/buildutils": "^1.0.0-alpha.9", + "@jupyterlab/codemirror-extension": "^1.0.0-alpha.9", + "@jupyterlab/completer-extension": "^1.0.0-alpha.9", + "@jupyterlab/console-extension": "^1.0.0-alpha.9", + "@jupyterlab/csvviewer-extension": "^1.0.0-alpha.10", + "@jupyterlab/docmanager-extension": "^1.0.0-alpha.9", + "@jupyterlab/faq-extension": "^1.0.0-alpha.9", + "@jupyterlab/filebrowser-extension": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor-extension": "^1.0.0-alpha.9", + "@jupyterlab/help-extension": "^1.0.0-alpha.9", + "@jupyterlab/imageviewer-extension": "^1.0.0-alpha.9", + "@jupyterlab/inspector-extension": "^1.0.0-alpha.9", + "@jupyterlab/launcher-extension": "^1.0.0-alpha.9", + "@jupyterlab/mainmenu-extension": "^1.0.0-alpha.9", + "@jupyterlab/markdownviewer-extension": "^1.0.0-alpha.9", + "@jupyterlab/mathjax2-extension": "^1.0.0-alpha.9", + "@jupyterlab/notebook-extension": "^1.0.0-alpha.9", + "@jupyterlab/rendermime-extension": "^1.0.0-alpha.9", + "@jupyterlab/running-extension": "^1.0.0-alpha.9", + "@jupyterlab/settingeditor-extension": "^1.0.0-alpha.9", + "@jupyterlab/shortcuts-extension": "^1.0.0-alpha.9", + "@jupyterlab/statusbar-extension": "^1.0.0-alpha.9", + "@jupyterlab/tabmanager-extension": "^1.0.0-alpha.9", + "@jupyterlab/terminal-extension": "^1.0.0-alpha.9", + "@jupyterlab/theme-dark-extension": "^1.0.0-alpha.10", + "@jupyterlab/theme-light-extension": "^1.0.0-alpha.10", + "@jupyterlab/tooltip-extension": "^1.0.0-alpha.9", + "es6-promise": "~4.2.6" }, "devDependencies": { - "css-loader": "~0.28.7", - "file-loader": "~1.1.11", - "fs-extra": "~4.0.2", + "css-loader": "~2.1.1", + "file-loader": "~3.0.1", + "fs-extra": "^8.0.1", "glob": "~7.1.2", - "mini-css-extract-plugin": "~0.4.4", - "raw-loader": "~0.5.1", - "read-package-tree": "~5.1.6", + "mini-css-extract-plugin": "~0.6.0", + "raw-loader": "~2.0.0", + "read-package-tree": "^5.2.2", "rimraf": "~2.6.2", - "style-loader": "~0.21.0", - "svg-url-loader": "~2.3.1", - "svgo": "~1.0.4", - "svgo-loader": "~2.1.0", - "url-loader": "~1.0.1", + "style-loader": "~0.23.1", + "svg-url-loader": "~2.3.2", + "svgo": "~1.2.1", + "svgo-loader": "~2.2.0", + "url-loader": "~1.1.2", "watch": "~1.0.2", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3", - "whatwg-fetch": "~2.0.3" + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0", + "whatwg-fetch": "^3.0.0" } } diff --git a/examples/app/templates/index.html b/examples/app/templates/index.html index fe0d432f..9f86f7e6 100644 --- a/examples/app/templates/index.html +++ b/examples/app/templates/index.html @@ -11,7 +11,7 @@ "baseUrl": "{{base_url}}", "wsUrl": "{{ws_url}}" } - + - + - + diff --git a/examples/cell/main.py b/examples/cell/main.py index 38d4b639..4bd04ed7 100644 --- a/examples/cell/main.py +++ b/examples/cell/main.py @@ -15,6 +15,7 @@ from jinja2 import FileSystemLoader from notebook.base.handlers import IPythonHandler, FileFindHandler from notebook.notebookapp import NotebookApp +from notebook.utils import url_path_join as ujoin from traitlets import Unicode HERE = os.path.dirname(__file__) @@ -41,11 +42,11 @@ class ExampleApp(NotebookApp): def init_webapp(self): """initialize tornado webapp and httpserver. """ - super(ExampleApp, self).init_webapp() + super().init_webapp() default_handlers = [ - (r'/example/?', ExampleHandler), - (r"/example/(.*)", FileFindHandler, - {'path': os.path.join(HERE, 'build')}) ] + (ujoin(self.base_url, r'/example/?'), ExampleHandler), + (ujoin(self.base_url, r"/example/(.*)"), FileFindHandler, + {'path': os.path.join(HERE, 'build')}) ] self.web_app.add_handlers('.*$', default_handlers) diff --git a/examples/cell/package.json b/examples/cell/package.json index 6f9ea8d7..1d9f9755 100644 --- a/examples/cell/package.json +++ b/examples/cell/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/example-cell", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -p src && webpack", @@ -8,32 +8,32 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/completer": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/theme-light-extension": "^1.0.0-alpha.4", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/cells": "^1.0.0-alpha.10", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/completer": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/theme-light-extension": "^1.0.0-alpha.10", "@phosphor/commands": "^1.6.1", - "@phosphor/widgets": "^1.6.0", - "es6-promise": "~4.1.1" + "@phosphor/widgets": "^1.7.0", + "es6-promise": "~4.2.6" }, "devDependencies": { - "css-loader": "~0.28.7", - "file-loader": "~1.1.11", - "mini-css-extract-plugin": "~0.4.4", - "raw-loader": "~0.5.1", + "css-loader": "~2.1.1", + "file-loader": "~3.0.1", + "mini-css-extract-plugin": "~0.6.0", + "raw-loader": "~2.0.0", "rimraf": "~2.6.2", - "style-loader": "~0.21.0", - "svg-url-loader": "~2.3.1", - "svgo": "~1.0.4", - "svgo-loader": "~2.1.0", - "typescript": "~3.3.1", - "url-loader": "~1.0.1", + "style-loader": "~0.23.1", + "svg-url-loader": "~2.3.2", + "svgo": "~1.2.1", + "svgo-loader": "~2.2.0", + "typescript": "~3.5.1", + "url-loader": "~1.1.2", "watch": "~1.0.2", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3", - "whatwg-fetch": "~2.0.3" + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0", + "whatwg-fetch": "^3.0.0" } } diff --git a/examples/cell/src/index.ts b/examples/cell/src/index.ts index bed7176a..eaf225cf 100755 --- a/examples/cell/src/index.ts +++ b/examples/cell/src/index.ts @@ -1,8 +1,12 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import 'es6-promise/auto'; // polyfill Promise on IE +import { PageConfig, URLExt } from '@jupyterlab/coreutils'; +// @ts-ignore +__webpack_public_path__ = URLExt.join(PageConfig.getBaseUrl(), 'example/'); + import '@jupyterlab/application/style/index.css'; +import '@jupyterlab/cells/style/index.css'; import '@jupyterlab/theme-light-extension/style/index.css'; import '../index.css'; @@ -54,20 +58,19 @@ function main(): void { const cellWidget = new CodeCell({ rendermime, model: new CodeCellModel({}) - }); + }).initializeState(); // Handle the mimeType for the current kernel. session.kernelChanged.connect(() => { - session.kernel.ready.then(() => { + void session.kernel.ready.then(() => { const lang = session.kernel.info.language_info; const mimeType = mimeService.getMimeTypeByLanguage(lang); cellWidget.model.mimeType = mimeType; }); }); - // Start the default kernel. + // Use the default kernel. session.kernelPreference = { autoStartDefault: true }; - session.initialize(); // Set up a completer. const editor = cellWidget.editor; @@ -130,6 +133,11 @@ function main(): void { keys: ['Shift Enter'], command: 'run:cell' }); + + // Start up the kernel. + void session.initialize().then(() => { + console.log('Example started!'); + }); } window.addEventListener('load', main); diff --git a/examples/cell/webpack.config.js b/examples/cell/webpack.config.js index 339ca2aa..0a6de8cc 100644 --- a/examples/cell/webpack.config.js +++ b/examples/cell/webpack.config.js @@ -2,8 +2,7 @@ module.exports = { entry: ['whatwg-fetch', './build/index.js'], output: { path: __dirname + '/build', - filename: 'bundle.js', - publicPath: './example/' + filename: 'bundle.js' }, bail: true, devtool: 'cheap-source-map', diff --git a/examples/chrome-example-test.js b/examples/chrome-example-test.js new file mode 100644 index 00000000..8c695a18 --- /dev/null +++ b/examples/chrome-example-test.js @@ -0,0 +1,66 @@ +/** + * A puppeteer test that launches an example app and makes sure + * there are no console errors or uncaught errors prior to a sentinal + * string being printed. + */ +const puppeteer = require('puppeteer'); +const inspect = require('util').inspect; +const URL = process.argv[2]; + +async function main() { + /* eslint-disable no-console */ + console.info('Starting Chrome Headless'); + + const browser = await puppeteer.launch({ + args: ['--no-sandbox'] + }); + const page = await browser.newPage(); + + let errored = false; + + const handleMessage = async msg => { + const text = msg.text(); + console.log(`>> ${text}`); + if (msg.type() === 'error') { + errored = true; + } + const lower = text.toLowerCase(); + if (lower === 'example started!' || lower === 'test complete!') { + await browser.close(); + if (errored) { + console.error('\n\n***\nExample test failed!\n***\n\n'); + process.exit(1); + } + console.info('Example test complete!'); + return; + } + }; + + function handleError(err) { + console.error(err); + errored = true; + } + + page.on('console', handleMessage); + page.on('error', handleError); + + console.info('Navigating to page:', URL); + await page.goto(URL); + console.info('Waiting for page to load...'); + + const html = await page.content(); + if (inspect(html).indexOf('jupyter-config-data') === -1) { + console.error('Error loading JupyterLab page:'); + console.error(html); + } + console.info('Page loaded'); +} + +// Stop the process if an error is raised in the async function. +process.on('unhandledRejection', up => { + if (String(up).indexOf('Target closed') === -1) { + throw up; + } +}); + +main(); diff --git a/examples/console/index.html b/examples/console/index.html index 0d29067f..3873caab 100644 --- a/examples/console/index.html +++ b/examples/console/index.html @@ -9,7 +9,7 @@ "baseUrl": "{{base_url}}", "token": "{{token}}" } - + - + diff --git a/examples/console/main.py b/examples/console/main.py index 3818ec49..cd485c83 100644 --- a/examples/console/main.py +++ b/examples/console/main.py @@ -15,6 +15,7 @@ from jinja2 import FileSystemLoader from notebook.base.handlers import IPythonHandler, FileFindHandler from notebook.notebookapp import NotebookApp +from notebook.utils import url_path_join as ujoin from traitlets import Unicode HERE = os.path.dirname(__file__) @@ -43,9 +44,9 @@ def init_webapp(self): """ super(ExampleApp, self).init_webapp() default_handlers = [ - (r'/example/?', ExampleHandler), - (r"/example/(.*)", FileFindHandler, - {'path': os.path.join(HERE, 'build')}) ] + (ujoin(self.base_url, r'/example/?'), ExampleHandler), + (ujoin(self.base_url, r"/example/(.*)"), FileFindHandler, + {'path': os.path.join(HERE, 'build')}) ] self.web_app.add_handlers('.*$', default_handlers) diff --git a/examples/console/package.json b/examples/console/package.json index 0374acd1..86807510 100644 --- a/examples/console/package.json +++ b/examples/console/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/example-console", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -p src && webpack", @@ -8,31 +8,31 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/console": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/theme-light-extension": "^1.0.0-alpha.4", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/console": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/theme-light-extension": "^1.0.0-alpha.10", "@phosphor/commands": "^1.6.1", - "@phosphor/widgets": "^1.6.0", - "es6-promise": "~4.1.1" + "@phosphor/widgets": "^1.7.0", + "es6-promise": "~4.2.6" }, "devDependencies": { - "@types/codemirror": "~0.0.70", - "css-loader": "~0.28.7", - "file-loader": "~1.1.11", - "mini-css-extract-plugin": "~0.4.4", - "raw-loader": "~0.5.1", + "@types/codemirror": "^0.0.74", + "css-loader": "~2.1.1", + "file-loader": "~3.0.1", + "mini-css-extract-plugin": "~0.6.0", + "raw-loader": "~2.0.0", "rimraf": "~2.6.2", - "style-loader": "~0.21.0", - "svg-url-loader": "~2.3.1", - "svgo": "~1.0.4", - "svgo-loader": "~2.1.0", - "typescript": "~3.3.1", - "url-loader": "~1.0.1", + "style-loader": "~0.23.1", + "svg-url-loader": "~2.3.2", + "svgo": "~1.2.1", + "svgo-loader": "~2.2.0", + "typescript": "~3.5.1", + "url-loader": "~1.1.2", "watch": "~1.0.2", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3", - "whatwg-fetch": "~2.0.3" + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0", + "whatwg-fetch": "^3.0.0" } } diff --git a/examples/console/src/index.ts b/examples/console/src/index.ts index d21557e1..33988b36 100644 --- a/examples/console/src/index.ts +++ b/examples/console/src/index.ts @@ -1,8 +1,12 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import 'es6-promise/auto'; // polyfill Promise on IE +import { PageConfig, URLExt } from '@jupyterlab/coreutils'; +// @ts-ignore +__webpack_public_path__ = URLExt.join(PageConfig.getBaseUrl(), 'example/'); + import '@jupyterlab/application/style/index.css'; +import '@jupyterlab/console/style/index.css'; import '@jupyterlab/theme-light-extension/style/index.css'; import '../index.css'; @@ -24,6 +28,7 @@ import { let TITLE = 'Console'; function main(): void { + console.log('in main'); let path = ''; let query: { [key: string]: string } = Object.create(null); @@ -42,7 +47,7 @@ function main(): void { } let manager = new ServiceManager(); - manager.ready.then(() => { + void manager.ready.then(() => { startApp(path, manager); }); } @@ -51,6 +56,7 @@ function main(): void { * Start the application. */ function startApp(path: string, manager: ServiceManager.IManager) { + console.log('starting app'); // Initialize the command registry with the key bindings. let commands = new CommandRegistry(); @@ -109,7 +115,7 @@ function startApp(path: string, manager: ServiceManager.IManager) { commands.addCommand(command, { label: 'Execute Prompt', execute: () => { - consolePanel.console.execute(); + return consolePanel.console.execute(); } }); palette.addItem({ command, category }); @@ -119,7 +125,7 @@ function startApp(path: string, manager: ServiceManager.IManager) { commands.addCommand(command, { label: 'Execute Cell (forced)', execute: () => { - consolePanel.console.execute(true); + return consolePanel.console.execute(true); } }); palette.addItem({ command, category }); @@ -134,6 +140,8 @@ function startApp(path: string, manager: ServiceManager.IManager) { }); palette.addItem({ command, category }); commands.addKeyBinding({ command, selector, keys: ['Ctrl Enter'] }); + + console.log('Example started!'); } window.addEventListener('load', main); diff --git a/examples/console/webpack.config.js b/examples/console/webpack.config.js index 339ca2aa..0a6de8cc 100644 --- a/examples/console/webpack.config.js +++ b/examples/console/webpack.config.js @@ -2,8 +2,7 @@ module.exports = { entry: ['whatwg-fetch', './build/index.js'], output: { path: __dirname + '/build', - filename: 'bundle.js', - publicPath: './example/' + filename: 'bundle.js' }, bail: true, devtool: 'cheap-source-map', diff --git a/examples/example_check.py b/examples/example_check.py new file mode 100644 index 00000000..1b0f2eca --- /dev/null +++ b/examples/example_check.py @@ -0,0 +1,66 @@ + +# -*- coding: utf-8 -*- +""" +This file is mean to be called with a path to an example directory as +its argument. We import the application entry point for the example +and add instrument them with a puppeteer test that makes sure +there are no console errors or uncaught errors prior to a sentinal +string being printed. + +e.g. python example_check.py ./app +""" +import importlib.util +import logging +from os import path as osp +import os +import shutil +import sys +import subprocess + +from tornado.ioloop import IOLoop +from traitlets import Bool, Unicode +from jupyterlab.labapp import get_app_dir +from jupyterlab.browser_check import run_test + +here = osp.abspath(osp.dirname(__file__)) + + +def main(): + # Load the main file and grab the example class so we can subclass + example_dir = sys.argv.pop() + mod_path = osp.abspath(osp.join(example_dir, 'main.py')) + spec = importlib.util.spec_from_file_location("example", mod_path) + mod = importlib.util.module_from_spec(spec) + spec.loader.exec_module(mod) + + class App(mod.ExampleApp): + """An app that launches an example and waits for it to start up, checking for + JS console errors, JS errors, and Python logged errors. + """ + open_browser = Bool(False) + default_url = '/example' + base_url = '/foo/' + ip = '127.0.0.1' + + def start(self): + run_test(self, run_browser) + super().start() + + App.__name__ = osp.basename(example_dir).capitalize() + 'Test' + App.launch_instance() + + +def run_browser(url): + """Run the browser test and return an exit code. + """ + target = osp.join(get_app_dir(), 'example_test') + if not osp.exists(osp.join(target, 'node_modules')): + os.makedirs(target) + subprocess.call(["jlpm"], cwd=target) + subprocess.call(["jlpm", "add", "puppeteer"], cwd=target) + shutil.copy(osp.join(here, 'chrome-example-test.js'), osp.join(target, 'chrome-example-test.js')) + return subprocess.check_call(["node", "chrome-example-test.js", url], cwd=target) + + +if __name__ == '__main__': + main() diff --git a/examples/filebrowser/index.html b/examples/filebrowser/index.html index f123cb52..02eea011 100644 --- a/examples/filebrowser/index.html +++ b/examples/filebrowser/index.html @@ -8,7 +8,7 @@ "baseUrl": "{{base_url}}", "token": "{{token}}" } - + - + diff --git a/examples/filebrowser/main.py b/examples/filebrowser/main.py index 0fb40d3d..d7c4d8b2 100644 --- a/examples/filebrowser/main.py +++ b/examples/filebrowser/main.py @@ -15,6 +15,7 @@ from jinja2 import FileSystemLoader from notebook.base.handlers import IPythonHandler, FileFindHandler from notebook.notebookapp import NotebookApp +from notebook.utils import url_path_join as ujoin from traitlets import Unicode HERE = os.path.dirname(__file__) @@ -34,6 +35,8 @@ def get_template(self, name): return loader.load(self.settings['jinja2_env'], name) + + class ExampleApp(NotebookApp): default_url = Unicode('/example') @@ -43,9 +46,9 @@ def init_webapp(self): """ super(ExampleApp, self).init_webapp() default_handlers = [ - (r'/example/?', ExampleHandler), - (r"/example/(.*)", FileFindHandler, - {'path': os.path.join(HERE, 'build')}) ] + (ujoin(self.base_url, r'/example/?'), ExampleHandler), + (ujoin(self.base_url, r"/example/(.*)"), FileFindHandler, + {'path': os.path.join(HERE, 'build')}) ] self.web_app.add_handlers('.*$', default_handlers) diff --git a/examples/filebrowser/package.json b/examples/filebrowser/package.json index 47d8765c..f93123b7 100644 --- a/examples/filebrowser/package.json +++ b/examples/filebrowser/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/example-filebrowser", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -p src && webpack", @@ -8,35 +8,35 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/docmanager": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/filebrowser": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/theme-light-extension": "^1.0.0-alpha.4", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/docmanager": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/filebrowser": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/theme-light-extension": "^1.0.0-alpha.10", "@phosphor/algorithm": "^1.1.2", "@phosphor/commands": "^1.6.1", - "@phosphor/widgets": "^1.6.0", - "es6-promise": "~4.1.1" + "@phosphor/widgets": "^1.7.0", + "es6-promise": "~4.2.6" }, "devDependencies": { - "@types/codemirror": "~0.0.70", - "css-loader": "~0.28.7", - "file-loader": "~1.1.11", - "mini-css-extract-plugin": "~0.4.4", - "raw-loader": "~0.5.1", + "@types/codemirror": "^0.0.74", + "css-loader": "~2.1.1", + "file-loader": "~3.0.1", + "mini-css-extract-plugin": "~0.6.0", + "raw-loader": "~2.0.0", "rimraf": "~2.6.2", - "style-loader": "~0.21.0", - "svg-url-loader": "~2.3.1", - "svgo": "~1.0.4", - "svgo-loader": "~2.1.0", - "typescript": "~3.3.1", - "url-loader": "~1.0.1", + "style-loader": "~0.23.1", + "svg-url-loader": "~2.3.2", + "svgo": "~1.2.1", + "svgo-loader": "~2.2.0", + "typescript": "~3.5.1", + "url-loader": "~1.1.2", "watch": "~1.0.2", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3", - "whatwg-fetch": "~2.0.3" + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0", + "whatwg-fetch": "^3.0.0" } } diff --git a/examples/filebrowser/src/index.ts b/examples/filebrowser/src/index.ts index a696f833..62cf8654 100644 --- a/examples/filebrowser/src/index.ts +++ b/examples/filebrowser/src/index.ts @@ -1,9 +1,12 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import 'es6-promise/auto'; // polyfill Promise on IE -import 'font-awesome/css/font-awesome.min.css'; +import { PageConfig, URLExt } from '@jupyterlab/coreutils'; +// @ts-ignore +__webpack_public_path__ = URLExt.join(PageConfig.getBaseUrl(), 'example/'); + import '@jupyterlab/application/style/index.css'; +import '@jupyterlab/filebrowser/style/index.css'; import '@jupyterlab/theme-light-extension/style/index.css'; import '../index.css'; @@ -32,7 +35,7 @@ import { FileEditorFactory } from '@jupyterlab/fileeditor'; function main(): void { let manager = new ServiceManager(); - manager.ready.then(() => { + void manager.ready.then(() => { createApp(manager); }); } @@ -91,7 +94,7 @@ function createApp(manager: ServiceManager.IManager): void { let creator = new ToolbarButton({ iconClassName: 'jp-AddIcon jp-Icon jp-Icon-16', onClick: () => { - docManager + void docManager .newUntitled({ type: 'file', path: fbModel.path @@ -138,13 +141,13 @@ function createApp(manager: ServiceManager.IManager): void { icon: 'fa fa-edit', mnemonic: 0, execute: () => { - fbWidget.rename(); + return fbWidget.rename(); } }); commands.addCommand('file-save', { execute: () => { let context = docManager.contextForWidget(activeWidget); - context.save(); + return context.save(); } }); commands.addCommand('file-cut', { @@ -167,7 +170,7 @@ function createApp(manager: ServiceManager.IManager): void { icon: 'fa fa-remove', mnemonic: 0, execute: () => { - fbWidget.delete(); + return fbWidget.delete(); } }); commands.addCommand('file-duplicate', { @@ -175,7 +178,7 @@ function createApp(manager: ServiceManager.IManager): void { icon: 'fa fa-copy', mnemonic: 0, execute: () => { - fbWidget.duplicate(); + return fbWidget.duplicate(); } }); commands.addCommand('file-paste', { @@ -183,21 +186,21 @@ function createApp(manager: ServiceManager.IManager): void { icon: 'fa fa-paste', mnemonic: 0, execute: () => { - fbWidget.paste(); + return fbWidget.paste(); } }); commands.addCommand('file-download', { label: 'Download', icon: 'fa fa-download', execute: () => { - fbWidget.download(); + return fbWidget.download(); } }); commands.addCommand('file-shutdown-kernel', { - label: 'Shutdown Kernel', + label: 'Shut Down Kernel', icon: 'fa fa-stop-circle-o', execute: () => { - fbWidget.shutdownKernels(); + return fbWidget.shutdownKernels(); } }); commands.addCommand('file-dialog-demo', { @@ -210,7 +213,7 @@ function createApp(manager: ServiceManager.IManager): void { label: 'Info Demo', execute: () => { let msg = 'The quick brown fox jumped over the lazy dog'; - showDialog({ + void showDialog({ title: 'Cool Title', body: msg, buttons: [Dialog.okButton()] @@ -262,6 +265,8 @@ function createApp(manager: ServiceManager.IManager): void { window.addEventListener('resize', () => { panel.update(); }); + + console.log('Example started!'); } /** @@ -282,7 +287,7 @@ function dialogDemo(): void { selector.appendChild(option1); body.appendChild(input); body.appendChild(selector); - showDialog({ + void showDialog({ title: 'Create new notebook' }); } diff --git a/examples/filebrowser/webpack.config.js b/examples/filebrowser/webpack.config.js index 339ca2aa..d496ec06 100644 --- a/examples/filebrowser/webpack.config.js +++ b/examples/filebrowser/webpack.config.js @@ -2,11 +2,10 @@ module.exports = { entry: ['whatwg-fetch', './build/index.js'], output: { path: __dirname + '/build', - filename: 'bundle.js', - publicPath: './example/' + filename: 'bundle.js' }, bail: true, - devtool: 'cheap-source-map', + devtool: 'source-map', mode: 'production', module: { rules: [ diff --git a/examples/notebook/index.css b/examples/notebook/index.css index af781f66..d709d139 100644 --- a/examples/notebook/index.css +++ b/examples/notebook/index.css @@ -20,3 +20,7 @@ body { .jp-NotebookPanel { border-bottom: 1px solid #e0e0e0; } + +.notebookCommandPalette { + min-width: 225px; +} diff --git a/examples/notebook/index.html b/examples/notebook/index.html index 57fc8a4e..9ebc5ff7 100644 --- a/examples/notebook/index.html +++ b/examples/notebook/index.html @@ -7,7 +7,7 @@ - + - + diff --git a/examples/notebook/main.py b/examples/notebook/main.py index 8f7d7bbb..f8f94c9a 100644 --- a/examples/notebook/main.py +++ b/examples/notebook/main.py @@ -20,20 +20,20 @@ HERE = os.path.dirname(__file__) -class NotebookHandler(IPythonHandler): +class ExampleHandler(IPythonHandler): """ Serve a notebook file from the filesystem in the notebook interface """ - def get(self, notebook_path): + def get(self): """Get the main page for the application's interface.""" # Options set here can be read with PageConfig.getOption config_data = { # Use camelCase here, since that's what the lab components expect 'baseUrl': self.base_url, 'token': self.settings['token'], - 'notebookPath': notebook_path, - 'bundleUrl': ujoin(self.base_url, 'build/'), + 'notebookPath': 'test.ipynb', + 'frontendUrl': ujoin(self.base_url, 'example/'), # FIXME: Don't use a CDN here 'mathjaxUrl': "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js", 'mathjaxConfig': "TeX-AMS_CHTML-full,Safe" @@ -54,19 +54,20 @@ def get_template(self, name): class ExampleApp(NotebookApp): - default_url = Unicode('/notebook/test.ipynb') + default_url = Unicode('/example') def init_webapp(self): """initialize tornado webapp and httpserver. """ super(ExampleApp, self).init_webapp() + default_handlers = [ - (ujoin(self.base_url, r'notebook/(.*)?'), NotebookHandler), - (ujoin(self.base_url, r"build/(.*)"), FileFindHandler, + (ujoin(self.base_url, r'/example/?'), ExampleHandler), + (ujoin(self.base_url, r"/example/(.*)"), FileFindHandler, {'path': os.path.join(HERE, 'build')}) ] self.web_app.add_handlers('.*$', default_handlers) if __name__ == '__main__': - ExampleApp.launch_instance() \ No newline at end of file + ExampleApp.launch_instance() diff --git a/examples/notebook/package.json b/examples/notebook/package.json index a9aa3c82..984f0615 100644 --- a/examples/notebook/package.json +++ b/examples/notebook/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/example-notebook", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -p src && webpack", @@ -8,35 +8,36 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/completer": "^1.0.0-alpha.3", - "@jupyterlab/docmanager": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/mathjax2": "^1.0.0-alpha.3", - "@jupyterlab/notebook": "^1.0.0-alpha.4", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/theme-light-extension": "^1.0.0-alpha.4", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/completer": "^1.0.0-alpha.9", + "@jupyterlab/docmanager": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/documentsearch": "^1.0.0-alpha.10", + "@jupyterlab/mathjax2": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/theme-light-extension": "^1.0.0-alpha.10", "@phosphor/commands": "^1.6.1", - "@phosphor/widgets": "^1.6.0", - "es6-promise": "~4.1.1" + "@phosphor/widgets": "^1.7.0", + "es6-promise": "~4.2.6" }, "devDependencies": { - "@types/codemirror": "~0.0.70", - "css-loader": "~0.28.7", - "file-loader": "~1.1.11", - "mini-css-extract-plugin": "~0.4.4", - "raw-loader": "~0.5.1", + "@types/codemirror": "^0.0.74", + "css-loader": "~2.1.1", + "file-loader": "~3.0.1", + "mini-css-extract-plugin": "~0.6.0", + "raw-loader": "~2.0.0", "rimraf": "~2.6.2", - "style-loader": "~0.21.0", - "svg-url-loader": "~2.3.1", - "svgo": "~1.0.4", - "svgo-loader": "~2.1.0", - "typescript": "~3.3.1", - "url-loader": "~1.0.1", + "style-loader": "~0.23.1", + "svg-url-loader": "~2.3.2", + "svgo": "~1.2.1", + "svgo-loader": "~2.2.0", + "typescript": "~3.5.1", + "url-loader": "~1.1.2", "watch": "~1.0.2", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3", - "whatwg-fetch": "~2.0.3" + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0", + "whatwg-fetch": "^3.0.0" } } diff --git a/examples/notebook/src/commands.ts b/examples/notebook/src/commands.ts index ff76279c..568c435e 100644 --- a/examples/notebook/src/commands.ts +++ b/examples/notebook/src/commands.ts @@ -4,6 +4,10 @@ import { CommandRegistry } from '@phosphor/commands'; import { CompletionHandler } from '@jupyterlab/completer'; import { NotebookPanel, NotebookActions } from '@jupyterlab/notebook'; +import { + SearchInstance, + NotebookSearchProvider +} from '@jupyterlab/documentsearch'; import { CommandPalette } from '@phosphor/widgets'; /** @@ -14,6 +18,9 @@ const cmdIds = { select: 'completer:select', invokeNotebook: 'completer:invoke-notebook', selectNotebook: 'completer:select-notebook', + startSearch: 'documentsearch:start-search', + findNext: 'documentsearch:find-next', + findPrevious: 'documentsearch:find-previous', save: 'notebook:save', interrupt: 'notebook:interrupt-kernel', restart: 'notebook:restart-kernel', @@ -67,11 +74,54 @@ export const SetupCommands = ( label: 'Save', execute: () => nbWidget.context.save() }); + + let searchInstance: SearchInstance; + commands.addCommand(cmdIds.startSearch, { + label: 'Find...', + execute: () => { + if (searchInstance) { + searchInstance.focusInput(); + return; + } + const provider = new NotebookSearchProvider(); + searchInstance = new SearchInstance(nbWidget, provider); + searchInstance.disposed.connect(() => { + searchInstance = undefined; + // find next and previous are now not enabled + commands.notifyCommandChanged(); + }); + // find next and previous are now enabled + commands.notifyCommandChanged(); + searchInstance.focusInput(); + } + }); + commands.addCommand(cmdIds.findNext, { + label: 'Find Next', + isEnabled: () => !!searchInstance, + execute: async () => { + if (!searchInstance) { + return; + } + await searchInstance.provider.highlightNext(); + searchInstance.updateIndices(); + } + }); + commands.addCommand(cmdIds.findPrevious, { + label: 'Find Previous', + isEnabled: () => !!searchInstance, + execute: async () => { + if (!searchInstance) { + return; + } + await searchInstance.provider.highlightPrevious(); + searchInstance.updateIndices(); + } + }); commands.addCommand(cmdIds.interrupt, { label: 'Interrupt', - execute: () => { + execute: async () => { if (nbWidget.context.session.kernel) { - nbWidget.context.session.kernel.interrupt(); + await nbWidget.context.session.kernel.interrupt(); } } }); @@ -86,7 +136,10 @@ export const SetupCommands = ( commands.addCommand(cmdIds.runAndAdvance, { label: 'Run and Advance', execute: () => { - NotebookActions.runAndAdvance(nbWidget.content, nbWidget.context.session); + return NotebookActions.runAndAdvance( + nbWidget.content, + nbWidget.context.session + ); } }); commands.addCommand(cmdIds.editMode, { @@ -140,7 +193,10 @@ export const SetupCommands = ( cmdIds.restart, cmdIds.editMode, cmdIds.commandMode, - cmdIds.switchKernel + cmdIds.switchKernel, + cmdIds.startSearch, + cmdIds.findNext, + cmdIds.findPrevious ].forEach(command => palette.addItem({ command, category })); category = 'Notebook Cell Operations'; @@ -177,6 +233,21 @@ export const SetupCommands = ( keys: ['Accel S'], command: cmdIds.save }, + { + selector: '.jp-Notebook', + keys: ['Accel F'], + command: cmdIds.startSearch + }, + { + selector: '.jp-Notebook', + keys: ['Accel G'], + command: cmdIds.findNext + }, + { + selector: '.jp-Notebook', + keys: ['Accel Shift G'], + command: cmdIds.findPrevious + }, { selector: '.jp-Notebook.jp-mod-commandMode:focus', keys: ['I', 'I'], diff --git a/examples/notebook/src/index.ts b/examples/notebook/src/index.ts index 13bc78b9..73626a91 100755 --- a/examples/notebook/src/index.ts +++ b/examples/notebook/src/index.ts @@ -1,8 +1,12 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import 'es6-promise/auto'; // polyfill Promise on IE +import { PageConfig, URLExt } from '@jupyterlab/coreutils'; +// @ts-ignore +__webpack_public_path__ = URLExt.join(PageConfig.getBaseUrl(), 'example/'); + import '@jupyterlab/application/style/index.css'; +import '@jupyterlab/notebook/style/index.css'; import '@jupyterlab/theme-light-extension/style/index.css'; import '../index.css'; @@ -36,12 +40,11 @@ import { RenderMimeRegistry, standardRendererFactories as initialFactories } from '@jupyterlab/rendermime'; -import { PageConfig } from '@jupyterlab/coreutils'; import { SetupCommands } from './commands'; function main(): void { let manager = new ServiceManager(); - manager.ready.then(() => { + void manager.ready.then(() => { createApp(manager); }); } @@ -101,6 +104,7 @@ function createApp(manager: ServiceManager.IManager): void { let notebookPath = PageConfig.getOption('notebookPath'); let nbWidget = docManager.open(notebookPath) as NotebookPanel; let palette = new CommandPalette({ commands }); + palette.addClass('notebookCommandPalette'); const editor = nbWidget.content.activeCell && nbWidget.content.activeCell.editor; @@ -139,6 +143,8 @@ function createApp(manager: ServiceManager.IManager): void { }); SetupCommands(commands, palette, nbWidget, handler); + + console.log('Example started!'); } window.addEventListener('load', main); diff --git a/examples/notebook/webpack.config.js b/examples/notebook/webpack.config.js index 339ca2aa..0a6de8cc 100644 --- a/examples/notebook/webpack.config.js +++ b/examples/notebook/webpack.config.js @@ -2,8 +2,7 @@ module.exports = { entry: ['whatwg-fetch', './build/index.js'], output: { path: __dirname + '/build', - filename: 'bundle.js', - publicPath: './example/' + filename: 'bundle.js' }, bail: true, devtool: 'cheap-source-map', diff --git a/examples/terminal/index.html b/examples/terminal/index.html index f350af7d..287dd3b6 100644 --- a/examples/terminal/index.html +++ b/examples/terminal/index.html @@ -9,7 +9,7 @@ "terminalsAvailable": "{{terminals_available}}", "token": "{{token}}" } - + - + diff --git a/examples/terminal/main.py b/examples/terminal/main.py index 4a66c53e..e3bc7c5e 100644 --- a/examples/terminal/main.py +++ b/examples/terminal/main.py @@ -15,6 +15,7 @@ from jinja2 import FileSystemLoader from notebook.base.handlers import IPythonHandler, FileFindHandler from notebook.notebookapp import NotebookApp +from notebook.utils import url_path_join as ujoin from traitlets import Unicode HERE = os.path.dirname(__file__) @@ -44,9 +45,10 @@ def init_webapp(self): """initialize tornado webapp and httpserver. """ super(ExampleApp, self).init_webapp() + default_handlers = [ - (r'/example/?', ExampleHandler), - (r"/example/(.*)", FileFindHandler, + (ujoin(self.base_url, r'/example/?'), ExampleHandler), + (ujoin(self.base_url, r"/example/(.*)"), FileFindHandler, {'path': os.path.join(HERE, 'build')}) ] self.web_app.add_handlers('.*$', default_handlers) diff --git a/examples/terminal/package.json b/examples/terminal/package.json index f8ad2dc9..f492e409 100644 --- a/examples/terminal/package.json +++ b/examples/terminal/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/example-terminal", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -p src && webpack", @@ -8,27 +8,27 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/terminal": "^1.0.0-alpha.3", - "@jupyterlab/theme-light-extension": "^1.0.0-alpha.4", - "@phosphor/widgets": "^1.6.0", - "es6-promise": "~4.1.1" + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/terminal": "^1.0.0-alpha.9", + "@jupyterlab/theme-light-extension": "^1.0.0-alpha.10", + "@phosphor/widgets": "^1.7.0", + "es6-promise": "~4.2.6" }, "devDependencies": { - "css-loader": "~0.28.7", - "file-loader": "~1.1.11", - "mini-css-extract-plugin": "~0.4.4", - "raw-loader": "~0.5.1", + "css-loader": "~2.1.1", + "file-loader": "~3.0.1", + "mini-css-extract-plugin": "~0.6.0", + "raw-loader": "~2.0.0", "rimraf": "~2.6.2", - "style-loader": "~0.21.0", - "svg-url-loader": "~2.3.1", - "svgo": "~1.0.4", - "svgo-loader": "~2.1.0", - "typescript": "~3.3.1", - "url-loader": "~1.0.1", + "style-loader": "~0.23.1", + "svg-url-loader": "~2.3.2", + "svgo": "~1.2.1", + "svgo-loader": "~2.2.0", + "typescript": "~3.5.1", + "url-loader": "~1.1.2", "watch": "~1.0.2", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3", - "whatwg-fetch": "~2.0.3" + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0", + "whatwg-fetch": "^3.0.0" } } diff --git a/examples/terminal/src/index.ts b/examples/terminal/src/index.ts index cb17e8d9..4f674dad 100644 --- a/examples/terminal/src/index.ts +++ b/examples/terminal/src/index.ts @@ -1,8 +1,12 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import 'es6-promise/auto'; // polyfill Promise on IE +import { PageConfig, URLExt } from '@jupyterlab/coreutils'; +// @ts-ignore +__webpack_public_path__ = URLExt.join(PageConfig.getBaseUrl(), 'example/'); + import '@jupyterlab/application/style/index.css'; +import '@jupyterlab/terminal/style/index.css'; import '@jupyterlab/theme-light-extension/style/index.css'; import '../index.css'; @@ -12,22 +16,8 @@ import { TerminalSession } from '@jupyterlab/services'; import { Terminal } from '@jupyterlab/terminal'; -function main(): void { - let term1 = new Terminal({ theme: 'light' }); - let term2 = new Terminal({ theme: 'dark' }); - - TerminalSession.startNew().then(session => { - term1.session = session; - }); - TerminalSession.startNew().then(session => { - term2.session = session; - }); - - term1.title.closable = true; - term2.title.closable = true; +async function main(): Promise { let dock = new DockPanel(); - dock.addWidget(term1); - dock.addWidget(term2, { mode: 'tab-before' }); dock.id = 'main'; // Attach the widget to the dom. @@ -37,6 +27,18 @@ function main(): void { window.addEventListener('resize', () => { dock.fit(); }); + + const s1 = await TerminalSession.startNew(); + const term1 = new Terminal(s1, { theme: 'light' }); + term1.title.closable = true; + dock.addWidget(term1); + + const s2 = await TerminalSession.startNew(); + const term2 = new Terminal(s2, { theme: 'dark' }); + term2.title.closable = true; + dock.addWidget(term2, { mode: 'tab-before' }); + + console.log('Example started!'); } window.addEventListener('load', main); diff --git a/examples/terminal/webpack.config.js b/examples/terminal/webpack.config.js index 339ca2aa..0a6de8cc 100644 --- a/examples/terminal/webpack.config.js +++ b/examples/terminal/webpack.config.js @@ -2,8 +2,7 @@ module.exports = { entry: ['whatwg-fetch', './build/index.js'], output: { path: __dirname + '/build', - filename: 'bundle.js', - publicPath: './example/' + filename: 'bundle.js' }, bail: true, devtool: 'cheap-source-map', diff --git a/examples/test_examples.py b/examples/test_examples.py new file mode 100644 index 00000000..c2016118 --- /dev/null +++ b/examples/test_examples.py @@ -0,0 +1,52 @@ + +# -*- coding: utf-8 -*- +""" +This file is meant to be used to test all of the example here and and +in ../packages/services/examples. We import each of the applications +and add instrument them with a puppeteer test that makes sure +there are no console errors or uncaught errors prior to a sentinal +string being printed. +""" +import glob +import os.path as osp +import subprocess +import sys + +here = osp.abspath(osp.dirname(__file__)) + +def header(path): + test_name = osp.basename(path) + print('\n') + print('*' * 40) + print('Starting %s test' % test_name) + print('*' * 40) + + +def main(): + paths = [i for i in glob.glob('%s/*' % here) if osp.isdir(i)] + + services_dir = osp.abspath(osp.join(here, '../packages/services/examples')) + paths += [i for i in glob.glob('%s/*' % services_dir)] + + count = 0 + for path in sorted(paths): + if osp.basename(path) == 'node': + header(path) + runner = osp.join(path, 'main.py') + subprocess.check_call([sys.executable, runner]) + count += 1 + continue + + if not osp.exists(osp.join(path, 'main.py')): + continue + + count += 1 + header(path) + runner = osp.join(here, 'example_check.py') + subprocess.check_call([sys.executable, runner, path]) + + print('\n\n%s tests complete!' % count) + + +if __name__ == "__main__": + main() diff --git a/git-hooks/README.md b/git-hooks/README.md deleted file mode 100644 index 00717c88..00000000 --- a/git-hooks/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Git hooks for JupyterLab - -add these to your `.git/hooks` - -For now, we just have `post-checkout` and `post-merge`, -both of which attempt to rebuild the server extension, -so make sure that you have a fully synced repo whenever you checkout or pull. - -To use these hooks, run `./install-hooks.sh`. diff --git a/git-hooks/install-hooks.sh b/git-hooks/install-hooks.sh deleted file mode 100755 index 60ea6416..00000000 --- a/git-hooks/install-hooks.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -DOTGIT=`git rev-parse --git-dir` -TOPLEVEL=`git rev-parse --show-toplevel` -TO=${DOTGIT}/hooks -FROM=${TOPLEVEL}/git-hooks - -ln -s ${FROM}/post-checkout ${TO}/post-checkout -ln -s ${FROM}/post-merge ${TO}/post-merge diff --git a/git-hooks/post-checkout b/git-hooks/post-checkout deleted file mode 100755 index c317c7c1..00000000 --- a/git-hooks/post-checkout +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "rebuilding extension" -(npm install && npm run build:main) || echo "fail to rebuild javascript" diff --git a/git-hooks/post-merge b/git-hooks/post-merge deleted file mode 100755 index c317c7c1..00000000 --- a/git-hooks/post-merge +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "rebuilding extension" -(npm install && npm run build:main) || echo "fail to rebuild javascript" diff --git a/jupyterlab/_version.py b/jupyterlab/_version.py index 1ddef494..1831b8c3 100644 --- a/jupyterlab/_version.py +++ b/jupyterlab/_version.py @@ -11,7 +11,8 @@ 'serial' ]) -version_info = VersionInfo(1, 0, 0, 'alpha', 1) +# DO NOT EDIT THIS DIRECTLY! It is managed by bumpversion +version_info = VersionInfo(1, 0, 0, 'alpha', 6) _specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''} @@ -21,4 +22,4 @@ version_info.micro, ('' if version_info.releaselevel == 'final' - else _specifier_[version_info.releaselevel] + str(version_info.serial))) +else _specifier_[version_info.releaselevel] + str(version_info.serial))) diff --git a/jupyterlab/browser_check.py b/jupyterlab/browser_check.py index b33afeec..5ce9613d 100644 --- a/jupyterlab/browser_check.py +++ b/jupyterlab/browser_check.py @@ -1,6 +1,11 @@ # -*- coding: utf-8 -*- +""" +This module is meant to run JupyterLab in a headless browser, making sure +the application launches and starts up without errors. +""" from concurrent.futures import ThreadPoolExecutor +import logging from os import path as osp import os import shutil @@ -12,6 +17,7 @@ from traitlets import Bool from .labapp import LabApp, get_app_dir +from .tests.test_app import TestEnv here = osp.abspath(osp.dirname(__file__)) @@ -30,8 +36,69 @@ test_aliases['app-dir'] = 'BrowserApp.app_dir' -class BrowserApp(LabApp): +class LogErrorHandler(logging.Handler): + """A handler that exits with 1 on a logged error.""" + + def __init__(self): + super().__init__(level=logging.ERROR) + self.errored = False + + def filter(self, record): + # known startup error message + if 'paste' in record.msg: + return + return super().filter(record) + + def emit(self, record): + print(record.msg, file=sys.stderr) + self.errored = True + + +def run_test(app, func): + """Run a test against the application. + + func is a function that accepts an app url as a parameter and returns a result. + """ + handler = LogErrorHandler() + + env_patch = TestEnv() + env_patch.start() + + def finished(future): + try: + result = future.result() + except Exception as e: + app.log.error(str(e)) + app.log.info('Stopping server...') + app.stop() + if handler.errored: + app.log.critical('Exiting with 1 due to errors') + result = 1 + elif result != 0: + app.log.critical('Exiting with %s due to errors' % result) + else: + app.log.info('Exiting normally') + result = 0 + + app.http_server.stop() + app.io_loop.stop() + env_patch.stop() + try: + os._exit(result) + except Exception as e: + self.log.error(str(e)) + os._exit(1) + app.log.addHandler(handler) + pool = ThreadPoolExecutor() + future = pool.submit(func, app.display_url) + IOLoop.current().add_future(future, finished) + + +class BrowserApp(LabApp): + """An app the launches JupyterLab and waits for it to start up, checking for + JS console errors, JS errors, and Python logged errors. + """ open_browser = Bool(False) base_url = '/foo/' ip = '127.0.0.1' @@ -43,18 +110,8 @@ def start(self): web_app.settings.setdefault('page_config_data', dict()) web_app.settings['page_config_data']['browserTest'] = True web_app.settings['page_config_data']['buildAvailable'] = False - - pool = ThreadPoolExecutor() - future = pool.submit(run_browser, self.display_url) - IOLoop.current().add_future(future, self._browser_finished) - super(BrowserApp, self).start() - - def _browser_finished(self, future): - try: - sys.exit(future.result()) - except Exception as e: - self.log.error(str(e)) - sys.exit(1) + run_test(self, run_browser) + super().start() def run_browser(url): diff --git a/jupyterlab/chrome-test.js b/jupyterlab/chrome-test.js index 08257122..443873fb 100644 --- a/jupyterlab/chrome-test.js +++ b/jupyterlab/chrome-test.js @@ -3,6 +3,7 @@ const inspect = require('util').inspect; const URL = process.argv[2]; async function main() { + /* eslint-disable no-console */ console.info('Starting Chrome Headless'); const browser = await puppeteer.launch({ args: ['--no-sandbox'] }); diff --git a/jupyterlab/commands.py b/jupyterlab/commands.py index 38f9c201..50a7f036 100644 --- a/jupyterlab/commands.py +++ b/jupyterlab/commands.py @@ -35,13 +35,13 @@ WEBPACK_EXPECT = re.compile(r'.*/index.out.js') # The dev mode directory. -DEV_DIR = osp.realpath(os.path.join(HERE, '..', 'dev_mode')) +DEV_DIR = osp.abspath(os.path.join(HERE, '..', 'dev_mode')) def pjoin(*args): """Join paths to create a real path. """ - return osp.realpath(osp.join(*args)) + return osp.abspath(osp.join(*args)) def get_user_settings_dir(): @@ -51,7 +51,7 @@ def get_user_settings_dir(): settings_dir = settings_dir or pjoin( jupyter_config_path()[0], 'lab', 'user-settings' ) - return osp.realpath(settings_dir) + return osp.abspath(settings_dir) def get_workspaces_dir(): @@ -61,7 +61,7 @@ def get_workspaces_dir(): workspaces_dir = workspaces_dir or pjoin( jupyter_config_path()[0], 'lab', 'workspaces' ) - return osp.realpath(workspaces_dir) + return osp.abspath(workspaces_dir) def get_app_dir(): @@ -69,7 +69,7 @@ def get_app_dir(): """ # Default to the override environment variable. if os.environ.get('JUPYTERLAB_DIR'): - return osp.realpath(os.environ['JUPYTERLAB_DIR']) + return osp.abspath(os.environ['JUPYTERLAB_DIR']) # Use the default locations for data_files. app_dir = pjoin(sys.prefix, 'share', 'jupyter', 'lab') @@ -87,20 +87,55 @@ def get_app_dir(): osp.exists(app_dir) and osp.exists('/usr/local/share/jupyter/lab')): app_dir = '/usr/local/share/jupyter/lab' + return osp.abspath(app_dir) - return osp.realpath(app_dir) + +def dedupe_yarn(path, logger=None): + """ `yarn-deduplicate` with the `fewer` strategy to minimize total + packages installed in a given staging directory + + This means a extension (or dependency) _could_ cause a downgrade of an + version expected at publication time, but core should aggressively set + pins above, for example, known-bad versions + """ + had_dupes = Process( + ['node', YARN_PATH, 'yarn-deduplicate', '-s', 'fewer', '--fail'], + cwd=path, logger=logger + ).wait() != 0 + + if had_dupes: + yarn_proc = Process(['node', YARN_PATH], cwd=path, logger=logger) + yarn_proc.wait() + + +def ensure_node_modules(cwd, logger=None): + """Ensure that node_modules is up to date. + + Returns true if the node_modules was updated. + """ + logger = _ensure_logger(logger) + yarn_proc = Process(['node', YARN_PATH, 'check', '--verify-tree'], cwd=cwd, logger=logger) + ret = yarn_proc.wait() + + # Update node_modules if needed. + if ret != 0: + yarn_proc = Process(['node', YARN_PATH], cwd=cwd, logger=logger) + yarn_proc.wait() + parent = pjoin(HERE, '..') + dedupe_yarn(parent, logger) + + return ret != 0 def ensure_dev(logger=None): """Ensure that the dev assets are available. """ parent = pjoin(HERE, '..') + logger = _ensure_logger(logger) + target = pjoin(parent, 'dev_mode', 'static') - if not osp.exists(pjoin(parent, 'node_modules')): - yarn_proc = Process(['node', YARN_PATH], cwd=parent, logger=logger) - yarn_proc.wait() - - if not osp.exists(pjoin(parent, 'dev_mode', 'static')): + # Determine whether to build. + if ensure_node_modules(parent, logger) or not osp.exists(target): yarn_proc = Process(['node', YARN_PATH, 'build'], cwd=parent, logger=logger) yarn_proc.wait() @@ -110,21 +145,30 @@ def ensure_core(logger=None): """Ensure that the core assets are available. """ staging = pjoin(HERE, 'staging') + logger = _ensure_logger(logger) - # Bail if the static directory already exists. - if osp.exists(pjoin(HERE, 'static')): - return - - if not osp.exists(pjoin(staging, 'node_modules')): - yarn_proc = Process(['node', YARN_PATH], cwd=staging, logger=logger) - yarn_proc.wait() - - if not osp.exists(pjoin(HERE, 'static')): + # Determine whether to build. + target = pjoin(HERE, 'static', 'index.html') + if not osp.exists(target): + ensure_node_modules(staging, logger) yarn_proc = Process(['node', YARN_PATH, 'build'], cwd=staging, logger=logger) yarn_proc.wait() +def ensure_app(app_dir): + """Ensure that an application directory is available. + + If it does not exist, return a list of messages to prompt the user. + """ + if osp.exists(pjoin(app_dir, 'static', 'index.html')): + return + + msgs = ['JupyterLab application assets not found in "%s"' % app_dir, + 'Please run `jupyter lab build` or use a different app directory'] + return msgs + + def watch_packages(logger=None): """Run watch mode for the source packages. @@ -138,13 +182,10 @@ def watch_packages(logger=None): A list of `WatchHelper` objects. """ parent = pjoin(HERE, '..') - - if not osp.exists(pjoin(parent, 'node_modules')): - yarn_proc = Process(['node', YARN_PATH], cwd=parent, logger=logger) - yarn_proc.wait() - logger = _ensure_logger(logger) - ts_dir = osp.realpath(osp.join(HERE, '..', 'packages', 'metapackage')) + ensure_node_modules(parent, logger) + + ts_dir = osp.abspath(osp.join(HERE, '..', 'packages', 'metapackage')) # Run typescript watch and wait for the string indicating it is done. ts_regex = r'.* Found 0 errors\. Watching for file changes\.' @@ -211,7 +252,7 @@ def install_extension(extension, app_dir=None, logger=None): return handler.install_extension(extension) -def uninstall_extension(name, app_dir=None, logger=None): +def uninstall_extension(name=None, app_dir=None, logger=None, all_=False): """Uninstall an extension by name or path. Returns `True` if a rebuild is recommended, `False` otherwise. @@ -219,6 +260,8 @@ def uninstall_extension(name, app_dir=None, logger=None): logger = _ensure_logger(logger) _node_check(logger) handler = _AppHandler(app_dir, logger) + if all_ is True: + return handler.uninstall_all_extensions() return handler.uninstall_extension(name) @@ -441,10 +484,20 @@ def build(self, name=None, version=None, public_url=None, staging = pjoin(app_dir, 'staging') # Make sure packages are installed. - self._run(['node', YARN_PATH, 'install'], cwd=staging) + ret = self._run(['node', YARN_PATH, 'install', '--non-interactive'], cwd=staging) + if ret != 0: + msg = 'npm dependencies failed to install' + self.logger.error(msg) + raise RuntimeError(msg) + + dedupe_yarn(staging, self.logger) # Build the app. - self._run(['node', YARN_PATH, 'run', command], cwd=staging) + ret = self._run(['node', YARN_PATH, 'run', command], cwd=staging) + if ret != 0: + msg = 'JupyterLab failed to build' + self.logger.error(msg) + raise RuntimeError(msg) def watch(self): """Start the application watcher and then run the watch in @@ -456,6 +509,7 @@ def watch(self): # Make sure packages are installed. self._run(['node', YARN_PATH, 'install'], cwd=staging) + dedupe_yarn(staging, self.logger) proc = WatchHelper(['node', YARN_PATH, 'run', 'watch'], cwd=pjoin(self.app_dir, 'staging'), @@ -469,43 +523,43 @@ def list_extensions(self): logger = self.logger info = self.info - logger.info('JupyterLab v%s' % info['version']) + print('JupyterLab v%s' % info['version']) if info['extensions']: info['compat_errors'] = self._get_extension_compat() - logger.info('Known labextensions:') + print('Known labextensions:') self._list_extensions(info, 'app') self._list_extensions(info, 'sys') else: - logger.info('No installed extensions') + print('No installed extensions') local = info['local_extensions'] if local: - logger.info('\n local extensions:') + print('\n local extensions:') for name in sorted(local): - logger.info(' %s: %s' % (name, local[name])) + print(' %s: %s' % (name, local[name])) linked_packages = info['linked_packages'] if linked_packages: - logger.info('\n linked packages:') + print('\n linked packages:') for key in sorted(linked_packages): source = linked_packages[key]['source'] - logger.info(' %s: %s' % (key, source)) + print(' %s: %s' % (key, source)) uninstalled_core = info['uninstalled_core'] if uninstalled_core: - logger.info('\nUninstalled core extensions:') - [logger.info(' %s' % item) for item in sorted(uninstalled_core)] + print('\nUninstalled core extensions:') + [print(' %s' % item) for item in sorted(uninstalled_core)] disabled_core = info['disabled_core'] if disabled_core: - logger.info('\nDisabled core extensions:') - [logger.info(' %s' % item) for item in sorted(disabled_core)] + print('\nDisabled core extensions:') + [print(' %s' % item) for item in sorted(disabled_core)] messages = self.build_check(fast=True) if messages: - logger.info('\nBuild recommended, please run `jupyter lab build`:') - [logger.info(' %s' % item) for item in messages] + print('\nBuild recommended, please run `jupyter lab build`:') + [print(' %s' % item) for item in messages] def build_check(self, fast=False): """Determine whether JupyterLab should be built. @@ -615,6 +669,17 @@ def uninstall_extension(self, name): self.logger.warn('No labextension named "%s" installed' % name) return False + def uninstall_all_extensions(self): + """Uninstalls all extensions + + Returns `True` if a rebuild is recommended, `False` otherwise + """ + should_rebuild = False + for (extname, _) in self.info['extensions'].items(): + uninstalled = self.uninstall_extension(extname) + should_rebuild = should_rebuild or uninstalled + return should_rebuild + def update_all_extensions(self): """Update all non-local extensions. @@ -862,12 +927,6 @@ def _populate_staging(self, name=None, version=None, public_url=None, target = pjoin(staging, fname) shutil.copy(pjoin(HERE, 'staging', fname), target) - # Remove an existing yarn.lock file - # Because otherwise we can end up with unwanted duplicates - # cf https://github.com/yarnpkg/yarn/issues/3967 - if osp.exists(pjoin(staging, 'yarn.lock')): - os.remove(pjoin(staging, 'yarn.lock')) - # Ensure a clean templates directory templates = pjoin(staging, 'templates') if osp.exists(templates): @@ -934,6 +993,11 @@ def _populate_staging(self, name=None, version=None, public_url=None, with open(pkg_path, 'w') as fid: json.dump(data, fid, indent=4) + # copy known-good yarn.lock if missing + lock_path = pjoin(staging, 'yarn.lock') + if not osp.exists(lock_path): + shutil.copy(pjoin(HERE, 'staging', 'yarn.lock'), lock_path) + def _get_package_template(self, silent=False): """Get the template the for staging package.json file. """ @@ -1066,7 +1130,7 @@ def _get_extensions_in_dir(self, dname, core_data): deps = data.get('dependencies', dict()) name = data['name'] jlab = data.get('jupyterlab', dict()) - path = osp.realpath(target) + path = osp.abspath(target) # homepage, repository are optional if 'homepage' in data: url = data['homepage'] @@ -1111,7 +1175,7 @@ def _get_linked_packages(self): return info for path in glob.glob(pjoin(dname, '*.tgz')): - path = osp.realpath(path) + path = osp.abspath(path) data = read_package(path) name = data['name'] if name not in info: diff --git a/jupyterlab/extension.py b/jupyterlab/extension.py index 061c97e6..6044127f 100644 --- a/jupyterlab/extension.py +++ b/jupyterlab/extension.py @@ -82,16 +82,19 @@ def load_jupyter_server_extension(nbapp): from notebook._version import version_info from tornado.ioloop import IOLoop from markupsafe import Markup - from .build_handler import build_path, Builder, BuildHandler - from .extension_manager_handler import ( + from .handlers.build_handler import build_path, Builder, BuildHandler + from .handlers.extension_manager_handler import ( extensions_handler_path, ExtensionManager, ExtensionHandler ) + from .handlers.error_handler import ErrorHandler from .commands import ( - DEV_DIR, HERE, ensure_core, ensure_dev, watch, watch_dev, get_app_dir + DEV_DIR, HERE, ensure_app, ensure_core, ensure_dev, watch, + watch_dev, get_app_dir ) web_app = nbapp.web_app logger = nbapp.log + base_url = nbapp.base_url # Handle the app_dir app_dir = getattr(nbapp, 'app_dir', get_app_dir()) @@ -133,16 +136,9 @@ def load_jupyter_server_extension(nbapp): page_config = web_app.settings.setdefault('page_config_data', dict()) page_config['buildAvailable'] = not core_mode and not dev_mode page_config['buildCheck'] = not core_mode and not dev_mode - page_config['defaultWorkspace'] = ujoin(nbapp.base_url, config.page_url) page_config['devMode'] = dev_mode page_config['token'] = nbapp.token - # Handle bundle url - bundle_url = config.public_url - if bundle_url.startswith(config.page_url): - bundle_url = ujoin(nbapp.base_url, bundle_url) - page_config['bundleUrl'] = bundle_url - # Export the version info tuple to a JSON array. This gets printed # inside double quote marks, so we render it to a JSON string of the # JSON data (so that we can call JSON.parse on the frontend on it). @@ -157,18 +153,34 @@ def load_jupyter_server_extension(nbapp): nbapp.default_url = uri nbapp.file_to_run = '' + # Print messages. + logger.info('JupyterLab extension loaded from %s' % HERE) + logger.info('JupyterLab application directory is %s' % app_dir) + + build_url = ujoin(base_url, build_path) + builder = Builder(logger, core_mode, app_dir) + build_handler = (build_url, BuildHandler, {'builder': builder}) + handlers = [build_handler] + + errored = False + if core_mode: logger.info(CORE_NOTE.strip()) ensure_core(logger) elif dev_mode: - ensure_dev(logger) if not watch_mode: + ensure_dev(logger) logger.info(DEV_NOTE) - # Print messages. - logger.info('JupyterLab extension loaded from %s' % HERE) - logger.info('JupyterLab application directory is %s' % app_dir) + # Make sure the app dir exists. + else: + msgs = ensure_app(app_dir) + if msgs: + [logger.error(msg) for msg in msgs] + handler = (ujoin(base_url, '/lab'), ErrorHandler, { 'messages': msgs }) + handlers.append(handler) + errored = True if watch_mode: logger.info('Starting JupyterLab watch mode...') @@ -183,19 +195,15 @@ def load_jupyter_server_extension(nbapp): config.cache_files = False - base_url = web_app.settings['base_url'] - build_url = ujoin(base_url, build_path) - builder = Builder(logger, core_mode, app_dir) - build_handler = (build_url, BuildHandler, {'builder': builder}) - handlers = [build_handler] - - if not core_mode: + if not core_mode and not errored: ext_url = ujoin(base_url, extensions_handler_path) ext_manager = ExtensionManager(logger, app_dir) ext_handler = (ext_url, ExtensionHandler, {'manager': ext_manager}) handlers.append(ext_handler) - # Must add before the launcher handlers to avoid shadowing. + # Must add before the root server handlers to avoid shadowing. web_app.add_handlers('.*$', handlers) - add_handlers(web_app, config) + # Add the root handlers if we have not errored. + if not errored: + add_handlers(web_app, config) diff --git a/jupyterlab/handlers/__init__.py b/jupyterlab/handlers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/jupyterlab/build_handler.py b/jupyterlab/handlers/build_handler.py similarity index 98% rename from jupyterlab/build_handler.py rename to jupyterlab/handlers/build_handler.py index e7090296..80cf27e5 100644 --- a/jupyterlab/build_handler.py +++ b/jupyterlab/handlers/build_handler.py @@ -10,7 +10,7 @@ from tornado import gen, web from tornado.concurrent import run_on_executor -from .commands import build, clean, build_check +from ..commands import build, clean, build_check class Builder(object): diff --git a/jupyterlab/handlers/error_handler.py b/jupyterlab/handlers/error_handler.py new file mode 100644 index 00000000..f6da79b6 --- /dev/null +++ b/jupyterlab/handlers/error_handler.py @@ -0,0 +1,33 @@ +# coding: utf-8 +"""An error handler for JupyterLab.""" + +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. + +from tornado import web +from jupyterlab_server.server import JupyterHandler + + +TEMPLATE = """ + + + + + JupyterLab Error + + +

JupyterLab Error

+%s + +""" + +class ErrorHandler(JupyterHandler): + + def initialize(self, messages): + self.messages = messages + + @web.authenticated + @web.removeslash + def get(self): + msgs = ['

%s

' % msg for msg in self.messages] + self.write(TEMPLATE % '\n'.join(msgs)) diff --git a/jupyterlab/extension_manager_handler.py b/jupyterlab/handlers/extension_manager_handler.py similarity index 99% rename from jupyterlab/extension_manager_handler.py rename to jupyterlab/handlers/extension_manager_handler.py index 5b5c3ba2..3ef873e3 100644 --- a/jupyterlab/extension_manager_handler.py +++ b/jupyterlab/handlers/extension_manager_handler.py @@ -12,7 +12,7 @@ from notebook.base.handlers import APIHandler from tornado import gen, web -from .commands import ( +from ..commands import ( get_app_info, install_extension, uninstall_extension, enable_extension, disable_extension, read_package, _AppHandler, get_latest_compatible_package_versions diff --git a/jupyterlab/labapp.py b/jupyterlab/labapp.py index 8eeb5612..bc852a6d 100644 --- a/jupyterlab/labapp.py +++ b/jupyterlab/labapp.py @@ -6,6 +6,8 @@ import json import os +import os.path as osp +from os.path import join as pjoin import sys from jupyter_core.application import JupyterApp, base_aliases @@ -26,12 +28,9 @@ build_aliases['app-dir'] = 'LabBuildApp.app_dir' build_aliases['name'] = 'LabBuildApp.name' build_aliases['version'] = 'LabBuildApp.version' +build_aliases['dev-build'] = 'LabBuildApp.dev_build' build_flags = dict(flags) -build_flags['dev'] = ( - {'LabBuildApp': {'dev_build': True}}, - "Build in Development mode" -) version = __version__ app_version = get_app_version() @@ -63,8 +62,8 @@ class LabBuildApp(JupyterApp): dev_build = Bool(True, config=True, help="Whether to build in dev mode (defaults to dev mode)") - pre_clean = Bool(True, config=True, - help="Whether to clean before building (defaults to True)") + pre_clean = Bool(False, config=True, + help="Whether to clean before building (defaults to False)") def start(self): command = 'build:prod' if not self.dev_build else 'build' @@ -143,9 +142,9 @@ def start(self): raw = (page_url if not self.extra_args else ujoin(config.workspaces_url, self.extra_args[0])) slug = slugify(raw, base_url) - workspace_path = os.path.join(directory, slug + WORKSPACE_EXTENSION) + workspace_path = pjoin(directory, slug + WORKSPACE_EXTENSION) - if os.path.exists(workspace_path): + if osp.exists(workspace_path): with open(workspace_path) as fid: try: # to load the workspace file. print(fid.read()) @@ -190,22 +189,15 @@ def start(self): print('One argument is required for workspace import.') sys.exit(1) - file_name = self.extra_args[0] - file_path = os.path.abspath(file_name) - - if not os.path.exists(file_path): - print('%s does not exist.' % file_name) - sys.exit(1) - workspace = dict() - with open(file_path) as fid: + with self._smart_open() as fid: try: # to load, parse, and validate the workspace file. workspace = self._validate(fid, base_url, page_url, workspaces_url) except Exception as e: - print('%s is not a valid workspace:\n%s' % (file_name, e)) + print('%s is not a valid workspace:\n%s' % (fid.name, e)) sys.exit(1) - if not os.path.exists(directory): + if not osp.exists(directory): try: os.makedirs(directory) except Exception as e: @@ -213,7 +205,7 @@ def start(self): sys.exit(1) slug = slugify(workspace['metadata']['id'], base_url) - workspace_path = os.path.join(directory, slug + WORKSPACE_EXTENSION) + workspace_path = pjoin(directory, slug + WORKSPACE_EXTENSION) # Write the workspace data to a file. with open(workspace_path, 'w') as fid: @@ -221,6 +213,20 @@ def start(self): print('Saved workspace: %s' % workspace_path) + def _smart_open(self): + file_name = self.extra_args[0] + + if file_name == '-': + return sys.stdin + else: + file_path = osp.abspath(file_name) + + if not osp.exists(file_path): + print('%s does not exist.' % file_name) + sys.exit(1) + + return open(file_path) + def _validate(self, data, base_url, page_url, workspaces_url): workspace = json.load(data) diff --git a/jupyterlab/labextensions.py b/jupyterlab/labextensions.py index 0ca03a51..7f7e09aa 100644 --- a/jupyterlab/labextensions.py +++ b/jupyterlab/labextensions.py @@ -26,10 +26,6 @@ {'BaseExtensionApp': {'should_build': False}}, "Defer building the app after the action." ) -flags['dev-build'] = ( - {'BaseExtensionApp': {'dev_build': True}}, - "Build in Development mode" -) flags['clean'] = ( {'BaseExtensionApp': {'should_clean': True}}, "Cleanup intermediate files after the action." @@ -47,8 +43,15 @@ "Update all extensions" ) +uninstall_flags = copy(flags) +uninstall_flags['all'] = ( + {'UninstallLabExtensionApp': {'all': True}}, + "Uninstall all extensions" +) + aliases = dict(base_aliases) aliases['app-dir'] = 'BaseExtensionApp.app_dir' +aliases['dev-build'] = 'BaseExtensionApp.dev_build' VERSION = get_app_version() @@ -158,11 +161,15 @@ def run_task(self): class UninstallLabExtensionApp(BaseExtensionApp): description = "Uninstall labextension(s) by name" + flags = uninstall_flags + + all = Bool(False, config=True, + help="Whether to uninstall all extensions") def run_task(self): self.extra_args = self.extra_args or [os.getcwd()] return any([ - uninstall_extension(arg, self.app_dir, logger=self.log) + uninstall_extension(arg, all_=self.all, app_dir=self.app_dir, logger=self.log) for arg in self.extra_args ]) diff --git a/jupyterlab/staging/index.js b/jupyterlab/staging/index.js index cf70ca9e..5ed61582 100644 --- a/jupyterlab/staging/index.js +++ b/jupyterlab/staging/index.js @@ -9,7 +9,7 @@ import { PageConfig, URLExt } from '@jupyterlab/coreutils'; -__webpack_public_path__ = PageConfig.getOption('bundleUrl'); +__webpack_public_path__ = PageConfig.getOption('frontendUrl'); // This needs to come after __webpack_public_path__ is set. require('font-awesome/css/font-awesome.min.css'); diff --git a/jupyterlab/staging/package.json b/jupyterlab/staging/package.json index c9d41a1c..a3ab8ae0 100644 --- a/jupyterlab/staging/package.json +++ b/jupyterlab/staging/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/application-top", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.10", "private": true, "scripts": { "build": "webpack", @@ -12,130 +12,104 @@ "watch": "webpack --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/application-extension": "^1.0.0-alpha.3", - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/apputils-extension": "^1.0.0-alpha.3", - "@jupyterlab/attachments": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/codemirror-extension": "^1.0.0-alpha.3", - "@jupyterlab/completer": "^1.0.0-alpha.3", - "@jupyterlab/completer-extension": "^1.0.0-alpha.3", - "@jupyterlab/console": "^1.0.0-alpha.3", - "@jupyterlab/console-extension": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/csvviewer": "^1.0.0-alpha.3", - "@jupyterlab/csvviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/docmanager": "^1.0.0-alpha.3", - "@jupyterlab/docmanager-extension": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/documentsearch": "^1.0.0-alpha.3", - "@jupyterlab/documentsearch-extension": "^1.0.0-alpha.4", - "@jupyterlab/extensionmanager": "^1.0.0-alpha.3", - "@jupyterlab/extensionmanager-extension": "^1.0.0-alpha.3", - "@jupyterlab/faq-extension": "^1.0.0-alpha.3", - "@jupyterlab/filebrowser": "^1.0.0-alpha.3", - "@jupyterlab/filebrowser-extension": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor-extension": "^1.0.0-alpha.3", - "@jupyterlab/help-extension": "^1.0.0-alpha.3", - "@jupyterlab/htmlviewer": "^1.0.0-alpha.3", - "@jupyterlab/htmlviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/imageviewer": "^1.0.0-alpha.3", - "@jupyterlab/imageviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/inspector": "^1.0.0-alpha.3", - "@jupyterlab/inspector-extension": "^1.0.0-alpha.3", - "@jupyterlab/javascript-extension": "^1.0.0-alpha.3", - "@jupyterlab/json-extension": "^1.0.0-alpha.3", - "@jupyterlab/launcher": "^1.0.0-alpha.3", - "@jupyterlab/launcher-extension": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu-extension": "^1.0.0-alpha.3", - "@jupyterlab/markdownviewer": "^1.0.0-alpha.3", - "@jupyterlab/markdownviewer-extension": "^1.0.0-alpha.3", - "@jupyterlab/mathjax2": "^1.0.0-alpha.3", - "@jupyterlab/mathjax2-extension": "^1.0.0-alpha.3", - "@jupyterlab/notebook": "^1.0.0-alpha.4", - "@jupyterlab/notebook-extension": "^1.0.0-alpha.3", - "@jupyterlab/observables": "^2.2.0-alpha.3", - "@jupyterlab/outputarea": "^1.0.0-alpha.3", - "@jupyterlab/pdf-extension": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/rendermime-extension": "^1.0.0-alpha.3", - "@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.3", - "@jupyterlab/running": "^1.0.0-alpha.3", - "@jupyterlab/running-extension": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/settingeditor": "^1.0.0-alpha.3", - "@jupyterlab/settingeditor-extension": "^1.0.0-alpha.3", - "@jupyterlab/shortcuts-extension": "^1.0.0-alpha.3", - "@jupyterlab/statusbar": "^1.0.0-alpha.3", - "@jupyterlab/statusbar-extension": "^1.0.0-alpha.3", - "@jupyterlab/tabmanager-extension": "^1.0.0-alpha.3", - "@jupyterlab/terminal": "^1.0.0-alpha.3", - "@jupyterlab/terminal-extension": "^1.0.0-alpha.3", - "@jupyterlab/theme-dark-extension": "^1.0.0-alpha.4", - "@jupyterlab/theme-light-extension": "^1.0.0-alpha.4", - "@jupyterlab/tooltip": "^1.0.0-alpha.3", - "@jupyterlab/tooltip-extension": "^1.0.0-alpha.3", - "@jupyterlab/ui-components": "^1.0.0-alpha.3", - "@jupyterlab/vdom-extension": "^1.0.0-alpha.3", - "@jupyterlab/vega4-extension": "^1.0.0-alpha.3", + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/application-extension": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/apputils-extension": "^1.0.0-alpha.9", + "@jupyterlab/codemirror-extension": "^1.0.0-alpha.9", + "@jupyterlab/completer-extension": "^1.0.0-alpha.9", + "@jupyterlab/console": "^1.0.0-alpha.9", + "@jupyterlab/console-extension": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/csvviewer-extension": "^1.0.0-alpha.10", + "@jupyterlab/docmanager": "^1.0.0-alpha.9", + "@jupyterlab/docmanager-extension": "^1.0.0-alpha.9", + "@jupyterlab/documentsearch-extension": "^1.0.0-alpha.11", + "@jupyterlab/extensionmanager": "^1.0.0-alpha.9", + "@jupyterlab/extensionmanager-extension": "^1.0.0-alpha.9", + "@jupyterlab/faq-extension": "^1.0.0-alpha.9", + "@jupyterlab/filebrowser": "^1.0.0-alpha.9", + "@jupyterlab/filebrowser-extension": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor-extension": "^1.0.0-alpha.9", + "@jupyterlab/help-extension": "^1.0.0-alpha.9", + "@jupyterlab/htmlviewer-extension": "^1.0.0-alpha.10", + "@jupyterlab/imageviewer": "^1.0.0-alpha.9", + "@jupyterlab/imageviewer-extension": "^1.0.0-alpha.9", + "@jupyterlab/inspector-extension": "^1.0.0-alpha.9", + "@jupyterlab/javascript-extension": "^1.0.0-alpha.9", + "@jupyterlab/json-extension": "^1.0.0-alpha.9", + "@jupyterlab/launcher": "^1.0.0-alpha.9", + "@jupyterlab/launcher-extension": "^1.0.0-alpha.9", + "@jupyterlab/mainmenu-extension": "^1.0.0-alpha.9", + "@jupyterlab/markdownviewer-extension": "^1.0.0-alpha.9", + "@jupyterlab/mathjax2-extension": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/notebook-extension": "^1.0.0-alpha.9", + "@jupyterlab/pdf-extension": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/rendermime-extension": "^1.0.0-alpha.9", + "@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.9", + "@jupyterlab/running-extension": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/settingeditor-extension": "^1.0.0-alpha.9", + "@jupyterlab/shortcuts-extension": "^1.0.0-alpha.9", + "@jupyterlab/statusbar-extension": "^1.0.0-alpha.9", + "@jupyterlab/tabmanager-extension": "^1.0.0-alpha.9", + "@jupyterlab/terminal": "^1.0.0-alpha.9", + "@jupyterlab/terminal-extension": "^1.0.0-alpha.9", + "@jupyterlab/theme-dark-extension": "^1.0.0-alpha.10", + "@jupyterlab/theme-light-extension": "^1.0.0-alpha.10", + "@jupyterlab/tooltip": "^1.0.0-alpha.9", + "@jupyterlab/tooltip-extension": "^1.0.0-alpha.9", + "@jupyterlab/vdom-extension": "^1.0.0-alpha.9", + "@jupyterlab/vega5-extension": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/application": "^1.6.0", "@phosphor/commands": "^1.6.1", "@phosphor/coreutils": "^1.3.0", "@phosphor/datagrid": "^0.1.6", "@phosphor/disposable": "^1.1.2", - "@phosphor/domutils": "^1.1.2", - "@phosphor/dragdrop": "^1.3.0", "@phosphor/messaging": "^1.2.2", "@phosphor/properties": "^1.1.2", "@phosphor/signaling": "^1.2.2", - "@phosphor/virtualdom": "^1.1.2", - "@phosphor/widgets": "^1.6.0", + "@phosphor/widgets": "^1.7.0", "ajv": "^6.5.5", - "codemirror": "~5.42.0", - "comment-json": "^1.1.3", - "es6-promise": "~4.1.1", - "marked": "0.5.1", - "moment": "~2.21.0", + "codemirror": "~5.47.0", + "es6-promise": "~4.2.6", + "json5": "^2.1.0", + "moment": "^2.24.0", "path-posix": "~1.0.0", - "react": "~16.4.2", - "react-dom": "~16.4.2", - "react-paginate": "^5.2.3", - "sanitize-html": "~1.18.2", - "semver": "^5.5.0", - "url-parse": "~1.4.3", - "xterm": "~3.10.1" + "react": "~16.8.4", + "react-dom": "~16.8.4", + "url-parse": "~1.4.3" }, "devDependencies": { - "@jupyterlab/buildutils": "^1.0.0-alpha.3", - "css-loader": "~0.28.7", + "@jupyterlab/buildutils": "^1.0.0-alpha.9", + "css-loader": "~2.1.1", "duplicate-package-checker-webpack-plugin": "^3.0.0", - "file-loader": "~1.1.11", - "fs-extra": "~4.0.2", + "file-loader": "~3.0.1", + "fs-extra": "^8.0.1", "glob": "~7.1.2", - "handlebars": "~4.0.11", - "html-loader": "^0.5.1", + "handlebars": "^4.1.2", + "html-loader": "~0.5.5", "html-webpack-plugin": "~3.2.0", - "mini-css-extract-plugin": "~0.4.4", - "raw-loader": "~0.5.1", + "mini-css-extract-plugin": "~0.6.0", + "raw-loader": "~2.0.0", "rimraf": "~2.6.2", - "sort-package-json": "~1.7.1", + "sort-package-json": "~1.22.1", "source-map-loader": "~0.2.1", - "style-loader": "~0.21.0", - "svg-url-loader": "~2.3.1", - "svgo": "~1.0.4", - "svgo-loader": "~2.1.0", - "uglifyjs-webpack-plugin": "~1.2.5", - "url-loader": "~1.0.1", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3", - "webpack-merge": "^4.1.1", - "webpack-visualizer-plugin": "^0.1.11" + "style-loader": "~0.23.1", + "svg-url-loader": "~2.3.2", + "svgo": "~1.2.1", + "svgo-loader": "~2.2.0", + "terser-webpack-plugin": "^1.3.0", + "url-loader": "~1.1.2", + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0", + "webpack-merge": "^4.2.1", + "webpack-visualizer-plugin": "^0.1.11", + "yarn-deduplicate": "^1.1.1" }, "engines": { "node": ">=6.11.5" @@ -172,14 +146,14 @@ "@jupyterlab/terminal-extension": "", "@jupyterlab/theme-dark-extension": "", "@jupyterlab/theme-light-extension": "", - "@jupyterlab/tooltip-extension": "" + "@jupyterlab/tooltip-extension": "", + "@jupyterlab/vdom-extension": "" }, "mimeExtensions": { "@jupyterlab/javascript-extension": "", "@jupyterlab/json-extension": "", "@jupyterlab/pdf-extension": "", - "@jupyterlab/vdom-extension": "", - "@jupyterlab/vega4-extension": "" + "@jupyterlab/vega5-extension": "" }, "name": "JupyterLab", "buildDir": "./build", @@ -220,7 +194,7 @@ "@phosphor/widgets", "ajv", "codemirror", - "comment-json", + "json5", "es6-promise", "marked", "moment", @@ -233,7 +207,7 @@ "url-parse", "xterm" ], - "version": "1.0.0a1", + "version": "1.0.0a6", "linkedPackages": {}, "staticDir": "../static" } diff --git a/jupyterlab/staging/webpack.config.js b/jupyterlab/staging/webpack.config.js index aa76727b..3b27f252 100644 --- a/jupyterlab/staging/webpack.config.js +++ b/jupyterlab/staging/webpack.config.js @@ -90,8 +90,8 @@ JupyterFrontEndPlugin.prototype.apply = function(compiler) { var indexPath = path.join(buildDir, 'index.html'); var indexData = fs.readFileSync(indexPath, 'utf8'); indexData = indexData - .split('{{page_config.bundleUrl}}/') - .join('{{page_config.bundleUrl}}'); + .split('{{page_config.frontendUrl}}/') + .join('{{page_config.frontendUrl}}'); fs.writeFileSync(indexPath, indexData, 'utf8'); // Copy the static assets. @@ -141,7 +141,7 @@ module.exports = [ }, output: { path: path.resolve(buildDir), - publicPath: '{{page_config.bundleUrl}}', + publicPath: '{{page_config.frontendUrl}}', filename: '[name].[chunkhash].js' }, optimization: { diff --git a/jupyterlab/staging/webpack.prod.config.js b/jupyterlab/staging/webpack.prod.config.js index 440abc2b..83a29fd3 100644 --- a/jupyterlab/staging/webpack.prod.config.js +++ b/jupyterlab/staging/webpack.prod.config.js @@ -1,4 +1,4 @@ -var UglifyJsPlugin = require('uglifyjs-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); var merge = require('webpack-merge'); var config = require('./webpack.config'); @@ -7,15 +7,17 @@ config[0] = merge(config[0], { devtool: 'source-map', optimization: { minimizer: [ - new UglifyJsPlugin({ + new TerserPlugin({ parallel: true, sourceMap: true, - uglifyOptions: { - beautify: false, - comments: false, + terserOptions: { compress: false, ecma: 6, - mangle: true + mangle: true, + output: { + beautify: false, + comments: false + } }, cache: process.platform !== 'win32' }) diff --git a/jupyterlab/staging/yarn.js b/jupyterlab/staging/yarn.js index fd518e51..eb0090d9 100644 --- a/jupyterlab/staging/yarn.js +++ b/jupyterlab/staging/yarn.js @@ -65,11 +65,229 @@ module.exports = /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 381); +/******/ return __webpack_require__(__webpack_require__.s = 517); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ +/***/ (function(module, exports) { + +module.exports = require("path"); + +/***/ }), +/* 1 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = __extends; +/* unused harmony export __assign */ +/* unused harmony export __rest */ +/* unused harmony export __decorate */ +/* unused harmony export __param */ +/* unused harmony export __metadata */ +/* unused harmony export __awaiter */ +/* unused harmony export __generator */ +/* unused harmony export __exportStar */ +/* unused harmony export __values */ +/* unused harmony export __read */ +/* unused harmony export __spread */ +/* unused harmony export __await */ +/* unused harmony export __asyncGenerator */ +/* unused harmony export __asyncDelegator */ +/* unused harmony export __asyncValues */ +/* unused harmony export __makeTemplateObject */ +/* unused harmony export __importStar */ +/* unused harmony export __importDefault */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +function __exportStar(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + + +/***/ }), +/* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77,7 +295,7 @@ module.exports = exports.__esModule = true; -var _promise = __webpack_require__(5); +var _promise = __webpack_require__(217); var _promise2 = _interopRequireDefault(_promise); @@ -112,226 +330,66 @@ exports.default = function (fn) { }; }; -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = require("path"); - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -exports.default = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; - /***/ }), /* 3 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -module.exports = { "default": __webpack_require__(444), __esModule: true }; +module.exports = require("util"); /***/ }), /* 4 */ /***/ (function(module, exports) { -module.exports = require("util"); +module.exports = require("fs"); /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(452), __esModule: true }; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResponseError = exports.ProcessTermError = exports.SecurityError = exports.ProcessSpawnError = exports.MessageError = undefined; - -var _create; - -function _load_create() { - return _create = _interopRequireDefault(__webpack_require__(242)); -} - -var _getPrototypeOf; - -function _load_getPrototypeOf() { - return _getPrototypeOf = _interopRequireDefault(__webpack_require__(422)); -} - -var _setPrototypeOf; - -function _load_setPrototypeOf() { - return _setPrototypeOf = _interopRequireDefault(__webpack_require__(161)); -} - -var _from; - -function _load_from() { - return _from = _interopRequireDefault(__webpack_require__(56)); -} - -var _construct; - -function _load_construct() { - return _construct = _interopRequireDefault(__webpack_require__(423)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _possibleConstructorReturn2; - -function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); -} - -var _inherits2; - -function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _extendableBuiltin3(cls) { - function ExtendableBuiltin() { - var instance = (0, (_construct || _load_construct()).default)(cls, (0, (_from || _load_from()).default)(arguments)); - (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(instance, (0, (_getPrototypeOf || _load_getPrototypeOf()).default)(this)); - return instance; - } - - ExtendableBuiltin.prototype = (0, (_create || _load_create()).default)(cls.prototype, { - constructor: { - value: cls, - enumerable: false, - writable: true, - configurable: true - } - }); - - if ((_setPrototypeOf || _load_setPrototypeOf()).default) { - (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(ExtendableBuiltin, cls); - } else { - ExtendableBuiltin.__proto__ = cls; +class MessageError extends Error { + constructor(msg, code) { + super(msg); + this.code = code; } - return ExtendableBuiltin; } -function _extendableBuiltin(cls) { - function ExtendableBuiltin() { - var instance = (0, (_construct || _load_construct()).default)(cls, (0, (_from || _load_from()).default)(arguments)); - (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(instance, (0, (_getPrototypeOf || _load_getPrototypeOf()).default)(this)); - return instance; - } - - ExtendableBuiltin.prototype = (0, (_create || _load_create()).default)(cls.prototype, { - constructor: { - value: cls, - enumerable: false, - writable: true, - configurable: true - } - }); - - if ((_setPrototypeOf || _load_setPrototypeOf()).default) { - (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(ExtendableBuiltin, cls); - } else { - ExtendableBuiltin.__proto__ = cls; +exports.MessageError = MessageError; +class ProcessSpawnError extends MessageError { + constructor(msg, code, process) { + super(msg, code); + this.process = process; } - return ExtendableBuiltin; } -var MessageError = exports.MessageError = function (_extendableBuiltin2) { - (0, (_inherits2 || _load_inherits()).default)(MessageError, _extendableBuiltin2); - - function MessageError(msg, code) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, MessageError); - - var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _extendableBuiltin2.call(this, msg)); - - _this.code = code; - return _this; - } - - return MessageError; -}(_extendableBuiltin(Error)); - -var ProcessSpawnError = exports.ProcessSpawnError = function (_MessageError) { - (0, (_inherits2 || _load_inherits()).default)(ProcessSpawnError, _MessageError); - - function ProcessSpawnError(msg, code, process) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ProcessSpawnError); - - var _this2 = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _MessageError.call(this, msg, code)); - - _this2.process = process; - return _this2; - } - - return ProcessSpawnError; -}(MessageError); - -var SecurityError = exports.SecurityError = function (_MessageError2) { - (0, (_inherits2 || _load_inherits()).default)(SecurityError, _MessageError2); +exports.ProcessSpawnError = ProcessSpawnError; +class SecurityError extends MessageError {} - function SecurityError() { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, SecurityError); - return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _MessageError2.apply(this, arguments)); - } - - return SecurityError; -}(MessageError); - -var ProcessTermError = exports.ProcessTermError = function (_MessageError3) { - (0, (_inherits2 || _load_inherits()).default)(ProcessTermError, _MessageError3); +exports.SecurityError = SecurityError; +class ProcessTermError extends MessageError {} - function ProcessTermError() { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ProcessTermError); - return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _MessageError3.apply(this, arguments)); +exports.ProcessTermError = ProcessTermError; +class ResponseError extends Error { + constructor(msg, responseCode) { + super(msg); + this.responseCode = responseCode; } - return ProcessTermError; -}(MessageError); - -var ResponseError = exports.ResponseError = function (_extendableBuiltin4) { - (0, (_inherits2 || _load_inherits()).default)(ResponseError, _extendableBuiltin4); - - function ResponseError(msg, responseCode) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ResponseError); - - var _this5 = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _extendableBuiltin4.call(this, msg)); - - _this5.responseCode = responseCode; - return _this5; - } +} - return ResponseError; -}(_extendableBuiltin3(Error)); +exports.ResponseError = ResponseError; +class OneTimePasswordError extends Error {} +exports.OneTimePasswordError = OneTimePasswordError; /***/ }), -/* 7 */ +/* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -342,48 +400,24 @@ Object.defineProperty(exports, "__esModule", { }); exports.getFirstSuitableFolder = exports.readFirstAvailableStream = exports.makeTempDir = exports.hardlinksWork = exports.writeFilePreservingEol = exports.getFileSizeOnDisk = exports.walk = exports.symlink = exports.find = exports.readJsonAndFile = exports.readJson = exports.readFileAny = exports.hardlinkBulk = exports.copyBulk = exports.unlink = exports.glob = exports.link = exports.chmod = exports.lstat = exports.exists = exports.mkdirp = exports.stat = exports.access = exports.rename = exports.readdir = exports.realpath = exports.readlink = exports.writeFile = exports.open = exports.readFileBuffer = exports.lockQueue = exports.constants = undefined; -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(38)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(14)); -} - var _asyncToGenerator2; function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(0)); + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -var buildActionsForCopy = function () { +let buildActionsForCopy = (() => { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { // - var build = function () { + let build = (() => { var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { - var src = data.src, - dest = data.dest, - type = data.type; + const src = data.src, + dest = data.dest, + type = data.type; - var onFresh = data.onFresh || noop; - var onDone = data.onDone || noop; + const onFresh = data.onFresh || noop; + const onDone = data.onDone || noop; // TODO https://github.com/yarnpkg/yarn/issues/3751 // related to bundled dependencies handling @@ -394,7 +428,7 @@ var buildActionsForCopy = function () { } if (type === 'symlink') { - yield mkdirp((_path2 || _load_path()).default.dirname(dest)); + yield mkdirp((_path || _load_path()).default.dirname(dest)); onFresh(); actions.symlink.push({ dest, @@ -404,19 +438,19 @@ var buildActionsForCopy = function () { return; } - if (events.ignoreBasenames.indexOf((_path2 || _load_path()).default.basename(src)) >= 0) { + if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { // ignored file return; } - var srcStat = yield lstat(src); - var srcFiles = void 0; + const srcStat = yield lstat(src); + let srcFiles; if (srcStat.isDirectory()) { srcFiles = yield readdir(src); } - var destStat = void 0; + let destStat; try { // try accessing the destination destStat = yield lstat(dest); @@ -429,9 +463,9 @@ var buildActionsForCopy = function () { // if destination exists if (destStat) { - var bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); - var bothFolders = srcStat.isDirectory() && destStat.isDirectory(); - var bothFiles = srcStat.isFile() && destStat.isFile(); + const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); + const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); + const bothFiles = srcStat.isFile() && destStat.isFile(); // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving // us modes that aren't valid. investigate this, it's generally safe to proceed. @@ -457,7 +491,7 @@ var buildActionsForCopy = function () { } if (bothSymlinks) { - var srcReallink = yield readlink(src); + const srcReallink = yield readlink(src); if (srcReallink === (yield readlink(dest))) { // if both symlinks are the same then we can continue on onDone(); @@ -468,10 +502,10 @@ var buildActionsForCopy = function () { if (bothFolders) { // mark files that aren't in this folder as possibly extraneous - var destFiles = yield readdir(dest); + const destFiles = yield readdir(dest); invariant(srcFiles, 'src files not initialised'); - for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { var _ref6; if (_isArray4) { @@ -483,14 +517,14 @@ var buildActionsForCopy = function () { _ref6 = _i4.value; } - var _file2 = _ref6; + const file = _ref6; - if (srcFiles.indexOf(_file2) < 0) { - var _loc = (_path2 || _load_path()).default.join(dest, _file2); - possibleExtraneous.add(_loc); + if (srcFiles.indexOf(file) < 0) { + const loc = (_path || _load_path()).default.join(dest, file); + possibleExtraneous.add(loc); - if ((yield lstat(_loc)).isDirectory()) { - for (var _iterator5 = yield readdir(_loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { + if ((yield lstat(loc)).isDirectory()) { + for (var _iterator5 = yield readdir(loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { var _ref7; if (_isArray5) { @@ -502,9 +536,9 @@ var buildActionsForCopy = function () { _ref7 = _i5.value; } - var _file3 = _ref7; + const file = _ref7; - possibleExtraneous.add((_path2 || _load_path()).default.join(_loc, _file3)); + possibleExtraneous.add((_path || _load_path()).default.join(loc, file)); } } } @@ -519,67 +553,65 @@ var buildActionsForCopy = function () { if (srcStat.isSymbolicLink()) { onFresh(); - var _linkname = yield readlink(src); + const linkname = yield readlink(src); actions.symlink.push({ dest, - linkname: _linkname + linkname }); onDone(); } else if (srcStat.isDirectory()) { - yield* function* () { - if (!destStat) { - reporter.verbose(reporter.lang('verboseFileFolder', dest)); - yield mkdirp(dest); - } + if (!destStat) { + reporter.verbose(reporter.lang('verboseFileFolder', dest)); + yield mkdirp(dest); + } - var destParts = dest.split((_path2 || _load_path()).default.sep); - while (destParts.length) { - files.add(destParts.join((_path2 || _load_path()).default.sep).toLowerCase()); - destParts.pop(); - } + const destParts = dest.split((_path || _load_path()).default.sep); + while (destParts.length) { + files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + destParts.pop(); + } - // push all files to queue - invariant(srcFiles, 'src files not initialised'); - var remaining = srcFiles.length; - if (!remaining) { - onDone(); - } - for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { - var _ref8; + // push all files to queue + invariant(srcFiles, 'src files not initialised'); + let remaining = srcFiles.length; + if (!remaining) { + onDone(); + } + for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref8; - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref8 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref8 = _i6.value; - } + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref8 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref8 = _i6.value; + } - var _file4 = _ref8; + const file = _ref8; - queue.push({ - dest: (_path2 || _load_path()).default.join(dest, _file4), - onFresh, - onDone: function (_onDone) { - function onDone() { - return _onDone.apply(this, arguments); - } + queue.push({ + dest: (_path || _load_path()).default.join(dest, file), + onFresh, + onDone: function (_onDone) { + function onDone() { + return _onDone.apply(this, arguments); + } - onDone.toString = function () { - return _onDone.toString(); - }; + onDone.toString = function () { + return _onDone.toString(); + }; - return onDone; - }(function () { - if (--remaining === 0) { - onDone(); - } - }), - src: (_path2 || _load_path()).default.join(src, _file4) - }); - } - }(); + return onDone; + }(function () { + if (--remaining === 0) { + onDone(); + } + }), + src: (_path || _load_path()).default.join(src, file) + }); + } } else if (srcStat.isFile()) { onFresh(); actions.file.push({ @@ -598,24 +630,13 @@ var buildActionsForCopy = function () { return function build(_x5) { return _ref5.apply(this, arguments); }; - }(); + })(); - var artifactFiles = new (_set || _load_set()).default(events.artifactFiles || []); - var files = new (_set || _load_set()).default(); + const artifactFiles = new Set(events.artifactFiles || []); + const files = new Set(); // initialise events - - var _loop = function _loop(item) { - var onDone = item.onDone; - item.onDone = function () { - events.onProgress(item.dest); - if (onDone) { - onDone(); - } - }; - }; - - for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref2; if (_isArray) { @@ -627,14 +648,20 @@ var buildActionsForCopy = function () { _ref2 = _i.value; } - var item = _ref2; + const item = _ref2; - _loop(item); + const onDone = item.onDone; + item.onDone = function () { + events.onProgress(item.dest); + if (onDone) { + onDone(); + } + }; } events.onStart(queue.length); // start building actions - var actions = { + const actions = { file: [], symlink: [], link: [] @@ -643,12 +670,12 @@ var buildActionsForCopy = function () { // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items // at a time due to the requirement to push items onto the queue while (queue.length) { - var items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); - yield (_promise || _load_promise()).default.all(items.map(build)); + const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); + yield Promise.all(items.map(build)); } // simulate the existence of some files to prevent considering them extraneous - for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { var _ref3; if (_isArray2) { @@ -660,15 +687,15 @@ var buildActionsForCopy = function () { _ref3 = _i2.value; } - var _file = _ref3; + const file = _ref3; - if (possibleExtraneous.has(_file)) { - reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', _file)); - possibleExtraneous.delete(_file); + if (possibleExtraneous.has(file)) { + reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file)); + possibleExtraneous.delete(file); } } - for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { var _ref4; if (_isArray3) { @@ -680,7 +707,7 @@ var buildActionsForCopy = function () { _ref4 = _i3.value; } - var loc = _ref4; + const loc = _ref4; if (files.has(loc.toLowerCase())) { possibleExtraneous.delete(loc); @@ -693,19 +720,19 @@ var buildActionsForCopy = function () { return function buildActionsForCopy(_x, _x2, _x3, _x4) { return _ref.apply(this, arguments); }; -}(); +})(); -var buildActionsForHardlink = function () { +let buildActionsForHardlink = (() => { var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { // - var build = function () { + let build = (() => { var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { - var src = data.src, - dest = data.dest; + const src = data.src, + dest = data.dest; - var onFresh = data.onFresh || noop; - var onDone = data.onDone || noop; + const onFresh = data.onFresh || noop; + const onDone = data.onDone || noop; if (files.has(dest.toLowerCase())) { // Fixes issue https://github.com/yarnpkg/yarn/issues/2734 // When bulk hardlinking we have A -> B structure that we want to hardlink to A1 -> B1, @@ -717,25 +744,25 @@ var buildActionsForHardlink = function () { } files.add(dest.toLowerCase()); - if (events.ignoreBasenames.indexOf((_path2 || _load_path()).default.basename(src)) >= 0) { + if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { // ignored file return; } - var srcStat = yield lstat(src); - var srcFiles = void 0; + const srcStat = yield lstat(src); + let srcFiles; if (srcStat.isDirectory()) { srcFiles = yield readdir(src); } - var destExists = yield exists(dest); + const destExists = yield exists(dest); if (destExists) { - var destStat = yield lstat(dest); + const destStat = yield lstat(dest); - var bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); - var bothFolders = srcStat.isDirectory() && destStat.isDirectory(); - var bothFiles = srcStat.isFile() && destStat.isFile(); + const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); + const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); + const bothFiles = srcStat.isFile() && destStat.isFile(); if (srcStat.mode !== destStat.mode) { try { @@ -762,7 +789,7 @@ var buildActionsForHardlink = function () { } if (bothSymlinks) { - var srcReallink = yield readlink(src); + const srcReallink = yield readlink(src); if (srcReallink === (yield readlink(dest))) { // if both symlinks are the same then we can continue on onDone(); @@ -773,10 +800,10 @@ var buildActionsForHardlink = function () { if (bothFolders) { // mark files that aren't in this folder as possibly extraneous - var destFiles = yield readdir(dest); + const destFiles = yield readdir(dest); invariant(srcFiles, 'src files not initialised'); - for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator10);;) { + for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { var _ref14; if (_isArray10) { @@ -788,14 +815,14 @@ var buildActionsForHardlink = function () { _ref14 = _i10.value; } - var _file6 = _ref14; + const file = _ref14; - if (srcFiles.indexOf(_file6) < 0) { - var _loc2 = (_path2 || _load_path()).default.join(dest, _file6); - possibleExtraneous.add(_loc2); + if (srcFiles.indexOf(file) < 0) { + const loc = (_path || _load_path()).default.join(dest, file); + possibleExtraneous.add(loc); - if ((yield lstat(_loc2)).isDirectory()) { - for (var _iterator11 = yield readdir(_loc2), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator11);;) { + if ((yield lstat(loc)).isDirectory()) { + for (var _iterator11 = yield readdir(loc), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { var _ref15; if (_isArray11) { @@ -807,9 +834,9 @@ var buildActionsForHardlink = function () { _ref15 = _i11.value; } - var _file7 = _ref15; + const file = _ref15; - possibleExtraneous.add((_path2 || _load_path()).default.join(_loc2, _file7)); + possibleExtraneous.add((_path || _load_path()).default.join(loc, file)); } } } @@ -819,65 +846,63 @@ var buildActionsForHardlink = function () { if (srcStat.isSymbolicLink()) { onFresh(); - var _linkname2 = yield readlink(src); + const linkname = yield readlink(src); actions.symlink.push({ dest, - linkname: _linkname2 + linkname }); onDone(); } else if (srcStat.isDirectory()) { - yield* function* () { - reporter.verbose(reporter.lang('verboseFileFolder', dest)); - yield mkdirp(dest); + reporter.verbose(reporter.lang('verboseFileFolder', dest)); + yield mkdirp(dest); - var destParts = dest.split((_path2 || _load_path()).default.sep); - while (destParts.length) { - files.add(destParts.join((_path2 || _load_path()).default.sep).toLowerCase()); - destParts.pop(); - } + const destParts = dest.split((_path || _load_path()).default.sep); + while (destParts.length) { + files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + destParts.pop(); + } - // push all files to queue - invariant(srcFiles, 'src files not initialised'); - var remaining = srcFiles.length; - if (!remaining) { - onDone(); - } - for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator12);;) { - var _ref16; + // push all files to queue + invariant(srcFiles, 'src files not initialised'); + let remaining = srcFiles.length; + if (!remaining) { + onDone(); + } + for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { + var _ref16; - if (_isArray12) { - if (_i12 >= _iterator12.length) break; - _ref16 = _iterator12[_i12++]; - } else { - _i12 = _iterator12.next(); - if (_i12.done) break; - _ref16 = _i12.value; - } + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref16 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref16 = _i12.value; + } - var _file8 = _ref16; + const file = _ref16; - queue.push({ - onFresh, - src: (_path2 || _load_path()).default.join(src, _file8), - dest: (_path2 || _load_path()).default.join(dest, _file8), - onDone: function (_onDone2) { - function onDone() { - return _onDone2.apply(this, arguments); - } + queue.push({ + onFresh, + src: (_path || _load_path()).default.join(src, file), + dest: (_path || _load_path()).default.join(dest, file), + onDone: function (_onDone2) { + function onDone() { + return _onDone2.apply(this, arguments); + } - onDone.toString = function () { - return _onDone2.toString(); - }; + onDone.toString = function () { + return _onDone2.toString(); + }; - return onDone; - }(function () { - if (--remaining === 0) { - onDone(); - } - }) - }); - } - }(); + return onDone; + }(function () { + if (--remaining === 0) { + onDone(); + } + }) + }); + } } else if (srcStat.isFile()) { onFresh(); actions.link.push({ @@ -894,22 +919,13 @@ var buildActionsForHardlink = function () { return function build(_x10) { return _ref13.apply(this, arguments); }; - }(); + })(); - var artifactFiles = new (_set || _load_set()).default(events.artifactFiles || []); - var files = new (_set || _load_set()).default(); + const artifactFiles = new Set(events.artifactFiles || []); + const files = new Set(); // initialise events - - var _loop2 = function _loop2(item) { - var onDone = item.onDone || noop; - item.onDone = function () { - events.onProgress(item.dest); - onDone(); - }; - }; - - for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { + for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { var _ref10; if (_isArray7) { @@ -921,14 +937,18 @@ var buildActionsForHardlink = function () { _ref10 = _i7.value; } - var item = _ref10; + const item = _ref10; - _loop2(item); + const onDone = item.onDone || noop; + item.onDone = function () { + events.onProgress(item.dest); + onDone(); + }; } events.onStart(queue.length); // start building actions - var actions = { + const actions = { file: [], symlink: [], link: [] @@ -937,12 +957,12 @@ var buildActionsForHardlink = function () { // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items // at a time due to the requirement to push items onto the queue while (queue.length) { - var items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); - yield (_promise || _load_promise()).default.all(items.map(build)); + const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); + yield Promise.all(items.map(build)); } // simulate the existence of some files to prevent considering them extraneous - for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) { + for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { var _ref11; if (_isArray8) { @@ -954,15 +974,15 @@ var buildActionsForHardlink = function () { _ref11 = _i8.value; } - var _file5 = _ref11; + const file = _ref11; - if (possibleExtraneous.has(_file5)) { - reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', _file5)); - possibleExtraneous.delete(_file5); + if (possibleExtraneous.has(file)) { + reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file)); + possibleExtraneous.delete(file); } } - for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) { + for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { var _ref12; if (_isArray9) { @@ -974,7 +994,7 @@ var buildActionsForHardlink = function () { _ref12 = _i9.value; } - var loc = _ref12; + const loc = _ref12; if (files.has(loc.toLowerCase())) { possibleExtraneous.delete(loc); @@ -987,34 +1007,34 @@ var buildActionsForHardlink = function () { return function buildActionsForHardlink(_x6, _x7, _x8, _x9) { return _ref9.apply(this, arguments); }; -}(); +})(); -var copyBulk = exports.copyBulk = function () { +let copyBulk = exports.copyBulk = (() => { var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { - var events = { + const events = { onStart: _events && _events.onStart || noop, onProgress: _events && _events.onProgress || noop, - possibleExtraneous: _events ? _events.possibleExtraneous : new (_set || _load_set()).default(), + possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), ignoreBasenames: _events && _events.ignoreBasenames || [], artifactFiles: _events && _events.artifactFiles || [] }; - var actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter); + const actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter); events.onStart(actions.file.length + actions.symlink.length + actions.link.length); - var fileActions = actions.file; + const fileActions = actions.file; - var currentlyWriting = new (_map || _load_map()).default(); + const currentlyWriting = new Map(); - yield (_promise2 || _load_promise2()).queue(fileActions, function () { + yield (_promise || _load_promise()).queue(fileActions, (() => { var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { - var writePromise = void 0; + let writePromise; while (writePromise = currentlyWriting.get(data.dest)) { yield writePromise; } reporter.verbose(reporter.lang('verboseFileCopy', data.src, data.dest)); - var copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function () { + const copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function () { return currentlyWriting.delete(data.dest); }); currentlyWriting.set(data.dest, copier); @@ -1025,12 +1045,12 @@ var copyBulk = exports.copyBulk = function () { return function (_x14) { return _ref18.apply(this, arguments); }; - }(), CONCURRENT_QUEUE_ITEMS); + })(), CONCURRENT_QUEUE_ITEMS); // we need to copy symlinks last as they could reference files we were copying - var symlinkActions = actions.symlink; - yield (_promise2 || _load_promise2()).queue(symlinkActions, function (data) { - var linkname = (_path2 || _load_path()).default.resolve((_path2 || _load_path()).default.dirname(data.dest), data.linkname); + const symlinkActions = actions.symlink; + yield (_promise || _load_promise()).queue(symlinkActions, function (data) { + const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); return symlink(linkname, data.dest); }); @@ -1039,24 +1059,24 @@ var copyBulk = exports.copyBulk = function () { return function copyBulk(_x11, _x12, _x13) { return _ref17.apply(this, arguments); }; -}(); +})(); -var hardlinkBulk = exports.hardlinkBulk = function () { +let hardlinkBulk = exports.hardlinkBulk = (() => { var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { - var events = { + const events = { onStart: _events && _events.onStart || noop, onProgress: _events && _events.onProgress || noop, - possibleExtraneous: _events ? _events.possibleExtraneous : new (_set || _load_set()).default(), + possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), artifactFiles: _events && _events.artifactFiles || [], ignoreBasenames: [] }; - var actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter); + const actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter); events.onStart(actions.file.length + actions.symlink.length + actions.link.length); - var fileActions = actions.link; + const fileActions = actions.link; - yield (_promise2 || _load_promise2()).queue(fileActions, function () { + yield (_promise || _load_promise()).queue(fileActions, (() => { var _ref20 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { reporter.verbose(reporter.lang('verboseFileLink', data.src, data.dest)); if (data.removeDest) { @@ -1068,12 +1088,12 @@ var hardlinkBulk = exports.hardlinkBulk = function () { return function (_x18) { return _ref20.apply(this, arguments); }; - }(), CONCURRENT_QUEUE_ITEMS); + })(), CONCURRENT_QUEUE_ITEMS); // we need to copy symlinks last as they could reference files we were copying - var symlinkActions = actions.symlink; - yield (_promise2 || _load_promise2()).queue(symlinkActions, function (data) { - var linkname = (_path2 || _load_path()).default.resolve((_path2 || _load_path()).default.dirname(data.dest), data.linkname); + const symlinkActions = actions.symlink; + yield (_promise || _load_promise()).queue(symlinkActions, function (data) { + const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); return symlink(linkname, data.dest); }); @@ -1082,11 +1102,11 @@ var hardlinkBulk = exports.hardlinkBulk = function () { return function hardlinkBulk(_x15, _x16, _x17) { return _ref19.apply(this, arguments); }; -}(); +})(); -var readFileAny = exports.readFileAny = function () { +let readFileAny = exports.readFileAny = (() => { var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (files) { - for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator13);;) { + for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { var _ref22; if (_isArray13) { @@ -1098,10 +1118,10 @@ var readFileAny = exports.readFileAny = function () { _ref22 = _i13.value; } - var _file9 = _ref22; + const file = _ref22; - if (yield exists(_file9)) { - return readFile(_file9); + if (yield exists(file)) { + return readFile(file); } } return null; @@ -1110,9 +1130,9 @@ var readFileAny = exports.readFileAny = function () { return function readFileAny(_x19) { return _ref21.apply(this, arguments); }; -}(); +})(); -var readJson = exports.readJson = function () { +let readJson = exports.readJson = (() => { var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { return (yield readJsonAndFile(loc)).object; }); @@ -1120,14 +1140,14 @@ var readJson = exports.readJson = function () { return function readJson(_x20) { return _ref23.apply(this, arguments); }; -}(); +})(); -var readJsonAndFile = exports.readJsonAndFile = function () { +let readJsonAndFile = exports.readJsonAndFile = (() => { var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { - var file = yield readFile(loc); + const file = yield readFile(loc); try { return { - object: (0, (_map2 || _load_map2()).default)(JSON.parse(stripBOM(file))), + object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM(file))), content: file }; } catch (err) { @@ -1139,14 +1159,14 @@ var readJsonAndFile = exports.readJsonAndFile = function () { return function readJsonAndFile(_x21) { return _ref24.apply(this, arguments); }; -}(); +})(); -var find = exports.find = function () { +let find = exports.find = (() => { var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) { - var parts = dir.split((_path2 || _load_path()).default.sep); + const parts = dir.split((_path || _load_path()).default.sep); while (parts.length) { - var loc = parts.concat(filename).join((_path2 || _load_path()).default.sep); + const loc = parts.concat(filename).join((_path || _load_path()).default.sep); if (yield exists(loc)) { return loc; @@ -1161,14 +1181,22 @@ var find = exports.find = function () { return function find(_x22, _x23) { return _ref25.apply(this, arguments); }; -}(); +})(); -var symlink = exports.symlink = function () { +let symlink = exports.symlink = (() => { var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) { + if (process.platform !== 'win32') { + // use relative paths otherwise which will be retained if the directory is moved + src = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src); + // When path.relative returns an empty string for the current directory, we should instead use + // '.', which is a valid fs.symlink target. + src = src || '.'; + } + try { - var stats = yield lstat(dest); + const stats = yield lstat(dest); if (stats.isSymbolicLink()) { - var resolved = yield realpath(dest); + const resolved = dest; if (resolved === src) { return; } @@ -1178,6 +1206,7 @@ var symlink = exports.symlink = function () { throw err; } } + // We use rimraf for unlink which never throws an ENOENT on missing target yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); @@ -1185,41 +1214,27 @@ var symlink = exports.symlink = function () { // use directory junctions if possible on win32, this requires absolute paths yield fsSymlink(src, dest, 'junction'); } else { - // use relative paths otherwise which will be retained if the directory is moved - var _relative = void 0; - try { - _relative = (_path2 || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path2 || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src)); - } catch (err) { - if (err.code !== 'ENOENT') { - throw err; - } - _relative = (_path2 || _load_path()).default.relative((_path2 || _load_path()).default.dirname(dest), src); - } - // When path.relative returns an empty string for the current directory, we should instead use - // '.', which is a valid fs.symlink target. - yield fsSymlink(_relative || '.', dest); + yield fsSymlink(src, dest); } }); return function symlink(_x24, _x25) { return _ref26.apply(this, arguments); }; -}(); - -var walk = exports.walk = function () { - var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir) { - var ignoreBasenames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new (_set || _load_set()).default(); +})(); - var files = []; +let walk = exports.walk = (() => { + var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) { + let files = []; - var filenames = yield readdir(dir); + let filenames = yield readdir(dir); if (ignoreBasenames.size) { filenames = filenames.filter(function (name) { return !ignoreBasenames.has(name); }); } - for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator14);;) { + for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { var _ref28; if (_isArray14) { @@ -1231,21 +1246,21 @@ var walk = exports.walk = function () { _ref28 = _i14.value; } - var name = _ref28; + const name = _ref28; - var _relative2 = relativeDir ? (_path2 || _load_path()).default.join(relativeDir, name) : name; - var loc = (_path2 || _load_path()).default.join(dir, name); - var _stat = yield lstat(loc); + const relative = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name; + const loc = (_path || _load_path()).default.join(dir, name); + const stat = yield lstat(loc); files.push({ - relative: _relative2, + relative, basename: name, absolute: loc, - mtime: +_stat.mtime + mtime: +stat.mtime }); - if (_stat.isDirectory()) { - files = files.concat((yield walk(loc, _relative2, ignoreBasenames))); + if (stat.isDirectory()) { + files = files.concat((yield walk(loc, relative, ignoreBasenames))); } } @@ -1255,32 +1270,32 @@ var walk = exports.walk = function () { return function walk(_x26, _x27) { return _ref27.apply(this, arguments); }; -}(); +})(); -var getFileSizeOnDisk = exports.getFileSizeOnDisk = function () { +let getFileSizeOnDisk = exports.getFileSizeOnDisk = (() => { var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { - var stat = yield lstat(loc); - var size = stat.size, - blockSize = stat.blksize; + const stat = yield lstat(loc); + const size = stat.size, + blockSize = stat.blksize; return Math.ceil(size / blockSize) * blockSize; }); - return function getFileSizeOnDisk(_x29) { + return function getFileSizeOnDisk(_x28) { return _ref29.apply(this, arguments); }; -}(); +})(); -var getEolFromFile = function () { +let getEolFromFile = (() => { var _ref30 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path) { if (!(yield exists(path))) { return undefined; } - var buffer = yield readFileBuffer(path); + const buffer = yield readFileBuffer(path); - for (var i = 0; i < buffer.length; ++i) { + for (let i = 0; i < buffer.length; ++i) { if (buffer[i] === cr) { return '\r\n'; } @@ -1291,30 +1306,30 @@ var getEolFromFile = function () { return undefined; }); - return function getEolFromFile(_x30) { + return function getEolFromFile(_x29) { return _ref30.apply(this, arguments); }; -}(); +})(); -var writeFilePreservingEol = exports.writeFilePreservingEol = function () { +let writeFilePreservingEol = exports.writeFilePreservingEol = (() => { var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path, data) { - var eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL; + const eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL; if (eol !== '\n') { data = data.replace(/\n/g, eol); } yield writeFile(path, data); }); - return function writeFilePreservingEol(_x31, _x32) { + return function writeFilePreservingEol(_x30, _x31) { return _ref31.apply(this, arguments); }; -}(); +})(); -var hardlinksWork = exports.hardlinksWork = function () { +let hardlinksWork = exports.hardlinksWork = (() => { var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) { - var filename = 'test-file' + Math.random(); - var file = (_path2 || _load_path()).default.join(dir, filename); - var fileLink = (_path2 || _load_path()).default.join(dir, filename + '-link'); + const filename = 'test-file' + Math.random(); + const file = (_path || _load_path()).default.join(dir, filename); + const fileLink = (_path || _load_path()).default.join(dir, filename + '-link'); try { yield writeFile(file, 'test'); yield link(file, fileLink); @@ -1327,30 +1342,30 @@ var hardlinksWork = exports.hardlinksWork = function () { return true; }); - return function hardlinksWork(_x33) { + return function hardlinksWork(_x32) { return _ref32.apply(this, arguments); }; -}(); +})(); // not a strict polyfill for Node's fs.mkdtemp -var makeTempDir = exports.makeTempDir = function () { +let makeTempDir = exports.makeTempDir = (() => { var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) { - var dir = (_path2 || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`); + const dir = (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`); yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir); yield mkdirp(dir); return dir; }); - return function makeTempDir(_x34) { + return function makeTempDir(_x33) { return _ref33.apply(this, arguments); }; -}(); +})(); -var readFirstAvailableStream = exports.readFirstAvailableStream = function () { +let readFirstAvailableStream = exports.readFirstAvailableStream = (() => { var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) { - for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator15);;) { + for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { var _ref35; if (_isArray15) { @@ -1362,11 +1377,11 @@ var readFirstAvailableStream = exports.readFirstAvailableStream = function () { _ref35 = _i15.value; } - var _path = _ref35; + const path = _ref35; try { - var fd = yield open(_path, 'r'); - return (_fs || _load_fs()).default.createReadStream(_path, { fd }); + const fd = yield open(path, 'r'); + return (_fs || _load_fs()).default.createReadStream(path, { fd }); } catch (err) { // Try the next one } @@ -1374,21 +1389,19 @@ var readFirstAvailableStream = exports.readFirstAvailableStream = function () { return null; }); - return function readFirstAvailableStream(_x35) { + return function readFirstAvailableStream(_x34) { return _ref34.apply(this, arguments); }; -}(); - -var getFirstSuitableFolder = exports.getFirstSuitableFolder = function () { - var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) { - var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : constants.W_OK | constants.X_OK; +})(); - var result = { +let getFirstSuitableFolder = exports.getFirstSuitableFolder = (() => { + var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths, mode = constants.W_OK | constants.X_OK) { + const result = { skipped: [], folder: null }; - for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator16);;) { + for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) { var _ref37; if (_isArray16) { @@ -1400,29 +1413,29 @@ var getFirstSuitableFolder = exports.getFirstSuitableFolder = function () { _ref37 = _i16.value; } - var _folder = _ref37; + const folder = _ref37; try { - yield mkdirp(_folder); - yield access(_folder, mode); + yield mkdirp(folder); + yield access(folder, mode); - result.folder = _folder; + result.folder = folder; return result; } catch (error) { result.skipped.push({ error, - folder: _folder + folder }); } } return result; }); - return function getFirstSuitableFolder(_x36) { + return function getFirstSuitableFolder(_x35) { return _ref36.apply(this, arguments); }; -}(); +})(); exports.copy = copy; exports.readFile = readFile; @@ -1432,104 +1445,104 @@ exports.normalizeOS = normalizeOS; var _fs; function _load_fs() { - return _fs = _interopRequireDefault(__webpack_require__(8)); + return _fs = _interopRequireDefault(__webpack_require__(4)); } var _glob; function _load_glob() { - return _glob = _interopRequireDefault(__webpack_require__(183)); + return _glob = _interopRequireDefault(__webpack_require__(93)); } var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(73)); + return _os = _interopRequireDefault(__webpack_require__(46)); } -var _path2; +var _path; function _load_path() { - return _path2 = _interopRequireDefault(__webpack_require__(1)); + return _path = _interopRequireDefault(__webpack_require__(0)); } var _blockingQueue; function _load_blockingQueue() { - return _blockingQueue = _interopRequireDefault(__webpack_require__(114)); + return _blockingQueue = _interopRequireDefault(__webpack_require__(103)); } -var _promise2; +var _promise; -function _load_promise2() { - return _promise2 = _interopRequireWildcard(__webpack_require__(76)); +function _load_promise() { + return _promise = _interopRequireWildcard(__webpack_require__(47)); } -var _promise3; +var _promise2; -function _load_promise3() { - return _promise3 = __webpack_require__(76); +function _load_promise2() { + return _promise2 = __webpack_require__(47); } -var _map2; +var _map; -function _load_map2() { - return _map2 = _interopRequireDefault(__webpack_require__(35)); +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(28)); } var _fsNormalized; function _load_fsNormalized() { - return _fsNormalized = __webpack_require__(408); + return _fsNormalized = __webpack_require__(208); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var constants = exports.constants = typeof (_fs || _load_fs()).default.constants !== 'undefined' ? (_fs || _load_fs()).default.constants : { +const constants = exports.constants = typeof (_fs || _load_fs()).default.constants !== 'undefined' ? (_fs || _load_fs()).default.constants : { R_OK: (_fs || _load_fs()).default.R_OK, W_OK: (_fs || _load_fs()).default.W_OK, X_OK: (_fs || _load_fs()).default.X_OK }; -var lockQueue = exports.lockQueue = new (_blockingQueue || _load_blockingQueue()).default('fs lock'); - -var readFileBuffer = exports.readFileBuffer = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.readFile); -var open = exports.open = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.open); -var writeFile = exports.writeFile = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.writeFile); -var readlink = exports.readlink = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.readlink); -var realpath = exports.realpath = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.realpath); -var readdir = exports.readdir = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.readdir); -var rename = exports.rename = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.rename); -var access = exports.access = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.access); -var stat = exports.stat = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.stat); -var mkdirp = exports.mkdirp = (0, (_promise3 || _load_promise3()).promisify)(__webpack_require__(190)); -var exists = exports.exists = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.exists, true); -var lstat = exports.lstat = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.lstat); -var chmod = exports.chmod = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.chmod); -var link = exports.link = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.link); -var glob = exports.glob = (0, (_promise3 || _load_promise3()).promisify)((_glob || _load_glob()).default); +const lockQueue = exports.lockQueue = new (_blockingQueue || _load_blockingQueue()).default('fs lock'); + +const readFileBuffer = exports.readFileBuffer = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readFile); +const open = exports.open = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.open); +const writeFile = exports.writeFile = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.writeFile); +const readlink = exports.readlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readlink); +const realpath = exports.realpath = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.realpath); +const readdir = exports.readdir = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readdir); +const rename = exports.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename); +const access = exports.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access); +const stat = exports.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat); +const mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(136)); +const exists = exports.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true); +const lstat = exports.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat); +const chmod = exports.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod); +const link = exports.link = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.link); +const glob = exports.glob = (0, (_promise2 || _load_promise2()).promisify)((_glob || _load_glob()).default); exports.unlink = (_fsNormalized || _load_fsNormalized()).unlink; // fs.copyFile uses the native file copying instructions on the system, performing much better // than any JS-based solution and consumes fewer resources. Repeated testing to fine tune the // concurrency level revealed 128 as the sweet spot on a quad-core, 16 CPU Intel system with SSD. -var CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; +const CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; -var fsSymlink = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.symlink); -var invariant = __webpack_require__(10); -var stripBOM = __webpack_require__(315); +const fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink); +const invariant = __webpack_require__(8); +const stripBOM = __webpack_require__(151); -var noop = function noop() {}; +const noop = () => {}; function copy(src, dest, reporter) { return copyBulk([{ src, dest }], reporter); } function _readFile(loc, encoding) { - return new (_promise || _load_promise()).default(function (resolve, reject) { + return new Promise((resolve, reject) => { (_fs || _load_fs()).default.readFile(loc, encoding, function (err, content) { if (err) { reject(err); @@ -1552,14 +1565,319 @@ function normalizeOS(body) { return body.replace(/\r\n/g, '\n'); } -var cr = '\r'.charCodeAt(0); -var lf = '\n'.charCodeAt(0); +const cr = '\r'.charCodeAt(0); +const lf = '\n'.charCodeAt(0); + +/***/ }), +/* 7 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; }); +/* unused harmony export SafeSubscriber */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isFunction__ = __webpack_require__(145); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(388); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(24); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(288); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(290); +/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */ + + + + + + + +var Subscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subscriber, _super); + function Subscriber(destinationOrNext, error, complete) { + var _this = _super.call(this) || this; + _this.syncErrorValue = null; + _this.syncErrorThrown = false; + _this.syncErrorThrowable = false; + _this.isStopped = false; + _this._parentSubscription = null; + switch (arguments.length) { + case 0: + _this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]; + break; + case 1: + if (!destinationOrNext) { + _this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]; + break; + } + if (typeof destinationOrNext === 'object') { + if (destinationOrNext instanceof Subscriber) { + _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; + _this.destination = destinationOrNext; + destinationOrNext.add(_this); + } + else { + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext); + } + break; + } + default: + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete); + break; + } + return _this; + } + Subscriber.prototype[__WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { return this; }; + Subscriber.create = function (next, error, complete) { + var subscriber = new Subscriber(next, error, complete); + subscriber.syncErrorThrowable = false; + return subscriber; + }; + Subscriber.prototype.next = function (value) { + if (!this.isStopped) { + this._next(value); + } + }; + Subscriber.prototype.error = function (err) { + if (!this.isStopped) { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (!this.isStopped) { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (this.closed) { + return; + } + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + this.destination.error(err); + this.unsubscribe(); + }; + Subscriber.prototype._complete = function () { + this.destination.complete(); + this.unsubscribe(); + }; + Subscriber.prototype._unsubscribeAndRecycle = function () { + var _a = this, _parent = _a._parent, _parents = _a._parents; + this._parent = null; + this._parents = null; + this.unsubscribe(); + this.closed = false; + this.isStopped = false; + this._parent = _parent; + this._parents = _parents; + this._parentSubscription = null; + return this; + }; + return Subscriber; +}(__WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */])); + +var SafeSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SafeSubscriber, _super); + function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) { + var _this = _super.call(this) || this; + _this._parentSubscriber = _parentSubscriber; + var next; + var context = _this; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isFunction__["a" /* isFunction */])(observerOrNext)) { + next = observerOrNext; + } + else if (observerOrNext) { + next = observerOrNext.next; + error = observerOrNext.error; + complete = observerOrNext.complete; + if (observerOrNext !== __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]) { + context = Object.create(observerOrNext); + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isFunction__["a" /* isFunction */])(context.unsubscribe)) { + _this.add(context.unsubscribe.bind(context)); + } + context.unsubscribe = _this.unsubscribe.bind(_this); + } + } + _this._context = context; + _this._next = next; + _this._error = error; + _this._complete = complete; + return _this; + } + SafeSubscriber.prototype.next = function (value) { + if (!this.isStopped && this._next) { + var _parentSubscriber = this._parentSubscriber; + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._next, value); + } + else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.error = function (err) { + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + var useDeprecatedSynchronousErrorHandling = __WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling; + if (this._error) { + if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._error, err); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, this._error, err); + this.unsubscribe(); + } + } + else if (!_parentSubscriber.syncErrorThrowable) { + this.unsubscribe(); + if (useDeprecatedSynchronousErrorHandling) { + throw err; + } + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + else { + if (useDeprecatedSynchronousErrorHandling) { + _parentSubscriber.syncErrorValue = err; + _parentSubscriber.syncErrorThrown = true; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.complete = function () { + var _this = this; + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + if (this._complete) { + var wrappedComplete = function () { return _this._complete.call(_this._context); }; + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(wrappedComplete); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, wrappedComplete); + this.unsubscribe(); + } + } + else { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) { + try { + fn.call(this._context, value); + } + catch (err) { + this.unsubscribe(); + if (__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + throw err; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + } + }; + SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) { + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + throw new Error('bad call'); + } + try { + fn.call(this._context, value); + } + catch (err) { + if (__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + parent.syncErrorValue = err; + parent.syncErrorThrown = true; + return true; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + return true; + } + } + return false; + }; + SafeSubscriber.prototype._unsubscribe = function () { + var _parentSubscriber = this._parentSubscriber; + this._context = null; + this._parentSubscriber = null; + _parentSubscriber.unsubscribe(); + }; + return SafeSubscriber; +}(Subscriber)); + +//# sourceMappingURL=Subscriber.js.map + /***/ }), /* 8 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var NODE_ENV = process.env.NODE_ENV; + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; -module.exports = require("fs"); /***/ }), /* 9 */ @@ -1572,50 +1890,54 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getPathKey = getPathKey; -var os = __webpack_require__(73); -var path = __webpack_require__(1); -var userHome = __webpack_require__(77).default; +const os = __webpack_require__(46); +const path = __webpack_require__(0); +const userHome = __webpack_require__(60).default; + +var _require = __webpack_require__(215); -var _require = __webpack_require__(421), - getCacheDir = _require.getCacheDir, - getConfigDir = _require.getConfigDir, - getDataDir = _require.getDataDir; +const getCacheDir = _require.getCacheDir, + getConfigDir = _require.getConfigDir, + getDataDir = _require.getDataDir; -var isWebpackBundle = __webpack_require__(626); +const isWebpackBundle = __webpack_require__(267); -var DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies']; -var RESOLUTIONS = exports.RESOLUTIONS = 'resolutions'; -var MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS].concat(DEPENDENCY_TYPES); +const DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies']; +const OWNED_DEPENDENCY_TYPES = exports.OWNED_DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies']; -var SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0'; +const RESOLUTIONS = exports.RESOLUTIONS = 'resolutions'; +const MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS, ...DEPENDENCY_TYPES]; -var YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com'; +const SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0'; -var YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/'; -var YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh'; -var YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi'; +const YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com'; +const NPM_REGISTRY_RE = exports.NPM_REGISTRY_RE = /https?:\/\/registry\.npmjs\.org/g; -var SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; +const YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/'; +const YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh'; +const YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi'; + +const SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; // cache version, bump whenever we make backwards incompatible changes -var CACHE_VERSION = exports.CACHE_VERSION = 2; +const CACHE_VERSION = exports.CACHE_VERSION = 4; // lockfile version, bump whenever we make backwards incompatible changes -var LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1; +const LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1; // max amount of network requests to perform concurrently -var NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8; +const NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8; // HTTP timeout used when downloading packages -var NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds +const NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds // max amount of child processes to execute concurrently -var CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5; +const CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5; -var REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid']; +const REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid']; function getPreferredCacheDirectories() { - var preferredCacheDirectories = [getCacheDir()]; + const preferredCacheDirectories = [getCacheDir()]; if (process.getuid) { // $FlowFixMe: process.getuid exists, dammit @@ -1627,14 +1949,14 @@ function getPreferredCacheDirectories() { return preferredCacheDirectories; } -var PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); -var CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir(); -var DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir(); -var LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link'); -var GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global'); +const PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); +const CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir(); +const DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir(); +const LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link'); +const GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global'); -var NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath; -var YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath(); +const NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath; +const YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath(); // Webpack needs to be configured with node.__dirname/__filename = false function getYarnBinPath() { @@ -1645,38 +1967,40 @@ function getYarnBinPath() { } } -var NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules'; -var NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json'; +const NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules'; +const NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json'; + +const PNP_FILENAME = exports.PNP_FILENAME = '.pnp.js'; -var POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`; -var FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn'); +const POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`; +const FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn'); -var META_FOLDER = exports.META_FOLDER = '.yarn-meta'; -var INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity'; -var LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock'; -var METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json'; -var TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz'; -var CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean'; +const META_FOLDER = exports.META_FOLDER = '.yarn-meta'; +const INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity'; +const LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock'; +const METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json'; +const TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz'; +const CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean'; -var NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json'; -var NPM_SHRINKWRAP_FILENAME = exports.NPM_SHRINKWRAP_FILENAME = 'npm-shrinkwrap.json'; +const NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json'; +const NPM_SHRINKWRAP_FILENAME = exports.NPM_SHRINKWRAP_FILENAME = 'npm-shrinkwrap.json'; -var DEFAULT_INDENT = exports.DEFAULT_INDENT = ' '; -var SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997; -var SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance'; +const DEFAULT_INDENT = exports.DEFAULT_INDENT = ' '; +const SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997; +const SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance'; -var ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env); +const ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env); function getPathKey(platform, env) { - var pathKey = 'PATH'; + let pathKey = 'PATH'; // windows calls its path "Path" usually, but this is not guaranteed. if (platform === 'win32') { pathKey = 'Path'; - for (var _key in env) { - if (_key.toLowerCase() === 'path') { - pathKey = _key; + for (const key in env) { + if (key.toLowerCase() === 'path') { + pathKey = key; } } } @@ -1684,7 +2008,7 @@ function getPathKey(platform, env) { return pathKey; } -var VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = { +const VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = { major: 'red', premajor: 'red', minor: 'yellow', @@ -1698,137 +2022,276 @@ var VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = { /***/ }), /* 10 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(289); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__(901); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(109); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(291); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(176); +/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */ -/** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ -var NODE_ENV = process.env.NODE_ENV; -var invariant = function(condition, format, a, b, c, d, e, f) { - if (NODE_ENV !== 'production') { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); +var Observable = /*@__PURE__*/ (function () { + function Observable(subscribe) { + this._isScalar = false; + if (subscribe) { + this._subscribe = subscribe; + } } - } + Observable.prototype.lift = function (operator) { + var observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable.prototype.subscribe = function (observerOrNext, error, complete) { + var operator = this.operator; + var sink = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__["a" /* toSubscriber */])(observerOrNext, error, complete); + if (operator) { + operator.call(sink, this.source); + } + else { + sink.add(this.source || (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ? + this._subscribe(sink) : + this._trySubscribe(sink)); + } + if (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + if (sink.syncErrorThrowable) { + sink.syncErrorThrowable = false; + if (sink.syncErrorThrown) { + throw sink.syncErrorValue; + } + } + } + return sink; + }; + Observable.prototype._trySubscribe = function (sink) { + try { + return this._subscribe(sink); + } + catch (err) { + if (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + sink.syncErrorThrown = true; + sink.syncErrorValue = err; + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_canReportError__["a" /* canReportError */])(sink)) { + sink.error(err); + } + else { + console.warn(err); + } + } + }; + Observable.prototype.forEach = function (next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var subscription; + subscription = _this.subscribe(function (value) { + try { + next(value); + } + catch (err) { + reject(err); + if (subscription) { + subscription.unsubscribe(); + } + } + }, reject, resolve); + }); + }; + Observable.prototype._subscribe = function (subscriber) { + var source = this.source; + return source && source.subscribe(subscriber); + }; + Observable.prototype[__WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__["a" /* observable */]] = function () { + return this; + }; + Observable.prototype.pipe = function () { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + if (operations.length === 0) { + return this; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["b" /* pipeFromArray */])(operations)(this); + }; + Observable.prototype.toPromise = function (promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var value; + _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); }); + }); + }; + Observable.create = function (subscribe) { + return new Observable(subscribe); + }; + return Observable; +}()); - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - error.name = 'Invariant Violation'; +function getPromiseCtor(promiseCtor) { + if (!promiseCtor) { + promiseCtor = __WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].Promise || Promise; } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -}; - -module.exports = invariant; + if (!promiseCtor) { + throw new Error('no Promise impl found'); + } + return promiseCtor; +} +//# sourceMappingURL=Observable.js.map /***/ }), /* 11 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -module.exports = { "default": __webpack_require__(450), __esModule: true }; +module.exports = require("crypto"); /***/ }), /* 12 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OuterSubscriber; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ -exports.__esModule = true; - -var _setPrototypeOf = __webpack_require__(161); - -var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); - -var _create = __webpack_require__(242); +var OuterSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](OuterSubscriber, _super); + function OuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.destination.next(innerValue); + }; + OuterSubscriber.prototype.notifyError = function (error, innerSub) { + this.destination.error(error); + }; + OuterSubscriber.prototype.notifyComplete = function (innerSub) { + this.destination.complete(); + }; + return OuterSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); -var _create2 = _interopRequireDefault(_create); +//# sourceMappingURL=OuterSubscriber.js.map -var _typeof2 = __webpack_require__(243); -var _typeof3 = _interopRequireDefault(_typeof2); +/***/ }), +/* 13 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = subscribeToResult; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__InnerSubscriber__ = __webpack_require__(77); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__subscribeTo__ = __webpack_require__(414); +/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */ -exports.default = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); - } - subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true +function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) { + if (destination === void 0) { + destination = new __WEBPACK_IMPORTED_MODULE_0__InnerSubscriber__["a" /* InnerSubscriber */](outerSubscriber, outerValue, outerIndex); } - }); - if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; -}; + if (destination.closed) { + return; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__subscribeTo__["a" /* subscribeTo */])(result)(destination); +} +//# sourceMappingURL=subscribeToResult.js.map + /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* eslint-disable node/no-deprecated-api */ -exports.__esModule = true; -var _typeof2 = __webpack_require__(243); +var buffer = __webpack_require__(80) +var Buffer = buffer.Buffer -var _typeof3 = _interopRequireDefault(_typeof2); +var safer = {} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var key + +for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue + if (key === 'SlowBuffer' || key === 'Buffer') continue + safer[key] = buffer[key] +} + +var Safer = safer.Buffer = {} +for (key in Buffer) { + if (!Buffer.hasOwnProperty(key)) continue + if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue + Safer[key] = Buffer[key] +} -exports.default = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); +safer.Buffer.prototype = Buffer.prototype + +if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) + } + if (value && typeof value.length === 'undefined') { + throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) + } + return Buffer(value, encodingOrOffset, length) } +} - return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; -}; +if (!Safer.alloc) { + Safer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } + var buf = Buffer(size) + if (!fill || fill.length === 0) { + buf.fill(0) + } else if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + return buf + } +} -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { +if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding('buffer').kStringMaxLength + } catch (e) { + // we can't determine kStringMaxLength in environments where process.binding + // is unsupported, so let's not set it + } +} + +if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + } + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength + } +} + +module.exports = safer -module.exports = { "default": __webpack_require__(454), __esModule: true }; /***/ }), /* 15 */ @@ -1837,9 +2300,9 @@ module.exports = { "default": __webpack_require__(454), __esModule: true }; // Copyright (c) 2012, Mark Cavage. All rights reserved. // Copyright 2015 Joyent, Inc. -var assert = __webpack_require__(36); -var Stream = __webpack_require__(37).Stream; -var util = __webpack_require__(4); +var assert = __webpack_require__(27); +var Stream = __webpack_require__(22).Stream; +var util = __webpack_require__(3); ///--- Globals @@ -2051,16 +2514,16 @@ module.exports = _setExports(process.env.NODE_NDEBUG); /* 16 */ /***/ (function(module, exports) { -module.exports = require("crypto"); - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef -module.exports = { "default": __webpack_require__(447), __esModule: true }; /***/ }), -/* 18 */ +/* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2069,14 +2532,8 @@ module.exports = { "default": __webpack_require__(447), __esModule: true }; Object.defineProperty(exports, "__esModule", { value: true }); - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - exports.sortAlpha = sortAlpha; +exports.sortOptionsByFlags = sortOptionsByFlags; exports.entries = entries; exports.removePrefix = removePrefix; exports.removeSuffix = removeSuffix; @@ -2085,17 +2542,14 @@ exports.hyphenate = hyphenate; exports.camelCase = camelCase; exports.compareSortedArrays = compareSortedArrays; exports.sleep = sleep; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _camelCase = __webpack_require__(432); +const _camelCase = __webpack_require__(220); function sortAlpha(a, b) { // sort alphabetically in a deterministic way - var shortLen = Math.min(a.length, b.length); - for (var i = 0; i < shortLen; i++) { - var aChar = a.charCodeAt(i); - var bChar = b.charCodeAt(i); + const shortLen = Math.min(a.length, b.length); + for (let i = 0; i < shortLen; i++) { + const aChar = a.charCodeAt(i); + const bChar = b.charCodeAt(i); if (aChar !== bChar) { return aChar - bChar; } @@ -2103,11 +2557,17 @@ function sortAlpha(a, b) { return a.length - b.length; } +function sortOptionsByFlags(a, b) { + const aOpt = a.flags.replace(/-/g, ''); + const bOpt = b.flags.replace(/-/g, ''); + return sortAlpha(aOpt, bOpt); +} + function entries(obj) { - var entries = []; + const entries = []; if (obj) { - for (var _key in obj) { - entries.push([_key, obj[_key]]); + for (const key in obj) { + entries.push([key, obj[key]]); } } return entries; @@ -2138,7 +2598,7 @@ function addSuffix(pattern, suffix) { } function hyphenate(str) { - return str.replace(/[A-Z]/g, function (match) { + return str.replace(/[A-Z]/g, match => { return '-' + match.charAt(0).toLowerCase(); }); } @@ -2155,7 +2615,7 @@ function compareSortedArrays(array1, array2) { if (array1.length !== array2.length) { return false; } - for (var i = 0, len = array1.length; i < len; i++) { + for (let i = 0, len = array1.length; i < len; i++) { if (array1[i] !== array2[i]) { return false; } @@ -2164,93 +2624,314 @@ function compareSortedArrays(array1, array2) { } function sleep(ms) { - return new (_promise || _load_promise()).default(function (resolve) { + return new Promise(resolve => { setTimeout(resolve, ms); }); } /***/ }), -/* 19 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* eslint-disable node/no-deprecated-api */ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.stringify = exports.parse = undefined; -var buffer = __webpack_require__(107) -var Buffer = buffer.Buffer +var _asyncToGenerator2; -var safer = {} +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} -var key +var _parse; -for (key in buffer) { - if (!buffer.hasOwnProperty(key)) continue - if (key === 'SlowBuffer' || key === 'Buffer') continue - safer[key] = buffer[key] +function _load_parse() { + return _parse = __webpack_require__(98); } -var Safer = safer.Buffer = {} -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue - Safer[key] = Buffer[key] +Object.defineProperty(exports, 'parse', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_parse || _load_parse()).default; + } +}); + +var _stringify; + +function _load_stringify() { + return _stringify = __webpack_require__(190); } -safer.Buffer.prototype = Buffer.prototype +Object.defineProperty(exports, 'stringify', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_stringify || _load_stringify()).default; + } +}); +exports.implodeEntry = implodeEntry; +exports.explodeEntry = explodeEntry; -if (!Safer.from || Safer.from === Uint8Array.from) { - Safer.from = function (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) - } - if (value && typeof value.length === 'undefined') { - throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) - } - return Buffer(value, encodingOrOffset, length) +var _misc; + +function _load_misc() { + return _misc = __webpack_require__(17); +} + +var _normalizePattern; + +function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(36); +} + +var _parse2; + +function _load_parse2() { + return _parse2 = _interopRequireDefault(__webpack_require__(98)); +} + +var _constants; + +function _load_constants() { + return _constants = __webpack_require__(9); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(6)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const invariant = __webpack_require__(8); + +const path = __webpack_require__(0); +const ssri = __webpack_require__(70); + +function getName(pattern) { + return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; +} + +function blankObjectUndefined(obj) { + return obj && Object.keys(obj).length ? obj : undefined; +} + +function keyForRemote(remote) { + return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); +} + +function serializeIntegrity(integrity) { + // We need this because `Integrity.toString()` does not use sorting to ensure a stable string output + // See https://git.io/vx2Hy + return integrity.toString().split(' ').sort().join(' '); +} + +function implodeEntry(pattern, obj) { + const inferredName = getName(pattern); + const integrity = obj.integrity ? serializeIntegrity(obj.integrity) : ''; + const imploded = { + name: inferredName === obj.name ? undefined : obj.name, + version: obj.version, + uid: obj.uid === obj.version ? undefined : obj.uid, + resolved: obj.resolved, + registry: obj.registry === 'npm' ? undefined : obj.registry, + dependencies: blankObjectUndefined(obj.dependencies), + optionalDependencies: blankObjectUndefined(obj.optionalDependencies), + permissions: blankObjectUndefined(obj.permissions), + prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) + }; + if (integrity) { + imploded.integrity = integrity; } + return imploded; } -if (!Safer.alloc) { - Safer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') +function explodeEntry(pattern, obj) { + obj.optionalDependencies = obj.optionalDependencies || {}; + obj.dependencies = obj.dependencies || {}; + obj.uid = obj.uid || obj.version; + obj.permissions = obj.permissions || {}; + obj.registry = obj.registry || 'npm'; + obj.name = obj.name || getName(pattern); + const integrity = obj.integrity; + if (integrity && integrity.isIntegrity) { + obj.integrity = ssri.parse(integrity); + } + return obj; +} + +class Lockfile { + constructor({ cache, source, parseResultType } = {}) { + this.source = source || ''; + this.cache = cache; + this.parseResultType = parseResultType; + } + + // source string if the `cache` was parsed + + + // if true, we're parsing an old yarn file and need to update integrity fields + hasEntriesExistWithoutIntegrity() { + if (!this.cache) { + return false; } - var buf = Buffer(size) - if (!fill || fill.length === 0) { - buf.fill(0) - } else if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) + + for (const key in this.cache) { + // $FlowFixMe - `this.cache` is clearly defined at this point + if (!/^.*@(file:|http)/.test(key) && this.cache[key] && !this.cache[key].integrity) { + return true; + } } - return buf + + return false; } -} -if (!safer.kStringMaxLength) { - try { - safer.kStringMaxLength = process.binding('buffer').kStringMaxLength - } catch (e) { - // we can't determine kStringMaxLength in environments where process.binding - // is unsupported, so let's not set it + static fromDirectory(dir, reporter) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // read the manifest in this directory + const lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); + + let lockfile; + let rawLockfile = ''; + let parseResult; + + if (yield (_fs || _load_fs()).exists(lockfileLoc)) { + rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); + parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); + + if (reporter) { + if (parseResult.type === 'merge') { + reporter.info(reporter.lang('lockfileMerged')); + } else if (parseResult.type === 'conflict') { + reporter.warn(reporter.lang('lockfileConflict')); + } + } + + lockfile = parseResult.object; + } else if (reporter) { + reporter.info(reporter.lang('noLockfileFound')); + } + + return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); + })(); } -} -if (!safer.constants) { - safer.constants = { - MAX_LENGTH: safer.kMaxLength + getLocked(pattern) { + const cache = this.cache; + if (!cache) { + return undefined; + } + + const shrunk = pattern in cache && cache[pattern]; + + if (typeof shrunk === 'string') { + return this.getLocked(shrunk); + } else if (shrunk) { + explodeEntry(pattern, shrunk); + return shrunk; + } + + return undefined; } - if (safer.kStringMaxLength) { - safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength + + removePattern(pattern) { + const cache = this.cache; + if (!cache) { + return; + } + delete cache[pattern]; + } + + getLockfile(patterns) { + const lockfile = {}; + const seen = new Map(); + + // order by name so that lockfile manifest is assigned to the first dependency with this manifest + // the others that have the same remoteKey will just refer to the first + // ordering allows for consistency in lockfile when it is serialized + const sortedPatternsKeys = Object.keys(patterns).sort((_misc || _load_misc()).sortAlpha); + + for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + const pattern = _ref; + + const pkg = patterns[pattern]; + const remote = pkg._remote, + ref = pkg._reference; + + invariant(ref, 'Package is missing a reference'); + invariant(remote, 'Package is missing a remote'); + + const remoteKey = keyForRemote(remote); + const seenPattern = remoteKey && seen.get(remoteKey); + if (seenPattern) { + // no point in duplicating it + lockfile[pattern] = seenPattern; + + // if we're relying on our name being inferred and two of the patterns have + // different inferred names then we need to set it + if (!seenPattern.name && getName(pattern) !== pkg.name) { + seenPattern.name = pkg.name; + } + continue; + } + const obj = implodeEntry(pattern, { + name: pkg.name, + version: pkg.version, + uid: pkg._uid, + resolved: remote.resolved, + integrity: remote.integrity, + registry: remote.registry, + dependencies: pkg.dependencies, + peerDependencies: pkg.peerDependencies, + optionalDependencies: pkg.optionalDependencies, + permissions: ref.permissions, + prebuiltVariants: pkg.prebuiltVariants + }); + + lockfile[pattern] = obj; + + if (remoteKey) { + seen.set(remoteKey, obj); + } + } + + return lockfile; } } +exports.default = Lockfile; -module.exports = safer +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(126)('wks'); +var uid = __webpack_require__(130); +var Symbol = __webpack_require__(16).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; /***/ }), @@ -2280,6 +2961,9 @@ exports.SEMVER_SPEC_VERSION = '2.0.0'; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16; + // The actual regexps go on exports.re var re = exports.re = []; var src = exports.src = []; @@ -2415,6 +3099,15 @@ src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; var XRANGELOOSE = R++; src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++; +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])'; + // Tilde ranges. // Meaning is "reasonably at or greater than" var LONETILDE = R++; @@ -2822,7 +3515,7 @@ function patch(a, loose) { exports.compare = compare; function compare(a, b, loose) { - return new SemVer(a, loose).compare(b); + return new SemVer(a, loose).compare(new SemVer(b, loose)); } exports.compareLoose = compareLoose; @@ -2963,11 +3656,59 @@ Comparator.prototype.test = function(version) { return cmp(version, this.operator, this.semver, this.loose); }; +Comparator.prototype.intersects = function(comp, loose) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, loose); + return satisfies(this.value, rangeTmp, loose); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, loose); + return satisfies(comp.semver, rangeTmp, loose); + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, loose) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')); + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, loose) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')); + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; +}; + exports.Range = Range; function Range(range, loose) { - if ((range instanceof Range) && range.loose === loose) - return range; + if (range instanceof Range) { + if (range.loose === loose) { + return range; + } else { + return new Range(range.raw, loose); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, loose); + } if (!(this instanceof Range)) return new Range(range, loose); @@ -3042,6 +3783,22 @@ Range.prototype.parseRange = function(range) { return set; }; +Range.prototype.intersects = function(range, loose) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function(thisComparators) { + return thisComparators.every(function(thisComparator) { + return range.set.some(function(rangeComparators) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, loose); + }); + }); + }); + }); +}; + // Mostly just for testing and legacy API reasons exports.toComparators = toComparators; function toComparators(range, loose) { @@ -3346,20 +4103,42 @@ function satisfies(version, range, loose) { exports.maxSatisfying = maxSatisfying; function maxSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return rcompare(a, b, loose); - })[0] || null; + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) + max = v; + maxSV = new SemVer(max, loose); + } + } + }) + return max; } exports.minSatisfying = minSatisfying; function minSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return compare(a, b, loose); - })[0] || null; + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!min || minSV.compare(v) === 1) { // compare(min, v, true) + min = v; + minSV = new SemVer(min, loose); + } + } + }) + return min; } exports.validRange = validRange; @@ -3461,308 +4240,64 @@ function prerelease(version, loose) { return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; } - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.stringify = exports.parse = undefined; - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(38)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(0)); +exports.intersects = intersects; +function intersects(r1, r2, loose) { + r1 = new Range(r1, loose) + r2 = new Range(r2, loose) + return r1.intersects(r2) } -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _parse; - -function _load_parse() { - return _parse = __webpack_require__(226); -} - -Object.defineProperty(exports, 'parse', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_parse || _load_parse()).default; - } -}); - -var _stringify; - -function _load_stringify() { - return _stringify = __webpack_require__(386); -} - -Object.defineProperty(exports, 'stringify', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_stringify || _load_stringify()).default; - } -}); -exports.implodeEntry = implodeEntry; -exports.explodeEntry = explodeEntry; +exports.coerce = coerce; +function coerce(version) { + if (version instanceof SemVer) + return version; -var _misc; + if (typeof version !== 'string') + return null; -function _load_misc() { - return _misc = __webpack_require__(18); -} + var match = version.match(re[COERCE]); -var _normalizePattern; + if (match == null) + return null; -function _load_normalizePattern() { - return _normalizePattern = __webpack_require__(40); + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); } -var _parse2; -function _load_parse2() { - return _parse2 = _interopRequireDefault(__webpack_require__(226)); -} +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { -var _constants; +"use strict"; -function _load_constants() { - return _constants = __webpack_require__(9); -} -var _fs; +exports.__esModule = true; -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} +var _assign = __webpack_require__(560); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(10); - -var path = __webpack_require__(1); - -function getName(pattern) { - return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; -} - -function blankObjectUndefined(obj) { - return obj && (0, (_keys || _load_keys()).default)(obj).length ? obj : undefined; -} - -function keyForRemote(remote) { - return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); -} - -function implodeEntry(pattern, obj) { - var inferredName = getName(pattern); - return { - name: inferredName === obj.name ? undefined : obj.name, - version: obj.version, - uid: obj.uid === obj.version ? undefined : obj.uid, - resolved: obj.resolved, - registry: obj.registry === 'npm' ? undefined : obj.registry, - dependencies: blankObjectUndefined(obj.dependencies), - optionalDependencies: blankObjectUndefined(obj.optionalDependencies), - permissions: blankObjectUndefined(obj.permissions), - prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) - }; -} - -function explodeEntry(pattern, obj) { - obj.optionalDependencies = obj.optionalDependencies || {}; - obj.dependencies = obj.dependencies || {}; - obj.uid = obj.uid || obj.version; - obj.permissions = obj.permissions || {}; - obj.registry = obj.registry || 'npm'; - obj.name = obj.name || getName(pattern); - return obj; -} - -var Lockfile = function () { - function Lockfile() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - cache = _ref.cache, - source = _ref.source, - parseResultType = _ref.parseResultType; - - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Lockfile); - - this.source = source || ''; - this.cache = cache; - this.parseResultType = parseResultType; - } - - // source string if the `cache` was parsed - - - Lockfile.fromDirectory = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, reporter) { - // read the manifest in this directory - var lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); - - var lockfile = void 0; - var rawLockfile = ''; - var parseResult = void 0; - - if (yield (_fs || _load_fs()).exists(lockfileLoc)) { - rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); - parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); - - if (reporter) { - if (parseResult.type === 'merge') { - reporter.info(reporter.lang('lockfileMerged')); - } else if (parseResult.type === 'conflict') { - reporter.warn(reporter.lang('lockfileConflict')); - } - } - - lockfile = parseResult.object; - } else if (reporter) { - reporter.info(reporter.lang('noLockfileFound')); - } - - return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); - }); - - function fromDirectory(_x2, _x3) { - return _ref2.apply(this, arguments); - } - - return fromDirectory; - }(); - - Lockfile.prototype.getLocked = function getLocked(pattern) { - var cache = this.cache; - if (!cache) { - return undefined; - } - - var shrunk = pattern in cache && cache[pattern]; - - if (typeof shrunk === 'string') { - return this.getLocked(shrunk); - } else if (shrunk) { - explodeEntry(pattern, shrunk); - return shrunk; - } - - return undefined; - }; - - Lockfile.prototype.removePattern = function removePattern(pattern) { - var cache = this.cache; - if (!cache) { - return; - } - delete cache[pattern]; - }; - - Lockfile.prototype.getLockfile = function getLockfile(patterns) { - var lockfile = {}; - var seen = new (_map || _load_map()).default(); - - // order by name so that lockfile manifest is assigned to the first dependency with this manifest - // the others that have the same remoteKey will just refer to the first - // ordering allows for consistency in lockfile when it is serialized - var sortedPatternsKeys = (0, (_keys || _load_keys()).default)(patterns).sort((_misc || _load_misc()).sortAlpha); - - for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var pattern = _ref3; - - var pkg = patterns[pattern]; - var remote = pkg._remote, - ref = pkg._reference; - - invariant(ref, 'Package is missing a reference'); - invariant(remote, 'Package is missing a remote'); - - var remoteKey = keyForRemote(remote); - var seenPattern = remoteKey && seen.get(remoteKey); - if (seenPattern) { - // no point in duplicating it - lockfile[pattern] = seenPattern; - - // if we're relying on our name being inferred and two of the patterns have - // different inferred names then we need to set it - if (!seenPattern.name && getName(pattern) !== pkg.name) { - seenPattern.name = pkg.name; - } - continue; - } - var obj = implodeEntry(pattern, { - name: pkg.name, - version: pkg.version, - uid: pkg._uid, - resolved: remote.resolved, - registry: remote.registry, - dependencies: pkg.dependencies, - peerDependencies: pkg.peerDependencies, - optionalDependencies: pkg.optionalDependencies, - permissions: ref.permissions, - prebuiltVariants: pkg.prebuiltVariants - }); - - lockfile[pattern] = obj; +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; - if (remoteKey) { - seen.set(remoteKey, obj); + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; } } + } - return lockfile; - }; - - return Lockfile; -}(); - -exports.default = Lockfile; + return target; +}; /***/ }), /* 22 */ /***/ (function(module, exports) { -var core = module.exports = {version: '2.4.0'}; -if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef +module.exports = require("stream"); /***/ }), /* 23 */ @@ -3772,32 +4307,149 @@ module.exports = require("url"); /***/ }), /* 24 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(412); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(145); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(51); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(409); +/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */ -exports.__esModule = true; -var _assign = __webpack_require__(17); - -var _assign2 = _interopRequireDefault(_assign); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _assign2.default || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } +var Subscription = /*@__PURE__*/ (function () { + function Subscription(unsubscribe) { + this.closed = false; + this._parent = null; + this._parents = null; + this._subscriptions = null; + if (unsubscribe) { + this._unsubscribe = unsubscribe; + } } - } + Subscription.prototype.unsubscribe = function () { + var hasErrors = false; + var errors; + if (this.closed) { + return; + } + var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; + this.closed = true; + this._parent = null; + this._parents = null; + this._subscriptions = null; + var index = -1; + var len = _parents ? _parents.length : 0; + while (_parent) { + _parent.remove(this); + _parent = ++index < len && _parents[index] || null; + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isFunction__["a" /* isFunction */])(_unsubscribe)) { + var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(_unsubscribe).call(this); + if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { + hasErrors = true; + errors = errors || (__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */] ? + flattenUnsubscriptionErrors(__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e.errors) : [__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e]); + } + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_isArray__["a" /* isArray */])(_subscriptions)) { + index = -1; + len = _subscriptions.length; + while (++index < len) { + var sub = _subscriptions[index]; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isObject__["a" /* isObject */])(sub)) { + var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(sub.unsubscribe).call(sub); + if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { + hasErrors = true; + errors = errors || []; + var err = __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e; + if (err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) { + errors = errors.concat(flattenUnsubscriptionErrors(err.errors)); + } + else { + errors.push(err); + } + } + } + } + } + if (hasErrors) { + throw new __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */](errors); + } + }; + Subscription.prototype.add = function (teardown) { + if (!teardown || (teardown === Subscription.EMPTY)) { + return Subscription.EMPTY; + } + if (teardown === this) { + return this; + } + var subscription = teardown; + switch (typeof teardown) { + case 'function': + subscription = new Subscription(teardown); + case 'object': + if (subscription.closed || typeof subscription.unsubscribe !== 'function') { + return subscription; + } + else if (this.closed) { + subscription.unsubscribe(); + return subscription; + } + else if (typeof subscription._addParent !== 'function') { + var tmp = subscription; + subscription = new Subscription(); + subscription._subscriptions = [tmp]; + } + break; + default: + throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); + } + var subscriptions = this._subscriptions || (this._subscriptions = []); + subscriptions.push(subscription); + subscription._addParent(this); + return subscription; + }; + Subscription.prototype.remove = function (subscription) { + var subscriptions = this._subscriptions; + if (subscriptions) { + var subscriptionIndex = subscriptions.indexOf(subscription); + if (subscriptionIndex !== -1) { + subscriptions.splice(subscriptionIndex, 1); + } + } + }; + Subscription.prototype._addParent = function (parent) { + var _a = this, _parent = _a._parent, _parents = _a._parents; + if (!_parent || _parent === parent) { + this._parent = parent; + } + else if (!_parents) { + this._parents = [parent]; + } + else if (_parents.indexOf(parent) === -1) { + _parents.push(parent); + } + }; + Subscription.EMPTY = (function (empty) { + empty.closed = true; + return empty; + }(new Subscription())); + return Subscription; +}()); + +function flattenUnsubscriptionErrors(errors) { + return errors.reduce(function (errs, err) { return errs.concat((err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) ? err.errors : err); }, []); +} +//# sourceMappingURL=Subscription.js.map - return target; -}; /***/ }), /* 25 */ @@ -3826,12 +4478,12 @@ module.exports = { }; var assert = __webpack_require__(15); -var Buffer = __webpack_require__(19).Buffer; -var PrivateKey = __webpack_require__(29); -var Key = __webpack_require__(27); -var crypto = __webpack_require__(16); -var algs = __webpack_require__(28); -var asn1 = __webpack_require__(49); +var Buffer = __webpack_require__(14).Buffer; +var PrivateKey = __webpack_require__(32); +var Key = __webpack_require__(26); +var crypto = __webpack_require__(11); +var algs = __webpack_require__(31); +var asn1 = __webpack_require__(59); var ec, jsbn; var nacl; @@ -4062,7 +4714,7 @@ function calculateDSAPublic(g, p, x) { assert.buffer(p); assert.buffer(x); try { - var bigInt = __webpack_require__(63).BigInteger; + var bigInt = __webpack_require__(74).BigInteger; } catch (e) { throw (new Error('To load a PKCS#8 format DSA private key, ' + 'the node jsbn library is required.')); @@ -4079,7 +4731,7 @@ function calculateED25519Public(k) { assert.buffer(k); if (nacl === undefined) - nacl = __webpack_require__(54); + nacl = __webpack_require__(68); var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); return (Buffer.from(kp.publicKey)); @@ -4089,7 +4741,7 @@ function calculateX25519Public(k) { assert.buffer(k); if (nacl === undefined) - nacl = __webpack_require__(54); + nacl = __webpack_require__(68); var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); return (Buffer.from(kp.publicKey)); @@ -4099,7 +4751,7 @@ function addRSAMissing(key) { assert.object(key); assertCompatible(key, PrivateKey, [1, 1]); try { - var bigInt = __webpack_require__(63).BigInteger; + var bigInt = __webpack_require__(74).BigInteger; } catch (e) { throw (new Error('To write a PEM private key from ' + 'this source, the node jsbn lib is required.')); @@ -4130,9 +4782,9 @@ function publicFromPrivateECDSA(curveName, priv) { assert.string(curveName, 'curveName'); assert.buffer(priv); if (ec === undefined) - ec = __webpack_require__(101); + ec = __webpack_require__(132); if (jsbn === undefined) - jsbn = __webpack_require__(63).BigInteger; + jsbn = __webpack_require__(74).BigInteger; var params = algs.curves[curveName]; var p = new jsbn(params.p); var a = new jsbn(params.a); @@ -4196,34 +4848,6 @@ function opensshCipherInfo(cipher) { /***/ }), /* 26 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), -/* 27 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -4231,18 +4855,18 @@ module.exports = function(module) { module.exports = Key; var assert = __webpack_require__(15); -var algs = __webpack_require__(28); -var crypto = __webpack_require__(16); -var Fingerprint = __webpack_require__(103); -var Signature = __webpack_require__(53); -var DiffieHellman = __webpack_require__(196).DiffieHellman; -var errs = __webpack_require__(52); +var algs = __webpack_require__(31); +var crypto = __webpack_require__(11); +var Fingerprint = __webpack_require__(147); +var Signature = __webpack_require__(67); +var DiffieHellman = __webpack_require__(292).DiffieHellman; +var errs = __webpack_require__(66); var utils = __webpack_require__(25); -var PrivateKey = __webpack_require__(29); +var PrivateKey = __webpack_require__(32); var edCompat; try { - edCompat = __webpack_require__(311); + edCompat = __webpack_require__(422); } catch (e) { /* Just continue through, and bail out if we try to use it. */ } @@ -4251,15 +4875,15 @@ var InvalidAlgorithmError = errs.InvalidAlgorithmError; var KeyParseError = errs.KeyParseError; var formats = {}; -formats['auto'] = __webpack_require__(312); -formats['pem'] = __webpack_require__(64); -formats['pkcs1'] = __webpack_require__(198); -formats['pkcs8'] = __webpack_require__(104); -formats['rfc4253'] = __webpack_require__(71); -formats['ssh'] = __webpack_require__(313); -formats['ssh-private'] = __webpack_require__(136); +formats['auto'] = __webpack_require__(423); +formats['pem'] = __webpack_require__(79); +formats['pkcs1'] = __webpack_require__(294); +formats['pkcs8'] = __webpack_require__(148); +formats['rfc4253'] = __webpack_require__(96); +formats['ssh'] = __webpack_require__(424); +formats['ssh-private'] = __webpack_require__(183); formats['openssh'] = formats['ssh-private']; -formats['dnssec'] = __webpack_require__(197); +formats['dnssec'] = __webpack_require__(293); function Key(opts) { assert.object(opts, 'options'); @@ -4503,13 +5127,305 @@ Key._oldVersionDetect = function (obj) { }; +/***/ }), +/* 27 */ +/***/ (function(module, exports) { + +module.exports = require("assert"); + /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = nullify; +function nullify(obj = {}) { + if (Array.isArray(obj)) { + for (var _iterator = obj, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + const item = _ref; + + nullify(item); + } + } else if (obj !== null && typeof obj === 'object' || typeof obj === 'function') { + Object.setPrototypeOf(obj, null); + + // for..in can only be applied to 'object', not 'function' + if (typeof obj === 'object') { + for (const key in obj) { + nullify(obj[key]); + } + } + } + + return obj; +} + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const escapeStringRegexp = __webpack_require__(355); +const ansiStyles = __webpack_require__(474); +const stdoutColor = __webpack_require__(567).stdout; + +const template = __webpack_require__(568); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + // Copyright 2015 Joyent, Inc. -var Buffer = __webpack_require__(19).Buffer; +var Buffer = __webpack_require__(14).Buffer; var algInfo = { 'dsa': { @@ -4678,7 +5594,7 @@ module.exports = { /***/ }), -/* 29 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -4686,42 +5602,42 @@ module.exports = { module.exports = PrivateKey; var assert = __webpack_require__(15); -var Buffer = __webpack_require__(19).Buffer; -var algs = __webpack_require__(28); -var crypto = __webpack_require__(16); -var Fingerprint = __webpack_require__(103); -var Signature = __webpack_require__(53); -var errs = __webpack_require__(52); -var util = __webpack_require__(4); +var Buffer = __webpack_require__(14).Buffer; +var algs = __webpack_require__(31); +var crypto = __webpack_require__(11); +var Fingerprint = __webpack_require__(147); +var Signature = __webpack_require__(67); +var errs = __webpack_require__(66); +var util = __webpack_require__(3); var utils = __webpack_require__(25); -var dhe = __webpack_require__(196); +var dhe = __webpack_require__(292); var generateECDSA = dhe.generateECDSA; var generateED25519 = dhe.generateED25519; var edCompat; var nacl; try { - edCompat = __webpack_require__(311); + edCompat = __webpack_require__(422); } catch (e) { /* Just continue through, and bail out if we try to use it. */ } -var Key = __webpack_require__(27); +var Key = __webpack_require__(26); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var KeyParseError = errs.KeyParseError; var KeyEncryptedError = errs.KeyEncryptedError; var formats = {}; -formats['auto'] = __webpack_require__(312); -formats['pem'] = __webpack_require__(64); -formats['pkcs1'] = __webpack_require__(198); -formats['pkcs8'] = __webpack_require__(104); -formats['rfc4253'] = __webpack_require__(71); -formats['ssh-private'] = __webpack_require__(136); +formats['auto'] = __webpack_require__(423); +formats['pem'] = __webpack_require__(79); +formats['pkcs1'] = __webpack_require__(294); +formats['pkcs8'] = __webpack_require__(148); +formats['rfc4253'] = __webpack_require__(96); +formats['ssh-private'] = __webpack_require__(183); formats['openssh'] = formats['ssh-private']; formats['ssh'] = formats['ssh-private']; -formats['dnssec'] = __webpack_require__(197); +formats['dnssec'] = __webpack_require__(293); function PrivateKey(opts) { assert.object(opts, 'options'); @@ -4774,7 +5690,7 @@ PrivateKey.prototype.derive = function (newType) { if (this.type === 'ed25519' && newType === 'curve25519') { if (nacl === undefined) - nacl = __webpack_require__(54); + nacl = __webpack_require__(68); priv = this.part.k.data; if (priv[0] === 0x00) @@ -4792,7 +5708,7 @@ PrivateKey.prototype.derive = function (newType) { })); } else if (this.type === 'curve25519' && newType === 'ed25519') { if (nacl === undefined) - nacl = __webpack_require__(54); + nacl = __webpack_require__(68); priv = this.part.k.data; if (priv[0] === 0x00) @@ -4937,6590 +5853,5314 @@ PrivateKey._oldVersionDetect = function (obj) { /***/ }), -/* 30 */ -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); -if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - -/***/ }), -/* 31 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { -var store = __webpack_require__(173)('wks') - , uid = __webpack_require__(122) - , Symbol = __webpack_require__(30).Symbol - , USE_SYMBOL = typeof Symbol == 'function'; +"use strict"; -var $exports = module.exports = function(name){ - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; -$exports.store = store; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.wrapLifecycle = exports.run = exports.install = exports.Install = undefined; -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { +var _extends2; -/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** - * @license - * Lodash - * Copyright JS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -;(function() { +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(21)); +} - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; +var _asyncToGenerator2; - /** Used as the semantic version number. */ - var VERSION = '4.17.4'; +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; +let install = exports.install = (() => { + var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, lockfile) { + yield wrapLifecycle(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const install = new Install(flags, config, reporter, lockfile); + yield install.init(); + })); + }); - /** Error message constants. */ - var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', - FUNC_ERROR_TEXT = 'Expected a function'; + return function install(_x7, _x8, _x9, _x10) { + return _ref29.apply(this, arguments); + }; +})(); - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; +let run = exports.run = (() => { + var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + let lockfile; + let error = 'installCommandRenamed'; + if (flags.lockfile === false) { + lockfile = new (_lockfile || _load_lockfile()).default(); + } else { + lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + } - /** Used as the maximum memoize cache size. */ - var MAX_MEMOIZE_SIZE = 500; + if (args.length) { + const exampleArgs = args.slice(); - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; + if (flags.saveDev) { + exampleArgs.push('--dev'); + } + if (flags.savePeer) { + exampleArgs.push('--peer'); + } + if (flags.saveOptional) { + exampleArgs.push('--optional'); + } + if (flags.saveExact) { + exampleArgs.push('--exact'); + } + if (flags.saveTilde) { + exampleArgs.push('--tilde'); + } + let command = 'add'; + if (flags.global) { + error = 'globalFlagRemoved'; + command = 'global add'; + } + throw new (_errors || _load_errors()).MessageError(reporter.lang(error, `yarn ${command} ${exampleArgs.join(' ')}`)); + } - /** Used to compose bitmasks for cloning. */ - var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; + yield install(config, reporter, flags, lockfile); + }); - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; + return function run(_x11, _x12, _x13, _x14) { + return _ref31.apply(this, arguments); + }; +})(); - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; +let wrapLifecycle = exports.wrapLifecycle = (() => { + var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags, factory) { + yield config.executeLifecycleScript('preinstall'); - /** Used as default options for `_.truncate`. */ - var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; + yield factory(); - /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 800, - HOT_SPAN = 16; + // npm behaviour, seems kinda funky but yay compatibility + yield config.executeLifecycleScript('install'); + yield config.executeLifecycleScript('postinstall'); - /** Used to indicate the type of lazy iteratees. */ - var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2, - LAZY_WHILE_FLAG = 3; + if (!config.production) { + if (!config.disablePrepublish) { + yield config.executeLifecycleScript('prepublish'); + } + yield config.executeLifecycleScript('prepare'); + } + }); - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; + return function wrapLifecycle(_x15, _x16, _x17) { + return _ref32.apply(this, arguments); + }; +})(); - /** Used as references for the maximum length and index of an array. */ - var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; - /** Used to associate wrap methods with their bit flags. */ - var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] - ]; +var _hooks; - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - domExcTag = '[object DOMException]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]', - weakSetTag = '[object WeakSet]'; +function _load_hooks() { + return _hooks = __webpack_require__(550); +} - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; +var _index; - /** Used to match empty string literals in compiled template source. */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; +function _load_index() { + return _index = _interopRequireDefault(__webpack_require__(210)); +} - /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, - reUnescapedHtml = /[&<>"']/g, - reHasEscapedHtml = RegExp(reEscapedHtml.source), - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); +var _errors; - /** Used to match template delimiters. */ - var reEscape = /<%-([\s\S]+?)%>/g, - reEvaluate = /<%([\s\S]+?)%>/g, - reInterpolate = /<%=([\s\S]+?)%>/g; +function _load_errors() { + return _errors = __webpack_require__(5); +} - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +var _integrityChecker; - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); +function _load_integrityChecker() { + return _integrityChecker = _interopRequireDefault(__webpack_require__(199)); +} - /** Used to match leading and trailing whitespace. */ - var reTrim = /^\s+|\s+$/g, - reTrimStart = /^\s+/, - reTrimEnd = /\s+$/; +var _lockfile; - /** Used to match wrap detail comments. */ - var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, - reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(18)); +} - /** Used to match words composed of alphanumeric characters. */ - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; +var _lockfile2; - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; +function _load_lockfile2() { + return _lockfile2 = __webpack_require__(18); +} - /** - * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). - */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; +var _packageFetcher; - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; +function _load_packageFetcher() { + return _packageFetcher = _interopRequireWildcard(__webpack_require__(200)); +} - /** Used to detect bad signed hexadecimal string values. */ - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; +var _packageInstallScripts; - /** Used to detect binary string values. */ - var reIsBinary = /^0b[01]+$/i; +function _load_packageInstallScripts() { + return _packageInstallScripts = _interopRequireDefault(__webpack_require__(525)); +} - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; +var _packageCompatibility; - /** Used to detect octal string values. */ - var reIsOctal = /^0o[0-7]+$/i; +function _load_packageCompatibility() { + return _packageCompatibility = _interopRequireWildcard(__webpack_require__(332)); +} - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; +var _packageResolver; - /** Used to match Latin Unicode letters (excluding mathematical operators). */ - var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; +function _load_packageResolver() { + return _packageResolver = _interopRequireDefault(__webpack_require__(334)); +} - /** Used to ensure capturing order of template delimiters. */ - var reNoMatch = /($^)/; +var _packageLinker; - /** Used to match unescaped characters in compiled string literals. */ - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; +function _load_packageLinker() { + return _packageLinker = _interopRequireDefault(__webpack_require__(201)); +} - /** Used to compose unicode character classes. */ - var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; +var _index2; - /** Used to compose unicode capture groups. */ - var rsApos = "['\u2019]", - rsAstral = '[' + rsAstralRange + ']', - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; +function _load_index2() { + return _index2 = __webpack_require__(52); +} - /** Used to compose unicode regexes. */ - var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', - rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; +var _index3; - /** Used to match apostrophes. */ - var reApos = RegExp(rsApos, 'g'); +function _load_index3() { + return _index3 = __webpack_require__(71); +} - /** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ - var reComboMark = RegExp(rsCombo, 'g'); +var _autoclean; - /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); +function _load_autoclean() { + return _autoclean = __webpack_require__(321); +} - /** Used to match complex or compound words. */ - var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji - ].join('|'), 'g'); +var _constants; - /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(9)); +} - /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; +var _normalizePattern; - /** Used to assign default `context` object properties. */ - var contextProps = [ - 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', - 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', - 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', - 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', - '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' - ]; +function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(36); +} - /** Used to make template sourceURLs easier to identify. */ - var templateCounter = -1; +var _fs; - /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = - typedArrayTags[errorTag] = typedArrayTags[funcTag] = - typedArrayTags[mapTag] = typedArrayTags[numberTag] = - typedArrayTags[objectTag] = typedArrayTags[regexpTag] = - typedArrayTags[setTag] = typedArrayTags[stringTag] = - typedArrayTags[weakMapTag] = false; +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(6)); +} - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = - cloneableTags[boolTag] = cloneableTags[dateTag] = - cloneableTags[float32Tag] = cloneableTags[float64Tag] = - cloneableTags[int8Tag] = cloneableTags[int16Tag] = - cloneableTags[int32Tag] = cloneableTags[mapTag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[setTag] = - cloneableTags[stringTag] = cloneableTags[symbolTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[weakMapTag] = false; +var _map; - /** Used to map Latin Unicode letters to basic Latin letters. */ - var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 's' - }; +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(28)); +} - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; +var _yarnVersion; - /** Used to map HTML entities to characters. */ - var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" - }; +function _load_yarnVersion() { + return _yarnVersion = __webpack_require__(112); +} - /** Used to escape characters for inclusion in compiled string literals. */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; +var _generatePnpMap; - /** Built-in method references without a dependency on `root`. */ - var freeParseFloat = parseFloat, - freeParseInt = parseInt; +function _load_generatePnpMap() { + return _generatePnpMap = __webpack_require__(547); +} - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; +var _workspaceLayout; - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +function _load_workspaceLayout() { + return _workspaceLayout = _interopRequireDefault(__webpack_require__(84)); +} - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); +var _resolutionMap; - /** Detect free variable `exports`. */ - var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; +function _load_resolutionMap() { + return _resolutionMap = _interopRequireDefault(__webpack_require__(204)); +} - /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +var _guessName; - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; +function _load_guessName() { + return _guessName = _interopRequireDefault(__webpack_require__(160)); +} - /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; +var _audit; - /** Used to access faster Node.js helpers. */ - var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} - }()); +function _load_audit() { + return _audit = _interopRequireDefault(__webpack_require__(320)); +} - /* Node.js helper references. */ - var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, - nodeIsDate = nodeUtil && nodeUtil.isDate, - nodeIsMap = nodeUtil && nodeUtil.isMap, - nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, - nodeIsSet = nodeUtil && nodeUtil.isSet, - nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - /*--------------------------------------------------------------------------*/ +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ - function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; - } +const deepEqual = __webpack_require__(600); - /** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ - function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; - } +const emoji = __webpack_require__(270); +const invariant = __webpack_require__(8); +const path = __webpack_require__(0); +const semver = __webpack_require__(20); +const uuid = __webpack_require__(111); +const ssri = __webpack_require__(70); - /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ - function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); - } +const ONE_DAY = 1000 * 60 * 60 * 24; - /** - * A specialized version of `baseAggregator` for arrays. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ - function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, - length = array == null ? 0 : array.length; +/** + * Try and detect the installation method for Yarn and provide a command to update it with. + */ - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); - } - return accumulator; +function getUpdateCommand(installationMethod) { + if (installationMethod === 'tar') { + return `curl --compressed -o- -L ${(_constants || _load_constants()).YARN_INSTALLER_SH} | bash`; } - /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; + if (installationMethod === 'homebrew') { + return 'brew upgrade yarn'; + } - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; + if (installationMethod === 'deb') { + return 'sudo apt-get update && sudo apt-get install yarn'; } - /** - * A specialized version of `_.forEachRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; + if (installationMethod === 'rpm') { + return 'sudo yum install yarn'; + } - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; + if (installationMethod === 'npm') { + return 'npm install --global yarn'; } - /** - * A specialized version of `_.every` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ - function arrayEvery(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + if (installationMethod === 'chocolatey') { + return 'choco upgrade yarn'; + } - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; + if (installationMethod === 'apk') { + return 'apk update && apk add -u yarn'; } - /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + return null; +} - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; +function getUpdateInstaller(installationMethod) { + // Windows + if (installationMethod === 'msi') { + return (_constants || _load_constants()).YARN_INSTALLER_MSI; } - /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; - } + return null; +} - /** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; +function normalizeFlags(config, rawFlags) { + const flags = { + // install + har: !!rawFlags.har, + ignorePlatform: !!rawFlags.ignorePlatform, + ignoreEngines: !!rawFlags.ignoreEngines, + ignoreScripts: !!rawFlags.ignoreScripts, + ignoreOptional: !!rawFlags.ignoreOptional, + force: !!rawFlags.force, + flat: !!rawFlags.flat, + lockfile: rawFlags.lockfile !== false, + pureLockfile: !!rawFlags.pureLockfile, + updateChecksums: !!rawFlags.updateChecksums, + skipIntegrityCheck: !!rawFlags.skipIntegrityCheck, + frozenLockfile: !!rawFlags.frozenLockfile, + linkDuplicates: !!rawFlags.linkDuplicates, + checkFiles: !!rawFlags.checkFiles, + audit: !!rawFlags.audit, - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; - } + // add + peer: !!rawFlags.peer, + dev: !!rawFlags.dev, + optional: !!rawFlags.optional, + exact: !!rawFlags.exact, + tilde: !!rawFlags.tilde, + ignoreWorkspaceRootCheck: !!rawFlags.ignoreWorkspaceRootCheck, - /** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); + // outdated, update-interactive + includeWorkspaceDeps: !!rawFlags.includeWorkspaceDeps, - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } + // add, remove, update + workspaceRootIsCwd: rawFlags.workspaceRootIsCwd !== false + }; - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; + if (config.getOption('ignore-scripts')) { + flags.ignoreScripts = true; + } - while (++index < length) { - array[offset + index] = values[index]; - } - return array; + if (config.getOption('ignore-platform')) { + flags.ignorePlatform = true; } - /** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; + if (config.getOption('ignore-engines')) { + flags.ignoreEngines = true; + } - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; + if (config.getOption('ignore-optional')) { + flags.ignoreOptional = true; } - /** - * A specialized version of `_.reduceRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the last element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; + if (config.getOption('force')) { + flags.force = true; } - /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + return flags; +} - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; +class Install { + constructor(flags, config, reporter, lockfile) { + this.rootManifestRegistries = []; + this.rootPatternsToOrigin = (0, (_map || _load_map()).default)(); + this.lockfile = lockfile; + this.reporter = reporter; + this.config = config; + this.flags = normalizeFlags(config, flags); + this.resolutions = (0, (_map || _load_map()).default)(); // Legacy resolutions field used for flat install mode + this.resolutionMap = new (_resolutionMap || _load_resolutionMap()).default(config); // Selective resolutions for nested dependencies + this.resolver = new (_packageResolver || _load_packageResolver()).default(config, lockfile, this.resolutionMap); + this.integrityChecker = new (_integrityChecker || _load_integrityChecker()).default(config); + this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver); + this.scripts = new (_packageInstallScripts || _load_packageInstallScripts()).default(config, this.resolver, this.flags.force); } /** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. + * Create a list of dependency requests from the current directories manifests. */ - var asciiSize = baseProperty('length'); - /** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function asciiToArray(string) { - return string.split(''); - } + fetchRequestFromCwd(excludePatterns = [], ignoreUnusedPatterns = false) { + var _this = this; - /** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function asciiWords(string) { - return string.match(reAsciiWord) || []; - } + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const patterns = []; + const deps = []; + let resolutionDeps = []; + const manifest = {}; - /** - * The base implementation of methods like `_.findKey` and `_.findLastKey`, - * without support for iteratee shorthands, which iterates over `collection` - * using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the found element or its key, else `undefined`. - */ - function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = key; - return false; - } - }); - return result; - } + const ignorePatterns = []; + const usedPatterns = []; + let workspaceLayout; - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); + // some commands should always run in the context of the entire workspace + const cwd = _this.flags.includeWorkspaceDeps || _this.flags.workspaceRootIsCwd ? _this.config.lockfileFolder : _this.config.cwd; - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } + // non-workspaces are always root, otherwise check for workspace root + const cwdIsRoot = !_this.config.workspaceRootFolder || _this.config.lockfileFolder === cwd; - /** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); - } + // exclude package names that are in install args + const excludeNames = []; + for (var _iterator = excludePatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; - /** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } - while (++index < length) { - if (comparator(array[index], value)) { - return index; + const pattern = _ref; + + if ((0, (_index3 || _load_index3()).getExoticResolver)(pattern)) { + excludeNames.push((0, (_guessName || _load_guessName()).default)(pattern)); + } else { + // extract the name + const parts = (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern); + excludeNames.push(parts.name); + } } - } - return -1; - } - /** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ - function baseIsNaN(value) { - return value !== value; - } + const stripExcluded = function stripExcluded(manifest) { + for (var _iterator2 = excludeNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; - /** - * The base implementation of `_.mean` and `_.meanBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the mean. - */ - function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? (baseSum(array, iteratee) / length) : NAN; - } + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } + const exclude = _ref2; - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } + if (manifest.dependencies && manifest.dependencies[exclude]) { + delete manifest.dependencies[exclude]; + } + if (manifest.devDependencies && manifest.devDependencies[exclude]) { + delete manifest.devDependencies[exclude]; + } + if (manifest.optionalDependencies && manifest.optionalDependencies[exclude]) { + delete manifest.optionalDependencies[exclude]; + } + } + }; - /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } + for (var _iterator3 = Object.keys((_index2 || _load_index2()).registries), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; - /** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ - function baseSortBy(array, comparer) { - var length = array.length; + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; - } + const registry = _ref3; - /** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ - function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; + const filename = (_index2 || _load_index2()).registries[registry].filename; - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); + const loc = path.join(cwd, filename); + if (!(yield (_fs || _load_fs()).exists(loc))) { + continue; + } + + _this.rootManifestRegistries.push(registry); + + const projectManifestJson = yield _this.config.readJson(loc); + yield (0, (_index || _load_index()).default)(projectManifestJson, cwd, _this.config, cwdIsRoot); + + Object.assign(_this.resolutions, projectManifestJson.resolutions); + Object.assign(manifest, projectManifestJson); + + _this.resolutionMap.init(_this.resolutions); + for (var _iterator4 = Object.keys(_this.resolutionMap.resolutionsByPackage), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + const packageName = _ref4; + + for (var _iterator8 = _this.resolutionMap.resolutionsByPackage[packageName], _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref9; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref9 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref9 = _i8.value; + } + + const _ref8 = _ref9; + const pattern = _ref8.pattern; + + resolutionDeps = [...resolutionDeps, { registry, pattern, optional: false, hint: 'resolution' }]; + } + } + + const pushDeps = function pushDeps(depType, manifest, { hint, optional }, isUsed) { + if (ignoreUnusedPatterns && !isUsed) { + return; + } + // We only take unused dependencies into consideration to get deterministic hoisting. + // Since flat mode doesn't care about hoisting and everything is top level and specified then we can safely + // leave these out. + if (_this.flags.flat && !isUsed) { + return; + } + const depMap = manifest[depType]; + for (const name in depMap) { + if (excludeNames.indexOf(name) >= 0) { + continue; + } + + let pattern = name; + if (!_this.lockfile.getLocked(pattern)) { + // when we use --save we save the dependency to the lockfile with just the name rather than the + // version combo + pattern += '@' + depMap[name]; + } + + // normalization made sure packages are mentioned only once + if (isUsed) { + usedPatterns.push(pattern); + } else { + ignorePatterns.push(pattern); + } + + _this.rootPatternsToOrigin[pattern] = depType; + patterns.push(pattern); + deps.push({ pattern, registry, hint, optional, workspaceName: manifest.name, workspaceLoc: manifest._loc }); + } + }; + + if (cwdIsRoot) { + pushDeps('dependencies', projectManifestJson, { hint: null, optional: false }, true); + pushDeps('devDependencies', projectManifestJson, { hint: 'dev', optional: false }, !_this.config.production); + pushDeps('optionalDependencies', projectManifestJson, { hint: 'optional', optional: true }, true); + } + + if (_this.config.workspaceRootFolder) { + const workspaceLoc = cwdIsRoot ? loc : path.join(_this.config.lockfileFolder, filename); + const workspacesRoot = path.dirname(workspaceLoc); + + let workspaceManifestJson = projectManifestJson; + if (!cwdIsRoot) { + // the manifest we read before was a child workspace, so get the root + workspaceManifestJson = yield _this.config.readJson(workspaceLoc); + yield (0, (_index || _load_index()).default)(workspaceManifestJson, workspacesRoot, _this.config, true); + } + + const workspaces = yield _this.config.resolveWorkspaces(workspacesRoot, workspaceManifestJson); + workspaceLayout = new (_workspaceLayout || _load_workspaceLayout()).default(workspaces, _this.config); + + // add virtual manifest that depends on all workspaces, this way package hoisters and resolvers will work fine + const workspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.dependencies); + for (var _iterator5 = Object.keys(workspaces), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + const workspaceName = _ref5; + + const workspaceManifest = workspaces[workspaceName].manifest; + workspaceDependencies[workspaceName] = workspaceManifest.version; + + // include dependencies from all workspaces + if (_this.flags.includeWorkspaceDeps) { + pushDeps('dependencies', workspaceManifest, { hint: null, optional: false }, true); + pushDeps('devDependencies', workspaceManifest, { hint: 'dev', optional: false }, !_this.config.production); + pushDeps('optionalDependencies', workspaceManifest, { hint: 'optional', optional: true }, true); + } + } + const virtualDependencyManifest = { + _uid: '', + name: `workspace-aggregator-${uuid.v4()}`, + version: '1.0.0', + _registry: 'npm', + _loc: workspacesRoot, + dependencies: workspaceDependencies, + devDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.devDependencies), + optionalDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.optionalDependencies), + private: workspaceManifestJson.private, + workspaces: workspaceManifestJson.workspaces + }; + workspaceLayout.virtualManifestName = virtualDependencyManifest.name; + const virtualDep = {}; + virtualDep[virtualDependencyManifest.name] = virtualDependencyManifest.version; + workspaces[virtualDependencyManifest.name] = { loc: workspacesRoot, manifest: virtualDependencyManifest }; + + // ensure dependencies that should be excluded are stripped from the correct manifest + stripExcluded(cwdIsRoot ? virtualDependencyManifest : workspaces[projectManifestJson.name].manifest); + + pushDeps('workspaces', { workspaces: virtualDep }, { hint: 'workspaces', optional: false }, true); + + const implicitWorkspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceDependencies); + + for (var _iterator6 = (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + const type = _ref6; + + for (var _iterator7 = Object.keys(projectManifestJson[type] || {}), _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + const dependencyName = _ref7; + + delete implicitWorkspaceDependencies[dependencyName]; + } + } + + pushDeps('dependencies', { dependencies: implicitWorkspaceDependencies }, { hint: 'workspaces', optional: false }, true); + } + + break; } - } - return result; - } - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); + // inherit root flat flag + if (manifest.flat) { + _this.flags.flat = true; + } - while (++index < n) { - result[index] = iteratee(index); - } - return result; + return { + requests: [...resolutionDeps, ...deps], + patterns, + manifest, + usedPatterns, + ignorePatterns, + workspaceLayout + }; + })(); } /** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. + * TODO description */ - function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); - } - /** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ - function baseUnary(func) { - return function(value) { - return func(value); - }; + prepareRequests(requests) { + return requests; } - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); + preparePatterns(patterns) { + return patterns; } - - /** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function cacheHas(cache, key) { - return cache.has(key); + preparePatternsForLinking(patterns, cwdManifest, cwdIsRoot) { + return patterns; } - /** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ - function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; + prepareManifests() { + var _this2 = this; - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const manifests = yield _this2.config.getRootManifests(); + return manifests; + })(); } - /** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ - function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; + bailout(patterns, workspaceLayout) { + var _this3 = this; - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // We don't want to skip the audit - it could yield important errors + if (_this3.flags.audit) { + return false; + } + // PNP is so fast that the integrity check isn't pertinent + if (_this3.config.plugnplayEnabled) { + return false; + } + if (_this3.flags.skipIntegrityCheck || _this3.flags.force) { + return false; + } + const lockfileCache = _this3.lockfile.cache; + if (!lockfileCache) { + return false; + } + const lockfileClean = _this3.lockfile.parseResultType === 'success'; + const match = yield _this3.integrityChecker.check(patterns, lockfileCache, _this3.flags, workspaceLayout); + if (_this3.flags.frozenLockfile && (!lockfileClean || match.missingPatterns.length > 0)) { + throw new (_errors || _load_errors()).MessageError(_this3.reporter.lang('frozenLockfileError')); + } - /** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ - function countHolders(array, placeholder) { - var length = array.length, - result = 0; + const haveLockfile = yield (_fs || _load_fs()).exists(path.join(_this3.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME)); - while (length--) { - if (array[length] === placeholder) { - ++result; + const lockfileIntegrityPresent = !_this3.lockfile.hasEntriesExistWithoutIntegrity(); + const integrityBailout = lockfileIntegrityPresent || !_this3.config.autoAddIntegrity; + + if (match.integrityMatches && haveLockfile && lockfileClean && integrityBailout) { + _this3.reporter.success(_this3.reporter.lang('upToDate')); + return true; } - } - return result; - } - /** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ - var deburrLetter = basePropertyOf(deburredLetters); + if (match.integrityFileMissing && haveLockfile) { + // Integrity file missing, force script installations + _this3.scripts.setForce(true); + return false; + } - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - var escapeHtmlChar = basePropertyOf(htmlEscapes); + if (match.hardRefreshRequired) { + // e.g. node version doesn't match, force script installations + _this3.scripts.setForce(true); + return false; + } - /** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; - } + if (!patterns.length && !match.integrityFileMissing) { + _this3.reporter.success(_this3.reporter.lang('nothingToInstall')); + yield _this3.createEmptyManifestFolders(); + yield _this3.saveLockfileAndIntegrity(patterns, workspaceLayout); + return true; + } - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; + return false; + })(); } /** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. + * Produce empty folders for all used root manifests. */ - function hasUnicode(string) { - return reHasUnicode.test(string); + + createEmptyManifestFolders() { + var _this4 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (_this4.config.modulesFolder) { + // already created + return; + } + + for (var _iterator9 = _this4.rootManifestRegistries, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref10; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref10 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref10 = _i9.value; + } + + const registryName = _ref10; + const folder = _this4.config.registries[registryName].folder; + + yield (_fs || _load_fs()).mkdirp(path.join(_this4.config.lockfileFolder, folder)); + } + })(); } /** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. + * TODO description */ - function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); + + markIgnored(patterns) { + for (var _iterator10 = patterns, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref11; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref11 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref11 = _i10.value; + } + + const pattern = _ref11; + + const manifest = this.resolver.getStrictResolvedPattern(pattern); + const ref = manifest._reference; + invariant(ref, 'expected package reference'); + + // just mark the package as ignored. if the package is used by a required package, the hoister + // will take care of that. + ref.ignore = true; + } } /** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. + * helper method that gets only recent manifests + * used by global.ls command */ - function iteratorToArray(iterator) { - var data, - result = []; + getFlattenedDeps() { + var _this5 = this; - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref12 = yield _this5.fetchRequestFromCwd(); + + const depRequests = _ref12.requests, + rawPatterns = _ref12.patterns; + + + yield _this5.resolver.init(depRequests, {}); + + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this5.resolver.getManifests(), _this5.config); + _this5.resolver.updateManifests(manifests); + + return _this5.flatten(rawPatterns); + })(); } /** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. + * TODO description */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; - } + init() { + var _this6 = this; - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.checkUpdate(); - /** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ - function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; + // warn if we have a shrinkwrap + if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_SHRINKWRAP_FILENAME))) { + _this6.reporter.warn(_this6.reporter.lang('shrinkwrapWarning')); + } - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; + // warn if we have an npm lockfile + if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_LOCK_FILENAME))) { + _this6.reporter.warn(_this6.reporter.lang('npmLockfileWarning')); } - } - return result; - } - /** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ - function setToArray(set) { - var index = -1, - result = Array(set.size); + let flattenedTopLevelPatterns = []; + const steps = []; - set.forEach(function(value) { - result[++index] = value; - }); - return result; - } + var _ref13 = yield _this6.fetchRequestFromCwd(); - /** - * Converts `set` to its value-value pairs. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the value-value pairs. - */ - function setToPairs(set) { - var index = -1, - result = Array(set.size); + const depRequests = _ref13.requests, + rawPatterns = _ref13.patterns, + ignorePatterns = _ref13.ignorePatterns, + workspaceLayout = _ref13.workspaceLayout, + manifest = _ref13.manifest; - set.forEach(function(value) { - result[++index] = [value, value]; - }); - return result; - } + let topLevelPatterns = []; - /** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; + const artifacts = yield _this6.integrityChecker.getArtifacts(); + if (artifacts) { + _this6.linker.setArtifacts(artifacts); + _this6.scripts.setArtifacts(artifacts); + } - while (++index < length) { - if (array[index] === value) { - return index; + if ((_packageCompatibility || _load_packageCompatibility()).shouldCheck(manifest, _this6.flags)) { + steps.push((() => { + var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + _this6.reporter.step(curr, total, _this6.reporter.lang('checkingManifest'), emoji.get('mag')); + yield _this6.checkCompatibility(); + }); + + return function (_x, _x2) { + return _ref14.apply(this, arguments); + }; + })()); } - } - return -1; - } - /** - * A specialized version of `_.lastIndexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; + const audit = new (_audit || _load_audit()).default(_this6.config, _this6.reporter); + let auditFoundProblems = false; + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('resolveStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.reporter.lang('resolvingPackages'), emoji.get('mag')); + yield _this6.resolver.init(_this6.prepareRequests(depRequests), { + isFlat: _this6.flags.flat, + isFrozen: _this6.flags.frozenLockfile, + workspaceLayout + }); + topLevelPatterns = _this6.preparePatterns(rawPatterns); + flattenedTopLevelPatterns = yield _this6.flatten(topLevelPatterns); + return { bailout: !_this6.flags.audit && (yield _this6.bailout(topLevelPatterns, workspaceLayout)) }; + })); + }); + + if (_this6.flags.audit) { + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('auditStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.reporter.lang('auditRunning'), emoji.get('mag')); + if (_this6.flags.offline) { + _this6.reporter.warn(_this6.reporter.lang('auditOffline')); + return { bailout: false }; + } + const preparedManifests = yield _this6.prepareManifests(); + // $FlowFixMe - Flow considers `m` in the map operation to be "mixed", so does not recognize `m.object` + const mergedManifest = Object.assign({}, ...Object.values(preparedManifests).map(function (m) { + return m.object; + })); + const auditVulnerabilityCounts = yield audit.performAudit(mergedManifest, _this6.lockfile, _this6.resolver, _this6.linker, topLevelPatterns); + auditFoundProblems = auditVulnerabilityCounts.info || auditVulnerabilityCounts.low || auditVulnerabilityCounts.moderate || auditVulnerabilityCounts.high || auditVulnerabilityCounts.critical; + return { bailout: yield _this6.bailout(topLevelPatterns, workspaceLayout) }; + })); + }); } - } - return index; + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('fetchStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.markIgnored(ignorePatterns); + _this6.reporter.step(curr, total, _this6.reporter.lang('fetchingPackages'), emoji.get('truck')); + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this6.resolver.getManifests(), _this6.config); + _this6.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(_this6.resolver.getManifests(), _this6.config, _this6.flags.ignoreEngines); + })); + }); + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('linkStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // remove integrity hash to make this operation atomic + yield _this6.integrityChecker.removeIntegrityFile(); + _this6.reporter.step(curr, total, _this6.reporter.lang('linkingDependencies'), emoji.get('link')); + flattenedTopLevelPatterns = _this6.preparePatternsForLinking(flattenedTopLevelPatterns, manifest, _this6.config.lockfileFolder === _this6.config.cwd); + yield _this6.linker.init(flattenedTopLevelPatterns, workspaceLayout, { + linkDuplicates: _this6.flags.linkDuplicates, + ignoreOptional: _this6.flags.ignoreOptional + }); + })); + }); + + if (_this6.config.plugnplayEnabled) { + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('pnpStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const pnpPath = `${_this6.config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`; + + const code = yield (0, (_generatePnpMap || _load_generatePnpMap()).generatePnpMap)(_this6.config, flattenedTopLevelPatterns, { + resolver: _this6.resolver, + reporter: _this6.reporter, + targetPath: pnpPath, + workspaceLayout + }); + + try { + const file = yield (_fs || _load_fs()).readFile(pnpPath); + if (file === code) { + return; + } + } catch (error) {} + + yield (_fs || _load_fs()).writeFile(pnpPath, code); + yield (_fs || _load_fs()).chmod(pnpPath, 0o755); + })); + }); + } + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('buildStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.flags.force ? _this6.reporter.lang('rebuildingPackages') : _this6.reporter.lang('buildingFreshPackages'), emoji.get('hammer')); + + if (_this6.config.ignoreScripts) { + _this6.reporter.warn(_this6.reporter.lang('ignoredScripts')); + } else { + yield _this6.scripts.init(flattenedTopLevelPatterns); + } + })); + }); + + if (_this6.flags.har) { + steps.push((() => { + var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + const formattedDate = new Date().toISOString().replace(/:/g, '-'); + const filename = `yarn-install_${formattedDate}.har`; + _this6.reporter.step(curr, total, _this6.reporter.lang('savingHar', filename), emoji.get('black_circle_for_record')); + yield _this6.config.requestManager.saveHar(filename); + }); + + return function (_x3, _x4) { + return _ref21.apply(this, arguments); + }; + })()); + } + + if (yield _this6.shouldClean()) { + steps.push((() => { + var _ref22 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + _this6.reporter.step(curr, total, _this6.reporter.lang('cleaningModules'), emoji.get('recycle')); + yield (0, (_autoclean || _load_autoclean()).clean)(_this6.config, _this6.reporter); + }); + + return function (_x5, _x6) { + return _ref22.apply(this, arguments); + }; + })()); + } + + let currentStep = 0; + for (var _iterator11 = steps, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { + var _ref23; + + if (_isArray11) { + if (_i11 >= _iterator11.length) break; + _ref23 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) break; + _ref23 = _i11.value; + } + + const step = _ref23; + + const stepResult = yield step(++currentStep, steps.length); + if (stepResult && stepResult.bailout) { + if (_this6.flags.audit) { + audit.summary(); + } + if (auditFoundProblems) { + _this6.reporter.warn(_this6.reporter.lang('auditRunAuditForDetails')); + } + _this6.maybeOutputUpdate(); + return flattenedTopLevelPatterns; + } + } + + // fin! + if (_this6.flags.audit) { + audit.summary(); + } + if (auditFoundProblems) { + _this6.reporter.warn(_this6.reporter.lang('auditRunAuditForDetails')); + } + yield _this6.saveLockfileAndIntegrity(topLevelPatterns, workspaceLayout); + yield _this6.persistChanges(); + _this6.maybeOutputUpdate(); + _this6.config.requestManager.clearCache(); + return flattenedTopLevelPatterns; + })(); } - /** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ - function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); + checkCompatibility() { + var _this7 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref24 = yield _this7.fetchRequestFromCwd(); + + const manifest = _ref24.manifest; + + yield (_packageCompatibility || _load_packageCompatibility()).checkOne((0, (_extends2 || _load_extends()).default)({ _reference: {} }, manifest), _this7.config, _this7.flags.ignoreEngines); + })(); } - /** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); + persistChanges() { + var _this8 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // get all the different registry manifests in this folder + const manifests = yield _this8.config.getRootManifests(); + + if (yield _this8.applyChanges(manifests)) { + yield _this8.config.saveRootManifests(manifests); + } + })(); } - /** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ - var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + applyChanges(manifests) { + let hasChanged = false; - /** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ - function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; + if (this.config.plugnplayPersist) { + const object = manifests.npm.object; + + + if (typeof object.installConfig !== 'object') { + object.installConfig = {}; + } + + if (this.config.plugnplayEnabled && object.installConfig.pnp !== true) { + object.installConfig.pnp = true; + hasChanged = true; + } else if (!this.config.plugnplayEnabled && typeof object.installConfig.pnp !== 'undefined') { + delete object.installConfig.pnp; + hasChanged = true; + } + + if (Object.keys(object.installConfig).length === 0) { + delete object.installConfig; + } } - return result; + + return Promise.resolve(hasChanged); } /** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. + * Check if we should run the cleaning step. */ - function unicodeToArray(string) { - return string.match(reUnicode) || []; + + shouldClean() { + return (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).CLEAN_FILENAME)); } /** - * Splits a Unicode `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. + * TODO */ - function unicodeWords(string) { - return string.match(reUnicodeWord) || []; - } - /*--------------------------------------------------------------------------*/ + flatten(patterns) { + var _this9 = this; - /** - * Create a new pristine `lodash` function using the `context` object. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Util - * @param {Object} [context=root] The context object. - * @returns {Function} Returns a new `lodash` function. - * @example - * - * _.mixin({ 'foo': _.constant('foo') }); - * - * var lodash = _.runInContext(); - * lodash.mixin({ 'bar': lodash.constant('bar') }); - * - * _.isFunction(_.foo); - * // => true - * _.isFunction(_.bar); - * // => false - * - * lodash.isFunction(lodash.foo); - * // => false - * lodash.isFunction(lodash.bar); - * // => true - * - * // Create a suped-up `defer` in Node.js. - * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; - */ - var runInContext = (function runInContext(context) { - context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (!_this9.flags.flat) { + return patterns; + } - /** Built-in constructor references. */ - var Array = context.Array, - Date = context.Date, - Error = context.Error, - Function = context.Function, - Math = context.Math, - Object = context.Object, - RegExp = context.RegExp, - String = context.String, - TypeError = context.TypeError; + const flattenedPatterns = []; - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; + for (var _iterator12 = _this9.resolver.getAllDependencyNamesByLevelOrder(patterns), _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { + var _ref25; - /** Used to detect overreaching core-js shims. */ - var coreJsData = context['__core-js_shared__']; + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref25 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref25 = _i12.value; + } - /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; + const name = _ref25; - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + const infos = _this9.resolver.getAllInfoForPackageName(name).filter(function (manifest) { + const ref = manifest._reference; + invariant(ref, 'expected package reference'); + return !ref.ignore; + }); - /** Used to generate unique IDs. */ - var idCounter = 0; + if (infos.length === 0) { + continue; + } - /** Used to detect methods masquerading as native. */ - var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; - }()); + if (infos.length === 1) { + // single version of this package + // take out a single pattern as multiple patterns may have resolved to this package + flattenedPatterns.push(_this9.resolver.patternsByPackage[name][0]); + continue; + } - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var nativeObjectToString = objectProto.toString; + const options = infos.map(function (info) { + const ref = info._reference; + invariant(ref, 'expected reference'); + return { + // TODO `and is required by {PARENT}`, + name: _this9.reporter.lang('manualVersionResolutionOption', ref.patterns.join(', '), info.version), - /** Used to infer the `Object` constructor. */ - var objectCtorString = funcToString.call(Object); + value: info.version + }; + }); + const versions = infos.map(function (info) { + return info.version; + }); + let version; - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = root._; + const resolutionVersion = _this9.resolutions[name]; + if (resolutionVersion && versions.indexOf(resolutionVersion) >= 0) { + // use json `resolution` version + version = resolutionVersion; + } else { + version = yield _this9.reporter.select(_this9.reporter.lang('manualVersionResolution', name), _this9.reporter.lang('answer'), options); + _this9.resolutions[name] = version; + } - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); + flattenedPatterns.push(_this9.resolver.collapseAllVersionsOfPackage(name, version)); + } - /** Built-in value references. */ - var Buffer = moduleExports ? context.Buffer : undefined, - Symbol = context.Symbol, - Uint8Array = context.Uint8Array, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, - symIterator = Symbol ? Symbol.iterator : undefined, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; + // save resolutions to their appropriate root manifest + if (Object.keys(_this9.resolutions).length) { + const manifests = yield _this9.config.getRootManifests(); - var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} - }()); + for (const name in _this9.resolutions) { + const version = _this9.resolutions[name]; - /** Mocked built-ins. */ - var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, - ctxNow = Date && Date.now !== root.Date.now && Date.now, - ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + const patterns = _this9.resolver.patternsByPackage[name]; + if (!patterns) { + continue; + } - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeCeil = Math.ceil, - nativeFloor = Math.floor, - nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeIsFinite = context.isFinite, - nativeJoin = arrayProto.join, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max, - nativeMin = Math.min, - nativeNow = Date.now, - nativeParseInt = context.parseInt, - nativeRandom = Math.random, - nativeReverse = arrayProto.reverse; + let manifest; + for (var _iterator13 = patterns, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { + var _ref26; - /* Built-in method references that are verified to be native. */ - var DataView = getNative(context, 'DataView'), - Map = getNative(context, 'Map'), - Promise = getNative(context, 'Promise'), - Set = getNative(context, 'Set'), - WeakMap = getNative(context, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); + if (_isArray13) { + if (_i13 >= _iterator13.length) break; + _ref26 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) break; + _ref26 = _i13.value; + } - /** Used to store function metadata. */ - var metaMap = WeakMap && new WeakMap; + const pattern = _ref26; - /** Used to lookup unminified function names. */ - var realNames = {}; + manifest = _this9.resolver.getResolvedPattern(pattern); + if (manifest) { + break; + } + } + invariant(manifest, 'expected manifest'); - /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); + const ref = manifest._reference; + invariant(ref, 'expected reference'); - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; + const object = manifests[ref.registry].object; + object.resolutions = object.resolutions || {}; + object.resolutions[name] = version; + } - /*------------------------------------------------------------------------*/ + yield _this9.config.saveRootManifests(manifests); + } - /** - * Creates a `lodash` object which wraps `value` to enable implicit method - * chain sequences. Methods that operate on and return arrays, collections, - * and functions can be chained together. Methods that retrieve a single value - * or may return a primitive value will automatically end the chain sequence - * and return the unwrapped value. Otherwise, the value must be unwrapped - * with `_#value`. - * - * Explicit chain sequences, which must be unwrapped with `_#value`, may be - * enabled using `_.chain`. - * - * The execution of chained methods is lazy, that is, it's deferred until - * `_#value` is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. - * Shortcut fusion is an optimization to merge iteratee calls; this avoids - * the creation of intermediate arrays and can greatly reduce the number of - * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array and iteratees accept only - * one argument. The heuristic for whether a section qualifies for shortcut - * fusion is subject to change. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, - * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, - * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, - * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, - * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, - * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, - * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, - * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, - * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, - * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, - * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, - * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, - * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, - * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, - * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, - * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, - * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, - * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, - * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, - * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, - * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, - * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, - * `zipObject`, `zipObjectDeep`, and `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, - * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, - * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, - * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, - * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, - * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, - * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, - * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, - * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, - * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, - * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, - * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, - * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, - * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, - * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, - * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, - * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, - * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, - * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, - * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, - * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, - * `upperFirst`, `value`, and `words` - * - * @name _ - * @constructor - * @category Seq - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2, 3]); - * - * // Returns an unwrapped value. - * wrapped.reduce(_.add); - * // => 6 - * - * // Returns a wrapped value. - * var squares = wrapped.map(square); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); + return flattenedPatterns; + })(); + } + + /** + * Remove offline tarballs that are no longer required + */ + + pruneOfflineMirror(lockfile) { + var _this10 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const mirror = _this10.config.getOfflineMirrorPath(); + if (!mirror) { + return; + } + + const requiredTarballs = new Set(); + for (const dependency in lockfile) { + const resolved = lockfile[dependency].resolved; + if (resolved) { + const basename = path.basename(resolved.split('#')[0]); + if (dependency[0] === '@' && basename[0] !== '@') { + requiredTarballs.add(`${dependency.split('/')[0]}-${basename}`); + } + requiredTarballs.add(basename); } } - return new LodashWrapper(value); - } - /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ - var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; + const mirrorFiles = yield (_fs || _load_fs()).walk(mirror); + for (var _iterator14 = mirrorFiles, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { + var _ref27; + + if (_isArray14) { + if (_i14 >= _iterator14.length) break; + _ref27 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) break; + _ref27 = _i14.value; } - if (objectCreate) { - return objectCreate(proto); + + const file = _ref27; + + const isTarball = path.extname(file.basename) === '.tgz'; + // if using experimental-pack-script-packages-in-mirror flag, don't unlink prebuilt packages + const hasPrebuiltPackage = file.relative.startsWith('prebuilt/'); + if (isTarball && !hasPrebuiltPackage && !requiredTarballs.has(file.basename)) { + yield (_fs || _load_fs()).unlink(file.absolute); } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; - }()); + } + })(); + } - /** - * The function whose prototype chain sequence wrappers inherit from. - * - * @private - */ - function baseLodash() { - // No operation performed. - } + /** + * Save updated integrity and lockfiles. + */ - /** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ - function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; - } + saveLockfileAndIntegrity(patterns, workspaceLayout) { + var _this11 = this; - /** - * By default, the template delimiters used by lodash are like those in - * embedded Ruby (ERB) as well as ES2015 template strings. Change the - * following template settings to use alternative delimiters. - * - * @static - * @memberOf _ - * @type {Object} - */ - lodash.templateSettings = { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const resolvedPatterns = {}; + Object.keys(_this11.resolver.patterns).forEach(function (pattern) { + if (!workspaceLayout || !workspaceLayout.getManifestByPattern(pattern)) { + resolvedPatterns[pattern] = _this11.resolver.patterns[pattern]; + } + }); - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'escape': reEscape, + // TODO this code is duplicated in a few places, need a common way to filter out workspace patterns from lockfile + patterns = patterns.filter(function (p) { + return !workspaceLayout || !workspaceLayout.getManifestByPattern(p); + }); - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'evaluate': reEvaluate, + const lockfileBasedOnResolver = _this11.lockfile.getLockfile(resolvedPatterns); - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'interpolate': reInterpolate, + if (_this11.config.pruneOfflineMirror) { + yield _this11.pruneOfflineMirror(lockfileBasedOnResolver); + } - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type {string} - */ - 'variable': '', + // write integrity hash + if (!_this11.config.plugnplayEnabled) { + yield _this11.integrityChecker.save(patterns, lockfileBasedOnResolver, _this11.flags, workspaceLayout, _this11.scripts.getArtifacts()); + } - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type {Object} - */ - 'imports': { + // --no-lockfile or --pure-lockfile or --frozen-lockfile + if (_this11.flags.lockfile === false || _this11.flags.pureLockfile || _this11.flags.frozenLockfile) { + return; + } - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type {Function} - */ - '_': lodash + const lockFileHasAllPatterns = patterns.every(function (p) { + return _this11.lockfile.getLocked(p); + }); + const lockfilePatternsMatch = Object.keys(_this11.lockfile.cache || {}).every(function (p) { + return lockfileBasedOnResolver[p]; + }); + const resolverPatternsAreSameAsInLockfile = Object.keys(lockfileBasedOnResolver).every(function (pattern) { + const manifest = _this11.lockfile.getLocked(pattern); + return manifest && manifest.resolved === lockfileBasedOnResolver[pattern].resolved && deepEqual(manifest.prebuiltVariants, lockfileBasedOnResolver[pattern].prebuiltVariants); + }); + const integrityPatternsAreSameAsInLockfile = Object.keys(lockfileBasedOnResolver).every(function (pattern) { + const existingIntegrityInfo = lockfileBasedOnResolver[pattern].integrity; + if (!existingIntegrityInfo) { + // if this entry does not have an integrity, no need to re-write the lockfile because of it + return true; + } + const manifest = _this11.lockfile.getLocked(pattern); + if (manifest && manifest.integrity) { + const manifestIntegrity = ssri.stringify(manifest.integrity); + return manifestIntegrity === existingIntegrityInfo; + } + return false; + }); + + // remove command is followed by install with force, lockfile will be rewritten in any case then + if (!_this11.flags.force && _this11.lockfile.parseResultType === 'success' && lockFileHasAllPatterns && lockfilePatternsMatch && resolverPatternsAreSameAsInLockfile && integrityPatternsAreSameAsInLockfile && patterns.length) { + return; } - }; - // Ensure wrappers are instances of `baseLodash`. - lodash.prototype = baseLodash.prototype; - lodash.prototype.constructor = lodash; + // build lockfile location + const loc = path.join(_this11.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME); - LodashWrapper.prototype = baseCreate(baseLodash.prototype); - LodashWrapper.prototype.constructor = LodashWrapper; + // write lockfile + const lockSource = (0, (_lockfile2 || _load_lockfile2()).stringify)(lockfileBasedOnResolver, false, _this11.config.enableLockfileVersions); + yield (_fs || _load_fs()).writeFilePreservingEol(loc, lockSource); - /*------------------------------------------------------------------------*/ + _this11._logSuccessSaveLockfile(); + })(); + } - /** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @constructor - * @param {*} value The value to wrap. - */ - function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; - } + _logSuccessSaveLockfile() { + this.reporter.success(this.reporter.lang('savedLockfile')); + } - /** - * Creates a clone of the lazy wrapper object. - * - * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. - */ - function lazyClone() { - var result = new LazyWrapper(this.__wrapped__); - result.__actions__ = copyArray(this.__actions__); - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = copyArray(this.__iteratees__); - result.__takeCount__ = this.__takeCount__; - result.__views__ = copyArray(this.__views__); - return result; - } + /** + * Load the dependency graph of the current install. Only does package resolving and wont write to the cwd. + */ + hydrate(ignoreUnusedPatterns) { + var _this12 = this; - /** - * Reverses the direction of lazy iteration. - * - * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. - */ - function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; - } - return result; - } + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const request = yield _this12.fetchRequestFromCwd([], ignoreUnusedPatterns); + const depRequests = request.requests, + rawPatterns = request.patterns, + ignorePatterns = request.ignorePatterns, + workspaceLayout = request.workspaceLayout; - /** - * Extracts the unwrapped value from its lazy wrapper. - * - * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. - */ - function lazyValue() { - var array = this.__wrapped__.value(), - dir = this.__dir__, - isArr = isArray(array), - isRight = dir < 0, - arrLength = isArr ? array.length : 0, - view = getView(0, arrLength, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - iteratees = this.__iteratees__, - iterLength = iteratees.length, - resIndex = 0, - takeCount = nativeMin(length, this.__takeCount__); - if (!isArr || (!isRight && arrLength == length && takeCount == length)) { - return baseWrapperValue(array, this.__actions__); - } - var result = []; + yield _this12.resolver.init(depRequests, { + isFlat: _this12.flags.flat, + isFrozen: _this12.flags.frozenLockfile, + workspaceLayout + }); + yield _this12.flatten(rawPatterns); + _this12.markIgnored(ignorePatterns); - outer: - while (length-- && resIndex < takeCount) { - index += dir; + // fetch packages, should hit cache most of the time + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this12.resolver.getManifests(), _this12.config); + _this12.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(_this12.resolver.getManifests(), _this12.config, _this12.flags.ignoreEngines); - var iterIndex = -1, - value = array[index]; + // expand minimal manifests + for (var _iterator15 = _this12.resolver.getManifests(), _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { + var _ref28; - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type, - computed = iteratee(value); + if (_isArray15) { + if (_i15 >= _iterator15.length) break; + _ref28 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) break; + _ref28 = _i15.value; + } - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } + const manifest = _ref28; + + const ref = manifest._reference; + invariant(ref, 'expected reference'); + const type = ref.remote.type; + // link specifier won't ever hit cache + + let loc = ''; + if (type === 'link') { + continue; + } else if (type === 'workspace') { + if (!ref.remote.reference) { + continue; } + loc = ref.remote.reference; + } else { + loc = _this12.config.generateModuleCachePath(ref); } - result[resIndex++] = value; + const newPkg = yield _this12.config.readManifest(loc); + yield _this12.resolver.updateManifest(ref, newPkg); } - return result; - } - // Ensure `LazyWrapper` is an instance of `baseLodash`. - LazyWrapper.prototype = baseCreate(baseLodash.prototype); - LazyWrapper.prototype.constructor = LazyWrapper; - - /*------------------------------------------------------------------------*/ + return request; + })(); + } - /** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + /** + * Check for updates every day and output a nag message if there's a newer version. + */ - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } + checkUpdate() { + if (this.config.nonInteractive) { + // don't show upgrade dialog on CI or non-TTY terminals + return; } - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; + // don't check if disabled + if (this.config.getOption('disable-self-update-check')) { + return; } - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; + // only check for updates once a day + const lastUpdateCheck = Number(this.config.getOption('lastUpdateCheck')) || 0; + if (lastUpdateCheck && Date.now() - lastUpdateCheck < ONE_DAY) { + return; } - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; + // don't bug for updates on tagged releases + if ((_yarnVersion || _load_yarnVersion()).version.indexOf('-') >= 0) { + return; } - /** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); - } + this._checkUpdate().catch(() => { + // swallow errors + }); + } - /** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ - function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; - } + _checkUpdate() { + var _this13 = this; - // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + let latestVersion = yield _this13.config.requestManager.request({ + url: (_constants || _load_constants()).SELF_UPDATE_VERSION_URL + }); + invariant(typeof latestVersion === 'string', 'expected string'); + latestVersion = latestVersion.trim(); + if (!semver.valid(latestVersion)) { + return; + } - /*------------------------------------------------------------------------*/ + // ensure we only check for updates periodically + _this13.config.registries.yarn.saveHomeConfig({ + lastUpdateCheck: Date.now() + }); - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + if (semver.gt(latestVersion, (_yarnVersion || _load_yarnVersion()).version)) { + const installationMethod = yield (0, (_yarnVersion || _load_yarnVersion()).getInstallationMethod)(); + _this13.maybeOutputUpdate = function () { + _this13.reporter.warn(_this13.reporter.lang('yarnOutdated', latestVersion, (_yarnVersion || _load_yarnVersion()).version)); - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } + const command = getUpdateCommand(installationMethod); + if (command) { + _this13.reporter.info(_this13.reporter.lang('yarnOutdatedCommand')); + _this13.reporter.command(command); + } else { + const installer = getUpdateInstaller(installationMethod); + if (installer) { + _this13.reporter.info(_this13.reporter.lang('yarnOutdatedInstaller', installer)); + } + } + }; + } + })(); + } - /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ - function listCacheClear() { - this.__data__ = []; - this.size = 0; - } + /** + * Method to override with a possible upgrade message. + */ - /** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + maybeOutputUpdate() {} +} - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; - } +exports.Install = Install; +function hasWrapper(commander, args) { + return true; +} - /** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); +function setFlags(commander) { + commander.description('Yarn install is used to install all dependencies for a project.'); + commander.usage('install [flags]'); + commander.option('-A, --audit', 'Run vulnerability audit on installed packages'); + commander.option('-g, --global', 'DEPRECATED'); + commander.option('-S, --save', 'DEPRECATED - save package to your `dependencies`'); + commander.option('-D, --save-dev', 'DEPRECATED - save package to your `devDependencies`'); + commander.option('-P, --save-peer', 'DEPRECATED - save package to your `peerDependencies`'); + commander.option('-O, --save-optional', 'DEPRECATED - save package to your `optionalDependencies`'); + commander.option('-E, --save-exact', 'DEPRECATED'); + commander.option('-T, --save-tilde', 'DEPRECATED'); +} - return index < 0 ? undefined : data[index][1]; - } +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } +var isObject = __webpack_require__(49); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; - /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; - } +/***/ }), +/* 35 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SubjectSubscriber; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; }); +/* unused harmony export AnonymousSubject */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(10); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(24); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(180); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(390); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(288); +/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */ - /*------------------------------------------------------------------------*/ - /** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - /** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ - function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; - } - /** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; - } - /** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } - /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function mapCacheHas(key) { - return getMapData(this, key).has(key); +var SubjectSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SubjectSubscriber, _super); + function SubjectSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.destination = destination; + return _this; } + return SubjectSubscriber; +}(__WEBPACK_IMPORTED_MODULE_2__Subscriber__["a" /* Subscriber */])); - /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; +var Subject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.observers = []; + _this.closed = false; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { + return new SubjectSubscriber(this); + }; + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype.next = function (value) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + if (!this.isStopped) { + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].next(value); + } + } + }; + Subject.prototype.error = function (err) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + this.hasError = true; + this.thrownError = err; + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].error(err); + } + this.observers.length = 0; + }; + Subject.prototype.complete = function () { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].complete(); + } + this.observers.length = 0; + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = true; + this.closed = true; + this.observers = null; + }; + Subject.prototype._trySubscribe = function (subscriber) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else { + return _super.prototype._trySubscribe.call(this, subscriber); + } + }; + Subject.prototype._subscribe = function (subscriber) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else if (this.hasError) { + subscriber.error(this.thrownError); + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else if (this.isStopped) { + subscriber.complete(); + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else { + this.observers.push(subscriber); + return new __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__["a" /* SubjectSubscription */](this, subscriber); + } + }; + Subject.prototype.asObservable = function () { + var observable = new __WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */](); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; +var AnonymousSubject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; } + AnonymousSubject.prototype.next = function (value) { + var destination = this.destination; + if (destination && destination.next) { + destination.next(value); + } + }; + AnonymousSubject.prototype.error = function (err) { + var destination = this.destination; + if (destination && destination.error) { + this.destination.error(err); + } + }; + AnonymousSubject.prototype.complete = function () { + var destination = this.destination; + if (destination && destination.complete) { + this.destination.complete(); + } + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var source = this.source; + if (source) { + return this.source.subscribe(subscriber); + } + else { + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + }; + return AnonymousSubject; +}(Subject)); - // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; +//# sourceMappingURL=Subject.js.map - /*------------------------------------------------------------------------*/ - /** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ - function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } - } +"use strict"; - /** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; - } - /** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ - function setCacheHas(value) { - return this.__data__.has(value); - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.normalizePattern = normalizePattern; - // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; +/** + * Explode and normalize a pattern into its name and range. + */ - /*------------------------------------------------------------------------*/ +function normalizePattern(pattern) { + let hasVersion = false; + let range = 'latest'; + let name = pattern; - /** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; - } + // if we're a scope then remove the @ and add it back later + let isScoped = false; + if (name[0] === '@') { + isScoped = true; + name = name.slice(1); + } - /** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ - function stackClear() { - this.__data__ = new ListCache; - this.size = 0; + // take first part as the name + const parts = name.split('@'); + if (parts.length > 1) { + name = parts.shift(); + range = parts.join('@'); + + if (range) { + hasVersion = true; + } else { + range = '*'; } + } - /** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + // add back @ scope suffix + if (isScoped) { + name = `@${name}`; + } - this.size = data.size; - return result; - } + return { name, range, hasVersion }; +} - /** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function stackGet(key) { - return this.__data__.get(key); - } +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function stackHas(key) { - return this.__data__.has(key); - } +/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { - /** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ - function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; - } + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; - // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; - Stack.prototype.get = stackGet; - Stack.prototype.has = stackHas; - Stack.prototype.set = stackSet; + /** Used as the semantic version number. */ + var VERSION = '4.17.10'; - /*------------------------------------------------------------------------*/ + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; - /** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ - function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; - } + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** - * A specialized version of `_.sample` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @returns {*} Returns the random element. - */ - function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; - } + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; - /** - * A specialized version of `_.sampleSize` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ - function arraySampleSize(array, n) { - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); - } + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; - /** - * A specialized version of `_.shuffle` for arrays. - * - * @private - * @param {Array} array The array to shuffle. - * @returns {Array} Returns the new shuffled array. - */ - function arrayShuffle(array) { - return shuffleSelf(copyArray(array)); - } + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; - /** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; - /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; - /** - * Aggregates elements of `collection` on `accumulator` with keys transformed - * by `iteratee` and values set by `setter`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ - function baseAggregator(collection, setter, iteratee, accumulator) { - baseEach(collection, function(value, key, collection) { - setter(accumulator, value, iteratee(value), collection); - }); - return accumulator; - } + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; - /** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); - } + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; - /** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); - } + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; - /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } - } + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - /** - * The base implementation of `_.at` without support for individual paths. - * - * @private - * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths to pick. - * @returns {Array} Returns the picked elements. - */ - function baseAt(object, paths) { - var index = -1, - length = paths.length, - result = Array(length), - skip = object == null; + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; - while (++index < length) { - result[index] = skip ? undefined : get(object, paths[index]); - } - return result; - } + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; - /** - * The base implementation of `_.clamp` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - */ - function baseClamp(number, lower, upper) { - if (number === number) { - if (upper !== undefined) { - number = number <= upper ? number : upper; - } - if (lower !== undefined) { - number = number >= lower ? number : lower; - } - } - return number; - } + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; - /** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ - function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, baseClone, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; - } + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); - /** - * The base implementation of `_.conforms` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - */ - function baseConforms(source) { - var props = keys(source); - return function(object) { - return baseConformsTo(object, source, props); - }; - } + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; - /** - * The base implementation of `_.conformsTo` which accepts `props` to check. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - */ - function baseConformsTo(object, source, props) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length], - predicate = source[key], - value = object[key]; + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; - if ((value === undefined && !(key in object)) || !predicate(value)) { - return false; - } - } - return true; - } + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - /** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); - } + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; - /** - * The base implementation of methods like `_.difference` without support - * for excluding multiple arrays or iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - */ - function baseDifference(array, values, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - isCommon = true, - length = array.length, - result = [], - valuesLength = values.length; + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - if (!length) { - return result; - } - if (iteratee) { - values = arrayMap(values, baseUnary(iteratee)); - } - if (comparator) { - includes = arrayIncludesWith; - isCommon = false; - } - else if (values.length >= LARGE_ARRAY_SIZE) { - includes = cacheHas; - isCommon = false; - values = new SetCache(values); - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee == null ? value : iteratee(value); + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === computed) { - continue outer; - } - } - result.push(value); - } - else if (!includes(values, computed, comparator)) { - result.push(value); - } - } - return result; - } + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - /** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; - /** - * The base implementation of `_.forEachRight` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEachRight = createBaseEach(baseForOwnRight, true); + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; - /** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; - } + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; - /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; - while (++index < length) { - var value = array[index], - current = iteratee(value); + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; - } + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; - /** - * The base implementation of `_.fill` without an iteratee call guard. - * - * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - */ - function baseFill(array, value, start, end) { - var length = array.length; + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; - start = toInteger(start); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : toInteger(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength(end); - while (start < end) { - array[start++] = value; - } - return array; - } + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - /** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; - } + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; - /** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ - function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - predicate || (predicate = isFlattenable); - result || (result = []); + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; - } + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); - /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - /** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseForRight = createBaseFor(true); + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); - /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); - } + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - /** - * The base implementation of `_.forOwnRight` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwnRight(object, iteratee) { - return object && baseForRight(object, iteratee, keys); - } + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ - function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); - } + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; - /** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ - function baseGet(object, path) { - path = castPath(path, object); + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; - var index = 0, - length = path.length; + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; - } + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; - /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); - } + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); - } + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; - /** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ - function baseGt(value, other) { - return value > other; - } + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; - /** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ - function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); - } + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; - /** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ - function baseHasIn(object, key) { - return object != null && key in Object(object); - } + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; - /** - * The base implementation of `_.inRange` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to check. - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - */ - function baseInRange(number, start, end) { - return number >= nativeMin(start, end) && number < nativeMax(start, end); - } + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - /** - * The base implementation of methods like `_.intersection`, without support - * for iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - */ - function baseIntersection(arrays, iteratee, comparator) { - var includes = comparator ? arrayIncludesWith : arrayIncludes, - length = arrays[0].length, - othLength = arrays.length, - othIndex = othLength, - caches = Array(othLength), - maxLength = Infinity, - result = []; + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee) { - array = arrayMap(array, baseUnary(iteratee)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) - ? new SetCache(othIndex && array) - : undefined; - } - array = arrays[0]; + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); - var index = -1, - seen = caches[0]; + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - outer: - while (++index < length && result.length < maxLength) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - value = (comparator || value !== 0) ? value : 0; - if (!(seen - ? cacheHas(seen, computed) - : includes(result, computed, comparator) - )) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache - ? cacheHas(cache, computed) - : includes(arrays[othIndex], computed, comparator)) - ) { - continue outer; - } - } - if (seen) { - seen.push(computed); - } - result.push(value); - } + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; } - return result; - } - /** - * The base implementation of `_.invert` and `_.invertBy` which inverts - * `object` with values transformed by `iteratee` and set by `setter`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform values. - * @param {Object} accumulator The initial inverted object. - * @returns {Function} Returns `accumulator`. - */ - function baseInverter(object, setter, iteratee, accumulator) { - baseForOwn(object, function(value, key, object) { - setter(accumulator, iteratee(value), key, object); - }); - return accumulator; - } + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); - /** - * The base implementation of `_.invoke` without support for individual - * method arguments. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ - function baseInvoke(object, path, args) { - path = castPath(path, object); - object = parent(object, path); - var func = object == null ? object : object[toKey(last(path))]; - return func == null ? undefined : apply(func, object, args); - } + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; - } + /*--------------------------------------------------------------------------*/ - /** - * The base implementation of `_.isArrayBuffer` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - */ - function baseIsArrayBuffer(value) { - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); } + return func.apply(thisArg, args); + } - /** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ - function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; - } + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); } + return accumulator; + } - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + } + return array; + } - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { + while (++index < length) { + if (!predicate(array[index], index, array)) { return false; } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } + return true; + } - /** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ - function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } } + return result; + } - /** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ - function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } + while (++index < length) { + if (comparator(value, array[index])) { + return true; } - return true; } + return false; + } - /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); - /** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ - function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; + while (++index < length) { + result[index] = iteratee(array[index], index, array); } + return result; + } - /** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ - function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; - } + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; - /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ - function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + while (++index < length) { + array[offset + index] = values[index]; } + return array; + } - /** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ - function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); - } + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; - /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; + if (initAccum && length) { + accumulator = array[++index]; } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } - /** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; - } - - /** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ - function baseLt(value, other) { - return value < other; + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; } - - /** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); } + return accumulator; + } - /** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; - } + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; - /** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; } + return false; + } - /** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - if (isObject(srcValue)) { - stack || (stack = new Stack); - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) - : undefined; + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); - } + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } - /** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], - stacked = stack.get(srcValue); + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } - if (stacked) { - assignMergeValue(object, key, stacked); - return; + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; + }); + return result; + } - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; } - assignMergeValue(object, key, newValue); } + return -1; + } - /** - * The base implementation of `_.nth` which doesn't coerce arguments. - * - * @private - * @param {Array} array The array to query. - * @param {number} n The index of the element to return. - * @returns {*} Returns the nth element of `array`. - */ - function baseNth(array, n) { - var length = array.length; - if (!length) { - return; + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; } - n += n < 0 ? length : 0; - return isIndex(n, length) ? array[n] : undefined; } + return -1; + } - /** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ - function baseOrderBy(collection, iteratees, orders) { - var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); - } + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } - /** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ - function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); - } + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } - /** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ - function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); } - return result; } + return result; + } - /** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); } + return result; + } - /** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - */ - function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; - } + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } - /** - * The base implementation of `_.pullAt` without support for individual - * indexes or capturing the removed elements. - * - * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. - */ - function basePullAt(array, indexes) { - var length = array ? indexes.length : 0, - lastIndex = length - 1; + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex(index)) { - splice.call(array, index, 1); - } else { - baseUnset(array, index); - } - } - } - return array; - } + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; - /** - * The base implementation of `_.random` without support for returning - * floating-point numbers. - * - * @private - * @param {number} lower The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the random number. - */ - function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); - } + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } - /** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ - function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; - } + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } - /** - * The base implementation of `_.repeat` which doesn't coerce arguments. - * - * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. - */ - function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; - return result; + while (length--) { + if (array[length] === placeholder) { + ++result; + } } + return result; + } - /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); - } + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); - /** - * The base implementation of `_.sample`. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - */ - function baseSample(collection) { - return arraySample(values(collection)); - } + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); - /** - * The base implementation of `_.sampleSize` without param guards. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ - function baseSampleSize(collection, n) { - var array = values(collection); - return shuffleSelf(array, baseClamp(n, 0, array.length)); - } + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } - /** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ - function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; - } + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; - /** - * The base implementation of `setData` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; - }; + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } - /** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); - }; + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); - /** - * The base implementation of `_.shuffle`. - * - * @private - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - */ - function baseShuffle(collection) { - return shuffleSelf(values(collection)); - } + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; } - return result; } + return result; + } - /** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function baseSome(collection, predicate) { - var result; + /** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + return key == '__proto__' + ? undefined + : object[key]; + } - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; - } + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); - /** - * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which - * performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function baseSortedIndex(array, value, retHighest) { - var low = 0, - high = array == null ? low : array.length; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if (computed !== null && !isSymbol(computed) && - (retHighest ? (computed <= value) : (computed < value))) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return baseSortedIndexBy(array, value, identity, retHighest); - } - - /** - * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` - * which invokes `iteratee` for `value` and each element of `array` to compute - * their sort ranking. The iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The iteratee invoked per element. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, - valIsNull = value === null, - valIsSymbol = isSymbol(value), - valIsUndefined = value === undefined; - - while (low < high) { - var mid = nativeFloor((low + high) / 2), - computed = iteratee(array[mid]), - othIsDefined = computed !== undefined, - othIsNull = computed === null, - othIsReflexive = computed === computed, - othIsSymbol = isSymbol(computed); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); - } + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); - /** - * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ - function baseSortedUniq(array, iteratee) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; - if (!index || !eq(computed, seen)) { - var seen = computed; - result[resIndex++] = value === 0 ? 0 : value; - } + while (++index < length) { + if (array[index] === value) { + return index; } - return result; } + return -1; + } - /** - * The base implementation of `_.toNumber` which doesn't ensure correct - * conversions of binary, hexadecimal, or octal string values. - * - * @private - * @param {*} value The value to process. - * @returns {number} Returns the number. - */ - function baseToNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; } - return +value; } + return index; + } - /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; - } + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } - /** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ - function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; } + return result; + } - /** - * The base implementation of `_.unset`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The property path to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. - */ - function baseUnset(object, path) { - path = castPath(path, object); - object = parent(object, path); - return object == null || delete object[toKey(last(path))]; - } + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } - /** - * The base implementation of `_.update`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to update. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ - function baseUpdate(object, path, updater, customizer) { - return baseSet(object, path, updater(baseGet(object, path)), customizer); - } + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } - /** - * The base implementation of methods like `_.dropWhile` and `_.takeWhile` - * without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. - */ - function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; + /*--------------------------------------------------------------------------*/ - while ((fromRight ? index-- : ++index < length) && - predicate(array[index], index, array)) {} + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); - } + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; - /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ - function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - return arrayReduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); - } + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; - /** - * The base implementation of methods like `_.xor`, without support for - * iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. - */ - function baseXor(arrays, iteratee, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq(arrays[0]) : []; - } - var index = -1, - result = Array(length); + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; - while (++index < length) { - var array = arrays[index], - othIndex = -1; + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; - while (++othIndex < length) { - if (othIndex != index) { - result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); - } - } - } - return baseUniq(baseFlatten(result, 1), iteratee, comparator); - } + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - /** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ - function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; + /** Used to generate unique IDs. */ + var idCounter = 0; - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; - } + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); /** - * Casts `value` to an empty array if it's not an array like object. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array|Object} Returns the cast array-like object. + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. */ - function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; - } + var nativeObjectToString = objectProto.toString; - /** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ - function castFunction(value) { - return typeof value == 'function' ? value : identity; - } + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); - /** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true */ - function castPath(value, object) { - if (isArray(value)) { - return value; + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } } - return isKey(value, object) ? [value] : stringToPath(toString(value)); + return new LodashWrapper(value); } /** - * A `baseRest` alias which can be replaced with `identity` by module - * replacement plugins. + * The base implementation of `_.create` without support for assigning + * properties to the created object. * * @private - * @type {Function} - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. */ - var castRest = baseRest; + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); /** - * Casts `array` to a slice if it's needed. + * The function whose prototype chain sequence wrappers inherit from. * * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. */ - function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); + function baseLodash() { + // No operation performed. } /** - * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * The base constructor for creating `lodash` wrapper objects. * * @private - * @param {number|Object} id The timer id or timeout object of the timer to clear. + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. */ - var clearTimeout = ctxClearTimeout || function(id) { - return root.clearTimeout(id); - }; + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } /** - * Creates a clone of `buffer`. + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. + * @static + * @memberOf _ + * @type {Object} */ - function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + }; - buffer.copy(result); - return result; - } + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ /** - * Creates a clone of `arrayBuffer`. + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. * * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. + * @constructor + * @param {*} value The value to wrap. */ - function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; } /** - * Creates a clone of `dataView`. + * Creates a clone of the lazy wrapper object. * * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. */ - function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; } /** - * Creates a clone of `map`. + * Reverses the direction of lazy iteration. * * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. */ - function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; } /** - * Creates a clone of `regexp`. + * Extracts the unwrapped value from its lazy wrapper. * * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. */ - function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } return result; } + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + /** - * Creates a clone of `set`. + * Creates a hash object. * * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ - function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } } /** - * Creates a clone of the `symbol` object. + * Removes all key-value entries from the hash. * * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. + * @name clear + * @memberOf Hash */ - function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; } /** - * Creates a clone of `typedArray`. + * Removes `key` and its value from the hash. * * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } /** - * Compares values to sort them in ascending order. + * Gets the hash value for `key`. * * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ - function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; } - return 0; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } /** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. + * Checks if a hash value for `key` exists. * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. */ - function compareMultiple(object, other, orders) { + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; + length = entries == null ? 0 : entries.length; + this.clear(); while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } + var entry = entries[index]; + this.set(entry[0], entry[1]); } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; } /** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. + * Removes all key-value entries from the list cache. * * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. + * @name clear + * @memberOf ListCache */ - function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersLength = holders.length, - leftIndex = -1, - leftLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(leftLength + rangeLength), - isUncurried = !isCurried; + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[holders[argsIndex]] = args[argsIndex]; - } + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; } - while (rangeLength--) { - result[leftIndex++] = args[argsIndex++]; + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); } - return result; + --this.size; + return true; } /** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. + * Gets the list cache value for `key`. * * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ - function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersIndex = -1, - holdersLength = holders.length, - rightIndex = -1, - rightLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(rangeLength + rightLength), - isUncurried = !isCurried; + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - while (++argsIndex < rangeLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result; + return index < 0 ? undefined : data[index][1]; } /** - * Copies the values of `source` to `array`. + * Checks if a list cache value for `key` exists. * * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function copyArray(source, array) { - var index = -1, - length = source.length; + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; } - return array; + return this; } + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + /** - * Copies properties of `source` to `object`. + * Creates a map cache object to store key-value pairs. * * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - + function MapCache(entries) { var index = -1, - length = props.length; + length = entries == null ? 0 : entries.length; + this.clear(); while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } + var entry = entries[index]; + this.set(entry[0], entry[1]); } - return object; } /** - * Copies own symbols of `source` to `object`. + * Removes all key-value entries from the map. * * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. + * @name clear + * @memberOf MapCache */ - function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; } /** - * Copies own and inherited symbols of `source` to `object`. + * Removes `key` and its value from the map. * * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; } /** - * Creates a function like `_.groupBy`. + * Gets the map value for `key`. * * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} [initializer] The accumulator object initializer. - * @returns {Function} Returns the new aggregator function. + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ - function createAggregator(setter, initializer) { - return function(collection, iteratee) { - var func = isArray(collection) ? arrayAggregator : baseAggregator, - accumulator = initializer ? initializer() : {}; - - return func(collection, setter, getIteratee(iteratee, 2), accumulator); - }; + function mapCacheGet(key) { + return getMapData(this, key).get(key); } /** - * Creates a function like `_.assign`. + * Checks if a map value for `key` exists. * * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); + function mapCacheHas(key) { + return getMapData(this, key).has(key); } /** - * Creates a `baseEach` or `baseEachRight` function. + * Sets the map `key` to `value`. * * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; } + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * Creates an array cache object to store unique values. * * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @constructor + * @param {Array} [values] The values to cache. */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } } /** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. + * Adds `value` to the array cache. * * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. */ - function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; } /** - * Creates a function like `_.lowerFirst`. + * Checks if `value` is in the array cache. * * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. */ - function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; + function setCacheHas(value) { + return this.__data__.has(value); + } - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); + /*------------------------------------------------------------------------*/ - return chr[methodName]() + trailing; - }; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } /** - * Creates a function like `_.camelCase`. + * Removes all key-value entries from the stack. * * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. + * @name clear + * @memberOf Stack */ - function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); - }; + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; } /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * Removes `key` and its value from the stack. * * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; + this.size = data.size; + return result; } /** - * Creates a function that wraps `func` to enable currying. + * Gets the stack value for `key`. * * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ - function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); - - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); - } - return wrapper; + function stackGet(key) { + return this.__data__.get(key); } /** - * Creates a `_.find` or `_.findLast` function. + * Checks if a stack value for `key` exists. * * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = getIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; + function stackHas(key) { + return this.__data__.has(key); } /** - * Creates a `_.flow` or `_.flowRight` function. + * Sets the stack `key` to `value`. * * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. */ - function createFlow(fromRight) { - return flatRest(function(funcs) { - var length = funcs.length, - index = length, - prereq = LodashWrapper.prototype.thru; - - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (prereq && !wrapper && getFuncName(func) == 'wrapper') { - var wrapper = new LodashWrapper([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : undefined; - - if (data && isLaziable(data[0]) && - data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && - !data[4].length && data[9] == 1 - ) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) - ? wrapper[funcName]() - : wrapper.thru(func); - } + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; } - return function() { - var args = arguments, - value = args[0]; + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } - if (wrapper && args.length == 1 && isArray(value)) { - return wrapper.plant(value).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : value; + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }); - } + /*------------------------------------------------------------------------*/ /** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. + * Creates an array of the enumerable property names of the array-like `value`. * * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided - * to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. */ - function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, - isBind = bitmask & WRAP_BIND_FLAG, - isBindKey = bitmask & WRAP_BIND_KEY_FLAG, - isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), - isFlip = bitmask & WRAP_FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length; - - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), - holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, thisArg, - args, newHolders, argPos, ary, arity - length - ); - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary < length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); } - return fn.apply(thisBinding, args); } - return wrapper; + return result; } /** - * Creates a function like `_.invertBy`. + * A specialized version of `_.sample` for arrays. * * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} toIteratee The function to resolve iteratees. - * @returns {Function} Returns the new inverter function. + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. */ - function createInverter(setter, toIteratee) { - return function(object, iteratee) { - return baseInverter(object, setter, toIteratee(iteratee), {}); - }; + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; } /** - * Creates a function that performs a mathematical operation on two values. + * A specialized version of `_.sampleSize` for arrays. * * @private - * @param {Function} operator The function to perform the operation. - * @param {number} [defaultValue] The value used for `undefined` arguments. - * @returns {Function} Returns the new mathematical operation function. + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. */ - function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result; - if (value === undefined && other === undefined) { - return defaultValue; - } - if (value !== undefined) { - result = value; - } - if (other !== undefined) { - if (result === undefined) { - return other; - } - if (typeof value == 'string' || typeof other == 'string') { - value = baseToString(value); - other = baseToString(other); - } else { - value = baseToNumber(value); - other = baseToNumber(other); - } - result = operator(value, other); - } - return result; - }; + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); } /** - * Creates a function like `_.over`. + * A specialized version of `_.shuffle` for arrays. * * @private - * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new over function. + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. */ - function createOver(arrayFunc) { - return flatRest(function(iteratees) { - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - return baseRest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee) { - return apply(iteratee, thisArg, args); - }); - }); - }); + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); } /** - * Creates the padding for `string` based on `length`. The `chars` string - * is truncated if the number of characters exceeds `length`. + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. * * @private - * @param {number} length The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padding for `string`. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ - function createPadding(length, chars) { - chars = chars === undefined ? ' ' : baseToString(chars); - - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } - var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) - ? castSlice(stringToArray(result), 0, length).join('') - : result.slice(0, length); } /** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ - function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } - return wrapper; } /** - * Creates a `_.range` or `_.rangeRight` function. + * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. */ - function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; + } + return -1; } /** - * Creates a function that performs a relational operation on two values. + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. * * @private - * @param {Function} operator The function to perform the operation. - * @returns {Function} Returns the new relational operation function. + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. */ - function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == 'string' && typeof other == 'string')) { - value = toNumber(value); - other = toNumber(other); - } - return operator(value, other); - }; + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; } /** - * Creates a function that wraps `func` to continue currying. + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. * * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder value. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. */ - function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, - newHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); - } - var newData = [ - func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, - newHoldersRight, argPos, ary, arity - ]; - - var result = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return setWrapToString(result, func, bitmask); + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); } /** - * Creates a function like `_.round`. + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. * * @private - * @param {string} methodName The name of the `Math` method to use when rounding. - * @returns {Function} Returns the new round function. + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. */ - function createRound(methodName) { - var func = Math[methodName]; - return function(number, precision) { - number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision) { - // Shift with exponential notation to avoid floating-point issues. - // See [MDN](https://mdn.io/round#Examples) for more details. - var pair = (toString(number) + 'e').split('e'), - value = func(pair[0] + 'e' + (+pair[1] + precision)); - - pair = (toString(value) + 'e').split('e'); - return +(pair[0] + 'e' + (+pair[1] - precision)); - } - return func(number); - }; + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); } /** - * Creates a set object of `values`. + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. * * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ - var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); - }; + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } /** - * Creates a `_.toPairs` or `_.toPairsIn` function. + * The base implementation of `_.at` without support for individual paths. * * @private - * @param {Function} keysFunc The function to get the keys of a given object. - * @returns {Function} Returns the new pairs function. + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. */ - function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; } - if (tag == setTag) { - return setToPairs(object); + if (lower !== undefined) { + number = number >= lower ? number : lower; } - return baseToPairs(object, keysFunc(object)); - }; + } + return number; } /** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. * * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * 512 - `_.flip` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. */ - function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; + if (result !== undefined) { + return result; } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; - partials = holders = undefined; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } } - var data = isBindKey ? undefined : getData(func); + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); - var newData = [ - func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, - argPos, ary, arity - ]; + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); - if (data) { - mergeData(newData, data); + return result; } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result = createPartial(func, bitmask, thisArg, partials); - } else { - result = createHybrid.apply(undefined, newData); + if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + + return result; } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result, newData), func, bitmask); + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; } /** - * Used by `_.defaults` to customize its `_.assignIn` use to assign properties - * of source objects to the destination object for all destination properties - * that resolve to `undefined`. + * The base implementation of `_.conforms` which doesn't clone `source`. * * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. */ - function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; } /** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. + * The base implementation of `_.conformsTo` which accepts `props` to check. * * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. */ - function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; } - return objValue; + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; } /** - * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain - * objects. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private - * @param {*} value The value to inspect. - * @param {string} key The key of the property to inspect. - * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. */ - function customOmitClone(value) { - return isPlainObject(value) ? undefined : value; + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); } /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. * * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; + if (!length) { + return result; } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } } - result = false; - break; + result.push(value); } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; + else if (!includes(values, computed, comparator)) { + result.push(value); } } - stack['delete'](array); - stack['delete'](other); return result; } /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); + var baseEach = createBaseEach(baseForOwn); - case mapTag: - var convert = mapToArray; + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; + while (++index < length) { + var value = array[index], + current = iteratee(value); - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } } - return false; + return result; } /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. + * The base implementation of `_.fill` without an iteratee call guard. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; + function baseFill(array, value, start, end) { + var length = array.length; - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; } - stack['delete'](object); - stack['delete'](other); - return result; + return array; } /** - * A specialized version of `baseRest` which flattens the rest array. + * The base implementation of `_.filter` without support for iteratee shorthands. * * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. */ - function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; } /** - * Creates an array of own enumerable property names and symbols of `object`. + * The base implementation of `_.flatten` with support for restricting flattening. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. */ - function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); - } + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; - /** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ - function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; } /** - * Gets metadata for `func`. + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. */ - var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); - }; + var baseFor = createBaseFor(); /** - * Gets the name of `func`. + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. * * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. */ - function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; - } + var baseForRight = createBaseFor(true); /** - * Gets the argument placeholder value for `func`. + * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. */ - function getHolder(func) { - var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; - return object.placeholder; + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); } /** - * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, - * this function returns the custom method, otherwise it returns `baseIteratee`. - * If arguments are provided, the chosen function is invoked with them and - * its result is returned. + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. * * @private - * @param {*} [value] The value to convert to an iteratee. - * @param {number} [arity] The arity of the created iteratee. - * @returns {Function} Returns the chosen function or its result. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. */ - function getIteratee() { - var result = lodash.iteratee || iteratee; - result = result === iteratee ? baseIteratee : result; - return arguments.length ? result(arguments[0], arguments[1]) : result; + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); } /** - * Gets the data for `map`. + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. * * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); } /** - * Gets the property names, values, and compare flags of `object`. + * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. */ - function getMatchData(object) { - var result = keys(object), - length = result.length; + function baseGet(object, path) { + path = castPath(path, object); - while (length--) { - var key = result[length], - value = object[key]; + var index = 0, + length = path.length; - result[length] = [key, value, isStrictComparable(value)]; + while (object != null && index < length) { + object = object[toKey(path[index++])]; } - return result; + return (index && index == length) ? object : undefined; } /** - * Gets the native function at `key` of `object`. + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. * * @private * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. */ - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. + * @returns {string} Returns the `toStringTag`. */ - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; } - return result; + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); } /** - * Creates an array of the own enumerable symbols of `object`. + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. */ - var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); - }; + function baseGt(value, other) { + return value > other; + } /** - * Creates an array of the own and inherited enumerable symbols of `object`. + * The base implementation of `_.has` without support for deep paths. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. */ - var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; - }; + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } /** - * Gets the `toStringTag` of `value`. + * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. */ - var getTag = baseGetTag; - - // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. - if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; + function baseHasIn(object, key) { + return object != null && key in Object(object); + } - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); } /** - * Gets the view, applying any `transforms` to the `start` and `end` positions. + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. * * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} transforms The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. */ - function getView(start, end, transforms) { + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + var index = -1, - length = transforms.length; + seen = caches[0]; - while (++index < length) { - var data = transforms[index], - size = data.size; + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); } } - return { 'start': start, 'end': end }; + return result; } /** - * Extracts wrapper details from the `source` body comment. + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. * * @private - * @param {string} source The source to inspect. - * @returns {Array} Returns the wrapper details. + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. */ - function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; } /** - * Checks if `path` exists on `object`. + * The base implementation of `_.invoke` without support for individual + * method arguments. * * @private * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. */ - function hasPath(object, path, hasFunc) { + function baseInvoke(object, path, args) { path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); } /** - * Initializes an array clone. + * The base implementation of `_.isArguments`. * * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ - function initCloneArray(array) { - var length = array.length, - result = array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; } /** - * Initializes an object clone. + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. * * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. */ - function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; } /** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * The base implementation of `_.isDate` without Node.js optimizations. * * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. */ - function initCloneByTag(object, tag, cloneFunc, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return cloneMap(object, isDeep, cloneFunc); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return cloneSet(object, isDeep, cloneFunc); - - case symbolTag: - return cloneSymbol(object); - } + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; } /** - * Inserts wrapper `details` in a comment at the top of the `source` body. + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. * * @private - * @param {string} source The source to modify. - * @returns {Array} details The details to insert. - * @returns {string} Returns the modified source. + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ - function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; - details = details.join(length > 2 ? ', ' : ' '); - return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } /** - * Checks if `value` is a flattenable `arguments` object or array. + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); - } + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); - } + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; - /** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } - return false; - } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - if (isArray(value)) { - return false; + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; + if (!isSameTag) { + return false; } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } /** - * Checks if `value` is suitable for use as unique object key. + * The base implementation of `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ - function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; } /** - * Checks if `func` has a lazy counterpart. + * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ - function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; + if (object == null) { + return !length; } - if (func === other) { - return true; + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } } - var data = getData(other); - return !!data && func === data[0]; - } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; } /** - * Checks if `func` is capable of being masked. + * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. */ - var isMaskable = coreJsData ? isFunction : stubFalse; + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } /** - * Checks if `value` is likely a prototype object. + * The base implementation of `_.isRegExp` without Node.js optimizations. * * @private * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; } /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * The base implementation of `_.isSet` without Node.js optimizations. * * @private * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. */ - function isStrictComparable(value) { - return value === value && !isObject(value); + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; } /** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. + * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ - function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } /** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * The base implementation of `_.iteratee`. * * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. */ - function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); } /** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers used to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and - * `_.rearg` modify function arguments, making the order in which they are - * executed important, preventing the merging of metadata. However, we make - * an exception for a safe combined case where curried functions have `_.ary` - * and or `_.rearg` applied. + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ - function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - - var isCombo = - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = value; - } - // Use source `ary` if it's smaller. - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; + return result; } /** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ - function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } @@ -11528,11984 +11168,13795 @@ $exports.store = store; } /** - * Converts `value` to a string using `Object.prototype.toString`. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. */ - function objectToString(value) { - return nativeObjectToString.call(value); + function baseLt(value, other) { + return value < other; } /** - * A specialized version of `baseRest` which transforms the rest array. + * The base implementation of `_.map` without support for iteratee shorthands. * * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. */ - function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; } /** - * Gets the parent value at `path` of `object`. + * The base implementation of `_.matches` which doesn't clone `source`. * * @private - * @param {Object} object The object to query. - * @param {Array} path The path to get the parent value of. - * @returns {*} Returns the parent value. + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. */ - function parent(object, path) { - return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; } /** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. */ - function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); } - return array; + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; } /** - * Sets metadata for `func`. + * The base implementation of `_.merge` without support for multiple sources. * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity - * function to avoid garbage collection pauses in V8. See - * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) - * for more details. + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. * * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. */ - var setData = shortOut(baseSetData); + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } /** - * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * The base implementation of `_.nth` which doesn't coerce arguments. * * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @returns {number|Object} Returns the timer id or timeout object. + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. */ - var setTimeout = ctxSetTimeout || function(func, wait) { - return root.setTimeout(func, wait); - }; + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } /** - * Sets the `toString` method of `func` to return `string`. + * The base implementation of `_.orderBy` without param guards. * * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. */ - var setToString = shortOut(baseSetToString); + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } /** - * Sets the `toString` method of `wrapper` to mimic the source of `reference` - * with wrapper details in a comment at the top of the source body. + * The base implementation of `_.pick` without support for individual + * property identifiers. * * @private - * @param {Function} wrapper The function to modify. - * @param {Function} reference The reference function. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Function} Returns `wrapper`. + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. */ - function setWrapToString(wrapper, reference, bitmask) { - var source = (reference + ''); - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); } /** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. + * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. */ - function shortOut(func) { - var count = 0, - lastCalled = 0; + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); } - return func.apply(undefined, arguments); + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); }; } /** - * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. * * @private - * @param {Array} array The array to shuffle. - * @param {number} [size=array.length] The size of `array`. + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns `array`. */ - function shuffleSelf(array, size) { - var index = -1, - length = array.length, - lastIndex = length - 1; + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; - size = size === undefined ? length : size; - while (++index < size) { - var rand = baseRandom(index, lastIndex), - value = array[rand]; + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; - array[rand] = array[index]; - array[index] = value; + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } } - array.length = size; return array; } /** - * Converts `string` to a property path array. + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. * * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. */ - var stringToPath = memoizeCapped(function(string) { - var result = []; - if (reLeadingDot.test(string)) { - result.push(''); + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; - }); + return array; + } /** - * Converts `value` to a string key if it's not a string or symbol. + * The base implementation of `_.random` without support for returning + * floating-point numbers. * * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. */ - function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); } /** - * Converts `func` to its source code. + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. * * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. */ - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; } - return ''; + return result; } /** - * Updates wrapper `details` based on `bitmask` flags. + * The base implementation of `_.repeat` which doesn't coerce arguments. * * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. */ - function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; } - }); - return details.sort(); + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; } /** - * Creates a clone of `wrapper`. + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. */ - function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result.__actions__ = copyArray(wrapper.__actions__); - result.__index__ = wrapper.__index__; - result.__values__ = wrapper.__values__; - return result; + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); } - /*------------------------------------------------------------------------*/ - /** - * Creates an array of elements split into groups the length of `size`. - * If `array` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array of chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] + * The base implementation of `_.sample`. * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. */ - function chunk(array, size, guard) { - if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { - size = 1; - } else { - size = nativeMax(toInteger(size), 0); - } - var length = array == null ? 0 : array.length; - if (!length || size < 1) { - return []; - } - var index = 0, - resIndex = 0, - result = Array(nativeCeil(length / size)); - - while (index < length) { - result[resIndex++] = baseSlice(array, index, (index += size)); - } - return result; + function baseSample(collection) { + return arraySample(values(collection)); } /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. + * The base implementation of `_.sampleSize` without param guards. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. */ - function compact(array) { + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + length = path.length, + lastIndex = length - 1, + nested = object; - while (++index < length) { - var value = array[index]; - if (value) { - result[resIndex++] = value; + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } } + assignValue(nested, key, newValue); + nested = nested[key]; } - return result; + return object; } /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. + * The base implementation of `setData` without support for hot loop shorting. * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. */ - function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); - } + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; /** - * Creates an array of `array` values not included in the other given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * **Note:** Unlike `_.pullAll`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.without, _.xor - * @example + * The base implementation of `setToString` without support for hot loop shorting. * - * _.difference([2, 1], [2, 3]); - * // => [1] + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ - var difference = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) - : []; - }); + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; /** - * This method is like `_.difference` except that it accepts `iteratee` which - * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * **Note:** Unlike `_.pullAllBy`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2] + * The base implementation of `_.shuffle`. * - * // The `_.property` iteratee shorthand. - * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. */ - var differenceBy = baseRest(function(array, values) { - var iteratee = last(values); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) - : []; - }); + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } /** - * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The order and - * references of result values are determined by the first array. The comparator - * is invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.pullAllWith`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * The base implementation of `_.slice` without an iteratee call guard. * - * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); - * // => [{ 'x': 2, 'y': 1 }] + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. */ - var differenceWith = baseRest(function(array, values) { - var comparator = last(values); - if (isArrayLikeObject(comparator)) { - comparator = undefined; + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) - : []; - }); + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } /** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] + * The base implementation of `_.some` without support for iteratee shorthands. * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. */ - function drop(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, n < 0 ? 0 : n, length); + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; } /** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. */ - function dropRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, 0, n < 0 ? 0 : n); + return baseSortedIndexBy(array, value, identity, retHighest); } /** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.dropRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney'] - * - * // The `_.matches` iteratee shorthand. - * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropRightWhile(users, ['active', false]); - * // => objects for ['barney'] + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). * - * // The `_.property` iteratee shorthand. - * _.dropRightWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. */ - function dropRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), true, true) - : []; + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); } /** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.dropWhile(users, function(o) { return !o.active; }); - * // => objects for ['pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.dropWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropWhile(users, ['active', false]); - * // => objects for ['pebbles'] + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. * - * // The `_.property` iteratee shorthand. - * _.dropWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. */ - function dropWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), true) - : []; + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; } /** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. * - * _.fill([4, 6, 8, 10], '*', 1, 3); - * // => [4, '*', '*', 10] + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. */ - function fill(array, value, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; + function baseToNumber(value) { + if (typeof value == 'number') { + return value; } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; + if (isSymbol(value)) { + return NAN; } - return baseFill(array, value, start, end); + return +value; } /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. */ - function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; } - return baseFindIndex(array, getIteratee(predicate, 3), index); + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. + * The base implementation of `_.uniqBy` without support for iteratee shorthands. * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array + * @private * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); - * // => 2 - * - * // The `_.matches` iteratee shorthand. - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastIndex(users, ['active', false]); - * // => 2 - * - * // The `_.property` iteratee shorthand. - * _.findLastIndex(users, 'active'); - * // => 0 + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. */ - function findLastIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; } - var index = length - 1; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = fromIndex < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1); + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; } - return baseFindIndex(array, getIteratee(predicate, 3), index, true); + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; } /** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example + * The base implementation of `_.unset`. * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; } /** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example + * The base implementation of `_.update`. * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. */ - function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); } /** - * Recursively flatten `array` up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Array - * @param {Array} array The array to flatten. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. * - * var array = [1, [2, [3, [4]], 5]]; + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. * - * _.flattenDepth(array, 1); - * // => [1, 2, [3, [4]], 5] + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. * - * _.flattenDepth(array, 2); - * // => [1, 2, 3, [4], 5] + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. */ - function flattenDepth(array, depth) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; } - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(array, depth); + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); } /** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} pairs The key-value pairs. + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['a', 1], ['b', 2]]); - * // => { 'a': 1, 'b': 2 } */ - function fromPairs(pairs) { + function baseZipObject(props, values, assignFunc) { var index = -1, - length = pairs == null ? 0 : pairs.length, + length = props.length, + valsLength = values.length, result = {}; while (++index < length) { - var pair = pairs[index]; - result[pair[0]] = pair[1]; + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); } return result; } /** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 + * Casts `value` to an empty array if it's not an array like object. * - * _.head([]); - * // => undefined + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. */ - function head(array) { - return (array && array.length) ? array[0] : undefined; + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; } /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example + * Casts `value` to `identity` if it's not a function. * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. */ - function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); + function castPath(value, object) { + if (isArray(value)) { + return value; } - return baseIndexOf(array, value, index); + return isKey(value, object) ? [value] : stringToPath(toString(value)); } /** - * Gets all but the last element of `array`. + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. * - * _.initial([1, 2, 3]); - * // => [1, 2] + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. */ - function initial(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 0, -1) : []; + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); } /** - * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of intersecting values. - * @example + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). * - * _.intersection([2, 1], [2, 3]); - * // => [2] + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. */ - var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped) - : []; - }); + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; /** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [2.1] + * Creates a clone of `buffer`. * - * // The `_.property` iteratee shorthand. - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. */ - var intersectionBy = baseRest(function(arrays) { - var iteratee = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - if (iteratee === last(mapped)) { - iteratee = undefined; - } else { - mapped.pop(); + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, getIteratee(iteratee, 2)) - : []; - }); + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } /** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The order and references - * of result values are determined by the first array. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * Creates a clone of `arrayBuffer`. * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. */ - var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - comparator = typeof comparator == 'function' ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, undefined, comparator) - : []; - }); + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } /** - * Converts all elements in `array` into a string separated by `separator`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to convert. - * @param {string} [separator=','] The element separator. - * @returns {string} Returns the joined string. - * @example + * Creates a clone of `dataView`. * - * _.join(['a', 'b', 'c'], '~'); - * // => 'a~b~c' + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. */ - function join(array, separator) { - return array == null ? '' : nativeJoin.call(array, separator); + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example + * Creates a clone of `regexp`. * - * _.last([1, 2, 3]); - * // => 3 + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. */ - function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; } /** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. + * Creates a clone of the `symbol` object. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // Search from the `fromIndex`. - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. */ - function lastIndexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); - } - return value === value - ? strictLastIndexOf(array, value, index) - : baseFindIndex(array, baseIsNaN, index, true); + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } /** - * Gets the element at index `n` of `array`. If `n` is negative, the nth - * element from the end is returned. - * - * @static - * @memberOf _ - * @since 4.11.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=0] The index of the element to return. - * @returns {*} Returns the nth element of `array`. - * @example - * - * var array = ['a', 'b', 'c', 'd']; - * - * _.nth(array, 1); - * // => 'b' + * Creates a clone of `typedArray`. * - * _.nth(array, -2); - * // => 'c'; + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. */ - function nth(array, n) { - return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } /** - * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` - * to remove elements from an array by predicate. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * Compares values to sort them in ascending order. * - * _.pull(array, 'a', 'c'); - * console.log(array); - * // => ['b', 'b'] + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. */ - var pull = baseRest(pullAll); + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); - /** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pullAll(array, ['a', 'c']); - * console.log(array); - * // => ['b', 'b'] - */ - function pullAll(array, values) { - return (array && array.length && values && values.length) - ? basePullAll(array, values) - : array; + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; } /** - * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The iteratee is invoked with one argument: (value). - * - * **Note:** Unlike `_.differenceBy`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns `array`. - * @example + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. * - * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. * - * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); - * console.log(array); - * // => [{ 'x': 2 }] + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. */ - function pullAllBy(array, values, iteratee) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, getIteratee(iteratee, 2)) - : array; + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; } /** - * This method is like `_.pullAll` except that it accepts `comparator` which - * is invoked to compare elements of `array` to `values`. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.differenceWith`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. * - * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); - * console.log(array); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. */ - function pullAllWith(array, values, comparator) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, undefined, comparator) - : array; + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; } /** - * Removes elements from `array` corresponding to `indexes` and returns an - * array of removed elements. - * - * **Note:** Unlike `_.at`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...(number|number[])} [indexes] The indexes of elements to remove. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = ['a', 'b', 'c', 'd']; - * var pulled = _.pullAt(array, [1, 3]); - * - * console.log(array); - * // => ['a', 'c'] + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. * - * console.log(pulled); - * // => ['b', 'd'] + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. */ - var pullAt = flatRest(function(array, indexes) { - var length = array == null ? 0 : array.length, - result = baseAt(array, indexes); - - basePullAt(array, arrayMap(indexes, function(index) { - return isIndex(index, length) ? +index : index; - }).sort(compareAscending)); + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } return result; - }); + } /** - * Removes all elements from `array` that `predicate` returns truthy for - * and returns an array of the removed elements. The predicate is invoked - * with three arguments: (value, index, array). - * - * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` - * to pull elements from an array by value. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [1, 2, 3, 4]; - * var evens = _.remove(array, function(n) { - * return n % 2 == 0; - * }); - * - * console.log(array); - * // => [1, 3] + * Copies the values of `source` to `array`. * - * console.log(evens); - * // => [2, 4] + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. */ - function remove(array, predicate) { - var result = []; - if (!(array && array.length)) { - return result; - } + function copyArray(source, array) { var index = -1, - indexes = [], - length = array.length; + length = source.length; - predicate = getIteratee(predicate, 3); + array || (array = Array(length)); while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result.push(value); - indexes.push(index); - } + array[index] = source[index]; } - basePullAt(array, indexes); - return result; + return array; } /** - * Reverses `array` so that the first element becomes the last, the second - * element becomes the second to last, and so on. - * - * **Note:** This method mutates `array` and is based on - * [`Array#reverse`](https://mdn.io/Array/reverse). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.reverse(array); - * // => [3, 2, 1] + * Copies properties of `source` to `object`. * - * console.log(array); - * // => [3, 2, 1] + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. */ - function reverse(array) { - return array == null ? array : nativeReverse.call(array); + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; } /** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of - * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are - * returned. + * Copies own symbols of `source` to `object`. * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. */ - function slice(array, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - else { - start = start == null ? 0 : toInteger(start); - end = end === undefined ? length : toInteger(end); - } - return baseSlice(array, start, end); + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); } /** - * Uses a binary search to determine the lowest index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example + * Copies own and inherited symbols of `source` to `object`. * - * _.sortedIndex([30, 50], 40); - * // => 1 + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. */ - function sortedIndex(array, value) { - return baseSortedIndex(array, value); + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); } /** - * This method is like `_.sortedIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; - * - * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 0 + * Creates a function like `_.groupBy`. * - * // The `_.property` iteratee shorthand. - * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); - * // => 0 + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. */ - function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; } /** - * This method is like `_.indexOf` except that it performs a binary - * search on a sorted `array`. + * Creates a function like `_.assign`. * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedIndexOf([4, 5, 5, 5, 6], 5); - * // => 1 + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. */ - function sortedIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value); - if (index < length && eq(array[index], value)) { - return index; + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; } - } - return -1; + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); } /** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example + * Creates a `baseEach` or `baseEachRight` function. * - * _.sortedLastIndex([4, 5, 5, 5, 6], 5); - * // => 4 + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ - function sortedLastIndex(array, value) { - return baseSortedIndex(array, value, true); - } + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); - /** - * This method is like `_.sortedLastIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; - * - * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 1 - * - * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); - * // => 1 - */ - function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; } /** - * This method is like `_.lastIndexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example + * Creates a base function for methods like `_.forIn` and `_.forOwn`. * - * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); - * // => 3 + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ - function sortedLastIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value, true) - 1; - if (eq(array[index], value)) { - return index; + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } } - } - return -1; + return object; + }; } /** - * This method is like `_.uniq` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. * - * _.sortedUniq([1, 1, 2]); - * // => [1, 2] + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. */ - function sortedUniq(array) { - return (array && array.length) - ? baseSortedUniq(array) - : []; + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; } /** - * This method is like `_.uniqBy` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example + * Creates a function like `_.lowerFirst`. * - * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); - * // => [1.1, 2.3] + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. */ - function sortedUniqBy(array, iteratee) { - return (array && array.length) - ? baseSortedUniq(array, getIteratee(iteratee, 2)) - : []; + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; } /** - * Gets all but the first element of `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example + * Creates a function like `_.camelCase`. * - * _.tail([1, 2, 3]); - * // => [2, 3] + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. */ - function tail(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 1, length) : []; + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; } /** - * Creates a slice of `array` with `n` elements taken from the beginning. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.take([1, 2, 3]); - * // => [1] - * - * _.take([1, 2, 3], 2); - * // => [1, 2] - * - * _.take([1, 2, 3], 5); - * // => [1, 2, 3] + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. * - * _.take([1, 2, 3], 0); - * // => [] + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. */ - function take(array, n, guard) { - if (!(array && array.length)) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, 0, n < 0 ? 0 : n); + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; } /** - * Creates a slice of `array` with `n` elements taken from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRight([1, 2, 3]); - * // => [3] - * - * _.takeRight([1, 2, 3], 2); - * // => [2, 3] - * - * _.takeRight([1, 2, 3], 5); - * // => [1, 2, 3] + * Creates a function that wraps `func` to enable currying. * - * _.takeRight([1, 2, 3], 0); - * // => [] + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. */ - function takeRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, n < 0 ? 0 : n, length); + return wrapper; } /** - * Creates a slice of `array` with elements taken from the end. Elements are - * taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.takeRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeRightWhile(users, ['active', false]); - * // => objects for ['fred', 'pebbles'] + * Creates a `_.find` or `_.findLast` function. * - * // The `_.property` iteratee shorthand. - * _.takeRightWhile(users, 'active'); - * // => [] + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. */ - function takeRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), false, true) - : []; + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; } /** - * Creates a slice of `array` with elements taken from the beginning. Elements - * are taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.takeWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matches` iteratee shorthand. - * _.takeWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeWhile(users, ['active', false]); - * // => objects for ['barney', 'fred'] + * Creates a `_.flow` or `_.flowRight` function. * - * // The `_.property` iteratee shorthand. - * _.takeWhile(users, 'active'); - * // => [] + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. */ - function takeWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3)) - : []; + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); } /** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. */ - var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); - }); + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } /** - * This method is like `_.union` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. Result values are chosen from the first - * array in which the value occurs. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.unionBy([2.1], [1.2, 2.3], Math.floor); - * // => [2.1, 1.2] + * Creates a function like `_.invertBy`. * - * // The `_.property` iteratee shorthand. - * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. */ - var unionBy = baseRest(function(arrays) { - var iteratee = last(arrays); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); - }); + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } /** - * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. Result values are chosen from - * the first array in which the value occurs. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * Creates a function that performs a mathematical operation on two values. * - * _.unionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. */ - var unionWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == 'function' ? comparator : undefined; - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); - }); + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each element - * is kept. The order of result values is determined by the order they occur - * in the array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example + * Creates a function like `_.over`. * - * _.uniq([2, 1, 2]); - * // => [2, 1] + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. */ - function uniq(array) { - return (array && array.length) ? baseUniq(array) : []; + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); } /** - * This method is like `_.uniq` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The order of result values is determined by the - * order they occur in the array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniqBy([2.1, 1.2, 2.3], Math.floor); - * // => [2.1, 1.2] + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. * - * // The `_.property` iteratee shorthand. - * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. */ - function uniqBy(array, iteratee) { - return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); } /** - * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The order of result values is - * determined by the order they occur in the array.The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. * - * _.uniqWith(objects, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. */ - function uniqWith(array, comparator) { - comparator = typeof comparator == 'function' ? comparator : undefined; - return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; } /** - * This method is like `_.zip` except that it accepts an array of grouped - * elements and creates an array regrouping the elements to their pre-zip - * configuration. - * - * @static - * @memberOf _ - * @since 1.2.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] + * Creates a `_.range` or `_.rangeRight` function. * - * _.unzip(zipped); - * // => [['a', 'b'], [1, 2], [true, false]] + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. */ - function unzip(array) { - if (!(array && array.length)) { - return []; - } - var length = 0; - array = arrayFilter(array, function(group) { - if (isArrayLikeObject(group)) { - length = nativeMax(group.length, length); - return true; + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; } - }); - return baseTimes(length, function(index) { - return arrayMap(array, baseProperty(index)); - }); + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; } /** - * This method is like `_.unzip` except that it accepts `iteratee` to specify - * how regrouped values should be combined. The iteratee is invoked with the - * elements of each group: (...group). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @param {Function} [iteratee=_.identity] The function to combine - * regrouped values. - * @returns {Array} Returns the new array of regrouped elements. - * @example + * Creates a function that performs a relational operation on two values. * - * var zipped = _.zip([1, 2], [10, 20], [100, 200]); - * // => [[1, 10, 100], [2, 20, 200]] + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. * - * _.unzipWith(zipped, _.add); - * // => [3, 30, 300] + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. */ - function unzipWith(array, iteratee) { - if (!(array && array.length)) { - return []; + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } - var result = unzip(array); - if (iteratee == null) { - return result; + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); } - return arrayMap(result, function(group) { - return apply(iteratee, undefined, group); - }); + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); } /** - * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.pull`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.xor - * @example + * Creates a function like `_.round`. * - * _.without([2, 1, 2, 3], 1, 2); - * // => [3] + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. */ - var without = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, values) - : []; - }); + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } /** - * Creates an array of unique values that is the - * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the given arrays. The order of result values is determined by the order - * they occur in the arrays. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.without - * @example + * Creates a set object of `values`. * - * _.xor([2, 1], [2, 3]); - * // => [1, 3] + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. */ - var xor = baseRest(function(arrays) { - return baseXor(arrayFilter(arrays, isArrayLikeObject)); - }); + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; /** - * This method is like `_.xor` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The order of result values is determined - * by the order they occur in the arrays. The iteratee is invoked with one - * argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2, 3.4] + * Creates a `_.toPairs` or `_.toPairsIn` function. * - * // The `_.property` iteratee shorthand. - * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. */ - var xorBy = baseRest(function(arrays) { - var iteratee = last(arrays); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); - }); - - /** - * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The order of result values is - * determined by the order they occur in the arrays. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.xorWith(objects, others, _.isEqual); - * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - var xorWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == 'function' ? comparator : undefined; - return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); - }); + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } /** - * Creates an array of grouped elements, the first of which contains the - * first elements of the given arrays, the second of which contains the - * second elements of the given arrays, and so on. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. - * @example + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. * - * _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. */ - var zip = baseRest(unzip); + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; - /** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ - function zipObject(props, values) { - return baseZipObject(props || [], values || [], assignValue); - } + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; - /** - * This method is like `_.zipObject` except that it supports property paths. - * - * @static - * @memberOf _ - * @since 4.1.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); - * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } - */ - function zipObjectDeep(props, values) { - return baseZipObject(props || [], values || [], baseSet); - } + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); - /** - * This method is like `_.zip` except that it accepts `iteratee` to specify - * how grouped values should be combined. The iteratee is invoked with the - * elements of each group: (...group). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee=_.identity] The function to combine - * grouped values. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { - * return a + b + c; - * }); - * // => [111, 222] - */ - var zipWith = baseRest(function(arrays) { - var length = arrays.length, - iteratee = length > 1 ? arrays[length - 1] : undefined; + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; - iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; - return unzipWith(arrays, iteratee); - }); + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); - /*------------------------------------------------------------------------*/ + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } /** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; } /** - * This method invokes `interceptor` and returns `value`. The interceptor - * is invoked with one argument; (value). The purpose of this method is to - * "tap into" a method chain sequence in order to modify intermediate results. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns `value`. - * @example + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. * - * _([1, 2, 3]) - * .tap(function(array) { - * // Mutate input array. - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. */ - function tap(value, interceptor) { - interceptor(value); - return value; + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; } /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * The purpose of this method is to "pass thru" values replacing intermediate - * results in a method chain sequence. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns the result of `interceptor`. - * @example + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ - function thru(value, interceptor) { - return interceptor(value); + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; } /** - * This method is the wrapper version of `_.at`. - * - * @name at - * @memberOf _ - * @since 1.0.0 - * @category Seq - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. * - * _(object).at(['a[0].b.c', 'a[1]']).value(); - * // => [3, 4] + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ - var wrapperAt = flatRest(function(paths) { - var length = paths.length, - start = length ? paths[0] : 0, - value = this.__wrapped__, - interceptor = function(object) { return baseAt(object, paths); }; + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; - if (length > 1 || this.__actions__.length || - !(value instanceof LazyWrapper) || !isIndex(start)) { - return this.thru(interceptor); + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; } - value = value.slice(start, +start + (length ? 1 : 0)); - value.__actions__.push({ - 'func': thru, - 'args': [interceptor], - 'thisArg': undefined - }); - return new LodashWrapper(value, this.__chain__).thru(function(array) { - if (length && !array.length) { - array.push(undefined); + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); } - return array; - }); - }); + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } /** - * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. - * - * @name chain - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. * - * // A sequence without explicit chaining. - * _(users).head(); - * // => { 'user': 'barney', 'age': 36 } + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * - * // A sequence with explicit chaining. - * _(users) - * .chain() - * .head() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function wrapperChain() { - return chain(this); + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; } /** - * Executes the chain sequence and returns the wrapped result. + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. * - * @name commit - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapped = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapped = wrapped.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapped.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; } /** - * Gets the next value on a wrapped object following the - * [iterator protocol](https://mdn.io/iteration_protocols#iterator). - * - * @name next - * @memberOf _ - * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the next iterator value. - * @example - * - * var wrapped = _([1, 2]); - * - * wrapped.next(); - * // => { 'done': false, 'value': 1 } - * - * wrapped.next(); - * // => { 'done': false, 'value': 2 } + * A specialized version of `baseRest` which flattens the rest array. * - * wrapped.next(); - * // => { 'done': true, 'value': undefined } + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. */ - function wrapperNext() { - if (this.__values__ === undefined) { - this.__values__ = toArray(this.value()); - } - var done = this.__index__ >= this.__values__.length, - value = done ? undefined : this.__values__[this.__index__++]; - - return { 'done': done, 'value': value }; + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); } /** - * Enables the wrapper to be iterable. - * - * @name Symbol.iterator - * @memberOf _ - * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the wrapper object. - * @example - * - * var wrapped = _([1, 2]); - * - * wrapped[Symbol.iterator]() === wrapped; - * // => true + * Creates an array of own enumerable property names and symbols of `object`. * - * Array.from(wrapped); - * // => [1, 2] + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. */ - function wrapperToIterator() { - return this; + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); } /** - * Creates a clone of the chain sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @param {*} value The value to plant. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. * - * var wrapped = _([1, 2]).map(square); - * var other = wrapped.plant([3, 4]); + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. * - * other.value(); - * // => [9, 16] + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. * - * wrapped.value(); - * // => [1, 4] + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. */ - function wrapperPlant(value) { - var result, - parent = this; + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - clone.__index__ = 0; - clone.__values__ = undefined; - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; } - var previous = clone; - parent = parent.__wrapped__; } - previous.__wrapped__ = value; return result; } /** - * This method is the wrapper version of `_.reverse`. - * - * **Note:** This method mutates the wrapped array. - * - * @name reverse - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2, 3]; - * - * _(array).reverse().value() - * // => [3, 2, 1] + * Gets the argument placeholder value for `func`. * - * console.log(array); - * // => [3, 2, 1] + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. */ - function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - var wrapped = value; - if (this.__actions__.length) { - wrapped = new LazyWrapper(this); - } - wrapped = wrapped.reverse(); - wrapped.__actions__.push({ - 'func': thru, - 'args': [reverse], - 'thisArg': undefined - }); - return new LodashWrapper(wrapped, this.__chain__); - } - return this.thru(reverse); + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; } /** - * Executes the chain sequence to resolve the unwrapped value. - * - * @name value - * @memberOf _ - * @since 0.1.0 - * @alias toJSON, valueOf - * @category Seq - * @returns {*} Returns the resolved unwrapped value. - * @example + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; } - /*------------------------------------------------------------------------*/ - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the number of times the key was returned by `iteratee`. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': 1, '6': 2 } + * Gets the data for `map`. * - * // The `_.property` iteratee shorthand. - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. */ - var countBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - ++result[key]; - } else { - baseAssignValue(result, key, 1); - } - }); + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true + * Gets the property names, values, and compare flags of `object`. * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. */ - function every(collection, predicate, guard) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; } - return func(collection, getIteratee(predicate, 3)); + return result; } /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] + * Gets the native function at `key` of `object`. * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. */ - function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, getIteratee(predicate, 3)); + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. */ - var find = createFind(findIndex); + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } /** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=collection.length-1] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example + * Creates an array of the own enumerable symbols of `object`. * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. */ - var findLast = createFind(findLastIndex); + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; /** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). + * Creates an array of the own and inherited enumerable symbols of `object`. * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [n, n]; - * } - * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. */ - function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); - } + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; /** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } + * Gets the `toStringTag` of `value`. * - * _.flatMapDeep([1, 2], duplicate); - * // => [1, 1, 2, 2] + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. */ - function flatMapDeep(collection, iteratee) { - return baseFlatten(map(collection, iteratee), INFINITY); + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; } /** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } + * Gets the view, applying any `transforms` to the `start` and `end` positions. * - * _.flatMapDepth([1, 2], duplicate, 2); - * // => [[1, 1], [2, 2]] + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. */ - function flatMapDepth(collection, iteratee, depth) { - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(map(collection, iteratee), depth); + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; } /** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. + * Extracts wrapper details from the `source` body comment. * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. */ - function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, getIteratee(iteratee, 3)); + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; } /** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @alias eachRight - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEach - * @example + * Checks if `path` exists on `object`. * - * _.forEachRight([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `2` then `1`. + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. */ - function forEachRight(collection, iteratee) { - var func = isArray(collection) ? arrayEachRight : baseEachRight; - return func(collection, getIteratee(iteratee, 3)); + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); } /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The order of grouped values - * is determined by the order they occur in `collection`. The corresponding - * value of each key is an array of elements responsible for generating the - * key. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } + * Initializes an array clone. * - * // The `_.property` iteratee shorthand. - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. */ - var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - baseAssignValue(result, key, [value]); + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; } - }); + return result; + } /** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true + * Initializes an object clone. * - * _.includes([1, 2, 3], 1, 2); - * // => false + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * - * _.includes('abcd', 'bc'); - * // => true + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. */ - function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } /** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `path` is a function, it's invoked - * for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke each method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] + * Inserts wrapper `details` in a comment at the top of the `source` body. * - * _.invokeMap([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. */ - var invokeMap = baseRest(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); - }); - return result; - }); + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the last element responsible for generating the key. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var array = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.keyBy(array, function(o) { - * return String.fromCharCode(o.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * Checks if `value` is a flattenable `arguments` object or array. * - * _.keyBy(array, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ - var keyBy = createAggregator(function(result, value, key) { - baseAssignValue(result, key, value); - }); + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; + * Checks if `value` is a valid array-like index. * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ - function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, getIteratee(iteratee, 3)); + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); } /** - * This method is like `_.sortBy` except that it allows specifying the sort - * orders of the iteratees to sort by. If `orders` is unspecified, all values - * are sorted in ascending order. Otherwise, specify an order of "desc" for - * descending or "asc" for ascending sort order of corresponding values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] - * The iteratees to sort by. - * @param {string[]} [orders] The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 36 } - * ]; + * Checks if the given arguments are from an iteratee call. * - * // Sort by `user` in ascending order and by `age` in descending order. - * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. */ - function orderBy(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; } - orders = guard ? undefined : orders; - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); } - return baseOrderBy(collection, iteratees, orders); + return false; } /** - * Creates an array of elements split into two groups, the first of which - * contains elements `predicate` returns truthy for, the second of which - * contains elements `predicate` returns falsey for. The predicate is - * invoked with one argument: (value). + * Checks if `value` is a property name and not a property path. * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the array of grouped elements. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true }, - * { 'user': 'pebbles', 'age': 1, 'active': false } - * ]; - * - * _.partition(users, function(o) { return o.active; }); - * // => objects for [['fred'], ['barney', 'pebbles']] - * - * // The `_.matches` iteratee shorthand. - * _.partition(users, { 'age': 1, 'active': false }); - * // => objects for [['pebbles'], ['barney', 'fred']] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.partition(users, ['active', false]); - * // => objects for [['barney', 'pebbles'], ['fred']] - * - * // The `_.property` iteratee shorthand. - * _.partition(users, 'active'); - * // => objects for [['fred'], ['barney', 'pebbles']] + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ - var partition = createAggregator(function(result, value, key) { - result[key ? 0 : 1].push(value); - }, function() { return [[], []]; }); + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 + * Checks if `value` is suitable for use as unique object key. * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ - function reduce(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduce : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); } /** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduce - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; + * Checks if `func` has a lazy counterpart. * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. */ - function reduceRight(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduceRight : baseReduce, - initAccum = arguments.length < 3; + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; - return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; } /** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.filter - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; - * - * _.reject(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.reject(users, { 'age': 40, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.reject(users, ['active', false]); - * // => objects for ['fred'] + * Checks if `func` has its source masked. * - * // The `_.property` iteratee shorthand. - * _.reject(users, 'active'); - * // => objects for ['barney'] + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ - function reject(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, negate(getIteratee(predicate, 3))); + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } /** - * Gets a random element from `collection`. + * Checks if `func` is capable of being masked. * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - * @example + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. * - * _.sample([1, 2, 3, 4]); - * // => 2 + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ - function sample(collection) { - var func = isArray(collection) ? arraySample : baseSample; - return func(collection); + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; } /** - * Gets `n` random elements at unique keys from `collection` up to the - * size of `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @param {number} [n=1] The number of elements to sample. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the random elements. - * @example - * - * _.sampleSize([1, 2, 3], 2); - * // => [3, 1] + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * - * _.sampleSize([1, 2, 3], 4); - * // => [2, 3, 1] + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. */ - function sampleSize(collection, n, guard) { - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - var func = isArray(collection) ? arraySampleSize : baseSampleSize; - return func(collection, n); + function isStrictComparable(value) { + return value === value && !isObject(value); } /** - * Creates an array of shuffled values, using a version of the - * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - * @example + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. * - * _.shuffle([1, 2, 3, 4]); - * // => [4, 1, 3, 2] + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. */ - function shuffle(collection) { - var func = isArray(collection) ? arrayShuffle : baseShuffle; - return func(collection); + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; } /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. * - * _.size([1, 2, 3]); - * // => 3 + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. * - * _.size('pebbles'); - * // => 7 + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. */ - function size(collection) { - if (collection == null) { - return 0; + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; } - if (isArrayLike(collection)) { - return isString(collection) ? stringSize(collection) : collection.length; + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; } - return baseKeys(collection).length; + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; } /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ - function some(collection, predicate, guard) { - var func = isArray(collection) ? arraySome : baseSome; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } } - return func(collection, getIteratee(predicate, 3)); + return result; } /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * Converts `value` to a string using `Object.prototype.toString`. * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ - var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); - }); - - /*------------------------------------------------------------------------*/ + function objectToString(value) { + return nativeObjectToString.call(value); + } /** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example + * A specialized version of `baseRest` which transforms the rest array. * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ - var now = ctxNow || function() { - return root.Date.now(); - }; + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); - /*------------------------------------------------------------------------*/ + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } /** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it's called `n` or more times. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; + * Gets the parent value at `path` of `object`. * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => Logs 'done saving!' after the two async saves have completed. + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. */ - function after(n, func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; } - n = toInteger(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; + return array; } /** - * Creates a function that invokes `func`, with up to `n` arguments, - * ignoring any additional arguments. + * Sets metadata for `func`. * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new capped function. - * @example + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. */ - function ary(func, n, guard) { - n = guard ? undefined : n; - n = (func && n == null) ? func.length : n; - return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); } /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. + * @private * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. + * @returns {Function} Returns the new shortable function. */ - function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); + function shortOut(func) { + var count = 0, + lastCalled = 0; + return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; } - return result; + return func.apply(undefined, arguments); }; } /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. */ - var bind = baseRest(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bind)); - bitmask |= WRAP_PARTIAL_FLAG; + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); } - return createWrap(func, bitmask, thisArg, partials, holders); + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; }); /** - * Creates a function that invokes the method at `object[key]` with `partials` - * prepended to the arguments it receives. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. See - * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Function - * @param {Object} object The object to invoke the method on. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; + * Converts `value` to a string key if it's not a string or symbol. * - * bound('!'); - * // => 'hiya fred!' + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. * - * // Bound with placeholders. - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. */ - var bindKey = baseRest(function(object, key, partials) { - var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG; + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} } - return createWrap(key, bitmask, object, partials, holders); - }); + return ''; + } /** - * Creates a function that accepts arguments of `func` and either invokes - * `func` returning its result, if at least `arity` number of arguments have - * been provided, or returns a function that accepts the remaining `func` - * arguments, and so on. The arity of `func` may be specified if `func.length` - * is not sufficient. + * Updates wrapper `details` based on `bitmask` flags. * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. * - * **Note:** This method doesn't set the "length" property of curried functions. + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. * * @static * @memberOf _ - * @since 2.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. + * @returns {Array} Returns the new array of chunks. * @example * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] * - * // Curried with placeholders. - * curried(1)(_, 3)(2); - * // => [1, 2, 3] + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] */ - function curry(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curry.placeholder; + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } return result; } /** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. * * @static * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. * @example * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(3)(1, _)(2); + * _.compact([0, 1, false, 2, '', 3]); * // => [1, 2, 3] */ - function curryRight(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curryRight.placeholder; + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } return result; } /** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. + * Creates a new array concatenating `array` with any additional arrays + * and/or values. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. * @example * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); + * console.log(other); + * // => [1, 2, 3, [4]] * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); + * console.log(array); + * // => [1] */ - function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - result = wait - timeSinceLastCall; - - return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); + function concat() { + var length = arguments.length; + if (!length) { + return []; } + var args = Array(length - 1), + array = arguments[0], + index = length; - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; + while (index--) { + args[index - 1] = arguments[index]; } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor * @example * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. + * _.difference([2, 1], [2, 3]); + * // => [1] */ - var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; }); /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] */ - var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; }); /** - * Creates a function that invokes `func` with arguments reversed. + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. * * @static * @memberOf _ * @since 4.0.0 - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new flipped function. + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. * @example * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] */ - function flip(func) { - return createWrap(func, WRAP_FLIP_FLAG); - } + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * Creates a slice of `array` with `n` elements dropped from the beginning. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. * @example * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] + * _.drop([1, 2, 3]); + * // => [2, 3] * - * object.a = 2; - * values(object); - * // => [1, 2] + * _.drop([1, 2, 3], 2); + * // => [3] * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] + * _.drop([1, 2, 3], 5); + * // => [] * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] */ - function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); } - // Expose `MapCache`. - memoize.Cache = MapCache; - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. + * Creates a slice of `array` with `n` elements dropped from the end. * * @static * @memberOf _ * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. * @example * - * function isEven(n) { - * return n % 2 == 0; - * } + * _.dropRight([1, 2, 3]); + * // => [1, 2] * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - return function() { - var args = arguments; - switch (args.length) { - case 0: return !predicate.call(this); - case 1: return !predicate.call(this, args[0]); - case 2: return !predicate.call(this, args[0], args[1]); - case 3: return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); } /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. * @example * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] */ - function once(func) { - return before(2, func); + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; } /** - * Creates a function that invokes `func` with its arguments transformed. + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). * * @static - * @since 4.0.0 * @memberOf _ - * @category Function - * @param {Function} func The function to wrap. - * @param {...(Function|Function[])} [transforms=[_.identity]] - * The argument transforms. - * @returns {Function} Returns the new function. + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. * @example * - * function doubled(n) { - * return n * 2; - * } + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; * - * function square(n) { - * return n * n; - * } + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] * - * var func = _.overArgs(function(x, y) { - * return [x, y]; - * }, [square, doubled]); + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] * - * func(9, 3); - * // => [81, 6] + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] * - * func(10, 5); - * // => [100, 10] + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] */ - var overArgs = castRest(function(func, transforms) { - transforms = (transforms.length == 1 && isArray(transforms[0])) - ? arrayMap(transforms[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); - - var funcsLength = transforms.length; - return baseRest(function(args) { - var index = -1, - length = nativeMin(args.length, funcsLength); - - while (++index < length) { - args[index] = transforms[index].call(this, args[index]); - } - return apply(func, this, args); - }); - }); + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } /** - * Creates a function that invokes `func` with `partials` prepended to the - * arguments it receives. This method is like `_.bind` except it does **not** - * alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. + * **Note:** This method mutates `array`. * * @static * @memberOf _ - * @since 0.2.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. * @example * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } + * var array = [1, 2, 3]; * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] * - * // Partially applied with placeholders. - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - */ - var partial = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partial)); - return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); - }); + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } /** - * This method is like `_.partial` except that partially applied arguments - * are appended to the arguments it receives. - * - * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ - * @since 1.0.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. * @example * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; * - * var greetFred = _.partialRight(greet, 'fred'); - * greetFred('hi'); - * // => 'hi fred' + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 * - * // Partially applied with placeholders. - * var sayHelloTo = _.partialRight(greet, 'hello', _); - * sayHelloTo('fred'); - * // => 'hello fred' + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 */ - var partialRight = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partialRight)); - return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); - }); + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } /** - * Creates a function that invokes `func` with arguments arranged according - * to the specified `indexes` where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. * * @static * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes. - * @returns {Function} Returns the new function. + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. * @example * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, [2, 0, 1]); + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 */ - var rearg = flatRest(function(func, indexes) { - return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); - }); + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. - * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). + * Flattens `array` a single level deep. * * @static * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. * @example * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] */ - function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start === undefined ? start : toInteger(start); - return baseRest(func, start); + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; } /** - * Creates a function that invokes `func` with the `this` binding of the - * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). - * - * **Note:** This method is based on the - * [spread operator](https://mdn.io/spread_operator). + * Recursively flattens `array`. * * @static * @memberOf _ - * @since 3.2.0 - * @category Function - * @param {Function} func The function to spread arguments over. - * @param {number} [start=0] The start position of the spread. - * @returns {Function} Returns the new function. + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. * @example * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); - * - * say(['fred', 'hello']); - * // => 'fred says hello' - * - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); - * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] */ - function spread(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start == null ? 0 : nativeMax(toInteger(start), 0); - return baseRest(function(args) { - var array = args[start], - otherArgs = castSlice(args, 0, start); - - if (array) { - arrayPush(otherArgs, array); - } - return apply(func, this, otherArgs); - }); + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; } /** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide `options` to indicate whether `func` - * should be invoked on the leading and/or trailing edge of the `wait` - * timeout. The `func` is invoked with the last arguments provided to the - * throttled function. Subsequent calls to the throttled function return the - * result of the last `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the throttled function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.throttle` and `_.debounce`. + * Recursively flatten `array` up to `depth` times. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=true] - * Specify invoking on the leading edge of the timeout. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. * @example * - * // Avoid excessively updating the position while scrolling. - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * var array = [1, [2, [3, [4]], 5]]; * - * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. - * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); - * jQuery(element).on('click', throttled); + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] * - * // Cancel the trailing throttled invocation. - * jQuery(window).on('popstate', throttled.cancel); + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] */ - function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - return debounce(func, wait, { - 'leading': leading, - 'maxWait': wait, - 'trailing': trailing - }); + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); } /** - * Creates a function that accepts up to one argument, ignoring any - * additional arguments. + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. * * @static * @memberOf _ * @since 4.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. * @example * - * _.map(['6', '8', '10'], _.unary(parseInt)); - * // => [6, 8, 10] + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } */ - function unary(func) { - return ary(func, 1); + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; } /** - * Creates a function that provides `value` to `wrapper` as its first - * argument. Any additional arguments provided to the function are appended - * to those provided to the `wrapper`. The wrapper is invoked with the `this` - * binding of the created function. + * Gets the first element of `array`. * * @static * @memberOf _ * @since 0.1.0 - * @category Function - * @param {*} value The value to wrap. - * @param {Function} [wrapper=identity] The wrapper function. - * @returns {Function} Returns the new function. + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. * @example * - * var p = _.wrap(_.escape, function(func, text) { - * return '

' + func(text) + '

'; - * }); + * _.head([1, 2, 3]); + * // => 1 * - * p('fred, barney, & pebbles'); - * // => '

fred, barney, & pebbles

' + * _.head([]); + * // => undefined */ - function wrap(value, wrapper) { - return partial(castFunction(wrapper), value); + function head(array) { + return (array && array.length) ? array[0] : undefined; } - /*------------------------------------------------------------------------*/ - /** - * Casts `value` as an array if it's not one. + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. * * @static * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 */ - function castArray() { - if (!arguments.length) { - return []; + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; } - var value = arguments[0]; - return isArray(value) ? value : [value]; + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); } /** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. + * Gets all but the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. * @example * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true + * _.initial([1, 2, 3]); + * // => [1, 2] */ - function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; } /** - * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined`, - * cloning is handled by the method instead. The `customizer` is invoked with - * up to four arguments; (value [, index|key, object, stack]). + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the cloned value. - * @see _.cloneDeepWith + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. * @example * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * } - * - * var el = _.cloneWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 0 + * _.intersection([2, 1], [2, 3]); + * // => [2] */ - function cloneWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); - } + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); /** - * This method is like `_.clone` except that it recursively clones `value`. + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. * @example * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] */ - function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); - } + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); - /** - * This method is like `_.cloneWith` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the deep cloned value. - * @see _.cloneWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * } - * - * var el = _.cloneDeepWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 20 - */ - function cloneDeepWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); - } + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); /** - * Checks if `object` conforms to `source` by invoking the predicate - * properties of `source` with the corresponding property values of `object`. - * - * **Note:** This method is equivalent to `_.conforms` when `source` is - * partially applied. + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). * * @static * @memberOf _ - * @since 4.14.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. * @example * - * var object = { 'a': 1, 'b': 2 }; - * - * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); - * // => true + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * - * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); - * // => false + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] */ - function conformsTo(object, source) { - return source == null || baseConformsTo(object, source, keys(source)); - } + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. + * Converts all elements in `array` into a string separated by `separator`. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. * @example * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' */ - function eq(value, other) { - return value === other || (value !== value && other !== other); + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); } /** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - * @see _.lt - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ - var gt = createRelationalOperation(baseGt); - - /** - * Checks if `value` is greater than or equal to `other`. + * Gets the last element of `array`. * * @static * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to - * `other`, else `false`. - * @see _.lte + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. * @example * - * _.gte(3, 1); - * // => true - * - * _.gte(3, 3); - * // => true - * - * _.gte(1, 3); - * // => false + * _.last([1, 2, 3]); + * // => 3 */ - var gte = createRelationalOperation(function(value, other) { - return value >= other; - }); + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } /** - * Checks if `value` is likely an `arguments` object. + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. * * @static * @memberOf _ * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.isArguments(function() { return arguments; }()); - * // => true + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 * - * _.isArguments([1, 2, 3]); - * // => false + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 */ - var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); - }; + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } /** - * Checks if `value` is classified as an `Array` object. + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. * @example * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false + * var array = ['a', 'b', 'c', 'd']; * - * _.isArray('abc'); - * // => false + * _.nth(array, 1); + * // => 'b' * - * _.isArray(_.noop); - * // => false + * _.nth(array, -2); + * // => 'c'; */ - var isArray = Array.isArray; + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } /** - * Checks if `value` is classified as an `ArrayBuffer` object. + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. * @example * - * _.isArrayBuffer(new ArrayBuffer(2)); - * // => true + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.isArrayBuffer(new Array(2)); - * // => false + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] */ - var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + var pull = baseRest(pullAll); /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. * @example * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.isArrayLike(_.noop); - * // => false + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] */ - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; } /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. * @example * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; * - * _.isArrayLikeObject(_.noop); - * // => false + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] */ - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; } /** - * Checks if `value` is classified as a boolean primitive or object. + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. * @example * - * _.isBoolean(false); - * // => true + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; * - * _.isBoolean(null); - * // => false + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] */ - function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; } /** - * Checks if `value` is a buffer. + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. * @example * - * _.isBuffer(new Buffer(2)); - * // => true + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); * - * _.isBuffer(new Uint8Array(2)); - * // => false + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] */ - var isBuffer = nativeIsBuffer || stubFalse; + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); /** - * Checks if `value` is classified as a `Date` object. + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. * @example * - * _.isDate(new Date); - * // => true + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); * - * _.isDate('Mon April 23 2012'); - * // => false + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] */ - var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } /** - * Checks if `value` is likely a DOM element. + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. * @example * - * _.isElement(document.body); - * // => true + * var array = [1, 2, 3]; * - * _.isElement(''); - * // => false + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] */ - function isElement(value) { - return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + function reverse(array) { + return array == null ? array : nativeReverse.call(array); } /** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. + * Creates a slice of `array` from `start` up to, but not including, `end`. * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ - function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - if (isPrototype(value)) { - return !baseKeys(value).length; + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); } - return true; + return baseSlice(array, start, end); } /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. * * @static * @memberOf _ * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. * @example * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false + * _.sortedIndex([30, 50], 40); + * // => 1 */ - function isEqual(value, other) { - return baseIsEqual(value, other); + function sortedIndex(array, value) { + return baseSortedIndex(array, value); } /** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. * @example * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } + * var objects = [{ 'x': 4 }, { 'x': 5 }]; * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 * - * _.isEqualWith(array, other, customizer); - * // => true + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 */ - function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); } /** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. * * @static * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 */ - function isError(value) { - if (!isObjectLike(value)) { - return false; + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || - (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + return -1; } /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. * @example * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 */ - function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); } /** - * Checks if `value` is classified as a `Function` object. + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. * @example * - * _.isFunction(_); - * // => true + * var objects = [{ 'x': 4 }, { 'x': 5 }]; * - * _.isFunction(/abc/); - * // => false + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 */ - function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); } /** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 */ - function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; } /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. * @example * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] */ - function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; } /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. * @example * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] */ - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; } /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". + * Gets all but the first element of `array`. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. * @example * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false + * _.tail([1, 2, 3]); + * // => [2, 3] */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; } /** - * Checks if `value` is classified as a `Map` object. + * Creates a slice of `array` with `n` elements taken from the beginning. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. * @example * - * _.isMap(new Map); - * // => true + * _.take([1, 2, 3]); + * // => [1] * - * _.isMap(new WeakMap); - * // => false + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] */ - var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } /** - * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. - * - * **Note:** This method is equivalent to `_.matches` when `source` is - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. + * Creates a slice of `array` with `n` elements taken from the end. * * @static * @memberOf _ * @since 3.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. * @example * - * var object = { 'a': 1, 'b': 2 }; + * _.takeRight([1, 2, 3]); + * // => [3] * - * _.isMatch(object, { 'b': 2 }); - * // => true + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] * - * _.isMatch(object, { 'b': 1 }); - * // => false + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] */ - function isMatch(object, source) { - return object === source || baseIsMatch(object, source, getMatchData(source)); + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); } /** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with five - * arguments: (objValue, srcValue, index|key, object, source). + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. * @example * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] * - * _.isMatchWith(object, source, customizer); - * // => true + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] */ - function isMatchWith(object, source, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseIsMatch(object, source, getMatchData(source), customizer); + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; } /** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. * @example * - * _.isNaN(NaN); - * // => true + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; * - * _.isNaN(new Number(NaN)); - * // => true + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] * - * isNaN(undefined); - * // => true + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; } /** - * Checks if `value` is a pristine native function. - * - * **Note:** This method can't reliably detect native functions in the presence - * of the core-js package because core-js circumvents this kind of detection. - * Despite multiple requests, the core-js maintainer has made it clear: any - * attempt to fix the detection will be obstructed. As a result, we're left - * with little choice but to throw an error. Unfortunately, this also affects - * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on core-js. + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * * @static * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. * @example * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false + * _.union([2], [1, 2]); + * // => [2, 1] */ - function isNative(value) { - if (isMaskable(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative(value); - } + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); /** - * Checks if `value` is `null`. + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. * @example * - * _.isNull(null); - * // => true + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] * - * _.isNull(void 0); - * // => false + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] */ - function isNull(value) { - return value === null; - } + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); /** - * Checks if `value` is `null` or `undefined`. + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. * @example * - * _.isNil(null); - * // => true - * - * _.isNil(void 0); - * // => true + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * - * _.isNil(NaN); - * // => false + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - function isNil(value) { - return value == null; - } + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * * @static * @memberOf _ * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. * @example * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false + * _.uniq([2, 1, 2]); + * // => [2, 1] */ - function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; } /** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. * @example * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] * - * _.isPlainObject(Object.create(null)); - * // => true + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] */ - function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; } /** - * Checks if `value` is classified as a `RegExp` object. + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. * @example * - * _.isRegExp(/abc/); - * // => true + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * - * _.isRegExp('/abc/'); - * // => false + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ - var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } /** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on - * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. * @example * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] * - * _.isSafeInteger('3'); - * // => false + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] */ - function isSafeInteger(value) { - return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); } /** - * Checks if `value` is classified as a `Set` object. + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. * @example * - * _.isSet(new Set); - * // => true + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] * - * _.isSet(new WeakSet); - * // => false + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] */ - var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } /** - * Checks if `value` is classified as a `String` primitive or object. + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. * * @static - * @since 0.1.0 * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor * @example * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); - } + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); /** - * Checks if `value` is classified as a `Symbol` primitive or object. + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without * @example * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false + * _.xor([2, 1], [2, 3]); + * // => [1, 3] */ - function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); - } + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); /** - * Checks if `value` is classified as a typed array. + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). * * @static * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.isTypedArray(new Uint8Array); - * // => true + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] * - * _.isTypedArray([]); - * // => false + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] */ - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); /** - * Checks if `value` is `undefined`. + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static - * @since 0.1.0 * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.isUndefined(void 0); - * // => true + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * - * _.isUndefined(null); - * // => false + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - function isUndefined(value) { - return value === undefined; - } + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); /** - * Checks if `value` is classified as a `WeakMap` object. + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. * @example * - * _.isWeakMap(new WeakMap); - * // => true - * - * _.isWeakMap(new Map); - * // => false + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] */ - function isWeakMap(value) { - return isObjectLike(value) && getTag(value) == weakMapTag; - } + var zip = baseRest(unzip); /** - * Checks if `value` is classified as a `WeakSet` object. + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. * @example * - * _.isWeakSet(new WeakSet); - * // => true - * - * _.isWeakSet(new Set); - * // => false + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } */ - function isWeakSet(value) { - return isObjectLike(value) && baseGetTag(value) == weakSetTag; + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); } /** - * Checks if `value` is less than `other`. + * This method is like `_.zipObject` except that it supports property paths. * * @static * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - * @see _.gt + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. * @example * - * _.lt(1, 3); - * // => true - * - * _.lt(3, 3); - * // => false - * - * _.lt(3, 1); - * // => false + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } */ - var lt = createRelationalOperation(baseLt); + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } /** - * Checks if `value` is less than or equal to `other`. + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). * * @static * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than or equal to - * `other`, else `false`. - * @see _.gte + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. * @example * - * _.lte(1, 3); - * // => true - * - * _.lte(3, 3); - * // => true - * - * _.lte(3, 1); - * // => false + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] */ - var lte = createRelationalOperation(function(value, other) { - return value <= other; + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); }); + /*------------------------------------------------------------------------*/ + /** - * Converts `value` to an array. + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. * * @static - * @since 0.1.0 * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. * @example * - * _.toArray({ 'a': 1, 'b': 2 }); - * // => [1, 2] - * - * _.toArray('abc'); - * // => ['a', 'b', 'c'] - * - * _.toArray(1); - * // => [] + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; * - * _.toArray(null); - * // => [] + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' */ - function toArray(value) { - if (!value) { - return []; - } - if (isArrayLike(value)) { - return isString(value) ? stringToArray(value) : copyArray(value); - } - if (symIterator && value[symIterator]) { - return iteratorToArray(value[symIterator]()); - } - var tag = getTag(value), - func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); - - return func(value); + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; } /** - * Converts `value` to a finite number. + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. * * @static * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. * @example * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] */ - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; + function tap(value, interceptor) { + interceptor(value); + return value; } /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. * @example * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] */ - function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; + function thru(value, interceptor) { + return interceptor(value); } /** - * Converts `value` to an integer suitable for use as the length of an - * array-like object. - * - * **Note:** This method is based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * This method is the wrapper version of `_.at`. * - * @static + * @name at * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. * @example * - * _.toLength(3.2); - * // => 3 - * - * _.toLength(Number.MIN_VALUE); - * // => 0 - * - * _.toLength(Infinity); - * // => 4294967295 + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * - * _.toLength('3.2'); - * // => 3 + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] */ - function toLength(value) { - return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; - } + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); /** - * Converts `value` to a number. + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. * - * @static + * @name chain * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. * @example * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; * - * _.toNumber(Infinity); - * // => Infinity + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } * - * _.toNumber('3.2'); - * // => 3.2 + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } */ - function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); + function wrapperChain() { + return chain(this); } /** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. + * Executes the chain sequence and returns the wrapped result. * - * @static + * @name commit * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. * @example * - * function Foo() { - * this.b = 2; - * } + * var array = [1, 2]; + * var wrapped = _(array).push(3); * - * Foo.prototype.c = 3; + * console.log(array); + * // => [1, 2] * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] */ - function toPlainObject(value) { - return copyObject(value, keysIn(value)); + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); } /** - * Converts `value` to a safe integer. A safe integer can be compared and - * represented correctly. + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). * - * @static + * @name next * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @category Seq + * @returns {Object} Returns the next iterator value. * @example * - * _.toSafeInteger(3.2); - * // => 3 + * var wrapped = _([1, 2]); * - * _.toSafeInteger(Number.MIN_VALUE); - * // => 0 + * wrapped.next(); + * // => { 'done': false, 'value': 1 } * - * _.toSafeInteger(Infinity); - * // => 9007199254740991 + * wrapped.next(); + * // => { 'done': false, 'value': 2 } * - * _.toSafeInteger('3.2'); - * // => 3 + * wrapped.next(); + * // => { 'done': true, 'value': undefined } */ - function toSafeInteger(value) { - return value - ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) - : (value === 0 ? value : 0); + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; } /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. + * Enables the wrapper to be iterable. * - * @static + * @name Symbol.iterator * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * @category Seq + * @returns {Object} Returns the wrapper object. * @example * - * _.toString(null); - * // => '' + * var wrapped = _([1, 2]); * - * _.toString(-0); - * // => '-0' + * wrapped[Symbol.iterator]() === wrapped; + * // => true * - * _.toString([1, 2, 3]); - * // => '1,2,3' + * Array.from(wrapped); + * // => [1, 2] */ - function toString(value) { - return value == null ? '' : baseToString(value); + function wrapperToIterator() { + return this; } - /*------------------------------------------------------------------------*/ - /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). + * Creates a clone of the chain sequence planting `value` as the wrapped value. * - * @static + * @name plant * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. * @example * - * function Foo() { - * this.a = 1; + * function square(n) { + * return n * n; * } * - * function Bar() { - * this.c = 3; - * } + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; + * other.value(); + * // => [9, 16] * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } + * wrapped.value(); + * // => [1, 4] */ - var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; } + var previous = clone; + parent = parent.__wrapped__; } - }); + previous.__wrapped__ = value; + return result; + } /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. + * This method is the wrapper version of `_.reverse`. * - * **Note:** This method mutates `object`. + * **Note:** This method mutates the wrapped array. * - * @static + * @name reverse * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. * @example * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } + * var array = [1, 2, 3]; * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; + * _(array).reverse().value() + * // => [3, 2, 1] * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + * console.log(array); + * // => [3, 2, 1] */ - var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); - }); + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } /** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. + * Executes the chain sequence to resolve the unwrapped value. * - * @static + * @name value * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. * @example * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } + * _([1, 2, 3]).value(); + * // => [1, 2, 3] */ - var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); - }); + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ /** - * This method is like `_.assign` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignInWith + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. * @example * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignWith, customizer); + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } */ - var assignWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keys(source), object, customizer); + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } }); /** - * Creates an array of values corresponding to `paths` of `object`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Array} Returns the picked values. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). * - * _.at(object, ['a[0].b.c', 'a[1]']); - * // => [3, 4] - */ - var at = flatRest(baseAt); - - /** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. * * @static * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. * @example * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } + * _.every([true, 1, null, 'yes'], Boolean); + * // => false * - * function Circle() { - * Shape.call(this); - * } + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false * - * var circle = new Circle; - * circle instanceof Circle; + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); * // => true * - * circle instanceof Shape; - * // => true + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false */ - function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : baseAssign(result, properties); + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); } /** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). * - * **Note:** This method mutates `object`. + * **Note:** Unlike `_.remove`, this method returns a new array. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject * @example * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var defaults = baseRest(function(args) { - args.push(undefined, customDefaultsAssignIn); - return apply(assignInWith, undefined, args); - }); - - /** - * This method is like `_.defaults` except that it recursively assigns - * default properties. + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; * - * **Note:** This method mutates `object`. + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults - * @example + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] */ - var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); - }); + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } /** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). * * @static * @memberOf _ - * @since 1.1.0 - * @category Object - * @param {Object} object The object to inspect. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. * @example * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; * - * _.findKey(users, function(o) { return o.age < 40; }); - * // => 'barney' (iteration order is not guaranteed) + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' * * // The `_.matches` iteratee shorthand. - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' * * // The `_.matchesProperty` iteratee shorthand. - * _.findKey(users, ['active', false]); - * // => 'fred' + * _.find(users, ['active', false]); + * // => object for 'fred' * * // The `_.property` iteratee shorthand. - * _.findKey(users, 'active'); - * // => 'barney' + * _.find(users, 'active'); + * // => object for 'barney' */ - function findKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); - } + var find = createFind(findIndex); /** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 - * @category Object - * @param {Object} object The object to inspect. + * @category Collection + * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. * @example * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(o) { return o.age < 40; }); - * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). * - * // The `_.matches` iteratee shorthand. - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastKey(users, ['active', false]); - * // => 'fred' + * function duplicate(n) { + * return [n, n]; + * } * - * // The `_.property` iteratee shorthand. - * _.findLastKey(users, 'active'); - * // => 'pebbles' + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] */ - function findLastKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); } /** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. * * @static * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight + * @returns {Array} Returns the new flattened array. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; + * function duplicate(n) { + * return [[[n, n]]]; * } * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] */ - function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, getIteratee(iteratee, 3), keysIn); + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); } /** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. * * @static * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forIn + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; + * function duplicate(n) { + * return [[[n, n]]]; * } * - * Foo.prototype.c = 3; - * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] */ - function forInRight(object, iteratee) { - return object == null - ? object - : baseForRight(object, getIteratee(iteratee, 3), keysIn); + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); } /** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. * * @static * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. * - * _.forOwn(new Foo, function(value, key) { + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ - function forOwn(object, iteratee) { - return object && baseForOwn(object, getIteratee(iteratee, 3)); + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); } /** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwn + * @returns {Array|Object} Returns `collection`. + * @see _.forEach * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); + * _.forEachRight([1, 2], function(value) { + * console.log(value); * }); - * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + * // => Logs `2` then `1`. */ - function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); } /** - * Creates an array of function property names from own enumerable properties - * of `object`. + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functionsIn + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. * @example * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } * - * _.functions(new Foo); - * // => ['a', 'b'] + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } */ - function functions(object) { - return object == null ? [] : baseFunctions(object, keys(object)); - } + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); /** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functions + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. * @example * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } + * _.includes([1, 2, 3], 1); + * // => true * - * Foo.prototype.c = _.constant('c'); + * _.includes([1, 2, 3], 1, 2); + * // => false * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true */ - function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] */ - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; - } + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); /** - * Checks if `path` is a direct property of `object`. + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. * @example * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; * - * _.has(object, ['a', 'b']); - * // => true + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } * - * _.has(other, 'a'); - * // => false + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ - function has(object, path) { - return object != null && hasPath(object, path, baseHas); - } + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); /** - * Checks if `path` is a direct or inherited property of `object`. + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. * @example * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * function square(n) { + * return n * n; + * } * - * _.hasIn(object, 'a'); - * // => true + * _.map([4, 8], square); + * // => [16, 64] * - * _.hasIn(object, 'a.b'); - * // => true + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) * - * _.hasIn(object, ['a', 'b']); - * // => true + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; * - * _.hasIn(object, 'b'); - * // => false + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] */ - function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); } /** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite - * property assignments of previous values. + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. * * @static * @memberOf _ - * @since 0.7.0 - * @category Object - * @param {Object} object The object to invert. - * @returns {Object} Returns the new inverted object. + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. * @example * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ - var invert = createInverter(function(result, value, key) { - result[value] = key; - }, constant(identity)); + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } /** - * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` thru `iteratee`. The - * corresponding inverted value of each inverted key is an array of keys - * responsible for generating the inverted value. The iteratee is invoked - * with one argument: (value). + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). * * @static * @memberOf _ - * @since 4.1.0 - * @category Object - * @param {Object} object The object to invert. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Object} Returns the new inverted object. + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. * @example * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; * - * _.invertBy(object); - * // => { '1': ['a', 'c'], '2': ['b'] } + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] * - * _.invertBy(object, function(value) { - * return 'group' + value; - * }); - * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] */ - var invertBy = createInverter(function(result, value, key) { - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - }, getIteratee); + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); /** - * Invokes the method at `path` of `object`. + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight * @example * - * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 * - * _.invoke(object, 'a[0].b.c.slice', 1, 3); - * // => [2, 3] + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ - var invoke = baseRest(baseInvoke); + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) + * var array = [[0, 1], [2, 3], [4, 5]]; * - * _.keys('hi'); - * // => ['0', '1'] + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] */ - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); } /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. * * @static * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; * - * Foo.prototype.c = 3; + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] */ - function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); } /** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * string keyed property of `object` thru `iteratee`. The iteratee is invoked - * with three arguments: (value, key, object). + * Gets a random element from `collection`. * * @static * @memberOf _ - * @since 3.8.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapValues + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. * @example * - * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { - * return key + value; - * }); - * // => { 'a1': 1, 'b2': 2 } + * _.sample([1, 2, 3, 4]); + * // => 2 */ - function mapKeys(object, iteratee) { - var result = {}; - iteratee = getIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, iteratee(value, key, object), value); - }); - return result; + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); } /** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. * * @static * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. * @example * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] */ - function mapValues(object, iteratee) { - var result = {}; - iteratee = getIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, key, iteratee(value, key, object)); - }); - return result; + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); } /** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). * * @static * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. * @example * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] */ - var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); - }); - - /** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with six arguments: - * (objValue, srcValue, key, object, source, stack). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { 'a': [1], 'b': [2] }; - * var other = { 'a': [3], 'b': [4] }; - * - * _.mergeWith(object, other, customizer); - * // => { 'a': [1, 3], 'b': [2, 4] } - */ - var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); - }); + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } /** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable property paths of `object` that are not omitted. - * - * **Note:** This method is considerably slower than `_.pick`. + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to omit. - * @returns {Object} Returns the new object. + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. * @example * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * _.size([1, 2, 3]); + * // => 3 * - * _.omit(object, ['a', 'c']); - * // => { 'b': '2' } + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 */ - var omit = flatRest(function(object, paths) { - var result = {}; - if (object == null) { - return result; + function size(collection) { + if (collection == null) { + return 0; } - var isDeep = false; - paths = arrayMap(paths, function(path) { - path = castPath(path, object); - isDeep || (isDeep = path.length > 1); - return path; - }); - copyObject(object, getAllKeysIn(object), result); - if (isDeep) { - result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; } - var length = paths.length; - while (length--) { - baseUnset(result, paths[length]); + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; } - return result; - }); + return baseKeys(collection).length; + } /** - * The opposite of `_.pickBy`; this method creates an object composed of - * the own and inherited enumerable string keyed properties of `object` that - * `predicate` doesn't return truthy for. The predicate is invoked with two - * arguments: (value, key). + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. * @example * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * _.some([null, 0, 'yes', false], Boolean); + * // => true * - * _.omitBy(object, _.isNumber); - * // => { 'b': '2' } + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true */ - function omitBy(object, predicate) { - return pickBy(object, negate(getIteratee(predicate))); + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); } /** - * Creates an object composed of the picked `object` properties. + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. * @example * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] */ - var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); + /*------------------------------------------------------------------------*/ + /** - * Creates an object composed of the `object` properties `predicate` returns - * truthy for. The predicate is invoked with two arguments: (value, key). + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. * @example * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pickBy(object, _.isNumber); - * // => { 'a': 1, 'c': 3 } + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. */ - function pickBy(object, predicate) { - if (object == null) { - return {}; - } - var props = arrayMap(getAllKeysIn(object), function(prop) { - return [prop]; - }); - predicate = getIteratee(predicate); - return basePickBy(object, props, function(value, path) { - return predicate(value, path[0]); - }); - } + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ /** - * This method is like `_.get` except that if the resolved value is a - * function it's invoked with the `this` binding of its parent object and - * its result is returned. + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. * @example * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 + * var saves = ['profile', 'settings']; * - * _.result(object, 'a[0].b.c3', 'default'); - * // => 'default' + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); * - * _.result(object, 'a[0].b.c3', _.constant('default')); - * // => 'default' + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. */ - function result(object, path, defaultValue) { - path = castPath(path, object); - - var index = -1, - length = path.length; - - // Ensure the loop is entered when path is empty. - if (!length) { - length = 1; - object = undefined; + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } - while (++index < length) { - var value = object == null ? undefined : object[toKey(path[index])]; - if (value === undefined) { - index = length; - value = defaultValue; + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); } - object = isFunction(value) ? value.call(object) : value; - } - return object; + }; } /** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, - * it's created. Arrays are created for missing index properties while objects - * are created for all other missing properties. Use `_.setWith` to customize - * `path` creation. - * - * **Note:** This method mutates `object`. + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. * * @static * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, ['x', '0', 'y', 'z'], 5); - * console.log(object.x[0].y.z); - * // => 5 + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] */ - function set(object, path, value) { - return object == null ? object : baseSet(object, path, value); + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); } /** - * This method is like `_.set` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). - * - * **Note:** This method mutates `object`. + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. * @example * - * var object = {}; - * - * _.setWith(object, '[0][1]', 'a', Object); - * // => { '0': { '1': 'a' } } + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. */ - function setWith(object, path, value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseSet(object, path, value, customizer); + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; } /** - * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. If `object` is a map or set, its - * entries are returned. + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. * * @static * @memberOf _ - * @since 4.0.0 - * @alias entries - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; * } * - * Foo.prototype.c = 3; + * var object = { 'user': 'fred' }; * - * _.toPairs(new Foo); - * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' */ - var toPairs = createToPairs(keys); + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); /** - * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. If `object` is a map - * or set, its entries are returned. + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. * * @static * @memberOf _ - * @since 4.0.0 - * @alias entriesIn - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; * - * Foo.prototype.c = 3; + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' * - * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' */ - var toPairsIn = createToPairs(keysIn); + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); /** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own - * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. If `accumulator` is not - * provided, a new object with the same `[[Prototype]]` will be used. The - * iteratee is invoked with four arguments: (accumulator, value, key, object). - * Iteratee functions may exit iteration early by explicitly returning `false`. + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. * * @static * @memberOf _ - * @since 1.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @returns {*} Returns the accumulated value. + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. * @example * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }, []); - * // => [4, 9] + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; * - * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] */ - function transform(object, iteratee, accumulator) { - var isArr = isArray(object), - isArrLike = isArr || isBuffer(object) || isTypedArray(object); - - iteratee = getIteratee(iteratee, 4); - if (accumulator == null) { - var Ctor = object && object.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor : []; - } - else if (isObject(object)) { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - else { - accumulator = {}; - } - } - (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; } /** - * Removes the property at `path` of `object`. + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. * - * **Note:** This method mutates `object`. + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. * @example * - * var object = { 'a': [{ 'b': { 'c': 7 } }] }; - * _.unset(object, 'a[0].b.c'); - * // => true + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; * - * console.log(object); - * // => { 'a': [{ 'b': {} }] }; + * var curried = _.curryRight(abc); * - * _.unset(object, ['a', '0', 'b', 'c']); - * // => true + * curried(3)(2)(1); + * // => [1, 2, 3] * - * console.log(object); - * // => { 'a': [{ 'b': {} }] }; + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] */ - function unset(object, path) { - return object == null ? true : baseUnset(object, path); + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; } /** - * This method is like `_.set` except that accepts `updater` to produce the - * value to set. Use `_.updateWith` to customize `path` creation. The `updater` - * is invoked with one argument: (value). + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. * - * **Note:** This method mutates `object`. + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. * * @static * @memberOf _ - * @since 4.6.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {Function} updater The function to produce the updated value. - * @returns {Object} Returns `object`. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); * - * _.update(object, 'a[0].b.c', function(n) { return n * n; }); - * console.log(object.a[0].b.c); - * // => 9 + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); * - * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); - * console.log(object.x[0].y.z); - * // => 0 + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); */ - function update(object, path, updater) { - return object == null ? object : baseUpdate(object, path, castFunction(updater)); + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; } /** - * This method is like `_.update` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). - * - * **Note:** This method mutates `object`. + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. * * @static * @memberOf _ - * @since 4.6.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. * @example * - * var object = {}; - * - * _.updateWith(object, '[0][1]', _.constant('a'), Object); - * // => { '0': { '1': 'a' } } + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. */ - function updateWith(object, path, updater, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); - } + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); /** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. * - * Foo.prototype.c = 3; + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); * - * _.values('hi'); - * // => ['h', 'i'] + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] */ - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); } /** - * Creates an array of the own and inherited enumerable string keyed property - * values of `object`. + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. * - * **Note:** Non-object values are coerced to objects. + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; * - * Foo.prototype.c = 3; + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] * - * _.valuesIn(new Foo); - * // => [1, 2, 3] (iteration order is not guaranteed) + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; */ - function valuesIn(object) { - return object == null ? [] : baseValues(object, keysIn(object)); + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; } - /*------------------------------------------------------------------------*/ + // Expose `MapCache`. + memoize.Cache = MapCache; /** - * Clamps `number` within the inclusive `lower` and `upper` bounds. + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. * * @static * @memberOf _ - * @since 4.0.0 - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. * @example * - * _.clamp(-10, -5, 5); - * // => -5 + * function isEven(n) { + * return n % 2 == 0; + * } * - * _.clamp(10, -5, 5); - * // => 5 + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] */ - function clamp(number, lower, upper) { - if (upper === undefined) { - upper = lower; - lower = undefined; - } - if (upper !== undefined) { - upper = toNumber(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== undefined) { - lower = toNumber(lower); - lower = lower === lower ? lower : 0; + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } - return baseClamp(toNumber(number), lower, upper); + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; } /** - * Checks if `n` is between `start` and up to, but not including, `end`. If - * `end` is not specified, it's set to `start` with `start` then set to `0`. - * If `start` is greater than `end` the params are swapped to support - * negative ranges. + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. * * @static * @memberOf _ - * @since 3.3.0 - * @category Number - * @param {number} number The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - * @see _.range, _.rangeRight + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. * @example * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. * - * _.inRange(4, 2); - * // => false + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example * - * _.inRange(2, 2); - * // => false + * function doubled(n) { + * return n * 2; + * } * - * _.inRange(1.2, 2); - * // => true + * function square(n) { + * return n * n; + * } * - * _.inRange(5.2, 4); - * // => false + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); * - * _.inRange(-3, -2, -6); - * // => true + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] */ - function inRange(number, start, end) { - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - number = toNumber(number); - return baseInRange(number, start, end); - } + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); /** - * Produces a random number between the inclusive `lower` and `upper` bounds. - * If only one argument is provided a number between `0` and the given number - * is returned. If `floating` is `true`, or either `lower` or `upper` are - * floats, a floating-point number is returned instead of an integer. + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. * * @static * @memberOf _ - * @since 0.7.0 - * @category Number - * @param {number} [lower=0] The lower bound. - * @param {number} [upper=1] The upper bound. - * @param {boolean} [floating] Specify returning a floating-point number. - * @returns {number} Returns the random number. + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. * @example * - * _.random(0, 5); - * // => an integer between 0 and 5 - * - * _.random(5); - * // => also an integer between 0 and 5 + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } * - * _.random(5, true); - * // => a floating-point number between 0 and 5 + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' * - * _.random(1.2, 5.2); - * // => a floating-point number between 1.2 and 5.2 + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' */ - function random(lower, upper, floating) { - if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { - upper = floating = undefined; - } - if (floating === undefined) { - if (typeof upper == 'boolean') { - floating = upper; - upper = undefined; - } - else if (typeof lower == 'boolean') { - floating = lower; - lower = undefined; - } - } - if (lower === undefined && upper === undefined) { - lower = 0; - upper = 1; - } - else { - lower = toFinite(lower); - if (upper === undefined) { - upper = lower; - lower = 0; - } else { - upper = toFinite(upper); - } - } - if (lower > upper) { - var temp = lower; - lower = upper; - upper = temp; - } - if (floating || lower % 1 || upper % 1) { - var rand = nativeRandom(); - return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); - } - return baseRandom(lower, upper); - } - - /*------------------------------------------------------------------------*/ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); /** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. * @example * - * _.camelCase('Foo Bar'); - * // => 'fooBar' + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } * - * _.camelCase('--foo-bar--'); - * // => 'fooBar' + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' * - * _.camelCase('__FOO_BAR__'); - * // => 'fooBar' + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' */ - var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? capitalize(word) : word); + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); /** - * Converts the first character of `string` to upper case and the remaining - * to lower case. + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. * * @static * @memberOf _ * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. * @example * - * _.capitalize('FRED'); - * // => 'Fred' + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] */ - function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); - } + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); /** - * Deburrs `string` by converting - * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) - * letters to basic Latin letters and removing - * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. * @example * - * _.deburr('déjà vu'); - * // => 'deja vu' + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' */ - function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); } /** - * Checks if `string` ends with the given target string. + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search up to. - * @returns {boolean} Returns `true` if `string` ends with `target`, - * else `false`. + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. * @example * - * _.endsWith('abc', 'c'); - * // => true + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); * - * _.endsWith('abc', 'b'); - * // => false + * say(['fred', 'hello']); + * // => 'fred says hello' * - * _.endsWith('abc', 'b', 2); - * // => true + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 */ - function endsWith(string, target, position) { - string = toString(string); - target = baseToString(target); - - var length = string.length; - position = position === undefined - ? length - : baseClamp(toInteger(position), 0, length); + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); - var end = position; - position -= target.length; - return position >= 0 && string.slice(position, end) == target; + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); } /** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. * * @static - * @since 0.1.0 * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. * @example * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); */ - function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); } /** - * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", - * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. * @example * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https://lodash\.com/\)' + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] */ - function escapeRegExp(string) { - string = toString(string); - return (string && reHasRegExpChar.test(string)) - ? string.replace(reRegExpChar, '\\$&') - : string; + function unary(func) { + return ary(func, 1); } /** - * Converts `string` to - * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. * @example * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); * - * _.kebabCase('__FOO_BAR__'); - * // => 'foo-bar' + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' */ - var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); - }); + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ /** - * Converts `string`, as space separated words, to lower case. + * Casts `value` as an array if it's not one. * * @static * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the lower cased string. + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. * @example * - * _.lowerCase('--Foo-Bar--'); - * // => 'foo bar' + * _.castArray(1); + * // => [1] * - * _.lowerCase('fooBar'); - * // => 'foo bar' + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] * - * _.lowerCase('__FOO_BAR__'); - * // => 'foo bar' + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true */ - var lowerCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + word.toLowerCase(); - }); + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } /** - * Converts the first character of `string` to lower case. + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. * * @static * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep * @example * - * _.lowerFirst('Fred'); - * // => 'fred' + * var objects = [{ 'a': 1 }, { 'b': 2 }]; * - * _.lowerFirst('FRED'); - * // => 'fRED' + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true */ - var lowerFirst = createCaseFirst('toLowerCase'); + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } /** - * Pads `string` on the left and right sides if it's shorter than `length`. - * Padding characters are truncated if they can't be evenly divided by `length`. + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith * @example * - * _.pad('abc', 8); - * // => ' abc ' + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } * - * _.pad('abc', 8, '_-'); - * // => '_-abc_-_' + * var el = _.cloneWith(document.body, customizer); * - * _.pad('abc', 3); - * // => 'abc' + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 */ - function pad(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - if (!length || strLength >= length) { - return string; - } - var mid = (length - strLength) / 2; - return ( - createPadding(nativeFloor(mid), chars) + - string + - createPadding(nativeCeil(mid), chars) - ); + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); } /** - * Pads `string` on the right side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. + * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone * @example * - * _.padEnd('abc', 6); - * // => 'abc ' - * - * _.padEnd('abc', 6, '_-'); - * // => 'abc_-_' + * var objects = [{ 'a': 1 }, { 'b': 2 }]; * - * _.padEnd('abc', 3); - * // => 'abc' + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false */ - function padEnd(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (string + createPadding(length - strLength, chars)) - : string; + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } /** - * Pads `string` on the left side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. + * This method is like `_.cloneWith` except that it recursively clones `value`. * * @static * @memberOf _ * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith * @example * - * _.padStart('abc', 6); - * // => ' abc' + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } * - * _.padStart('abc', 6, '_-'); - * // => '_-_abc' + * var el = _.cloneDeepWith(document.body, customizer); * - * _.padStart('abc', 3); - * // => 'abc' + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 */ - function padStart(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (createPadding(length - strLength, chars) + string) - : string; + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); } /** - * Converts `string` to an integer of the specified radix. If `radix` is - * `undefined` or `0`, a `radix` of `10` is used unless `value` is a - * hexadecimal, in which case a `radix` of `16` is used. + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. * - * **Note:** This method aligns with the - * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. * * @static * @memberOf _ - * @since 1.1.0 - * @category String - * @param {string} string The string to convert. - * @param {number} [radix=10] The radix to interpret `value` by. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {number} Returns the converted integer. + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. * @example * - * _.parseInt('08'); - * // => 8 + * var object = { 'a': 1, 'b': 2 }; * - * _.map(['6', '08', '10'], _.parseInt); - * // => [6, 8, 10] + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false */ - function parseInt(string, radix, guard) { - if (guard || radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); } /** - * Repeats the given string `n` times. + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=1] The number of times to repeat the string. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the repeated string. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * _.repeat('*', 3); - * // => '***' + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * - * _.repeat('abc', 2); - * // => 'abcabc' + * _.eq(object, object); + * // => true * - * _.repeat('abc', 0); - * // => '' + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true */ - function repeat(string, n, guard) { - if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - return baseRepeat(toString(string), n); + function eq(value, other) { + return value === other || (value !== value && other !== other); } /** - * Replaces matches for `pattern` in `string` with `replacement`. - * - * **Note:** This method is based on - * [`String#replace`](https://mdn.io/String/replace). + * Checks if `value` is greater than `other`. * * @static * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to modify. - * @param {RegExp|string} pattern The pattern to replace. - * @param {Function|string} replacement The match replacement. - * @returns {string} Returns the modified string. + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt * @example * - * _.replace('Hi Fred', 'Fred', 'Barney'); - * // => 'Hi Barney' + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false */ - function replace() { - var args = arguments, - string = toString(args[0]); - - return args.length < 3 ? string : string.replace(args[1], args[2]); - } + var gt = createRelationalOperation(baseGt); /** - * Converts `string` to - * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * Checks if `value` is greater than or equal to `other`. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the snake cased string. + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte * @example * - * _.snakeCase('Foo Bar'); - * // => 'foo_bar' + * _.gte(3, 1); + * // => true * - * _.snakeCase('fooBar'); - * // => 'foo_bar' + * _.gte(3, 3); + * // => true * - * _.snakeCase('--FOO-BAR--'); - * // => 'foo_bar' + * _.gte(1, 3); + * // => false */ - var snakeCase = createCompounder(function(result, word, index) { - return result + (index ? '_' : '') + word.toLowerCase(); + var gte = createRelationalOperation(function(value, other) { + return value >= other; }); /** - * Splits `string` by `separator`. - * - * **Note:** This method is based on - * [`String#split`](https://mdn.io/String/split). + * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to split. - * @param {RegExp|string} separator The separator pattern to split by. - * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the string segments. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. * @example * - * _.split('a-b-c', '-', 2); - * // => ['a', 'b'] + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false */ - function split(string, separator, limit) { - if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { - separator = limit = undefined; - } - limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; - if (!limit) { - return []; - } - string = toString(string); - if (string && ( - typeof separator == 'string' || - (separator != null && !isRegExp(separator)) - )) { - separator = baseToString(separator); - if (!separator && hasUnicode(string)) { - return castSlice(stringToArray(string), 0, limit); - } - } - return string.split(separator, limit); - } + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; /** - * Converts `string` to - * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ - * @since 3.1.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the start cased string. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * - * _.startCase('--foo-bar--'); - * // => 'Foo Bar' + * _.isArray([1, 2, 3]); + * // => true * - * _.startCase('fooBar'); - * // => 'Foo Bar' + * _.isArray(document.body.children); + * // => false * - * _.startCase('__FOO_BAR__'); - * // => 'FOO BAR' + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false */ - var startCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + upperFirst(word); - }); + var isArray = Array.isArray; /** - * Checks if `string` starts with the given target string. + * Checks if `value` is classified as an `ArrayBuffer` object. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=0] The position to search from. - * @returns {boolean} Returns `true` if `string` starts with `target`, - * else `false`. + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. * @example * - * _.startsWith('abc', 'a'); + * _.isArrayBuffer(new ArrayBuffer(2)); * // => true * - * _.startsWith('abc', 'b'); + * _.isArrayBuffer(new Array(2)); * // => false - * - * _.startsWith('abc', 'b', 1); - * // => true */ - function startsWith(string, target, position) { - string = toString(string); - position = position == null - ? 0 - : baseClamp(toInteger(position), 0, string.length); - - target = baseToString(target); - return string.slice(position, position + target.length) == target; - } + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; /** - * Creates a compiled template function that can interpolate data properties - * in "interpolate" delimiters, HTML-escape interpolated data properties in - * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data - * properties may be accessed as free variables in the template. If a setting - * object is given, it takes precedence over `_.templateSettings` values. + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * - * **Note:** In the development build `_.template` utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * for easier debugging. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * _.isArrayLike([1, 2, 3]); + * // => true * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. * * @static - * @since 0.1.0 * @memberOf _ - * @category String - * @param {string} [string=''] The template string. - * @param {Object} [options={}] The options object. - * @param {RegExp} [options.escape=_.templateSettings.escape] - * The HTML "escape" delimiter. - * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] - * The "evaluate" delimiter. - * @param {Object} [options.imports=_.templateSettings.imports] - * An object to import into the template as free variables. - * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] - * The "interpolate" delimiter. - * @param {string} [options.sourceURL='lodash.templateSources[n]'] - * The sourceURL of the compiled template. - * @param {string} [options.variable='obj'] - * The data object variable name. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the compiled template function. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. * @example * - * // Use the "interpolate" delimiter to create a compiled template. - * var compiled = _.template('hello <%= user %>!'); - * compiled({ 'user': 'fred' }); - * // => 'hello fred!' + * _.isArrayLikeObject([1, 2, 3]); + * // => true * - * // Use the HTML "escape" delimiter to escape data property values. - * var compiled = _.template('<%- value %>'); - * compiled({ 'value': ' - + diff --git a/packages/services/examples/browser-require/index.js b/packages/services/examples/browser-require/index.js index 03a6360e..479415fe 100644 --- a/packages/services/examples/browser-require/index.js +++ b/packages/services/examples/browser-require/index.js @@ -1,5 +1,6 @@ require(['jquery', '@jupyterlab/services'], function($, services) { - 'use strict'; + /* eslint-disable no-console */ + console.log('Starting example'); var startNewKernel = services.Kernel.startNew; var kernelOptions = { @@ -7,13 +8,13 @@ require(['jquery', '@jupyterlab/services'], function($, services) { }; // start a single kernel for the page - /* eslint-disable no-console */ startNewKernel(kernelOptions).then(function(kernel) { console.log('Kernel started:', kernel); kernel.requestKernelInfo().then(function(reply) { var content = reply.content; $('#kernel-info').text(content.banner); console.log('Kernel info:', content); + console.log('Example started!'); }); $('#run').click(function() { var code = $('#cell').val(); diff --git a/packages/services/examples/browser-require/main.py b/packages/services/examples/browser-require/main.py index 07eb0406..96af21a9 100644 --- a/packages/services/examples/browser-require/main.py +++ b/packages/services/examples/browser-require/main.py @@ -6,6 +6,7 @@ import os from jinja2 import FileSystemLoader from notebook.base.handlers import IPythonHandler, FileFindHandler +from notebook.utils import url_path_join as ujoin from traitlets import Unicode @@ -33,11 +34,11 @@ class ExampleApp(NotebookApp): default_url = Unicode('/example') def start(self): - handlers = [ - (r'/example/?', ExampleHander), - (r'/example/(.*)', FileFindHandler, {'path': HERE}), + default_handlers = [ + (ujoin(self.base_url, r'/example/?'), ExampleHander), + (ujoin(self.base_url, r'/example/(.*)'), FileFindHandler, {'path': HERE}), ] - self.web_app.add_handlers('.*$', handlers) + self.web_app.add_handlers('.*$', default_handlers) super(ExampleApp, self).start() diff --git a/packages/services/examples/browser/index.html b/packages/services/examples/browser/index.html index cc1a676b..dae0c538 100644 --- a/packages/services/examples/browser/index.html +++ b/packages/services/examples/browser/index.html @@ -6,7 +6,7 @@ - +

   
 
diff --git a/packages/services/examples/browser/main.py b/packages/services/examples/browser/main.py
index 4f6e99aa..45a6e55d 100644
--- a/packages/services/examples/browser/main.py
+++ b/packages/services/examples/browser/main.py
@@ -3,13 +3,14 @@
 Distributed under the terms of the Modified BSD License.
 """
 from notebook.notebookapp import NotebookApp
-import os
+import os.path as osp
 from jinja2 import FileSystemLoader
 from notebook.base.handlers import IPythonHandler, FileFindHandler
+from notebook.utils import url_path_join as ujoin
 from traitlets import Unicode
 
 
-HERE = os.path.dirname(__file__)
+HERE = osp.dirname(__file__)
 LOADER = FileSystemLoader(HERE)
 
 
@@ -33,12 +34,11 @@ class ExampleApp(NotebookApp):
     default_url = Unicode('/example')
 
     def start(self):
-        path = os.path.join(HERE, 'build')
-        handlers = [
-            (r'/example/?', ExampleHander),
-            (r'/example/(.*)', FileFindHandler, {'path': path}),
+        default_handlers = [
+            (ujoin(self.base_url, r'/example/?'), ExampleHander),
+            (ujoin(self.base_url, r'/example/(.*)'), FileFindHandler, {'path': osp.join(HERE, 'build')}),
         ]
-        self.web_app.add_handlers('.*$', handlers)
+        self.web_app.add_handlers('.*$', default_handlers)
         super(ExampleApp, self).start()
 
 
diff --git a/packages/services/examples/browser/package.json b/packages/services/examples/browser/package.json
index 600ca0ca..0cddffa2 100644
--- a/packages/services/examples/browser/package.json
+++ b/packages/services/examples/browser/package.json
@@ -1,6 +1,6 @@
 {
-  "name": "browser-example",
-  "version": "1.0.0-alpha.3",
+  "name": "@jupyterlab/example-services-browser",
+  "version": "1.0.0-alpha.9",
   "private": true,
   "scripts": {
     "build": "tsc && webpack",
@@ -8,12 +8,13 @@
     "prepublishOnly": "npm run build"
   },
   "dependencies": {
-    "@jupyterlab/services": "^4.0.0-alpha.3",
-    "es6-promise": "~4.1.1"
+    "@jupyterlab/coreutils": "^3.0.0-alpha.9",
+    "@jupyterlab/services": "^4.0.0-alpha.9"
   },
   "devDependencies": {
     "rimraf": "~2.6.2",
-    "webpack": "~4.12.0",
-    "webpack-cli": "^3.0.3"
+    "typescript": "~3.5.1",
+    "webpack": "^4.32.2",
+    "webpack-cli": "^3.3.0"
   }
 }
diff --git a/packages/services/examples/browser/index.ts b/packages/services/examples/browser/src/index.ts
similarity index 90%
rename from packages/services/examples/browser/index.ts
rename to packages/services/examples/browser/src/index.ts
index 9d2ccadb..0498cb16 100644
--- a/packages/services/examples/browser/index.ts
+++ b/packages/services/examples/browser/src/index.ts
@@ -4,8 +4,9 @@
 | Distributed under the terms of the Modified BSD License.
 |----------------------------------------------------------------------------*/
 
-// Polyfill for ES6 Promises
-import 'es6-promise';
+import { PageConfig, URLExt } from '@jupyterlab/coreutils';
+// @ts-ignore
+__webpack_public_path__ = URLExt.join(PageConfig.getBaseUrl(), 'example/');
 
 import { Session } from '@jupyterlab/services';
 
diff --git a/packages/services/examples/browser/tsconfig.json b/packages/services/examples/browser/tsconfig.json
new file mode 100644
index 00000000..8b6b5fee
--- /dev/null
+++ b/packages/services/examples/browser/tsconfig.json
@@ -0,0 +1,28 @@
+{
+  "compilerOptions": {
+    "declaration": true,
+    "lib": ["es2015", "dom"],
+    "module": "commonjs",
+    "moduleResolution": "node",
+    "noEmitOnError": true,
+    "noUnusedLocals": true,
+    "outDir": "build",
+    "rootDir": "src",
+    "strict": true,
+    "strictNullChecks": false,
+    "target": "es2015",
+    "types": []
+  },
+  "include": ["src/*"],
+  "references": [
+    {
+      "path": "../../../outputarea"
+    },
+    {
+      "path": "../../../rendermime"
+    },
+    {
+      "path": "../.."
+    }
+  ]
+}
diff --git a/packages/services/examples/browser/webpack.config.js b/packages/services/examples/browser/webpack.config.js
index ad4cd130..aa77df38 100644
--- a/packages/services/examples/browser/webpack.config.js
+++ b/packages/services/examples/browser/webpack.config.js
@@ -1,7 +1,9 @@
 module.exports = {
   entry: './build/index.js',
+  mode: 'development',
   output: {
-    filename: './build/bundle.js'
+    path: require('path').join(__dirname, 'build'),
+    filename: 'bundle.js'
   },
   bail: true
 };
diff --git a/packages/services/examples/node/main.py b/packages/services/examples/node/main.py
index a76be900..2de401d3 100644
--- a/packages/services/examples/node/main.py
+++ b/packages/services/examples/node/main.py
@@ -3,11 +3,11 @@
 
 from __future__ import print_function, absolute_import
 import json
-import os
+import os.path as osp
 from jupyterlab_server.process import which
 from jupyterlab_server.process_app import ProcessApp
 
-HERE = os.path.dirname(os.path.realpath(__file__))
+HERE = osp.dirname(osp.realpath(__file__))
 
 
 class NodeApp(ProcessApp):
@@ -18,7 +18,7 @@ def get_command(self):
         # Run the node script with command arguments.
         config = dict(baseUrl=self.connection_url, token=self.token)
 
-        with open('config.json', 'w') as fid:
+        with open(osp.join(HERE, 'config.json'), 'w') as fid:
             json.dump(config, fid)
 
         cmd = [which('node'),
diff --git a/packages/services/examples/node/package.json b/packages/services/examples/node/package.json
index 22250509..2de20c22 100644
--- a/packages/services/examples/node/package.json
+++ b/packages/services/examples/node/package.json
@@ -1,15 +1,15 @@
 {
   "name": "node-example",
-  "version": "1.0.0-alpha.3",
+  "version": "1.0.0-alpha.9",
   "private": true,
   "scripts": {
     "clean": "rimraf node_modules",
     "update": "rimraf node_modules/@jupyterlab/services && npm install"
   },
   "dependencies": {
-    "@jupyterlab/services": "^4.0.0-alpha.3",
-    "node-fetch": "~2.2.0",
-    "ws": "~6.0.0"
+    "@jupyterlab/services": "^4.0.0-alpha.9",
+    "node-fetch": "^2.6.0",
+    "ws": "^7.0.0"
   },
   "devDependencies": {
     "rimraf": "~2.6.2"
diff --git a/packages/services/examples/typescript-browser-with-output/index.html b/packages/services/examples/typescript-browser-with-output/index.html
index 07790350..187fbe1f 100644
--- a/packages/services/examples/typescript-browser-with-output/index.html
+++ b/packages/services/examples/typescript-browser-with-output/index.html
@@ -6,7 +6,7 @@
   
   
     
-    
+    
     
   
 
diff --git a/packages/services/examples/typescript-browser-with-output/main.py b/packages/services/examples/typescript-browser-with-output/main.py
index b75583fe..dfa03158 100644
--- a/packages/services/examples/typescript-browser-with-output/main.py
+++ b/packages/services/examples/typescript-browser-with-output/main.py
@@ -6,6 +6,7 @@
 import os
 from jinja2 import FileSystemLoader
 from notebook.base.handlers import IPythonHandler, FileFindHandler
+from notebook.utils import url_path_join as ujoin
 from traitlets import Unicode
 
 
@@ -32,12 +33,12 @@ class ExampleApp(NotebookApp):
     default_url = Unicode('/example')
 
     def start(self):
-        handlers = [
-            (r'/example/?', ExampleHander),
-            (r"/example/(.*)", FileFindHandler,
+        default_handlers = [
+            (ujoin(self.base_url, r'/example/?'), ExampleHander),
+            (ujoin(self.base_url, r"/example/(.*)"), FileFindHandler,
                 {'path': os.path.join(HERE, 'build')}),
         ]
-        self.web_app.add_handlers(".*$", handlers)
+        self.web_app.add_handlers(".*$", default_handlers)
         super(ExampleApp, self).start()
 
 
diff --git a/packages/services/examples/typescript-browser-with-output/package.json b/packages/services/examples/typescript-browser-with-output/package.json
index fd9e3d0c..5283a745 100644
--- a/packages/services/examples/typescript-browser-with-output/package.json
+++ b/packages/services/examples/typescript-browser-with-output/package.json
@@ -1,6 +1,6 @@
 {
-  "name": "typescript-browser-with-output",
-  "version": "1.0.0-alpha.3",
+  "name": "@jupyterlab/example-services-outputarea",
+  "version": "1.0.0-alpha.9",
   "private": true,
   "scripts": {
     "build": "tsc && webpack",
@@ -8,18 +8,17 @@
     "prepublishOnly": "npm run build"
   },
   "dependencies": {
-    "@jupyterlab/outputarea": "^1.0.0-alpha.3",
-    "@jupyterlab/rendermime": "^1.0.0-alpha.3",
-    "@jupyterlab/services": "^4.0.0-alpha.3",
-    "es6-promise": "~4.1.1"
+    "@jupyterlab/coreutils": "^3.0.0-alpha.9",
+    "@jupyterlab/outputarea": "^1.0.0-alpha.9",
+    "@jupyterlab/rendermime": "^1.0.0-alpha.9",
+    "@jupyterlab/services": "^4.0.0-alpha.9"
   },
   "devDependencies": {
-    "css-loader": "~0.28.7",
+    "css-loader": "~2.1.1",
     "rimraf": "~2.6.2",
-    "style-loader": "~0.21.0",
-    "tslint": "~5.10.0",
-    "typescript": "~3.3.1",
-    "webpack": "~4.12.0",
-    "webpack-cli": "^3.0.3"
+    "style-loader": "~0.23.1",
+    "typescript": "~3.5.1",
+    "webpack": "^4.32.2",
+    "webpack-cli": "^3.3.0"
   }
 }
diff --git a/packages/services/examples/typescript-browser-with-output/index.ts b/packages/services/examples/typescript-browser-with-output/src/index.ts
similarity index 60%
rename from packages/services/examples/typescript-browser-with-output/index.ts
rename to packages/services/examples/typescript-browser-with-output/src/index.ts
index d4b56951..323cb24b 100644
--- a/packages/services/examples/typescript-browser-with-output/index.ts
+++ b/packages/services/examples/typescript-browser-with-output/src/index.ts
@@ -4,8 +4,9 @@
 | Distributed under the terms of the Modified BSD License.
 |----------------------------------------------------------------------------*/
 
-// Polyfill for ES6 Promises
-import 'es6-promise';
+import { PageConfig, URLExt } from '@jupyterlab/coreutils';
+// @ts-ignore
+__webpack_public_path__ = URLExt.join(PageConfig.getBaseUrl(), 'example/');
 
 import { OutputArea, OutputAreaModel } from '@jupyterlab/outputarea';
 
@@ -16,25 +17,20 @@ import {
 
 import { Kernel } from '@jupyterlab/services';
 
-function main() {
+async function main() {
   const code = [
-    'import numpy as np',
-    'import matplotlib.pyplot as plt',
-    '%matplotlib inline',
-    'x = np.linspace(-10,10)',
-    'y = x**2',
-    'print(x)',
-    'print(y)',
-    'plt.plot(x, y)'
+    'from IPython.display import HTML',
+    'HTML("

Hello, world!

")' ].join('\n'); const model = new OutputAreaModel(); const rendermime = new RenderMimeRegistry({ initialFactories }); const outputArea = new OutputArea({ model, rendermime }); - Kernel.startNew().then(kernel => { - outputArea.future = kernel.requestExecute({ code }); - document.getElementById('outputarea').appendChild(outputArea.node); - }); + const kernel = await Kernel.startNew(); + outputArea.future = kernel.requestExecute({ code }); + document.getElementById('outputarea').appendChild(outputArea.node); + await outputArea.future.done; + console.log('Test complete!'); } window.onload = main; diff --git a/packages/services/examples/typescript-browser-with-output/tsconfig.json b/packages/services/examples/typescript-browser-with-output/tsconfig.json new file mode 100644 index 00000000..8b6b5fee --- /dev/null +++ b/packages/services/examples/typescript-browser-with-output/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "declaration": true, + "lib": ["es2015", "dom"], + "module": "commonjs", + "moduleResolution": "node", + "noEmitOnError": true, + "noUnusedLocals": true, + "outDir": "build", + "rootDir": "src", + "strict": true, + "strictNullChecks": false, + "target": "es2015", + "types": [] + }, + "include": ["src/*"], + "references": [ + { + "path": "../../../outputarea" + }, + { + "path": "../../../rendermime" + }, + { + "path": "../.." + } + ] +} diff --git a/packages/services/examples/typescript-browser-with-output/webpack.config.js b/packages/services/examples/typescript-browser-with-output/webpack.config.js index 74bc7e62..0f66371b 100644 --- a/packages/services/examples/typescript-browser-with-output/webpack.config.js +++ b/packages/services/examples/typescript-browser-with-output/webpack.config.js @@ -1,13 +1,46 @@ +var path = require('path'); + module.exports = { entry: './build/index.js', + mode: 'development', output: { - filename: './build/bundle.js' + path: path.join(__dirname, 'build'), + filename: 'bundle.js' }, module: { rules: [ + { test: /\.css$/, use: ['style-loader', 'css-loader'] }, + { test: /\.md$/, use: 'raw-loader' }, + { test: /\.txt$/, use: 'raw-loader' }, { - test: /\.css$/, - use: ['style-loader', 'css-loader'] + test: /\.js$/, + use: ['source-map-loader'], + enforce: 'pre', + // eslint-disable-next-line no-undef + exclude: /node_modules/ + }, + { test: /\.(jpg|png|gif)$/, use: 'file-loader' }, + { test: /\.js.map$/, use: 'file-loader' }, + { + test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, + use: 'url-loader?limit=10000&mimetype=application/font-woff' + }, + { + test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, + use: 'url-loader?limit=10000&mimetype=application/font-woff' + }, + { + test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, + use: 'url-loader?limit=10000&mimetype=application/octet-stream' + }, + { + test: /\.otf(\?v=\d+\.\d+\.\d+)?$/, + use: 'url-loader?limit=10000&mimetype=application/octet-stream' + }, + { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: 'file-loader' }, + { + test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, + use: 'url-loader?limit=10000&mimetype=image/svg+xml' } ] }, diff --git a/packages/services/jest.config.js b/packages/services/jest.config.js deleted file mode 100644 index f4e7c5bd..00000000 --- a/packages/services/jest.config.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - transform: { - '^.+\\.tsx?$': 'ts-jest' - }, - setupTestFrameworkScriptFile: '@jupyterlab/testutils/lib/jestScript.js', - testRegex: '(/tests/.*|(\\.|/)(test|spec))\\.tsx?$', - testPathIgnorePatterns: ['/lib/', '/node_modules/'], - collectCoverage: true, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], - globals: { - 'ts-jest': { - tsConfigFile: `test/tsconfig.json` - } - } -}; diff --git a/packages/services/package.json b/packages/services/package.json index c81e7c35..420df46d 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/services", - "version": "4.0.0-alpha.3", + "version": "4.0.0-alpha.9", "description": "Client APIs for the Jupyter services REST APIs", "keywords": [ "jupyter", @@ -11,6 +11,10 @@ "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -24,11 +28,11 @@ "dist/**/*.js" ], "main": "lib/index.js", - "typings": "lib/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab" + "browser": { + "node-fetch": false, + "ws": false }, + "typings": "lib/index.d.ts", "scripts": { "build": "tsc -b", "clean": "rimraf docs && rimraf lib && rimraf test/build && rimraf test/coverage", @@ -36,32 +40,27 @@ "prepublishOnly": "jlpm run build && webpack", "watch": "tsc -b --watch" }, - "browser": { - "node-fetch": false, - "ws": false - }, "dependencies": { - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/observables": "^2.2.0-alpha.3", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/observables": "^2.2.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", "@phosphor/disposable": "^1.1.2", "@phosphor/signaling": "^1.2.2", - "node-fetch": "~2.2.0", - "ws": "~6.0.0" + "node-fetch": "^2.6.0", + "ws": "^7.0.0" }, "devDependencies": { - "@types/node": "~8.0.47", - "@types/text-encoding": "0.0.33", + "@types/node": "^12.0.2", + "@types/text-encoding": "^0.0.35", "rimraf": "~2.6.2", - "text-encoding": "~0.5.5", + "text-encoding": "^0.7.0", "typedoc": "^0.14.2", - "typescript": "~3.3.1", - "webpack": "~4.12.0", - "webpack-cli": "^3.0.3" + "typescript": "~3.5.1", + "webpack": "^4.32.2", + "webpack-cli": "^3.3.0" }, "publishConfig": { "access": "public" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + } } diff --git a/packages/services/src/contents/index.ts b/packages/services/src/contents/index.ts index 758795ce..22ecd3cb 100644 --- a/packages/services/src/contents/index.ts +++ b/packages/services/src/contents/index.ts @@ -529,10 +529,7 @@ export class ContentsManager implements Contents.IManager { let serverSettings = (this.serverSettings = options.serverSettings || ServerConnection.makeSettings()); this._defaultDrive = options.defaultDrive || new Drive({ serverSettings }); - this._defaultDrive.fileChanged.connect( - this._onFileChanged, - this - ); + this._defaultDrive.fileChanged.connect(this._onFileChanged, this); } /** @@ -570,10 +567,7 @@ export class ContentsManager implements Contents.IManager { */ addDrive(drive: Contents.IDrive): void { this._additionalDrives.set(drive.name, drive); - drive.fileChanged.connect( - this._onFileChanged, - this - ); + drive.fileChanged.connect(this._onFileChanged, this); } /** diff --git a/packages/services/src/kernel/comm.ts b/packages/services/src/kernel/comm.ts index fc3c23d0..e9a5c29e 100644 --- a/packages/services/src/kernel/comm.ts +++ b/packages/services/src/kernel/comm.ts @@ -1,7 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { JSONObject, JSONValue } from '@phosphor/coreutils'; +import { JSONObject } from '@phosphor/coreutils'; import { DisposableDelegate } from '@phosphor/disposable'; @@ -100,30 +100,26 @@ export class CommHandler extends DisposableDelegate implements Kernel.IComm { * **See also:** [[ICommOpen]] */ open( - data?: JSONValue, + data?: JSONObject, metadata?: JSONObject, buffers: (ArrayBuffer | ArrayBufferView)[] = [] ): Kernel.IFuture { if (this.isDisposed || this._kernel.isDisposed) { throw new Error('Cannot open'); } - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'comm_open', channel: 'shell', username: this._kernel.username, - session: this._kernel.clientId - }; - let content: KernelMessage.ICommOpen = { - comm_id: this._id, - target_name: this._target, - data: data || {} - }; - let msg = KernelMessage.createShellMessage( - options, - content, + session: this._kernel.clientId, + content: { + comm_id: this._id, + target_name: this._target, + data: data || {} + }, metadata, buffers - ); + }); return this._kernel.sendShellMessage(msg, false, true); } @@ -136,7 +132,7 @@ export class CommHandler extends DisposableDelegate implements Kernel.IComm { * **See also:** [[ICommMsg]] */ send( - data: JSONValue, + data: JSONObject, metadata?: JSONObject, buffers: (ArrayBuffer | ArrayBufferView)[] = [], disposeOnDone: boolean = true @@ -144,22 +140,18 @@ export class CommHandler extends DisposableDelegate implements Kernel.IComm { if (this.isDisposed || this._kernel.isDisposed) { throw new Error('Cannot send'); } - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'comm_msg', channel: 'shell', username: this._kernel.username, - session: this._kernel.clientId - }; - let content: KernelMessage.ICommMsg = { - comm_id: this._id, - data: data - }; - let msg = KernelMessage.createShellMessage( - options, - content, + session: this._kernel.clientId, + content: { + comm_id: this._id, + data: data + }, metadata, buffers - ); + }); return this._kernel.sendShellMessage(msg, false, true); } @@ -175,42 +167,43 @@ export class CommHandler extends DisposableDelegate implements Kernel.IComm { * **See also:** [[ICommClose]], [[onClose]] */ close( - data?: JSONValue, + data?: JSONObject, metadata?: JSONObject, buffers: (ArrayBuffer | ArrayBufferView)[] = [] ): Kernel.IFuture { if (this.isDisposed || this._kernel.isDisposed) { throw new Error('Cannot close'); } - let options: KernelMessage.IOptions = { - msgType: 'comm_msg', + let msg = KernelMessage.createMessage({ + msgType: 'comm_close', channel: 'shell', username: this._kernel.username, - session: this._kernel.clientId - }; - let content: KernelMessage.ICommClose = { - comm_id: this._id, - data: data || {} - }; - let msg = KernelMessage.createShellMessage( - options, - content, + session: this._kernel.clientId, + content: { + comm_id: this._id, + data: data || {} + }, metadata, buffers - ); + }); let future = this._kernel.sendShellMessage(msg, false, true); - options.channel = 'iopub'; let onClose = this._onClose; if (onClose) { - let ioMsg = KernelMessage.createMessage( - options, - content, + let ioMsg = KernelMessage.createMessage({ + msgType: 'comm_close', + channel: 'iopub', + username: this._kernel.username, + session: this._kernel.clientId, + content: { + comm_id: this._id, + data: data || {} + }, metadata, buffers - ); + }); // In the future, we may want to communicate back to the user the possible // promise returned from onClose. - onClose(ioMsg as KernelMessage.ICommCloseMsg); + onClose(ioMsg); } this.dispose(); return future; @@ -220,7 +213,7 @@ export class CommHandler extends DisposableDelegate implements Kernel.IComm { private _id = ''; private _kernel: Kernel.IKernel; private _onClose: ( - msg: KernelMessage.ICommCloseMsg + msg: KernelMessage.ICommCloseMsg<'iopub'> ) => void | PromiseLike; private _onMsg: (msg: KernelMessage.ICommMsgMsg) => void | PromiseLike; } diff --git a/packages/services/src/kernel/default.ts b/packages/services/src/kernel/default.ts index 97224b18..6c74023d 100644 --- a/packages/services/src/kernel/default.ts +++ b/packages/services/src/kernel/default.ts @@ -57,8 +57,11 @@ export class DefaultKernel implements Kernel.IKernel { options.serverSettings || ServerConnection.makeSettings(); this._clientId = options.clientId || UUID.uuid4(); this._username = options.username || ''; - this._futures = new Map(); - this._comms = new Map(); + + void this._readyPromise.promise.then(() => { + this._sendPending(); + }); + this._createSocket(); Private.runningKernels.push(this); } @@ -187,7 +190,7 @@ export class DefaultKernel implements Kernel.IKernel { * A promise that is fulfilled when the kernel is ready. */ get ready(): Promise { - return this._connectionPromise.promise; + return this._readyPromise.promise; } /** @@ -227,9 +230,10 @@ export class DefaultKernel implements Kernel.IKernel { return; } this._isDisposed = true; - this._terminated.emit(void 0); + this._terminated.emit(); this._status = 'dead'; - this._clearState(); + // Trigger the async _clearState, but do not wait for it. + void this._clearState(); this._clearSocket(); this._kernelSession = ''; this._msgChain = null; @@ -255,11 +259,11 @@ export class DefaultKernel implements Kernel.IKernel { * * If the kernel status is `dead`, this will throw an error. */ - sendShellMessage( - msg: KernelMessage.IShellMessage, + sendShellMessage( + msg: KernelMessage.IShellMessage, expectReply = false, disposeOnDone = true - ): Kernel.IFuture { + ): Kernel.IFuture> { if (this.status === 'dead') { throw new Error('Kernel is dead'); } @@ -347,7 +351,6 @@ export class DefaultKernel implements Kernel.IKernel { async handleRestart(): Promise { await this._clearState(); this._updateStatus('restarting'); - this._clearSocket(); } /** @@ -360,7 +363,7 @@ export class DefaultKernel implements Kernel.IKernel { this._clearSocket(); this._updateStatus('reconnecting'); this._createSocket(); - return this._connectionPromise.promise; + return this._readyPromise.promise; } /** @@ -374,8 +377,8 @@ export class DefaultKernel implements Kernel.IKernel { * On a valid response, closes the websocket and disposes of the kernel * object, and fulfills the promise. * - * The promise will be rejected if the kernel status is `Dead` or if the - * request fails or the response is invalid. + * If the kernel is already `dead`, it closes the websocket and returns + * without a server request. */ async shutdown(): Promise { if (this.status === 'dead') { @@ -396,19 +399,15 @@ export class DefaultKernel implements Kernel.IKernel { * * Fulfills with the `kernel_info_response` content when the shell reply is * received and validated. - * - * TODO: this should be automatically run every time our kernel restarts, - * before we say the kernel is ready, and cache the info and the kernel - * session id. Further calls to this should returned the cached results. */ async requestKernelInfo(): Promise { - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'kernel_info_request', channel: 'shell', username: this._username, - session: this._clientId - }; - let msg = KernelMessage.createShellMessage(options); + session: this._clientId, + content: {} + }); let reply = (await Private.handleShellMessage( this, msg @@ -432,13 +431,13 @@ export class DefaultKernel implements Kernel.IKernel { requestComplete( content: KernelMessage.ICompleteRequest ): Promise { - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'complete_request', channel: 'shell', username: this._username, - session: this._clientId - }; - let msg = KernelMessage.createShellMessage(options, content); + session: this._clientId, + content + }); return Private.handleShellMessage(this, msg) as Promise< KernelMessage.ICompleteReplyMsg >; @@ -456,13 +455,13 @@ export class DefaultKernel implements Kernel.IKernel { requestInspect( content: KernelMessage.IInspectRequest ): Promise { - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'inspect_request', channel: 'shell', username: this._username, - session: this._clientId - }; - let msg = KernelMessage.createShellMessage(options, content); + session: this._clientId, + content: content + }); return Private.handleShellMessage(this, msg) as Promise< KernelMessage.IInspectReplyMsg >; @@ -480,13 +479,13 @@ export class DefaultKernel implements Kernel.IKernel { requestHistory( content: KernelMessage.IHistoryRequest ): Promise { - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'history_request', channel: 'shell', username: this._username, - session: this._clientId - }; - let msg = KernelMessage.createShellMessage(options, content); + session: this._clientId, + content + }); return Private.handleShellMessage(this, msg) as Promise< KernelMessage.IHistoryReplyMsg >; @@ -511,13 +510,10 @@ export class DefaultKernel implements Kernel.IKernel { content: KernelMessage.IExecuteRequest, disposeOnDone: boolean = true, metadata?: JSONObject - ): Kernel.IFuture { - let options: KernelMessage.IOptions = { - msgType: 'execute_request', - channel: 'shell', - username: this._username, - session: this._clientId - }; + ): Kernel.IFuture< + KernelMessage.IExecuteRequestMsg, + KernelMessage.IExecuteReplyMsg + > { let defaults: JSONObject = { silent: false, store_history: true, @@ -525,9 +521,17 @@ export class DefaultKernel implements Kernel.IKernel { allow_stdin: true, stop_on_error: false }; - content = { ...defaults, ...content }; - let msg = KernelMessage.createShellMessage(options, content, metadata); - return this.sendShellMessage(msg, true, disposeOnDone); + let msg = KernelMessage.createMessage({ + msgType: 'execute_request', + channel: 'shell', + username: this._username, + session: this._clientId, + content: { ...defaults, ...content } + }); + return this.sendShellMessage(msg, true, disposeOnDone) as Kernel.IFuture< + KernelMessage.IExecuteRequestMsg, + KernelMessage.IExecuteReplyMsg + >; } /** @@ -542,13 +546,13 @@ export class DefaultKernel implements Kernel.IKernel { requestIsComplete( content: KernelMessage.IIsCompleteRequest ): Promise { - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'is_complete_request', channel: 'shell', username: this._username, - session: this._clientId - }; - let msg = KernelMessage.createShellMessage(options, content); + session: this._clientId, + content + }); return Private.handleShellMessage(this, msg) as Promise< KernelMessage.IIsCompleteReplyMsg >; @@ -564,13 +568,13 @@ export class DefaultKernel implements Kernel.IKernel { requestCommInfo( content: KernelMessage.ICommInfoRequest ): Promise { - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'comm_info_request', channel: 'shell', username: this._username, - session: this._clientId - }; - let msg = KernelMessage.createShellMessage(options, content); + session: this._clientId, + content + }); return Private.handleShellMessage(this, msg) as Promise< KernelMessage.ICommInfoReplyMsg >; @@ -586,13 +590,13 @@ export class DefaultKernel implements Kernel.IKernel { if (this.status === 'dead') { throw new Error('Kernel is dead'); } - let options: KernelMessage.IOptions = { + let msg = KernelMessage.createMessage({ msgType: 'input_reply', channel: 'stdin', username: this._username, - session: this._clientId - }; - let msg = KernelMessage.createMessage(options, content); + session: this._clientId, + content + }); if (!this._isReady || !this._ws) { this._pendingMessages.push(msg); } else { @@ -737,12 +741,14 @@ export class DefaultKernel implements Kernel.IKernel { // We've seen it before, update existing outputs with same display_id // by handling display_data as update_display_data. let updateMsg: KernelMessage.IMessage = { - header: JSONExt.deepCopy(msg.header) as KernelMessage.IHeader, - parent_header: JSONExt.deepCopy( - msg.parent_header - ) as KernelMessage.IHeader, + header: (JSONExt.deepCopy( + (msg.header as unknown) as JSONObject + ) as unknown) as KernelMessage.IHeader, + parent_header: (JSONExt.deepCopy( + (msg.parent_header as unknown) as JSONObject + ) as unknown) as KernelMessage.IHeader, metadata: JSONExt.deepCopy(msg.metadata), - content: JSONExt.deepCopy(msg.content), + content: JSONExt.deepCopy(msg.content as JSONObject), channel: msg.channel, buffers: msg.buffers ? msg.buffers.slice() : [] }; @@ -785,10 +791,13 @@ export class DefaultKernel implements Kernel.IKernel { /** * Clear the socket state. + * + * #### Notes + * When calling this, you should also set the status to something like + * 'reconnecting' to reset the kernel ready state. */ private _clearSocket(): void { this._wsStopped = true; - this._isReady = false; if (this._ws !== null) { // Clear the websocket event handlers and the socket itself. this._ws.onopen = this._noOp; @@ -805,16 +814,44 @@ export class DefaultKernel implements Kernel.IKernel { */ private _updateStatus(status: Kernel.Status): void { switch (status) { - case 'starting': case 'idle': case 'busy': - case 'connected': - this._isReady = true; + if (!this._isReady && this._initialized) { + this._isReady = true; + this._readyPromise.resolve(); + } break; case 'restarting': + // Send a kernel_info_request to get to a known kernel state. + void this.requestKernelInfo().catch(this._noOp); + break; + case 'starting': + case 'autorestarting': + // 'starting' can happen at initialization or 'restarting'. + // 'autorestarting' is always preceded by 'restarting'. In either case, + // the 'restarting' handler above is fine, so we do nothing here. + /* no-op */ + break; + case 'connected': + // requestKernelInfo is sent by the onWSOpen + break; case 'reconnecting': + if (this._isReady) { + this._isReady = false; + this._readyPromise = new PromiseDelegate(); + void this._readyPromise.promise.then(() => { + // when we are ready again, send any pending messages. + this._sendPending(); + }); + } + break; case 'dead': - this._isReady = false; + if (this._isReady) { + this._isReady = false; + this._readyPromise = new PromiseDelegate(); + } + void this._readyPromise.promise.catch(this._noOp); + this._readyPromise.reject('Kernel is dead'); break; default: console.error('invalid kernel status:', status); @@ -828,9 +865,6 @@ export class DefaultKernel implements Kernel.IKernel { this.dispose(); } } - if (this._isReady) { - this._sendPending(); - } } /** @@ -851,12 +885,11 @@ export class DefaultKernel implements Kernel.IKernel { * Clear the internal state. */ private async _clearState(): Promise { - this._isReady = false; this._pendingMessages = []; - const futuresResolved: Promise[] = []; + const futuresResolved: Promise[] = []; this._futures.forEach(future => { + futuresResolved.push(future.done.then(this._noOp, this._noOp)); future.dispose(); - futuresResolved.push(future.done); }); this._comms.forEach(comm => { comm.dispose(); @@ -868,9 +901,7 @@ export class DefaultKernel implements Kernel.IKernel { this._displayIdToParentIds.clear(); this._msgIdToDisplayIds.clear(); - await Promise.all(futuresResolved).catch(() => { - /* no-op */ - }); + await Promise.all(futuresResolved); } /** @@ -945,6 +976,7 @@ export class DefaultKernel implements Kernel.IKernel { this._unregisterComm(comm.commId); let onClose = comm.onClose; if (onClose) { + // tslint:disable-next-line:await-promise await onClose(msg); } (comm as CommHandler).dispose(); @@ -962,6 +994,7 @@ export class DefaultKernel implements Kernel.IKernel { } let onMsg = comm.onMsg; if (onMsg) { + // tslint:disable-next-line:await-promise await onMsg(msg); } } @@ -1002,7 +1035,6 @@ export class DefaultKernel implements Kernel.IKernel { url = url + `&token=${encodeURIComponent(token)}`; } - this._connectionPromise = new PromiseDelegate(); this._wsStopped = false; this._ws = new settings.WebSocket(url); @@ -1020,19 +1052,26 @@ export class DefaultKernel implements Kernel.IKernel { */ private _onWSOpen = (evt: Event) => { this._reconnectAttempt = 0; - // Allow the message to get through. - this._isReady = true; - // Update our status to connected. this._updateStatus('connected'); + + // We temporarily set the ready status to true so our kernel info request + // below will go through. + this._isReady = true; + // Get the kernel info, signaling that the kernel is ready. - // TODO: requestKernelInfo shouldn't make a request, but should return cached info? this.requestKernelInfo() .then(() => { - this._connectionPromise.resolve(void 0); + this._initialized = true; + this._isReady = true; + this._readyPromise.resolve(); }) .catch(err => { - this._connectionPromise.reject(err); + this._initialized = true; + this._readyPromise.reject(err); }); + + // Reset the isReady status after we sent our message so others wait for + // the kernel info request to come back. this._isReady = false; }; @@ -1080,22 +1119,20 @@ export class DefaultKernel implements Kernel.IKernel { let handled = false; // Check to see if we have a display_id we need to reroute. - if (msg.parent_header && msg.channel === 'iopub') { - switch (msg.header.msg_type) { - case 'display_data': - case 'update_display_data': - case 'execute_result': - // display_data messages may re-route based on their display_id. - let transient = (msg.content.transient || {}) as JSONObject; - let displayId = transient['display_id'] as string; - if (displayId) { - handled = await this._handleDisplayId(displayId, msg); - // The await above may make this message out of date, so check again. - this._assertCurrentMessage(msg); - } - break; - default: - break; + if ( + msg.parent_header && + msg.channel === 'iopub' && + (KernelMessage.isDisplayDataMsg(msg) || + KernelMessage.isUpdateDisplayDataMsg(msg) || + KernelMessage.isExecuteResultMsg(msg)) + ) { + // display_data messages may re-route based on their display_id. + let transient = (msg.content.transient || {}) as JSONObject; + let displayId = transient['display_id'] as string; + if (displayId) { + handled = await this._handleDisplayId(displayId, msg); + // The await above may make this message out of date, so check again. + this._assertCurrentMessage(msg); } } @@ -1117,9 +1154,22 @@ export class DefaultKernel implements Kernel.IKernel { switch (msg.header.msg_type) { case 'status': // Updating the status is synchronous, and we call no async user code - this._updateStatus( - (msg as KernelMessage.IStatusMsg).content.execution_state - ); + let executionState = (msg as KernelMessage.IStatusMsg).content + .execution_state; + this._updateStatus(executionState); + if (executionState === 'restarting') { + // After processing for this message is completely done, we want to + // handle this restart, so we don't await, but instead schedule the + // work as a microtask. We schedule this here so that it comes + // before any microtasks scheduled in the signal emission below. + void Promise.resolve().then(async () => { + // handleRestart changes the status to 'restarting', so we call it + // first so that the status won't flip back and forth between + // 'restarting' and 'autorestarting'. + await this.handleRestart(); + this._updateStatus('autorestarting'); + }); + } break; case 'comm_open': await this._handleCommOpen(msg as KernelMessage.ICommOpenMsg); @@ -1162,9 +1212,6 @@ export class DefaultKernel implements Kernel.IKernel { this._reconnectAttempt += 1; } else { this._updateStatus('dead'); - this._connectionPromise.reject( - new Error('Could not establish connection') - ); } }; @@ -1180,8 +1227,10 @@ export class DefaultKernel implements Kernel.IKernel { private _reconnectLimit = 7; private _reconnectAttempt = 0; private _isReady = false; - private _futures: Map; - private _comms: Map; + private _readyPromise = new PromiseDelegate(); + private _initialized = false; + private _futures = new Map(); + private _comms = new Map(); private _targetRegistry: { [key: string]: ( comm: Kernel.IComm, @@ -1190,7 +1239,6 @@ export class DefaultKernel implements Kernel.IKernel { } = Object.create(null); private _info: KernelMessage.IInfoReply | null = null; private _pendingMessages: KernelMessage.IMessage[] = []; - private _connectionPromise: PromiseDelegate; private _specPromise: Promise; private _statusChanged = new Signal(this); private _iopubMessage = new Signal(this); @@ -1526,11 +1574,6 @@ namespace Private { ); let init = { method: 'POST' }; - // TODO: If we handleRestart before making the server request, we sever the - // communication link before the shutdown_reply message comes, so we end up - // getting the shutdown_reply messages after we reconnect, which is weird. - // We might want to move the handleRestart to after we get the response back - // Handle the restart on all of the kernels with the same id. await Promise.all( runningKernels.filter(k => k.id === kernel.id).map(k => k.handleRestart()) @@ -1541,13 +1584,6 @@ namespace Private { } let data = await response.json(); validate.validateModel(data); - // Reconnect the other kernels asynchronously, but don't wait for them. - each(runningKernels, k => { - if (k !== kernel && k.id === kernel.id) { - k.reconnect(); - } - }); - await kernel.reconnect(); } /** diff --git a/packages/services/src/kernel/future.ts b/packages/services/src/kernel/future.ts index a18c5bef..8c35471c 100644 --- a/packages/services/src/kernel/future.ts +++ b/packages/services/src/kernel/future.ts @@ -19,14 +19,16 @@ declare var setImmediate: any; * is considered done when the `idle` status is received. * */ -export class KernelFutureHandler extends DisposableDelegate - implements Kernel.IFuture { +export class KernelFutureHandler< + REQUEST extends KernelMessage.IShellMessage = KernelMessage.IShellMessage, + REPLY extends KernelMessage.IShellMessage = KernelMessage.IShellMessage +> extends DisposableDelegate implements Kernel.IFuture { /** * Construct a new KernelFutureHandler. */ constructor( cb: () => void, - msg: KernelMessage.IShellMessage, + msg: REQUEST, expectReply: boolean, disposeOnDone: boolean, kernel: Kernel.IKernel @@ -43,32 +45,28 @@ export class KernelFutureHandler extends DisposableDelegate /** * Get the original outgoing message. */ - get msg(): KernelMessage.IShellMessage { + get msg(): REQUEST { return this._msg; } /** * A promise that resolves when the future is done. */ - get done(): Promise { + get done(): Promise { return this._done.promise; } /** * Get the reply handler. */ - get onReply(): ( - msg: KernelMessage.IShellMessage - ) => void | PromiseLike { + get onReply(): (msg: REPLY) => void | PromiseLike { return this._reply; } /** * Set the reply handler. */ - set onReply( - cb: (msg: KernelMessage.IShellMessage) => void | PromiseLike - ) { + set onReply(cb: (msg: REPLY) => void | PromiseLike) { this._reply = cb; } @@ -197,7 +195,7 @@ export class KernelFutureHandler extends DisposableDelegate async handleMsg(msg: KernelMessage.IMessage): Promise { switch (msg.channel) { case 'shell': - await this._handleReply(msg as KernelMessage.IShellMessage); + await this._handleReply(msg as REPLY); break; case 'stdin': await this._handleStdin(msg as KernelMessage.IStdinMessage); @@ -210,9 +208,10 @@ export class KernelFutureHandler extends DisposableDelegate } } - private async _handleReply(msg: KernelMessage.IShellMessage): Promise { + private async _handleReply(msg: REPLY): Promise { let reply = this._reply; if (reply) { + // tslint:disable-next-line:await-promise await reply(msg); } this._replyMsg = msg; @@ -225,6 +224,7 @@ export class KernelFutureHandler extends DisposableDelegate private async _handleStdin(msg: KernelMessage.IStdinMessage): Promise { let stdin = this._stdin; if (stdin) { + // tslint:disable-next-line:await-promise await stdin(msg); } } @@ -233,6 +233,7 @@ export class KernelFutureHandler extends DisposableDelegate let process = await this._hooks.process(msg); let iopub = this._iopub; if (process && iopub) { + // tslint:disable-next-line:await-promise await iopub(msg); } if ( @@ -273,7 +274,7 @@ export class KernelFutureHandler extends DisposableDelegate this._status |= flag; } - private _msg: KernelMessage.IShellMessage; + private _msg: REQUEST; private _status = 0; private _stdin: ( msg: KernelMessage.IStdinMessage @@ -281,11 +282,9 @@ export class KernelFutureHandler extends DisposableDelegate private _iopub: ( msg: KernelMessage.IIOPubMessage ) => void | PromiseLike = Private.noOp; - private _reply: ( - msg: KernelMessage.IShellMessage - ) => void | PromiseLike = Private.noOp; - private _done = new PromiseDelegate(); - private _replyMsg: KernelMessage.IShellMessage; + private _reply: (msg: REPLY) => void | PromiseLike = Private.noOp; + private _done = new PromiseDelegate(); + private _replyMsg: REPLY; private _hooks = new Private.HookList(); private _disposeOnDone = true; private _kernel: Kernel.IKernel; @@ -375,6 +374,7 @@ namespace Private { // Execute the hook and log any errors. try { + // tslint:disable-next-line:await-promise continueHandling = await hook(msg); } catch (err) { continueHandling = true; diff --git a/packages/services/src/kernel/kernel.ts b/packages/services/src/kernel/kernel.ts index 8ba427ac..9766bc4d 100644 --- a/packages/services/src/kernel/kernel.ts +++ b/packages/services/src/kernel/kernel.ts @@ -126,11 +126,11 @@ export namespace Kernel { * * If the kernel status is `'dead'`, this will throw an error. */ - sendShellMessage( - msg: KernelMessage.IShellMessage, + sendShellMessage( + msg: KernelMessage.IShellMessage, expectReply?: boolean, disposeOnDone?: boolean - ): Kernel.IFuture; + ): Kernel.IFuture>; /** * Reconnect to a disconnected kernel. @@ -268,7 +268,10 @@ export namespace Kernel { content: KernelMessage.IExecuteRequest, disposeOnDone?: boolean, metadata?: JSONObject - ): Kernel.IFuture; + ): Kernel.IFuture< + KernelMessage.IExecuteRequestMsg, + KernelMessage.IExecuteReplyMsg + >; /** * Send an `is_complete_request` message. @@ -629,6 +632,11 @@ export namespace Kernel { */ runningChanged: ISignal; + /** + * A signal emitted when there is a connection failure. + */ + connectionFailure: ISignal; + /** * The server settings for the manager. */ @@ -734,11 +742,14 @@ export namespace Kernel { * When a message is sent to a kernel, a Future is created to handle any * responses that may come from the kernel. */ - export interface IFuture extends IDisposable { + export interface IFuture< + REQUEST extends KernelMessage.IShellMessage = KernelMessage.IShellMessage, + REPLY extends KernelMessage.IShellMessage = KernelMessage.IShellMessage + > extends IDisposable { /** * The original outgoing message. */ - readonly msg: KernelMessage.IShellMessage; + readonly msg: REQUEST; /** * A promise that resolves when the future is done. @@ -750,7 +761,7 @@ export namespace Kernel { * The `done` promise resolves to the reply message if there is one, * otherwise it resolves to `undefined`. */ - readonly done: Promise; + readonly done: Promise; /** * The reply handler for the kernel future. @@ -761,7 +772,7 @@ export namespace Kernel { * `done` promise also resolves to the reply message after this handler has * been called. */ - onReply: (msg: KernelMessage.IShellMessage) => void | PromiseLike; + onReply: (msg: REPLY) => void | PromiseLike; /** * The stdin handler for the kernel future. @@ -929,6 +940,7 @@ export namespace Kernel { | 'idle' | 'busy' | 'restarting' + | 'autorestarting' | 'dead' | 'connected'; diff --git a/packages/services/src/kernel/manager.ts b/packages/services/src/kernel/manager.ts index d6ca38d8..73230ea4 100644 --- a/packages/services/src/kernel/manager.ts +++ b/packages/services/src/kernel/manager.ts @@ -1,6 +1,8 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. +import { Poll } from '@jupyterlab/coreutils'; + import { ArrayExt, IIterator, iter } from '@phosphor/algorithm'; import { JSONExt } from '@phosphor/coreutils'; @@ -25,66 +27,77 @@ export class KernelManager implements Kernel.IManager { options.serverSettings || ServerConnection.makeSettings(); // Initialize internal data. - this._readyPromise = this._refreshSpecs().then(() => { - return this._refreshRunning(); - }); + this._ready = Promise.all([this.requestRunning(), this.requestSpecs()]) + .then(_ => undefined) + .catch(_ => undefined) + .then(() => { + if (this.isDisposed) { + return; + } + this._isReady = true; + }); - // Set up polling. - this._modelsTimer = (setInterval as any)(() => { - if (typeof document !== 'undefined' && document.hidden) { - // Don't poll when nobody's looking. - return; - } - this._refreshRunning(); - }, 10000); - this._specsTimer = (setInterval as any)(() => { - if (typeof document !== 'undefined' && document.hidden) { - // Don't poll when nobody's looking. - return; - } - this._refreshSpecs(); - }, 61000); + // Start model and specs polling with exponential backoff. + this._pollModels = new Poll({ + auto: false, + factory: () => this.requestRunning(), + frequency: { + interval: 10 * 1000, + backoff: true, + max: 300 * 1000 + }, + name: `@jupyterlab/services:KernelManager#models`, + standby: options.standby || 'when-hidden' + }); + this._pollSpecs = new Poll({ + auto: false, + factory: () => this.requestSpecs(), + frequency: { + interval: 61 * 1000, + backoff: true, + max: 300 * 1000 + }, + name: `@jupyterlab/services:KernelManager#specs`, + standby: options.standby || 'when-hidden' + }); + void this.ready.then(() => { + void this._pollModels.start(); + void this._pollSpecs.start(); + }); } /** - * A signal emitted when the specs change. + * The server settings for the manager. */ - get specsChanged(): ISignal { - return this._specsChanged; - } + readonly serverSettings: ServerConnection.ISettings; /** - * A signal emitted when the running kernels change. + * Test whether the terminal manager is disposed. */ - get runningChanged(): ISignal { - return this._runningChanged; + get isDisposed(): boolean { + return this._isDisposed; } /** - * Test whether the terminal manager is disposed. + * Test whether the manager is ready. */ - get isDisposed(): boolean { - return this._isDisposed; + get isReady(): boolean { + return this._isReady; } /** - * Dispose of the resources used by the manager. + * A promise that fulfills when the manager is ready. */ - dispose(): void { - if (this.isDisposed) { - return; - } - this._isDisposed = true; - clearInterval(this._modelsTimer); - clearInterval(this._specsTimer); - Signal.clearData(this); - this._models = []; + get ready(): Promise { + return this._ready; } /** - * The server settings for the manager. + * A signal emitted when the running kernels change. */ - readonly serverSettings: ServerConnection.ISettings; + get runningChanged(): ISignal { + return this._runningChanged; + } /** * Get the most recently fetched kernel specs. @@ -94,94 +107,92 @@ export class KernelManager implements Kernel.IManager { } /** - * Test whether the manager is ready. + * A signal emitted when the specs change. */ - get isReady(): boolean { - return this._isReady; + get specsChanged(): ISignal { + return this._specsChanged; } /** - * A promise that fulfills when the manager is ready. + * A signal emitted when there is a connection failure. */ - get ready(): Promise { - return this._readyPromise; + get connectionFailure(): ISignal { + return this._connectionFailure; } /** - * Create an iterator over the most recent running kernels. + * Connect to an existing kernel. * - * @returns A new iterator over the running kernels. + * @param model - The model of the target kernel. + * + * @returns A promise that resolves with the new kernel instance. */ - running(): IIterator { - return iter(this._models); + connectTo(model: Kernel.IModel): Kernel.IKernel { + let kernel = Kernel.connectTo(model, this.serverSettings); + this._onStarted(kernel); + return kernel; } /** - * Force a refresh of the specs from the server. - * - * @returns A promise that resolves when the specs are fetched. - * - * #### Notes - * This is intended to be called only in response to a user action, - * since the manager maintains its internal state. + * Dispose of the resources used by the manager. */ - refreshSpecs(): Promise { - return this._refreshSpecs(); + dispose(): void { + if (this._isDisposed) { + return; + } + this._isDisposed = true; + this._models.length = 0; + this._pollModels.dispose(); + this._pollSpecs.dispose(); + Signal.clearData(this); } /** - * Force a refresh of the running kernels. + * Find a kernel by id. * - * @returns A promise that with the list of running sessions. + * @param id - The id of the target kernel. * - * #### Notes - * This is not typically meant to be called by the user, since the - * manager maintains its own internal state. + * @returns A promise that resolves with the kernel's model. */ - refreshRunning(): Promise { - return this._refreshRunning(); + findById(id: string): Promise { + return Kernel.findById(id, this.serverSettings); } /** - * Start a new kernel. - * - * @param options - The kernel options to use. + * Force a refresh of the running kernels. * - * @returns A promise that resolves with the kernel instance. + * @returns A promise that resolves when the running list has been refreshed. * * #### Notes - * The manager `serverSettings` will be always be used. + * This is not typically meant to be called by the user, since the + * manager maintains its own internal state. */ - startNew(options: Kernel.IOptions = {}): Promise { - let newOptions = { ...options, serverSettings: this.serverSettings }; - return Kernel.startNew(newOptions).then(kernel => { - this._onStarted(kernel); - return kernel; - }); + async refreshRunning(): Promise { + await this._pollModels.refresh(); + await this._pollModels.tick; } /** - * Find a kernel by id. + * Force a refresh of the specs from the server. * - * @param id - The id of the target kernel. + * @returns A promise that resolves when the specs are fetched. * - * @returns A promise that resolves with the kernel's model. + * #### Notes + * This is intended to be called only in response to a user action, + * since the manager maintains its internal state. */ - findById(id: string): Promise { - return Kernel.findById(id, this.serverSettings); + async refreshSpecs(): Promise { + await this._pollSpecs.refresh(); + await this._pollSpecs.tick; } /** - * Connect to an existing kernel. - * - * @param model - The model of the target kernel. + * Create an iterator over the most recent running kernels. * - * @returns A promise that resolves with the new kernel instance. + * @returns A new iterator over the running kernels. */ - connectTo(model: Kernel.IModel): Kernel.IKernel { - let kernel = Kernel.connectTo(model, this.serverSettings); - this._onStarted(kernel); - return kernel; + running(): IIterator { + return iter(this._models); } /** @@ -195,28 +206,29 @@ export class KernelManager implements Kernel.IManager { * This will emit [[runningChanged]] if the running kernels list * changes. */ - shutdown(id: string): Promise { - let index = ArrayExt.findFirstIndex(this._models, value => value.id === id); + async shutdown(id: string): Promise { + const models = this._models; + const kernels = this._kernels; + const index = ArrayExt.findFirstIndex(models, value => value.id === id); + if (index === -1) { return; } // Proactively remove the model. - this._models.splice(index, 1); - this._runningChanged.emit(this._models.slice()); - - return Kernel.shutdown(id, this.serverSettings).then(() => { - let toRemove: Kernel.IKernel[] = []; - this._kernels.forEach(k => { - if (k.id === id) { - k.dispose(); - toRemove.push(k); - } - }); - toRemove.forEach(k => { - this._kernels.delete(k); - }); + models.splice(index, 1); + this._runningChanged.emit(models.slice()); + + // Delete and dispose the kernel locally. + kernels.forEach(kernel => { + if (kernel.id === id) { + kernels.delete(kernel); + kernel.dispose(); + } }); + + // Shut down the remote session. + await Kernel.shutdown(id, this.serverSettings); } /** @@ -224,42 +236,84 @@ export class KernelManager implements Kernel.IManager { * * @returns A promise that resolves when all of the kernels are shut down. */ - shutdownAll(): Promise { - // Proactively remove all models. - let models = this._models; - if (models.length > 0) { - this._models = []; - this._runningChanged.emit([]); + async shutdownAll(): Promise { + // Update the list of models then shut down every session. + try { + await this.requestRunning(); + await Promise.all( + this._models.map(({ id }) => Kernel.shutdown(id, this.serverSettings)) + ); + } finally { + // Dispose every kernel and clear the set. + this._kernels.forEach(kernel => { + kernel.dispose(); + }); + this._kernels.clear(); + + // Remove all models even if we had an error. + if (this._models.length) { + this._models.length = 0; + this._runningChanged.emit([]); + } } + } - return this._refreshRunning().then(() => { - return Promise.all( - models.map(model => { - return Kernel.shutdown(model.id, this.serverSettings).then(() => { - let toRemove: Kernel.IKernel[] = []; - this._kernels.forEach(k => { - k.dispose(); - toRemove.push(k); - }); - toRemove.forEach(k => { - this._kernels.delete(k); - }); - }); - }) - ).then(() => { - return undefined; - }); + /** + * Start a new kernel. + * + * @param options - The kernel options to use. + * + * @returns A promise that resolves with the kernel instance. + * + * #### Notes + * The manager `serverSettings` will be always be used. + */ + async startNew(options: Kernel.IOptions = {}): Promise { + const newOptions = { ...options, serverSettings: this.serverSettings }; + const kernel = await Kernel.startNew(newOptions); + this._onStarted(kernel); + return kernel; + } + + /** + * Execute a request to the server to poll running kernels and update state. + */ + protected async requestRunning(): Promise { + const models = await Kernel.listRunning(this.serverSettings).catch(err => { + if (err instanceof ServerConnection.NetworkError) { + this._connectionFailure.emit(err); + return [] as Kernel.IModel[]; + } + throw err; }); + if (this._isDisposed) { + return; + } + if (!JSONExt.deepEqual(models, this._models)) { + const ids = models.map(({ id }) => id); + const kernels = this._kernels; + kernels.forEach(kernel => { + if (ids.indexOf(kernel.id) === -1) { + kernel.dispose(); + kernels.delete(kernel); + } + }); + this._models = models.slice(); + this._runningChanged.emit(models); + } } /** - * Handle a kernel terminating. + * Execute a request to the server to poll specs and update state. */ - private _onTerminated(id: string): void { - let index = ArrayExt.findFirstIndex(this._models, value => value.id === id); - if (index !== -1) { - this._models.splice(index, 1); - this._runningChanged.emit(this._models.slice()); + protected async requestSpecs(): Promise { + const specs = await Kernel.getSpecs(this.serverSettings); + if (this._isDisposed) { + return; + } + if (!JSONExt.deepEqual(specs, this._specs)) { + this._specs = specs; + this._specsChanged.emit(specs); } } @@ -280,51 +334,29 @@ export class KernelManager implements Kernel.IManager { } /** - * Refresh the specs. - */ - private _refreshSpecs(): Promise { - return Kernel.getSpecs(this.serverSettings).then(specs => { - if (!JSONExt.deepEqual(specs, this._specs)) { - this._specs = specs; - this._specsChanged.emit(specs); - } - }); - } - - /** - * Refresh the running sessions. + * Handle a kernel terminating. */ - private _refreshRunning(): Promise { - return Kernel.listRunning(this.serverSettings).then(models => { - this._isReady = true; - if (!JSONExt.deepEqual(models, this._models)) { - let ids = models.map(r => r.id); - let toRemove: Kernel.IKernel[] = []; - this._kernels.forEach(k => { - if (ids.indexOf(k.id) === -1) { - k.dispose(); - toRemove.push(k); - } - }); - toRemove.forEach(s => { - this._kernels.delete(s); - }); - this._models = models.slice(); - this._runningChanged.emit(models); - } - }); + private _onTerminated(id: string): void { + let index = ArrayExt.findFirstIndex(this._models, value => value.id === id); + if (index !== -1) { + this._models.splice(index, 1); + this._runningChanged.emit(this._models.slice()); + } } - private _models: Kernel.IModel[] = []; - private _kernels = new Set(); - private _specs: Kernel.ISpecModels | null = null; private _isDisposed = false; - private _modelsTimer = -1; - private _specsTimer = -1; - private _readyPromise: Promise; private _isReady = false; - private _specsChanged = new Signal(this); + private _kernels = new Set(); + private _models: Kernel.IModel[] = []; + private _pollModels: Poll; + private _pollSpecs: Poll; + private _ready: Promise; private _runningChanged = new Signal(this); + private _specs: Kernel.ISpecModels | null = null; + private _specsChanged = new Signal(this); + private _connectionFailure = new Signal( + this + ); } /** @@ -339,5 +371,10 @@ export namespace KernelManager { * The server settings for the manager. */ serverSettings?: ServerConnection.ISettings; + + /** + * When the manager stops polling the API. Defaults to `when-hidden`. + */ + standby?: Poll.Standby; } } diff --git a/packages/services/src/kernel/messages.ts b/packages/services/src/kernel/messages.ts index 8d58bb43..823aaf57 100644 --- a/packages/services/src/kernel/messages.ts +++ b/packages/services/src/kernel/messages.ts @@ -5,7 +5,7 @@ import { nbformat } from '@jupyterlab/coreutils'; import { UUID } from '@phosphor/coreutils'; -import { JSONObject, JSONValue } from '@phosphor/coreutils'; +import { JSONObject } from '@phosphor/coreutils'; import { Kernel } from './kernel'; @@ -13,43 +13,179 @@ import { Kernel } from './kernel'; * A namespace for kernel messages. */ export namespace KernelMessage { - /** - * Create a well-formed kernel message. - */ - export function createMessage( - options: IOptions, - content: JSONObject = {}, - metadata: JSONObject = {}, - buffers: (ArrayBuffer | ArrayBufferView)[] = [] - ): IMessage { + export interface IOptions { + session: string; + channel: T['channel']; + msgType: T['header']['msg_type']; + content: T['content']; + buffers?: (ArrayBuffer | ArrayBufferView)[]; + metadata?: JSONObject; + msgId?: string; + username?: string; + parentHeader?: T['parent_header']; + } + export function createMessage( + options: IOptions + ): T; + export function createMessage>( + options: IOptions + ): T; + export function createMessage>( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage>( + options: IOptions + ): T; + export function createMessage>( + options: IOptions + ): T; + export function createMessage>( + options: IOptions + ): T; + export function createMessage>( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage(options: IOptions): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage( + options: IOptions + ): T; + export function createMessage(options: IOptions): T; + export function createMessage(options: IOptions): T; + export function createMessage( + options: IOptions + ): T; + + export function createMessage(options: IOptions): T { return { + buffers: options.buffers || [], + channel: options.channel, + content: options.content, header: { - username: options.username || '', - version: '5.2', - session: options.session, + date: new Date().toISOString(), msg_id: options.msgId || UUID.uuid4(), - msg_type: options.msgType + msg_type: options.msgType, + session: options.session, + username: options.username || '', + version: '5.2' }, - parent_header: {}, - channel: options.channel, - content, - metadata, - buffers - }; + metadata: options.metadata || {}, + parent_header: options.parentHeader || {} + } as T; } /** - * Create a well-formed kernel shell message. + * Shell message types. */ - export function createShellMessage( - options: IOptions, - content: JSONObject = {}, - metadata: JSONObject = {}, - buffers: (ArrayBuffer | ArrayBufferView)[] = [] - ): IShellMessage { - let msg = createMessage(options, content, metadata, buffers); - return msg as IShellMessage; - } + export type ShellMessageType = + | 'comm_close' + | 'comm_info_reply' + | 'comm_info_request' + | 'comm_msg' + | 'comm_open' + | 'complete_reply' + | 'complete_request' + | 'execute_reply' + | 'execute_request' + | 'history_reply' + | 'history_request' + | 'inspect_reply' + | 'inspect_request' + | 'interrupt_reply' + | 'interrupt_request' + | 'is_complete_reply' + | 'is_complete_request' + | 'kernel_info_reply' + | 'kernel_info_request' + | 'shutdown_reply' + | 'shutdown_request'; + + /** + * IOPub message types. + */ + export type IOPubMessageType = + | 'clear_output' + | 'comm_close' + | 'comm_msg' + | 'comm_open' + | 'display_data' + | 'error' + | 'execute_input' + | 'execute_result' + | 'status' + | 'stream' + | 'update_display_data'; + + /** + * Stdin message types. + */ + export type StdinMessageType = 'input_request' | 'input_reply'; + + /** + * Jupyter message types. + */ + export type MessageType = + | IOPubMessageType + | ShellMessageType + | StdinMessageType; + + /** + * The valid Jupyter channel names in a message to a frontend. + */ + export type Channel = 'shell' | 'iopub' | 'stdin'; /** * Kernel message header content. @@ -58,12 +194,36 @@ export namespace KernelMessage { * * **See also:** [[IMessage]] */ - export interface IHeader extends JSONObject { + export interface IHeader { + /** + * ISO 8601 timestamp for when the message is created + */ + date: string; + + /** + * Message id, typically UUID, must be unique per message + */ + msg_id: string; + + /** + * Message type + */ + msg_type: T; + + /** + * Session id, typically UUID, should be unique per session. + */ + session: string; + + /** + * The user sending the message + */ username: string; + + /** + * The message protocol version, should be 5.1, 5.2, 5.3, etc. + */ version: string; - session: string; - msg_id: string; - msg_type: string; } /** @@ -71,47 +231,102 @@ export namespace KernelMessage { * * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#general-message-format). */ - export interface IMessage { - header: IHeader; + export interface IMessage { + /** + * The message header. + */ + header: IHeader; + + /** + * The parent message + */ parent_header: IHeader | {}; + + /** + * Metadata associated with the message. + */ metadata: JSONObject; - content: JSONObject; + + /** + * The content of the message. + */ + content: MessageContent; + + /** + * The channel on which the message is transmitted. + */ channel: Channel; + + /** + * An optional list of binary buffers. + */ buffers?: (ArrayBuffer | ArrayBufferView)[]; } - /** - * The valid channel names. - */ - export type Channel = 'shell' | 'iopub' | 'stdin'; - /** * A kernel message on the `'shell'` channel. */ - export interface IShellMessage extends IMessage { + export interface IShellMessage + extends IMessage { channel: 'shell'; } /** * A kernel message on the `'iopub'` channel. */ - export interface IIOPubMessage extends IMessage { + export interface IIOPubMessage + extends IMessage { channel: 'iopub'; } /** * A kernel message on the `'stdin'` channel. */ - export interface IStdinMessage extends IMessage { + export interface IStdinMessage + extends IMessage { channel: 'stdin'; } + export type Message = + | IClearOutputMsg + | ICommCloseMsg<'iopub'> + | ICommCloseMsg<'shell'> + | ICommInfoReplyMsg + | ICommInfoRequestMsg + | ICommMsgMsg<'iopub'> + | ICommMsgMsg<'shell'> + | ICommOpenMsg<'iopub'> + | ICommOpenMsg<'shell'> + | ICompleteReplyMsg + | ICompleteRequestMsg + | IDisplayDataMsg + | IErrorMsg + | IExecuteInputMsg + | IExecuteReplyMsg + | IExecuteRequestMsg + | IExecuteResultMsg + | IHistoryReplyMsg + | IHistoryRequestMsg + | IInfoReplyMsg + | IInfoRequestMsg + | IInputReplyMsg + | IInputRequestMsg + | IInspectReplyMsg + | IInspectRequestMsg + | IIsCompleteReplyMsg + | IIsCompleteRequestMsg + | IStatusMsg + | IStreamMsg + | IUpdateDisplayDataMsg; + + export type MessageContent = T['content']; + /** * A `'stream'` message on the `'iopub'` channel. * * See [Streams](https://jupyter-client.readthedocs.io/en/latest/messaging.html#streams-stdout-stderr-etc). */ - export interface IStreamMsg extends IIOPubMessage { + export interface IStreamMsg extends IIOPubMessage<'stream'> { content: { name: 'stdout' | 'stderr'; text: string; @@ -130,7 +345,7 @@ export namespace KernelMessage { * * See [Display data](https://jupyter-client.readthedocs.io/en/latest/messaging.html#display-data). */ - export interface IDisplayDataMsg extends IIOPubMessage { + export interface IDisplayDataMsg extends IIOPubMessage<'display_data'> { content: { data: nbformat.IMimeBundle; metadata: nbformat.OutputMetadata; @@ -150,8 +365,10 @@ export namespace KernelMessage { * * See [Update Display data](https://jupyter-client.readthedocs.io/en/latest/messaging.html#update-display-data). */ - export interface IUpdateDisplayDataMsg extends IDisplayDataMsg { + export interface IUpdateDisplayDataMsg + extends IIOPubMessage<'update_display_data'> { content: IDisplayDataMsg['content'] & { + // display_id is a required field in update_display_data transient: { display_id: string }; }; } @@ -170,7 +387,7 @@ export namespace KernelMessage { * * See [Code inputs](https://jupyter-client.readthedocs.io/en/latest/messaging.html#code-inputs). */ - export interface IExecuteInputMsg extends IIOPubMessage { + export interface IExecuteInputMsg extends IIOPubMessage<'execute_input'> { content: { code: string; execution_count: nbformat.ExecutionCount; @@ -189,11 +406,12 @@ export namespace KernelMessage { * * See [Execution results](https://jupyter-client.readthedocs.io/en/latest/messaging.html#id4). */ - export interface IExecuteResultMsg extends IIOPubMessage { + export interface IExecuteResultMsg extends IIOPubMessage<'execute_result'> { content: { execution_count: nbformat.ExecutionCount; data: nbformat.IMimeBundle; metadata: nbformat.OutputMetadata; + transient?: { display_id?: string }; }; } @@ -209,7 +427,7 @@ export namespace KernelMessage { * * See [Execution errors](https://jupyter-client.readthedocs.io/en/latest/messaging.html#execution-errors). */ - export interface IErrorMsg extends IIOPubMessage { + export interface IErrorMsg extends IIOPubMessage<'error'> { content: { ename: string; evalue: string; @@ -229,7 +447,7 @@ export namespace KernelMessage { * * See [Kernel status](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-status). */ - export interface IStatusMsg extends IIOPubMessage { + export interface IStatusMsg extends IIOPubMessage<'status'> { content: { execution_state: Kernel.Status; }; @@ -247,7 +465,7 @@ export namespace KernelMessage { * * See [Clear output](https://jupyter-client.readthedocs.io/en/latest/messaging.html#clear-output). */ - export interface IClearOutputMsg extends IIOPubMessage { + export interface IClearOutputMsg extends IIOPubMessage<'clear_output'> { content: { wait: boolean; }; @@ -265,7 +483,30 @@ export namespace KernelMessage { * * See [Comm open](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm). */ - export interface ICommOpenMsg extends IIOPubMessage { + export interface ICommOpenMsg< + T extends 'shell' | 'iopub' = 'iopub' | 'shell' + > extends IMessage<'comm_open'> { + channel: T; + content: ICommOpen; + } + + /** + * A `'comm_open'` message on the `'iopub'` channel. + * + * See [Comm open](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm). + */ + export interface ICommOpenIOPubMsg extends IIOPubMessage<'comm_open'> { + channel: 'iopub'; + content: ICommOpen; + } + + /** + * A `'comm_open'` message on the `'shell'` channel. + * + * See [Comm open](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm). + */ + export interface ICommOpenShellMsg extends IShellMessage<'comm_open'> { + channel: 'shell'; content: ICommOpen; } @@ -275,26 +516,33 @@ export namespace KernelMessage { * * See [Comm open](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm). */ - export interface ICommOpen extends JSONObject { + export interface ICommOpen { comm_id: string; target_name: string; - data: JSONValue; + data: JSONObject; target_module?: string; } /** * Test whether a kernel message is a `'comm_open'` message. */ - export function isCommOpenMsg(msg: IMessage): msg is ICommOpenMsg { + export function isCommOpenMsg( + msg: IMessage + ): msg is ICommOpenIOPubMsg | ICommOpenShellMsg { return msg.header.msg_type === 'comm_open'; } + export type iopubshell = 'iopub' | 'shell'; + /** * A `'comm_close'` message on the `'iopub'` channel. * * See [Comm close](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm). */ - export interface ICommCloseMsg extends IIOPubMessage { + export interface ICommCloseMsg< + T extends 'iopub' | 'shell' = 'iopub' | 'shell' + > extends IMessage<'comm_close'> { + channel: T; content: ICommClose; } @@ -304,15 +552,17 @@ export namespace KernelMessage { * * See [Comm close](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm). */ - export interface ICommClose extends JSONObject { + export interface ICommClose { comm_id: string; - data: JSONValue; + data: JSONObject; } /** * Test whether a kernel message is a `'comm_close'` message. */ - export function isCommCloseMsg(msg: IMessage): msg is ICommCloseMsg { + export function isCommCloseMsg( + msg: IMessage + ): msg is ICommCloseMsg<'iopub' | 'shell'> { return msg.header.msg_type === 'comm_close'; } @@ -321,7 +571,9 @@ export namespace KernelMessage { * * See [Comm msg](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm). */ - export interface ICommMsgMsg extends IIOPubMessage { + export interface ICommMsgMsg + extends IMessage<'comm_msg'> { + channel: T; content: ICommMsg; } @@ -331,24 +583,44 @@ export namespace KernelMessage { * * See [Comm msg](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm). */ - export interface ICommMsg extends JSONObject { + export interface ICommMsg { comm_id: string; - data: JSONValue; + data: JSONObject; } /** * Test whether a kernel message is a `'comm_msg'` message. */ - export function isCommMsgMsg(msg: IMessage): msg is ICommMsgMsg { + export function isCommMsgMsg( + msg: IMessage + ): msg is ICommMsgMsg<'iopub' | 'shell'> { return msg.header.msg_type === 'comm_msg'; } /** - * A `'kernel_info_reply'` message on the `'stream'` channel. + * A `'kernel_info_request'` message on the `'shell'` channel. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info). + */ + export interface IInfoRequestMsg + extends IShellMessage<'kernel_info_request'> { + content: {}; + } + + /** + * Test whether a kernel message is a `'kernel_info_request'` message. + */ + export function isInfoRequestMsg(msg: IMessage): msg is IInfoRequestMsg { + return msg.header.msg_type === 'kernel_info_request'; + } + + /** + * A `'kernel_info_reply'` message on the `'shell'` channel. * * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info). */ - export interface IInfoReplyMsg extends IShellMessage { + export interface IInfoReplyMsg extends IShellMessage<'kernel_info_reply'> { + parent_header: IHeader<'kernel_info_request'>; content: IInfoReply; } @@ -357,7 +629,7 @@ export namespace KernelMessage { * * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info). */ - export interface IInfoReply extends JSONObject { + export interface IInfoReply { protocol_version: string; implementation: string; implementation_version: string; @@ -376,6 +648,18 @@ export namespace KernelMessage { nbconverter_exporter?: string; } + /** + * A `'complete_request'` message. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#completion). + * + * **See also:** [[ICompleteReplyMsg]], [[IKernel.complete]] + */ + export interface ICompleteRequestMsg + extends IShellMessage<'complete_request'> { + content: ICompleteRequest; + } + /** * The content of a `'complete_request'` message. * @@ -383,7 +667,7 @@ export namespace KernelMessage { * * **See also:** [[ICompleteReply]], [[IKernel.complete]] */ - export interface ICompleteRequest extends JSONObject { + export interface ICompleteRequest { code: string; cursor_pos: number; } @@ -395,7 +679,8 @@ export namespace KernelMessage { * * **See also:** [[ICompleteRequest]], [[IKernel.complete]] */ - export interface ICompleteReplyMsg extends IShellMessage { + export interface ICompleteReplyMsg extends IShellMessage<'complete_reply'> { + parent_header: IHeader<'complete_request'>; content: { matches: string[]; cursor_start: number; @@ -405,6 +690,17 @@ export namespace KernelMessage { }; } + /** + * An `'inspect_request'` message. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#introspection). + * + * **See also:** [[IInspectReplyMsg]], [[[IKernel.inspect]]] + */ + export interface IInspectRequestMsg extends IShellMessage<'inspect_request'> { + content: IInspectRequest; + } + /** * The content of an `'inspect_request'` message. * @@ -412,7 +708,7 @@ export namespace KernelMessage { * * **See also:** [[IInspectReply]], [[[IKernel.inspect]]] */ - export interface IInspectRequest extends JSONObject { + export interface IInspectRequest { code: string; cursor_pos: number; detail_level: 0 | 1; @@ -425,7 +721,8 @@ export namespace KernelMessage { * * **See also:** [[IInspectRequest]], [[IKernel.inspect]] */ - export interface IInspectReplyMsg extends IShellMessage { + export interface IInspectReplyMsg extends IShellMessage<'inspect_reply'> { + parent_header: IHeader<'inspect_request'>; content: { status: 'ok' | 'error'; found: boolean; @@ -435,24 +732,79 @@ export namespace KernelMessage { } /** - * The content of a `'history_request'` message. + * A `'history_request'` message. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#history). + * + * **See also:** [[IHistoryReplyMsg]], [[[IKernel.history]]] + */ + export interface IHistoryRequestMsg extends IShellMessage<'history_request'> { + content: IHistoryRequest; + } + + /** + * The history access settings. + */ + export type HistAccess = 'range' | 'tail' | 'search'; + + /** + * The content of a `'history_request'` range message. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#history). + * + * **See also:** [[IHistoryReply]], [[[IKernel.history]]] + */ + export interface IHistoryRequestRange { + output: boolean; + raw: boolean; + hist_access_type: 'range'; + session: number; + start: number; + stop: number; + } + + /** + * The content of a `'history_request'` tail message. * * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#history). * * **See also:** [[IHistoryReply]], [[[IKernel.history]]] */ - export interface IHistoryRequest extends JSONObject { + export interface IHistoryRequestTail { output: boolean; raw: boolean; - hist_access_type: HistAccess; - session?: number; - start?: number; - stop?: number; - n?: number; - pattern?: string; - unique?: boolean; + hist_access_type: 'tail'; + n: number; } + /** + * The content of a `'history_request'` search message. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#history). + * + * **See also:** [[IHistoryReply]], [[[IKernel.history]]] + */ + export interface IHistoryRequestSearch { + output: boolean; + raw: boolean; + hist_access_type: 'search'; + n: number; + pattern: string; + unique: boolean; + } + + /** + * The content of a `'history_request'` message. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#history). + * + * **See also:** [[IHistoryReply]], [[[IKernel.history]]] + */ + export type IHistoryRequest = + | IHistoryRequestRange + | IHistoryRequestTail + | IHistoryRequestSearch; + /** * A `'history_reply'` message on the `'stream'` channel. * @@ -460,16 +812,26 @@ export namespace KernelMessage { * * **See also:** [[IHistoryRequest]], [[IKernel.history]] */ - export interface IHistoryReplyMsg extends IShellMessage { + export interface IHistoryReplyMsg extends IShellMessage<'history_reply'> { + parent_header: IHeader<'history_request'>; content: { - history: JSONValue[]; + history: + | [number, number, string][] + | [number, number, [string, string]][]; }; } /** - * The history access settings. + * An `'is_complete_request'` message. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#code-completeness). + * + * **See also:** [[IIsCompleteReplyMsg]], [[IKernel.isComplete]] */ - export type HistAccess = 'range' | 'tail' | 'search'; + export interface IIsCompleteRequestMsg + extends IShellMessage<'is_complete_request'> { + content: IIsCompleteRequest; + } /** * The content of an `'is_complete_request'` message. @@ -478,7 +840,7 @@ export namespace KernelMessage { * * **See also:** [[IIsCompleteReply]], [[IKernel.isComplete]] */ - export interface IIsCompleteRequest extends JSONObject { + export interface IIsCompleteRequest { code: string; } @@ -489,13 +851,22 @@ export namespace KernelMessage { * * **See also:** [[IIsCompleteRequest]], [[IKernel.isComplete]] */ - export interface IIsCompleteReplyMsg extends IShellMessage { + export interface IIsCompleteReplyMsg + extends IShellMessage<'is_complete_reply'> { + parent_header: IHeader<'is_complete_request'>; content: { status: string; indent: string; }; } + /** + * An `execute_request` message on the ` + */ + export interface IExecuteRequestMsg extends IShellMessage<'execute_request'> { + content: IExecuteRequest; + } + /** * The content of an `'execute_request'` message. * @@ -512,7 +883,7 @@ export namespace KernelMessage { * * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#execute). */ - export interface IExecuteOptions extends JSONObject { + export interface IExecuteOptions { /** * Whether to execute the code as quietly as possible. * The default is `false`. @@ -552,7 +923,8 @@ export namespace KernelMessage { * * **See also:** [[IExecuteRequest]], [[IKernel.execute]] */ - export interface IExecuteReplyMsg extends IShellMessage { + export interface IExecuteReplyMsg extends IShellMessage<'execute_reply'> { + parent_header: IHeader<'execute_request'>; content: IExecuteReply; } @@ -561,7 +933,7 @@ export namespace KernelMessage { * * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#execution-results). */ - export interface IExecuteReply extends JSONObject { + export interface IExecuteReply { status: 'ok' | 'error' | 'abort'; execution_count: nbformat.ExecutionCount; } @@ -620,14 +992,14 @@ export namespace KernelMessage { * * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets). */ - export interface IInputRequestMsg extends IStdinMessage { + export interface IInputRequestMsg extends IStdinMessage<'input_request'> { content: IInputRequest; } /** * The content of an `'input_request'` message. */ - export interface IInputRequest extends JSONObject { + export interface IInputRequest { /** * The text to show at the prompt. */ @@ -647,6 +1019,16 @@ export namespace KernelMessage { return msg.header.msg_type === 'input_request'; } + /** + * An `'input_reply'` message on the `'stdin'` channel. + * + * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets). + */ + export interface IInputReplyMsg extends IStdinMessage<'input_reply'> { + parent_header: IHeader<'input_request'>; + content: IInputReply; + } + /** * The content of an `'input_reply'` message. * @@ -654,10 +1036,22 @@ export namespace KernelMessage { * * **See also:** [[IKernel.input_reply]] */ - export interface IInputReply extends JSONObject { + export interface IInputReply { value: string; } + /** + * Test whether a kernel message is an `'input_reply'` message. + */ + export function isInputReplyMsg(msg: IMessage): msg is IInputReplyMsg { + return msg.header.msg_type === 'input_reply'; + } + + export interface ICommInfoRequestMsg + extends IShellMessage<'comm_info_request'> { + content: ICommInfoRequest; + } + /** * The content of a `'comm_info_request'` message. * @@ -665,7 +1059,7 @@ export namespace KernelMessage { * * **See also:** [[ICommInfoReply]], [[IKernel.commInfo]] */ - export interface ICommInfoRequest extends JSONObject { + export interface ICommInfoRequest { target?: string; } @@ -676,7 +1070,8 @@ export namespace KernelMessage { * * **See also:** [[ICommInfoRequest]], [[IKernel.commInfo]] */ - export interface ICommInfoReplyMsg extends IShellMessage { + export interface ICommInfoReplyMsg extends IShellMessage<'comm_info_reply'> { + parent_header: IHeader<'comm_info_request'>; content: { /** * Mapping of comm ids to target names. @@ -684,17 +1079,4 @@ export namespace KernelMessage { comms: { [commId: string]: { target_name: string } }; }; } - - /** - * Options for an `IMessage`. - * - * **See also:** [[IMessage]] - */ - export interface IOptions { - msgType: string; - channel: Channel; - session: string; - username?: string; - msgId?: string; - } } diff --git a/packages/services/src/manager.ts b/packages/services/src/manager.ts index 7007ebfc..9a013622 100644 --- a/packages/services/src/manager.ts +++ b/packages/services/src/manager.ts @@ -1,6 +1,8 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. +import { Poll } from '@jupyterlab/coreutils'; + import { IDisposable } from '@phosphor/disposable'; import { ISignal, Signal } from '@phosphor/signaling'; @@ -31,26 +33,37 @@ export class ServiceManager implements ServiceManager.IManager { * Construct a new services provider. */ constructor(options: ServiceManager.IOptions = {}) { - this.serverSettings = + const defaultDrive = options.defaultDrive; + const serverSettings = options.serverSettings || ServerConnection.makeSettings(); - - this.contents = new ContentsManager(options); - this.sessions = new SessionManager(options); - this.settings = new SettingManager(options); - this.terminals = new TerminalManager(options); - this.builder = new BuildManager(options); - this.workspaces = new WorkspaceManager(options); - this.nbconvert = new NbConvertManager(options); - - this.sessions.specsChanged.connect((sender, specs) => { + const standby = options.standby || 'when-hidden'; + const normalized = { defaultDrive, serverSettings, standby }; + + this.serverSettings = serverSettings; + this.contents = new ContentsManager(normalized); + this.sessions = new SessionManager(normalized); + this.settings = new SettingManager(normalized); + this.terminals = new TerminalManager(normalized); + this.builder = new BuildManager(normalized); + this.workspaces = new WorkspaceManager(normalized); + this.nbconvert = new NbConvertManager(normalized); + + this.sessions.specsChanged.connect((_, specs) => { this._specsChanged.emit(specs); }); + + // Relay connection failures from the service managers that poll + // the server for running sessions. + // TODO: should we also relay connection failures from other managers? + this.sessions.connectionFailure.connect(this._onConnectionFailure, this); + this.terminals.connectionFailure.connect(this._onConnectionFailure, this); + this._readyPromise = this.sessions.ready.then(() => { if (this.terminals.isAvailable()) { return this.terminals.ready; } }); - this._readyPromise.then(() => { + void this._readyPromise.then(() => { this._isReady = true; }); } @@ -62,6 +75,13 @@ export class ServiceManager implements ServiceManager.IManager { return this._specsChanged; } + /** + * A signal emitted when there is a connection failure with the kernel. + */ + get connectionFailure(): ISignal { + return this._connectionFailure; + } + /** * Test whether the service manager is disposed. */ @@ -146,9 +166,19 @@ export class ServiceManager implements ServiceManager.IManager { return this._readyPromise; } + private _onConnectionFailure( + sender: any, + err: ServerConnection.NetworkError + ): void { + this._connectionFailure.emit(err); + } + private _isDisposed = false; private _readyPromise: Promise; private _specsChanged = new Signal(this); + private _connectionFailure = new Signal( + this + ); private _isReady = false; } @@ -219,6 +249,14 @@ export namespace ServiceManager { * The nbconvert manager for the manager. */ readonly nbconvert: NbConvert.IManager; + + /** + * A signal emitted when there is a connection failure with the server. + */ + readonly connectionFailure: ISignal< + IManager, + ServerConnection.NetworkError + >; } /** @@ -234,5 +272,10 @@ export namespace ServiceManager { * The default drive for the contents manager. */ readonly defaultDrive?: Contents.IDrive; + + /** + * When the manager stops polling the API. Defaults to `when-hidden`. + */ + standby?: Poll.Standby; } } diff --git a/packages/services/src/serverconnection.ts b/packages/services/src/serverconnection.ts index 52e646ec..89aeea09 100644 --- a/packages/services/src/serverconnection.ts +++ b/packages/services/src/serverconnection.ts @@ -245,22 +245,24 @@ namespace Private { // Use explicit cache buster when `no-store` is set since // not all browsers use it properly. - let cache = init.cache || settings.init.cache; + const cache = init.cache || settings.init.cache; if (cache === 'no-store') { // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache url += (/\?/.test(url) ? '&' : '?') + new Date().getTime(); } - let request = new settings.Request(url, { ...settings.init, ...init }); + const request = new settings.Request(url, { ...settings.init, ...init }); - // Handle authentication. + // Handle authentication. Authentication can be overdetermined by + // settings token and XSRF token. let authenticated = false; if (settings.token) { authenticated = true; request.headers.append('Authorization', `token ${settings.token}`); - } else if (typeof document !== 'undefined' && document.cookie) { - let xsrfToken = getCookie('_xsrf'); - if (xsrfToken !== void 0) { + } + if (typeof document !== 'undefined' && document && document.cookie) { + const xsrfToken = getCookie('_xsrf'); + if (xsrfToken !== undefined) { authenticated = true; request.headers.append('X-XSRFToken', xsrfToken); } @@ -282,9 +284,9 @@ namespace Private { /** * Get a cookie from the document. */ - function getCookie(name: string) { - // from tornado docs: http://www.tornadoweb.org/en/stable/guide/security.html - let r = document.cookie.match('\\b' + name + '=([^;]*)\\b'); - return r ? r[1] : void 0; + function getCookie(name: string): string | undefined { + // From http://www.tornadoweb.org/en/stable/guide/security.html + const matches = document.cookie.match('\\b' + name + '=([^;]*)\\b'); + return matches ? matches[1] : undefined; } } diff --git a/packages/services/src/session/default.ts b/packages/services/src/session/default.ts index 2b5283ce..a0c40bb9 100644 --- a/packages/services/src/session/default.ts +++ b/packages/services/src/session/default.ts @@ -312,22 +312,10 @@ export class DefaultSession implements Session.ISession { */ protected setupKernel(kernel: Kernel.IKernel): void { this._kernel = kernel; - kernel.statusChanged.connect( - this.onKernelStatus, - this - ); - kernel.unhandledMessage.connect( - this.onUnhandledMessage, - this - ); - kernel.iopubMessage.connect( - this.onIOPubMessage, - this - ); - kernel.anyMessage.connect( - this.onAnyMessage, - this - ); + kernel.statusChanged.connect(this.onKernelStatus, this); + kernel.unhandledMessage.connect(this.onUnhandledMessage, this); + kernel.iopubMessage.connect(this.onIOPubMessage, this); + kernel.anyMessage.connect(this.onAnyMessage, this); } /** @@ -693,7 +681,7 @@ namespace Private { let init = { method: 'DELETE' }; return ServerConnection.makeRequest(url, init, settings).then(response => { if (response.status === 404) { - response.json().then(data => { + return response.json().then(data => { let msg = data.message || `The session "${id}"" does not exist on the server`; console.warn(msg); @@ -713,15 +701,12 @@ namespace Private { /** * Shut down all sessions. */ - export function shutdownAll( + export async function shutdownAll( settings?: ServerConnection.ISettings ): Promise { settings = settings || ServerConnection.makeSettings(); - return listRunning(settings).then(running => { - each(running, s => { - shutdownSession(s.id, settings); - }); - }); + const running = await listRunning(settings); + await Promise.all(running.map(s => shutdownSession(s.id, settings))); } /** diff --git a/packages/services/src/session/manager.ts b/packages/services/src/session/manager.ts index df28a65d..450f9d1d 100644 --- a/packages/services/src/session/manager.ts +++ b/packages/services/src/session/manager.ts @@ -1,6 +1,8 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. +import { Poll } from '@jupyterlab/coreutils'; + import { ArrayExt, IIterator, iter } from '@phosphor/algorithm'; import { JSONExt } from '@phosphor/coreutils'; @@ -9,7 +11,7 @@ import { ISignal, Signal } from '@phosphor/signaling'; import { Kernel } from '../kernel'; -import { ServerConnection } from '..'; +import { ServerConnection } from '../serverconnection'; import { Session } from './session'; @@ -27,25 +29,43 @@ export class SessionManager implements Session.IManager { options.serverSettings || ServerConnection.makeSettings(); // Initialize internal data. - this._readyPromise = this._refreshSpecs().then(() => { - return this._refreshRunning(); - }); + this._ready = Promise.all([this.requestRunning(), this.requestSpecs()]) + .then(_ => undefined) + .catch(_ => undefined) + .then(() => { + if (this.isDisposed) { + return; + } + this._isReady = true; + }); - // Set up polling. - this._modelsTimer = (setInterval as any)(() => { - if (typeof document !== 'undefined' && document.hidden) { - // Don't poll when nobody's looking. - return; - } - this._refreshRunning(); - }, 10000); - this._specsTimer = (setInterval as any)(() => { - if (typeof document !== 'undefined' && document.hidden) { - // Don't poll when nobody's looking. - return; - } - this._refreshSpecs(); - }, 61000); + // Start model and specs polling with exponential backoff. + this._pollModels = new Poll({ + auto: false, + factory: () => this.requestRunning(), + frequency: { + interval: 10 * 1000, + backoff: true, + max: 300 * 1000 + }, + name: `@jupyterlab/services:SessionManager#models`, + standby: options.standby || 'when-hidden' + }); + this._pollSpecs = new Poll({ + auto: false, + factory: () => this.requestSpecs(), + frequency: { + interval: 61 * 1000, + backoff: true, + max: 300 * 1000 + }, + name: `@jupyterlab/services:SessionManager#specs`, + standby: options.standby || 'when-hidden' + }); + void this.ready.then(() => { + void this._pollModels.start(); + void this._pollSpecs.start(); + }); } /** @@ -62,6 +82,13 @@ export class SessionManager implements Session.IManager { return this._runningChanged; } + /** + * A signal emitted when there is a connection failure. + */ + get connectionFailure(): ISignal { + return this._connectionFailure; + } + /** * Test whether the manager is disposed. */ @@ -85,14 +112,14 @@ export class SessionManager implements Session.IManager { * Test whether the manager is ready. */ get isReady(): boolean { - return this._specs !== null; + return this._isReady; } /** * A promise that fulfills when the manager is ready. */ get ready(): Promise { - return this._readyPromise; + return this._ready; } /** @@ -103,10 +130,10 @@ export class SessionManager implements Session.IManager { return; } this._isDisposed = true; - clearInterval(this._modelsTimer); - clearInterval(this._specsTimer); - Signal.clearData(this); this._models.length = 0; + this._pollModels.dispose(); + this._pollSpecs.dispose(); + Signal.clearData(this); } /** @@ -127,8 +154,9 @@ export class SessionManager implements Session.IManager { * This is intended to be called only in response to a user action, * since the manager maintains its internal state. */ - refreshSpecs(): Promise { - return this._refreshSpecs(); + async refreshSpecs(): Promise { + await this._pollSpecs.refresh(); + await this._pollSpecs.tick; } /** @@ -140,22 +168,21 @@ export class SessionManager implements Session.IManager { * This is not typically meant to be called by the user, since the * manager maintains its own internal state. */ - refreshRunning(): Promise { - return this._refreshRunning(); + async refreshRunning(): Promise { + await this._pollModels.refresh(); + await this._pollModels.tick; } /** * Start a new session. See also [[startNewSession]]. * - * @param options - Overrides for the default options, must include a - * `'path'`. + * @param options - Overrides for the default options, must include a `path`. */ - startNew(options: Session.IOptions): Promise { - let serverSettings = this.serverSettings; - return Session.startNew({ ...options, serverSettings }).then(session => { - this._onStarted(session); - return session; - }); + async startNew(options: Session.IOptions): Promise { + const { serverSettings } = this; + const session = await Session.startNew({ ...options, serverSettings }); + this._onStarted(session); + return session; } /** @@ -166,18 +193,19 @@ export class SessionManager implements Session.IManager { * * @returns A promise that resolves when the relevant sessions are stopped. */ - stopIfNeeded(path: string): Promise { - return Session.listRunning(this.serverSettings) - .then(sessions => { - const matches = sessions.filter(value => value.path === path); - if (matches.length === 1) { - const id = matches[0].id; - return this.shutdown(id).catch(() => { - /* no-op */ - }); - } - }) - .catch(() => Promise.resolve(void 0)); // Always succeed. + async stopIfNeeded(path: string): Promise { + try { + const sessions = await Session.listRunning(this.serverSettings); + const matches = sessions.filter(value => value.path === path); + if (matches.length === 1) { + const id = matches[0].id; + return this.shutdown(id).catch(() => { + /* no-op */ + }); + } + } catch (error) { + /* Always succeed. */ + } } /** @@ -206,60 +234,96 @@ export class SessionManager implements Session.IManager { /** * Shut down a session by id. */ - shutdown(id: string): Promise { - let index = ArrayExt.findFirstIndex(this._models, value => value.id === id); + async shutdown(id: string): Promise { + const models = this._models; + const sessions = this._sessions; + const index = ArrayExt.findFirstIndex(models, model => model.id === id); + if (index === -1) { return; } + // Proactively remove the model. - this._models.splice(index, 1); - this._runningChanged.emit(this._models.slice()); - - return Session.shutdown(id, this.serverSettings).then(() => { - let toRemove: Session.ISession[] = []; - this._sessions.forEach(s => { - if (s.id === id) { - s.dispose(); - toRemove.push(s); - } - }); - toRemove.forEach(s => { - this._sessions.delete(s); - }); + models.splice(index, 1); + this._runningChanged.emit(models.slice()); + + sessions.forEach(session => { + if (session.id === id) { + sessions.delete(session); + session.dispose(); + } }); + + await Session.shutdown(id, this.serverSettings); } /** * Shut down all sessions. * - * @returns A promise that resolves when all of the sessions are shut down. + * @returns A promise that resolves when all of the kernels are shut down. */ - shutdownAll(): Promise { - // Proactively remove all models. - let models = this._models; - if (models.length > 0) { - this._models = []; - this._runningChanged.emit([]); + async shutdownAll(): Promise { + // Update the list of models then shut down every session. + try { + await this.requestRunning(); + await Promise.all( + this._models.map(({ id }) => Session.shutdown(id, this.serverSettings)) + ); + } finally { + // Dispose every session and clear the set. + this._sessions.forEach(kernel => { + kernel.dispose(); + }); + this._sessions.clear(); + + // Remove all models even if we had an error. + if (this._models.length) { + this._models.length = 0; + this._runningChanged.emit([]); + } } + } - return this._refreshRunning().then(() => { - return Promise.all( - models.map(model => { - return Session.shutdown(model.id, this.serverSettings).then(() => { - let toRemove: Session.ISession[] = []; - this._sessions.forEach(s => { - s.dispose(); - toRemove.push(s); - }); - toRemove.forEach(s => { - this._sessions.delete(s); - }); - }); - }) - ).then(() => { - return undefined; - }); + /** + * Execute a request to the server to poll running kernels and update state. + */ + protected async requestRunning(): Promise { + const models = await Session.listRunning(this.serverSettings).catch(err => { + if (err instanceof ServerConnection.NetworkError) { + this._connectionFailure.emit(err); + return [] as Session.IModel[]; + } + throw err; }); + if (this.isDisposed) { + return; + } + if (!JSONExt.deepEqual(models, this._models)) { + const ids = models.map(model => model.id); + const sessions = this._sessions; + sessions.forEach(session => { + if (ids.indexOf(session.id) === -1) { + session.dispose(); + sessions.delete(session); + } + }); + this._models = models.slice(); + this._runningChanged.emit(models); + } + } + + /** + * Execute a request to the server to poll specs and update state. + */ + protected async requestSpecs(): Promise { + const specs = await Kernel.getSpecs(this.serverSettings); + if (this.isDisposed) { + return; + } + if (!JSONExt.deepEqual(specs, this._specs)) { + this._specs = specs; + this._specsChanged.emit(specs); + } } /** @@ -309,50 +373,19 @@ export class SessionManager implements Session.IManager { } } - /** - * Refresh the specs. - */ - private _refreshSpecs(): Promise { - return Kernel.getSpecs(this.serverSettings).then(specs => { - if (!JSONExt.deepEqual(specs, this._specs)) { - this._specs = specs; - this._specsChanged.emit(specs); - } - }); - } - - /** - * Refresh the running sessions. - */ - private _refreshRunning(): Promise { - return Session.listRunning(this.serverSettings).then(models => { - if (!JSONExt.deepEqual(models, this._models)) { - let ids = models.map(r => r.id); - let toRemove: Session.ISession[] = []; - this._sessions.forEach(s => { - if (ids.indexOf(s.id) === -1) { - s.dispose(); - toRemove.push(s); - } - }); - toRemove.forEach(s => { - this._sessions.delete(s); - }); - this._models = models.slice(); - this._runningChanged.emit(models); - } - }); - } - private _isDisposed = false; + private _isReady = false; private _models: Session.IModel[] = []; + private _pollModels: Poll; + private _pollSpecs: Poll; + private _ready: Promise; + private _runningChanged = new Signal(this); + private _connectionFailure = new Signal( + this + ); private _sessions = new Set(); private _specs: Kernel.ISpecModels | null = null; - private _modelsTimer = -1; - private _specsTimer = -1; - private _readyPromise: Promise; private _specsChanged = new Signal(this); - private _runningChanged = new Signal(this); } /** @@ -367,5 +400,10 @@ export namespace SessionManager { * The server settings for the manager. */ serverSettings?: ServerConnection.ISettings; + + /** + * When the manager stops polling the API. Defaults to `when-hidden`. + */ + standby?: Poll.Standby; } } diff --git a/packages/services/src/session/session.ts b/packages/services/src/session/session.ts index 7b3eda27..029e6a6e 100644 --- a/packages/services/src/session/session.ts +++ b/packages/services/src/session/session.ts @@ -380,6 +380,11 @@ export namespace Session { */ runningChanged: ISignal; + /** + * A signal emitted when there is a connection failure. + */ + connectionFailure: ISignal; + /** * The server settings for the manager. */ diff --git a/packages/services/src/terminal/default.ts b/packages/services/src/terminal/default.ts index 4c5045b6..5b8afab7 100644 --- a/packages/services/src/terminal/default.ts +++ b/packages/services/src/terminal/default.ts @@ -121,7 +121,7 @@ export class DefaultTerminalSession implements TerminalSession.ISession { return; } - this.ready.then(() => { + void this.ready.then(() => { const socket = this._ws; if (socket) { @@ -197,6 +197,11 @@ export class DefaultTerminalSession implements TerminalSession.ISession { const data = JSON.parse(event.data) as JSONPrimitive[]; + // Handle a disconnect message. + if (data[0] === 'disconnect') { + this._disconnected = true; + } + if (this._reconnectAttempt > 0) { // After reconnection, ignore all messages until a 'setup' message. if (data[0] === 'setup') { @@ -214,6 +219,7 @@ export class DefaultTerminalSession implements TerminalSession.ISession { socket.onopen = (event: MessageEvent) => { if (!this._isDisposed) { this._isReady = true; + this._disconnected = false; resolve(undefined); } }; @@ -226,13 +232,16 @@ export class DefaultTerminalSession implements TerminalSession.ISession { socket.onclose = (event: CloseEvent) => { console.warn(`Terminal websocket closed: ${event.code}`); + if (this._disconnected) { + this.dispose(); + } this._reconnectSocket(); }; }); } private _reconnectSocket(): void { - if (this._isDisposed || !this._ws) { + if (this._isDisposed || !this._ws || this._disconnected) { return; } @@ -277,6 +286,7 @@ export class DefaultTerminalSession implements TerminalSession.ISession { }; private _reconnectLimit = 7; private _reconnectAttempt = 0; + private _disconnected = false; } /** @@ -433,13 +443,11 @@ export namespace DefaultTerminalSession { if (response.status === 404) { return response.json().then(data => { console.warn(data['message']); - Private.killTerminal(url); }); } if (response.status !== 204) { throw new ServerConnection.ResponseError(response); } - Private.killTerminal(url); }); } @@ -450,15 +458,12 @@ export namespace DefaultTerminalSession { * * @returns A promise that resolves when all the sessions are shut down. */ - export function shutdownAll( + export async function shutdownAll( settings?: ServerConnection.ISettings ): Promise { settings = settings || ServerConnection.makeSettings(); - return listRunning(settings).then(running => { - each(running, s => { - shutdown(s.name, settings); - }); - }); + const running = await listRunning(settings); + await Promise.all(running.map(s => shutdown(s.name, settings))); } } @@ -491,15 +496,4 @@ namespace Private { export function getServiceUrl(baseUrl: string): string { return URLExt.join(baseUrl, TERMINAL_SERVICE_URL); } - - /** - * Kill a terminal by url. - */ - export function killTerminal(url: string): void { - // Update the local data store. - if (Private.running[url]) { - let session = Private.running[url]; - session.dispose(); - } - } } diff --git a/packages/services/src/terminal/manager.ts b/packages/services/src/terminal/manager.ts index 0d5e974c..84b9df77 100644 --- a/packages/services/src/terminal/manager.ts +++ b/packages/services/src/terminal/manager.ts @@ -1,6 +1,8 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. +import { Poll } from '@jupyterlab/coreutils'; + import { ArrayExt, IIterator, iter } from '@phosphor/algorithm'; import { JSONExt } from '@phosphor/coreutils'; @@ -22,20 +24,39 @@ export class TerminalManager implements TerminalSession.IManager { this.serverSettings = options.serverSettings || ServerConnection.makeSettings(); - // Set up state handling if terminals are available. - if (TerminalSession.isAvailable()) { - // Initialize internal data. - this._readyPromise = this._refreshRunning(); + // Check if terminals are available + if (!TerminalSession.isAvailable()) { + this._ready = Promise.reject('Terminals unavailable'); + this._ready.catch(_ => undefined); + return; + } - // Set up polling. - this._refreshTimer = (setInterval as any)(() => { - if (typeof document !== 'undefined' && document.hidden) { - // Don't poll when nobody's looking. + // Initialize internal data then start polling. + this._ready = this.requestRunning() + .then(_ => undefined) + .catch(_ => undefined) + .then(() => { + if (this.isDisposed) { return; } - this._refreshRunning(); - }, 10000); - } + this._isReady = true; + }); + + // Start polling with exponential backoff. + this._pollModels = new Poll({ + auto: false, + factory: () => this.requestRunning(), + frequency: { + interval: 10 * 1000, + backoff: true, + max: 300 * 1000 + }, + name: `@jupyterlab/services:TerminalManager#models`, + standby: options.standby || 'when-hidden' + }); + void this.ready.then(() => { + void this._pollModels.start(); + }); } /** @@ -45,6 +66,13 @@ export class TerminalManager implements TerminalSession.IManager { return this._runningChanged; } + /** + * A signal emitted when there is a connection failure. + */ + get connectionFailure(): ISignal { + return this._connectionFailure; + } + /** * Test whether the terminal manager is disposed. */ @@ -72,16 +100,16 @@ export class TerminalManager implements TerminalSession.IManager { return; } this._isDisposed = true; - clearInterval(this._refreshTimer); + this._models.length = 0; + this._pollModels.dispose(); Signal.clearData(this); - this._models = []; } /** * A promise that fulfills when the manager is ready. */ get ready(): Promise { - return this._readyPromise || Promise.reject('Terminals unavailable'); + return this._ready; } /** @@ -111,13 +139,12 @@ export class TerminalManager implements TerminalSession.IManager { * The manager `serverSettings` will be used unless overridden in the * options. */ - startNew( + async startNew( options?: TerminalSession.IOptions ): Promise { - return TerminalSession.startNew(this._getOptions(options)).then(session => { - this._onStarted(session); - return session; - }); + const session = await TerminalSession.startNew(this._getOptions(options)); + this._onStarted(session); + return session; } /* @@ -133,46 +160,55 @@ export class TerminalManager implements TerminalSession.IManager { * The manager `serverSettings` will be used unless overridden in the * options. */ - connectTo( + async connectTo( name: string, options?: TerminalSession.IOptions ): Promise { - return TerminalSession.connectTo(name, this._getOptions(options)).then( - session => { - this._onStarted(session); - return session; - } + const session = await TerminalSession.connectTo( + name, + this._getOptions(options) ); + this._onStarted(session); + return session; + } + + /** + * Force a refresh of the running sessions. + * + * #### Notes + * This is intended to be called only in response to a user action, + * since the manager maintains its internal state. + */ + async refreshRunning(): Promise { + await this._pollModels.refresh(); + await this._pollModels.tick; } /** * Shut down a terminal session by name. */ - shutdown(name: string): Promise { - let index = ArrayExt.findFirstIndex( - this._models, - value => value.name === name - ); + async shutdown(name: string): Promise { + const models = this._models; + const sessions = this._sessions; + const index = ArrayExt.findFirstIndex(models, model => model.name === name); if (index === -1) { return; } // Proactively remove the model. - this._models.splice(index, 1); - this._runningChanged.emit(this._models.slice()); - - return TerminalSession.shutdown(name, this.serverSettings).then(() => { - let toRemove: TerminalSession.ISession[] = []; - this._sessions.forEach(s => { - if (s.name === name) { - s.dispose(); - toRemove.push(s); - } - }); - toRemove.forEach(s => { - this._sessions.delete(s); - }); + models.splice(index, 1); + this._runningChanged.emit(models.slice()); + + // Delete and dispose the session locally. + sessions.forEach(session => { + if (session.name === name) { + sessions.delete(session); + session.dispose(); + } }); + + // Shut down the remote session. + await TerminalSession.shutdown(name, this.serverSettings); } /** @@ -180,61 +216,67 @@ export class TerminalManager implements TerminalSession.IManager { * * @returns A promise that resolves when all of the sessions are shut down. */ - shutdownAll(): Promise { - // Proactively remove all models. - let models = this._models; - if (models.length > 0) { - this._models = []; - this._runningChanged.emit([]); - } - - return this._refreshRunning().then(() => { - return Promise.all( - models.map(model => { - return TerminalSession.shutdown(model.name, this.serverSettings).then( - () => { - let toRemove: TerminalSession.ISession[] = []; - this._sessions.forEach(s => { - s.dispose(); - toRemove.push(s); - }); - toRemove.forEach(s => { - this._sessions.delete(s); - }); - } - ); - }) - ).then(() => { - return undefined; + async shutdownAll(): Promise { + // Update the list of models then shut down every session. + try { + await this.requestRunning(); + await Promise.all( + this._models.map(({ name }) => + TerminalSession.shutdown(name, this.serverSettings) + ) + ); + } finally { + // Dispose every kernel and clear the set. + this._sessions.forEach(session => { + session.dispose(); }); - }); + this._sessions.clear(); + + // Remove all models even if we had an error. + if (this._models.length) { + this._models.length = 0; + this._runningChanged.emit([]); + } + } } /** - * Force a refresh of the running sessions. - * - * @returns A promise that with the list of running sessions. - * - * #### Notes - * This is not typically meant to be called by the user, since the - * manager maintains its own internal state. + * Execute a request to the server to poll running terminals and update state. */ - refreshRunning(): Promise { - return this._refreshRunning(); + protected async requestRunning(): Promise { + const models = await TerminalSession.listRunning(this.serverSettings).catch( + err => { + if (err instanceof ServerConnection.NetworkError) { + this._connectionFailure.emit(err); + return [] as TerminalSession.IModel[]; + } + throw err; + } + ); + if (this.isDisposed) { + return; + } + if (!JSONExt.deepEqual(models, this._models)) { + const names = models.map(({ name }) => name); + const sessions = this._sessions; + sessions.forEach(session => { + if (names.indexOf(session.name) === -1) { + session.dispose(); + sessions.delete(session); + } + }); + this._models = models.slice(); + this._runningChanged.emit(models); + } } /** - * Handle a session terminating. + * Get a set of options to pass. */ - private _onTerminated(name: string): void { - let index = ArrayExt.findFirstIndex( - this._models, - value => value.name === name - ); - if (index !== -1) { - this._models.splice(index, 1); - this._runningChanged.emit(this._models.slice()); - } + private _getOptions( + options: TerminalSession.IOptions = {} + ): TerminalSession.IOptions { + return { ...options, serverSettings: this.serverSettings }; } /** @@ -257,45 +299,35 @@ export class TerminalManager implements TerminalSession.IManager { } /** - * Refresh the running sessions. + * Handle a session terminating. */ - private _refreshRunning(): Promise { - return TerminalSession.listRunning(this.serverSettings).then(models => { - this._isReady = true; - if (!JSONExt.deepEqual(models, this._models)) { - let names = models.map(r => r.name); - let toRemove: TerminalSession.ISession[] = []; - this._sessions.forEach(s => { - if (names.indexOf(s.name) === -1) { - s.dispose(); - toRemove.push(s); - } - }); - toRemove.forEach(s => { - this._sessions.delete(s); - }); - this._models = models.slice(); - this._runningChanged.emit(models); + private _onTerminated(name: string): void { + let index = ArrayExt.findFirstIndex( + this._models, + value => value.name === name + ); + if (index !== -1) { + this._models.splice(index, 1); + this._runningChanged.emit(this._models.slice()); + } + const sessions = this._sessions; + sessions.forEach(session => { + if (session.name === name) { + sessions.delete(session); } }); } - /** - * Get a set of options to pass. - */ - private _getOptions( - options: TerminalSession.IOptions = {} - ): TerminalSession.IOptions { - return { ...options, serverSettings: this.serverSettings }; - } - - private _models: TerminalSession.IModel[] = []; - private _sessions = new Set(); private _isDisposed = false; private _isReady = false; - private _refreshTimer = -1; - private _readyPromise: Promise; + private _models: TerminalSession.IModel[] = []; + private _pollModels: Poll; + private _sessions = new Set(); + private _ready: Promise; private _runningChanged = new Signal(this); + private _connectionFailure = new Signal( + this + ); } /** @@ -310,5 +342,10 @@ export namespace TerminalManager { * The server settings used by the manager. */ serverSettings?: ServerConnection.ISettings; + + /** + * When the manager stops polling the API. Defaults to `when-hidden`. + */ + standby?: Poll.Standby; } } diff --git a/packages/services/src/terminal/terminal.ts b/packages/services/src/terminal/terminal.ts index e17a77d9..bd1acf7a 100644 --- a/packages/services/src/terminal/terminal.ts +++ b/packages/services/src/terminal/terminal.ts @@ -210,6 +210,11 @@ export namespace TerminalSession { */ runningChanged: ISignal; + /** + * A signal emitted when there is a connection failure. + */ + connectionFailure: ISignal; + /** * The server settings for the manager. */ diff --git a/packages/services/tsconfig.json b/packages/services/tsconfig.json index 604b4706..1c324ae7 100644 --- a/packages/services/tsconfig.json +++ b/packages/services/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "lib", "rootDir": "src", + "module": "commonjs", "types": ["node"] }, "include": ["src/**/*"], diff --git a/packages/settingeditor-extension/package.json b/packages/settingeditor-extension/package.json index 7b913fa8..b9f2bfe4 100644 --- a/packages/settingeditor-extension/package.json +++ b/packages/settingeditor-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/settingeditor-extension", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Setting Editor Extension", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -20,10 +24,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -32,22 +32,21 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/settingeditor": "^1.0.0-alpha.3" + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/settingeditor": "^1.0.0-alpha.9" }, "devDependencies": { "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "extension": true, "schemaDir": "schema" diff --git a/packages/settingeditor-extension/src/index.ts b/packages/settingeditor-extension/src/index.ts index eb26222e..d3477e58 100644 --- a/packages/settingeditor-extension/src/index.ts +++ b/packages/settingeditor-extension/src/index.ts @@ -133,7 +133,7 @@ function activate( editor.title.iconClass = 'jp-SettingsIcon'; let main = new MainAreaWidget({ content: editor }); - tracker.add(main); + void tracker.add(main); shell.add(main); }, label: 'Advanced Settings Editor' diff --git a/packages/settingeditor/package.json b/packages/settingeditor/package.json index 680e7dac..1d028f03 100644 --- a/packages/settingeditor/package.json +++ b/packages/settingeditor/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/settingeditor", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "The JupyterLab default setting editor interface", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,39 +23,35 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", "docs": "typedoc --options tdoptions.json --theme ../../typedoc-theme src", + "prepublishOnly": "npm run build", "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/inspector": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/inspector": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", "@phosphor/commands": "^1.6.1", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", "@phosphor/signaling": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "react": "~16.4.2", - "react-dom": "~16.4.2" + "@phosphor/widgets": "^1.7.0", + "react": "~16.8.4", + "react-dom": "~16.8.4" }, "devDependencies": { - "@types/react": "~16.4.13", - "@types/react-dom": "~16.0.7", + "@types/react": "~16.8.18", + "@types/react-dom": "^16.8.4", "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + } } diff --git a/packages/settingeditor/src/index.ts b/packages/settingeditor/src/index.ts index be32230d..2acac92d 100644 --- a/packages/settingeditor/src/index.ts +++ b/packages/settingeditor/src/index.ts @@ -1,27 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { IInstanceTracker, MainAreaWidget } from '@jupyterlab/apputils'; - -import { Token } from '@phosphor/coreutils'; - -import { SettingEditor } from './settingeditor'; - import '../style/settingeditor.css'; export * from './settingeditor'; - -/* tslint:disable */ -/** - * The setting editor tracker token. - */ -export const ISettingEditorTracker = new Token( - '@jupyterlab/settingeditor:ISettingEditorTracker' -); -/* tslint:enable */ - -/** - * A class that tracks the setting editor. - */ -export interface ISettingEditorTracker - extends IInstanceTracker> {} +export * from './tokens'; diff --git a/packages/settingeditor/src/inspector.ts b/packages/settingeditor/src/inspector.ts index 1fc05dd6..fea298d0 100644 --- a/packages/settingeditor/src/inspector.ts +++ b/packages/settingeditor/src/inspector.ts @@ -8,6 +8,7 @@ import { DataConnector, ISchemaValidator } from '@jupyterlab/coreutils'; import { InspectionHandler, InspectorPanel } from '@jupyterlab/inspector'; import { + IRenderMimeRegistry, RenderMimeRegistry, standardRendererFactories } from '@jupyterlab/rendermime'; @@ -21,7 +22,7 @@ import { RawEditor } from './raweditor'; */ export function createInspector( editor: RawEditor, - rendermime?: RenderMimeRegistry + rendermime?: IRenderMimeRegistry ): InspectorPanel { const connector = new InspectorConnector(editor); const inspector = new InspectorPanel(); diff --git a/packages/settingeditor/src/plugineditor.ts b/packages/settingeditor/src/plugineditor.ts index 68d51093..4943f32d 100644 --- a/packages/settingeditor/src/plugineditor.ts +++ b/packages/settingeditor/src/plugineditor.ts @@ -9,7 +9,7 @@ import { CodeEditor } from '@jupyterlab/codeeditor'; import { ISettingRegistry } from '@jupyterlab/coreutils'; -import { RenderMimeRegistry } from '@jupyterlab/rendermime'; +import { IRenderMimeRegistry } from '@jupyterlab/rendermime'; import { CommandRegistry } from '@phosphor/commands'; @@ -57,10 +57,7 @@ export class PluginEditor extends Widget { rendermime }); this.table = this._tableEditor = new TableEditor({ onSaveError }); - this._rawEditor.handleMoved.connect( - this._onStateChanged, - this - ); + this._rawEditor.handleMoved.connect(this._onStateChanged, this); layout.addWidget(this._rawEditor); layout.addWidget(this._tableEditor); @@ -246,7 +243,7 @@ export namespace PluginEditor { /** * The optional MIME renderer to use for rendering debug messages. */ - rendermime?: RenderMimeRegistry; + rendermime?: IRenderMimeRegistry; } } @@ -260,7 +257,7 @@ namespace Private { export function onSaveError(reason: any): void { console.error(`Saving setting editor value failed: ${reason.message}`); - showDialog({ + void showDialog({ title: 'Your changes were not saved.', body: reason.message, buttons: [Dialog.okButton()] diff --git a/packages/settingeditor/src/pluginlist.tsx b/packages/settingeditor/src/pluginlist.tsx index 7af09c62..3f84693b 100644 --- a/packages/settingeditor/src/pluginlist.tsx +++ b/packages/settingeditor/src/pluginlist.tsx @@ -27,12 +27,9 @@ export class PluginList extends Widget { this.registry = options.registry; this.addClass('jp-PluginList'); this._confirm = options.confirm; - this.registry.pluginChanged.connect( - () => { - this.update(); - }, - this - ); + this.registry.pluginChanged.connect(() => { + this.update(); + }, this); } /** diff --git a/packages/settingeditor/src/raweditor.ts b/packages/settingeditor/src/raweditor.ts index 8f38ee3a..006938ae 100644 --- a/packages/settingeditor/src/raweditor.ts +++ b/packages/settingeditor/src/raweditor.ts @@ -7,7 +7,7 @@ import { CodeEditor, CodeEditorWrapper } from '@jupyterlab/codeeditor'; import { ISettingRegistry } from '@jupyterlab/coreutils'; -import { RenderMimeRegistry } from '@jupyterlab/rendermime'; +import { IRenderMimeRegistry } from '@jupyterlab/rendermime'; import { CommandRegistry } from '@phosphor/commands'; @@ -84,10 +84,7 @@ export class RawEditor extends SplitPanel { user.addClass(USER_CLASS); user.editor.model.mimeType = 'text/javascript'; - user.editor.model.value.changed.connect( - this._onTextChanged, - this - ); + user.editor.model.value.changed.connect(this._onTextChanged, this); // Create and set up an inspector. this._inspector = createInspector(this, options.rendermime); @@ -166,10 +163,7 @@ export class RawEditor extends SplitPanel { if (settings) { this._settings = settings; - this._settings.changed.connect( - this._onSettingsChanged, - this - ); + this._settings.changed.connect(this._onSettingsChanged, this); this._onSettingsChanged(); } else { this._settings = null; @@ -394,7 +388,7 @@ export namespace RawEditor { /** * The optional MIME renderer to use for rendering debug messages. */ - rendermime?: RenderMimeRegistry; + rendermime?: IRenderMimeRegistry; } } diff --git a/packages/settingeditor/src/settingeditor.tsx b/packages/settingeditor/src/settingeditor.tsx index 1fdcf136..03f5e2e4 100644 --- a/packages/settingeditor/src/settingeditor.tsx +++ b/packages/settingeditor/src/settingeditor.tsx @@ -7,7 +7,7 @@ import { CodeEditor } from '@jupyterlab/codeeditor'; import { ISettingRegistry, IStateDB } from '@jupyterlab/coreutils'; -import { RenderMimeRegistry } from '@jupyterlab/rendermime'; +import { IRenderMimeRegistry } from '@jupyterlab/rendermime'; import { CommandRegistry } from '@phosphor/commands'; @@ -89,18 +89,9 @@ export class SettingEditor extends Widget { SplitPanel.setStretch(instructions, 1); SplitPanel.setStretch(editor, 1); - editor.stateChanged.connect( - this._onStateChanged, - this - ); - list.changed.connect( - this._onStateChanged, - this - ); - panel.handleMoved.connect( - this._onStateChanged, - this - ); + editor.stateChanged.connect(this._onStateChanged, this); + list.changed.connect(this._onStateChanged, this); + panel.handleMoved.connect(this._onStateChanged, this); } /** @@ -411,7 +402,7 @@ export namespace SettingEditor { /** * The optional MIME renderer to use for rendering debug messages. */ - rendermime?: RenderMimeRegistry; + rendermime?: IRenderMimeRegistry; /** * The state database used to store layout. diff --git a/packages/settingeditor/src/tableeditor.tsx b/packages/settingeditor/src/tableeditor.tsx index e3d01878..7f21a6a9 100644 --- a/packages/settingeditor/src/tableeditor.tsx +++ b/packages/settingeditor/src/tableeditor.tsx @@ -44,10 +44,7 @@ export class TableEditor extends Widget { } this._settings = settings; if (this._settings) { - this._settings.changed.connect( - this._onSettingsChanged, - this - ); + this._settings.changed.connect(this._onSettingsChanged, this); } this.update(); } diff --git a/packages/settingeditor/src/tokens.ts b/packages/settingeditor/src/tokens.ts new file mode 100644 index 00000000..524fa862 --- /dev/null +++ b/packages/settingeditor/src/tokens.ts @@ -0,0 +1,23 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import { IInstanceTracker, MainAreaWidget } from '@jupyterlab/apputils'; + +import { Token } from '@phosphor/coreutils'; + +import { SettingEditor } from './settingeditor'; + +/* tslint:disable */ +/** + * The setting editor tracker token. + */ +export const ISettingEditorTracker = new Token( + '@jupyterlab/settingeditor:ISettingEditorTracker' +); +/* tslint:enable */ + +/** + * A class that tracks the setting editor. + */ +export interface ISettingEditorTracker + extends IInstanceTracker> {} diff --git a/packages/settingeditor/style/settingeditor.css b/packages/settingeditor/style/settingeditor.css index 60f508d6..8a5e6142 100644 --- a/packages/settingeditor/style/settingeditor.css +++ b/packages/settingeditor/style/settingeditor.css @@ -72,6 +72,7 @@ top: 1px; left: 0; right: 0; + display: flex; } #setting-editor .jp-PluginList-switcher button { @@ -82,7 +83,7 @@ margin: 0; padding: 0; height: var(--jp-private-settingeditor-switcher-height); - width: 50%; + flex: 1; } #setting-editor .jp-PluginList-switcher button:first-child { diff --git a/packages/shortcuts-extension/package.json b/packages/shortcuts-extension/package.json index cf4c6046..8a2a8aa9 100644 --- a/packages/shortcuts-extension/package.json +++ b/packages/shortcuts-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/shortcuts-extension", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Shortcuts Extension", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -31,8 +31,8 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", "@phosphor/commands": "^1.6.1", "@phosphor/coreutils": "^1.3.0", "@phosphor/disposable": "^1.1.2" @@ -40,12 +40,11 @@ "devDependencies": { "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "extension": true, "schemaDir": "schema" diff --git a/packages/shortcuts-extension/src/index.ts b/packages/shortcuts-extension/src/index.ts index b931d54c..a44ccb95 100644 --- a/packages/shortcuts-extension/src/index.ts +++ b/packages/shortcuts-extension/src/index.ts @@ -80,7 +80,7 @@ const plugin: JupyterFrontEndPlugin = { }); // Save the reconciled list. - settings.set('shortcuts', shortcuts); + void settings.set('shortcuts', shortcuts); }; if (!keys.length) { @@ -101,7 +101,7 @@ const plugin: JupyterFrontEndPlugin = { port(deprecated); // Remove all old shortcuts; - old.save('{}'); + void old.save('{}'); } catch (error) { console.error(`Loading ${plugin.id} failed.`, error); } diff --git a/packages/statusbar-extension/package.json b/packages/statusbar-extension/package.json index 696270b5..daf5638b 100644 --- a/packages/statusbar-extension/package.json +++ b/packages/statusbar-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/statusbar-extension", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Statusbar Extension", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter, Richa Gadgil, Takahiro Shimokobe, Declan Kelly", "files": [ @@ -20,10 +24,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -32,29 +32,28 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/console": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu": "^1.0.0-alpha.3", - "@jupyterlab/notebook": "^1.0.0-alpha.4", - "@jupyterlab/statusbar": "^1.0.0-alpha.3", - "@phosphor/widgets": "^1.6.0" + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/cells": "^1.0.0-alpha.10", + "@jupyterlab/console": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor": "^1.0.0-alpha.9", + "@jupyterlab/mainmenu": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/statusbar": "^1.0.0-alpha.9", + "@phosphor/widgets": "^1.7.0" }, "devDependencies": { - "@types/react": "~16.4.13", - "@types/react-dom": "~16.0.7", + "@types/react": "~16.8.18", + "@types/react-dom": "^16.8.4", "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "extension": true, "schemaDir": "schema" diff --git a/packages/statusbar-extension/src/index.ts b/packages/statusbar-extension/src/index.ts index 6abb4911..229fbaf3 100644 --- a/packages/statusbar-extension/src/index.ts +++ b/packages/statusbar-extension/src/index.ts @@ -79,7 +79,7 @@ const statusBar: JupyterFrontEndPlugin = { execute: (args: any) => { statusBar.setHidden(statusBar.isVisible); if (settingRegistry) { - settingRegistry.set( + void settingRegistry.set( STATUSBAR_PLUGIN_ID, 'visible', statusBar.isVisible @@ -136,11 +136,11 @@ export const kernelStatus: JupyterFrontEndPlugin = { // When the status item is clicked, launch the kernel // selection dialog for the current session. let currentSession: IClientSession | null = null; - const changeKernel = () => { + const changeKernel = async () => { if (!currentSession) { return; } - currentSession.selectKernel(); + await currentSession.selectKernel(); }; // Create the status item. diff --git a/packages/statusbar/package.json b/packages/statusbar/package.json index 589c338c..ea29dd0a 100644 --- a/packages/statusbar/package.json +++ b/packages/statusbar/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/statusbar", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab statusbar package.", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -17,10 +21,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -29,25 +29,24 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", "@phosphor/disposable": "^1.1.2", "@phosphor/messaging": "^1.2.2", "@phosphor/signaling": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "react": "~16.4.2", + "@phosphor/widgets": "^1.7.0", + "react": "~16.8.4", "typestyle": "^2.0.1" }, "devDependencies": { "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + } } diff --git a/packages/statusbar/src/components/hover.tsx b/packages/statusbar/src/components/hover.tsx index 9649160e..1495250d 100644 --- a/packages/statusbar/src/components/hover.tsx +++ b/packages/statusbar/src/components/hover.tsx @@ -72,7 +72,7 @@ export class Popup extends Widget { */ protected onAfterAttach(msg: Message): void { document.addEventListener('click', this, false); - this.node.addEventListener('keypress', this, false); + this.node.addEventListener('keydown', this, false); window.addEventListener('resize', this, false); } @@ -81,7 +81,7 @@ export class Popup extends Widget { */ protected onAfterDetach(msg: Message): void { document.removeEventListener('click', this, false); - this.node.removeEventListener('keypress', this, false); + this.node.removeEventListener('keydown', this, false); window.removeEventListener('resize', this, false); } diff --git a/packages/statusbar/src/defaults/memoryUsage.tsx b/packages/statusbar/src/defaults/memoryUsage.tsx index f47af63f..03a7106d 100644 --- a/packages/statusbar/src/defaults/memoryUsage.tsx +++ b/packages/statusbar/src/defaults/memoryUsage.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { VDomModel, VDomRenderer } from '@jupyterlab/apputils'; -import { URLExt } from '@jupyterlab/coreutils'; +import { URLExt, Poll } from '@jupyterlab/coreutils'; import { TextItem } from '..'; @@ -20,9 +20,7 @@ export class MemoryUsage extends VDomRenderer { */ constructor() { super(); - this.model = new MemoryUsage.Model({ - refreshRate: 5000 - }); + this.model = new MemoryUsage.Model({ refreshRate: 5000 }); } /** @@ -63,13 +61,33 @@ export namespace MemoryUsage { */ constructor(options: Model.IOptions) { super(); + this._poll = new Poll({ + factory: () => Private.factory(), + frequency: { + interval: options.refreshRate, + backoff: true + }, + name: '@jupyterlab/statusbar:MemoryUsage#metrics' + }); + this._poll.ticked.connect(poll => { + const { payload, phase } = poll.state; + if (phase === 'resolved') { + this._updateMetricsValues(payload); + return; + } + if (phase === 'rejected') { + const oldMetricsAvailable = this._metricsAvailable; + this._metricsAvailable = false; + this._currentMemory = 0; + this._memoryLimit = null; + this._units = 'B'; - this._refreshRate = options.refreshRate; - - this._intervalId = setInterval( - () => this._makeMetricRequest(), - this._refreshRate - ); + if (oldMetricsAvailable) { + this.stateChanged.emit(); + } + return; + } + }); } /** @@ -105,43 +123,11 @@ export namespace MemoryUsage { */ dispose(): void { super.dispose(); - clearInterval(this._intervalId); + this._poll.dispose(); } /** - * Make a request to the metrics backend and update the model. - */ - private _makeMetricRequest(): Promise { - return Private.makeMetricsRequest() - .then(response => { - if (response.ok) { - try { - return response.json(); - } catch (err) { - return null; - } - } else { - return null; - } - }) - .then(data => this._updateMetricsValues(data)) - .catch(err => { - const oldMetricsAvailable = this._metricsAvailable; - this._metricsAvailable = false; - this._currentMemory = 0; - this._memoryLimit = null; - this._units = 'B'; - clearInterval(this._intervalId); - - if (oldMetricsAvailable) { - this.stateChanged.emit(void 0); - } - }); - } - - /** - * Given the results of the metrics request, update - * model values. + * Given the results of the metrics request, update model values. */ private _updateMetricsValues( value: Private.IMetricRequestResult | null @@ -156,8 +142,6 @@ export namespace MemoryUsage { this._currentMemory = 0; this._memoryLimit = null; this._units = 'B'; - - clearInterval(this._intervalId); } else { const numBytes = value.rss; const memoryLimit = value.limits.memory @@ -171,13 +155,6 @@ export namespace MemoryUsage { this._memoryLimit = memoryLimit ? memoryLimit / Private.MEMORY_UNIT_LIMITS[units] : null; - - if (!oldMetricsAvailable) { - this._intervalId = setInterval( - () => this._makeMetricRequest(), - this._refreshRate - ); - } } if ( @@ -190,12 +167,11 @@ export namespace MemoryUsage { } } - private _metricsAvailable: boolean = false; private _currentMemory: number = 0; private _memoryLimit: number | null = null; + private _metricsAvailable: boolean = false; + private _poll: Poll; private _units: MemoryUnit = 'B'; - private _intervalId: any; - private _refreshRate: number; } /** @@ -302,13 +278,22 @@ namespace Private { /** * Make a request to the backend. */ - export function makeMetricsRequest(): Promise { + export async function factory(): Promise { const request = ServerConnection.makeRequest( METRIC_URL, {}, SERVER_CONNECTION_SETTINGS ); + const response = await request; + + if (response.ok) { + try { + return await response.json(); + } catch (error) { + throw error; + } + } - return request; + return null; } } diff --git a/packages/statusbar/src/index.ts b/packages/statusbar/src/index.ts index ac477a9a..4455c9b2 100644 --- a/packages/statusbar/src/index.ts +++ b/packages/statusbar/src/index.ts @@ -7,3 +7,4 @@ export * from './statusbar'; export * from './style/statusbar'; export * from './components'; export * from './defaults'; +export * from './tokens'; diff --git a/packages/statusbar/src/statusbar.ts b/packages/statusbar/src/statusbar.ts index cc860aed..89585eba 100644 --- a/packages/statusbar/src/statusbar.ts +++ b/packages/statusbar/src/statusbar.ts @@ -3,10 +3,6 @@ import { ArrayExt } from '@phosphor/algorithm'; -import { ISignal } from '@phosphor/signaling'; - -import { Token } from '@phosphor/coreutils'; - import { DisposableDelegate, DisposableSet, @@ -25,65 +21,7 @@ import { rightSide as rightSideStyle } from './style/statusbar'; -// tslint:disable-next-line:variable-name -export const IStatusBar = new Token( - '@jupyterlab/statusbar:IStatusBar' -); - -/** - * Main status bar object which contains all widgets. - */ -export interface IStatusBar { - /** - * Register a new status item. - * - * @param id - a unique id for the status item. - * - * @param options - The options for how to add the status item. - * - * @returns an `IDisposable` that can be disposed to remove the item. - */ - registerStatusItem(id: string, statusItem: IStatusBar.IItem): IDisposable; -} - -/** - * A namespace for status bar statics. - */ -export namespace IStatusBar { - export type Alignment = 'right' | 'left' | 'middle'; - - /** - * Options for status bar items. - */ - export interface IItem { - /** - * The item to add to the status bar. - */ - item: Widget; - - /** - * Which side to place item. - * Permanent items are intended for the right and left side, - * with more transient items in the middle. - */ - align?: Alignment; - - /** - * Ordering of Items -- higher rank items are closer to the middle. - */ - rank?: number; - - /** - * Whether the item is shown or hidden. - */ - isActive?: () => boolean; - - /** - * A signal that is fired when the item active state changes. - */ - activeStateChanged?: ISignal; - } -} +import { IStatusBar } from './tokens'; /** * Main status bar object which contains all items. diff --git a/packages/statusbar/src/tokens.ts b/packages/statusbar/src/tokens.ts new file mode 100644 index 00000000..896b1b97 --- /dev/null +++ b/packages/statusbar/src/tokens.ts @@ -0,0 +1,70 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import { ISignal } from '@phosphor/signaling'; + +import { Token } from '@phosphor/coreutils'; + +import { IDisposable } from '@phosphor/disposable'; + +import { Widget } from '@phosphor/widgets'; + +// tslint:disable-next-line:variable-name +export const IStatusBar = new Token( + '@jupyterlab/statusbar:IStatusBar' +); + +/** + * Main status bar object which contains all widgets. + */ +export interface IStatusBar { + /** + * Register a new status item. + * + * @param id - a unique id for the status item. + * + * @param options - The options for how to add the status item. + * + * @returns an `IDisposable` that can be disposed to remove the item. + */ + registerStatusItem(id: string, statusItem: IStatusBar.IItem): IDisposable; +} + +/** + * A namespace for status bar statics. + */ +export namespace IStatusBar { + export type Alignment = 'right' | 'left' | 'middle'; + + /** + * Options for status bar items. + */ + export interface IItem { + /** + * The item to add to the status bar. + */ + item: Widget; + + /** + * Which side to place item. + * Permanent items are intended for the right and left side, + * with more transient items in the middle. + */ + align?: Alignment; + + /** + * Ordering of Items -- higher rank items are closer to the middle. + */ + rank?: number; + + /** + * Whether the item is shown or hidden. + */ + isActive?: () => boolean; + + /** + * A signal that is fired when the item active state changes. + */ + activeStateChanged?: ISignal; + } +} diff --git a/packages/tabmanager-extension/package.json b/packages/tabmanager-extension/package.json index 76a07039..4f9a6eed 100644 --- a/packages/tabmanager-extension/package.json +++ b/packages/tabmanager-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/tabmanager-extension", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Tab Manager Extension", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -31,19 +31,18 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", + "@jupyterlab/application": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", - "@phosphor/widgets": "^1.6.0" + "@phosphor/widgets": "^1.7.0" }, "devDependencies": { "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "extension": true } diff --git a/packages/tabmanager-extension/src/index.ts b/packages/tabmanager-extension/src/index.ts index 81d6b672..2bd2b2fc 100644 --- a/packages/tabmanager-extension/src/index.ts +++ b/packages/tabmanager-extension/src/index.ts @@ -39,7 +39,7 @@ const plugin: JupyterFrontEndPlugin = { tabs.node.insertBefore(header, tabs.contentNode); shell.add(tabs, 'left', { rank: 600 }); - app.restored.then(() => { + void app.restored.then(() => { const populate = () => { tabs.clearTabs(); each(shell.widgets('main'), widget => { diff --git a/packages/terminal-extension/package.json b/packages/terminal-extension/package.json index b3769f11..58b859cb 100644 --- a/packages/terminal-extension/package.json +++ b/packages/terminal-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/terminal-extension", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Terminal Emulator Extension", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -31,22 +31,23 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/launcher": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu": "^1.0.0-alpha.3", - "@jupyterlab/terminal": "^1.0.0-alpha.3" + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/launcher": "^1.0.0-alpha.9", + "@jupyterlab/mainmenu": "^1.0.0-alpha.9", + "@jupyterlab/terminal": "^1.0.0-alpha.9", + "@phosphor/widgets": "^1.7.0" }, "devDependencies": { + "@types/webpack-env": "^1.13.9", "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "extension": true, "schemaDir": "schema" diff --git a/packages/terminal-extension/schema/plugin.json b/packages/terminal-extension/schema/plugin.json index f440d014..bac2ba28 100644 --- a/packages/terminal-extension/schema/plugin.json +++ b/packages/terminal-extension/schema/plugin.json @@ -17,10 +17,13 @@ "minimum": 1.0 }, "theme": { - "enum": ["dark", "light"] + "enum": ["dark", "light", "inherit"] }, "scrollback": { "type": "number" + }, + "pasteWithCtrlV": { + "type": "boolean" } }, "properties": { @@ -46,13 +49,25 @@ "title": "Theme", "description": "The theme for the terminal.", "$ref": "#/definitions/theme", - "default": "dark" + "default": "inherit" }, "scrollback": { "title": "Scrollback Buffer", "description": "The amount of scrollback beyond initial viewport", "$ref": "#/definitions/lineHeight", "default": 1000 + }, + "shutdownOnClose": { + "title": "Shut down on close", + "description": "Whether to shut down or not the session when closing the terminal.", + "type": "boolean", + "default": false + }, + "pasteWithCtrlV": { + "title": "Paste with Ctrl+V", + "description": "Whether to enable pasting with Ctrl+V. This can be disabled to use Ctrl+V in the vi editor, for instance. This setting has no effect on macOS, where Cmd+V is available", + "type": "boolean", + "default": true } }, "additionalProperties": false, diff --git a/packages/terminal-extension/src/index.ts b/packages/terminal-extension/src/index.ts index 1bd78671..b4e8bbb6 100644 --- a/packages/terminal-extension/src/index.ts +++ b/packages/terminal-extension/src/index.ts @@ -1,6 +1,8 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. +import { ISettingRegistry } from '@jupyterlab/coreutils'; + import { ILayoutRestorer, JupyterFrontEnd, @@ -10,16 +12,20 @@ import { import { ICommandPalette, InstanceTracker, + IThemeManager, MainAreaWidget } from '@jupyterlab/apputils'; import { ILauncher } from '@jupyterlab/launcher'; -import { IMainMenu } from '@jupyterlab/mainmenu'; +import { IFileMenu, IMainMenu } from '@jupyterlab/mainmenu'; -import { ITerminalTracker, Terminal } from '@jupyterlab/terminal'; +import { ITerminalTracker, ITerminal } from '@jupyterlab/terminal'; -import { ISettingRegistry } from '@jupyterlab/coreutils'; +// Name-only import so as to not trigger inclusion in main bundle +import * as WidgetModuleType from '@jupyterlab/terminal/lib/widget'; + +import { Menu } from '@phosphor/widgets'; /** * The command IDs used by the terminal plugin. @@ -35,7 +41,7 @@ namespace CommandIDs { export const decreaseFont = 'terminal:decrease-font'; - export const toggleTheme = 'terminal:toggle-theme'; + export const setTheme = 'terminal:set-theme'; } /** @@ -51,7 +57,13 @@ const plugin: JupyterFrontEndPlugin = { id: '@jupyterlab/terminal-extension:plugin', provides: ITerminalTracker, requires: [ISettingRegistry], - optional: [ICommandPalette, ILauncher, ILayoutRestorer, IMainMenu], + optional: [ + ICommandPalette, + ILauncher, + ILayoutRestorer, + IMainMenu, + IThemeManager + ], autoStart: true }; @@ -69,12 +81,15 @@ function activate( palette: ICommandPalette | null, launcher: ILauncher | null, restorer: ILayoutRestorer | null, - mainMenu: IMainMenu | null + mainMenu: IMainMenu | null, + themeManager: IThemeManager ): ITerminalTracker { - const { serviceManager } = app; + const { serviceManager, commands } = app; const category = 'Terminal'; const namespace = 'terminal'; - const tracker = new InstanceTracker>({ namespace }); + const tracker = new InstanceTracker>({ + namespace + }); // Bail if there are no terminals available. if (!serviceManager.terminals.isAvailable()) { @@ -89,32 +104,29 @@ function activate( restorer.restore(tracker, { command: CommandIDs.createNew, args: widget => ({ name: widget.content.session.name }), - name: widget => widget.content.session && widget.content.session.name + name: widget => widget.content.session.name }); } - // The terminal options from the setting editor. - let options: Partial; + // The cached terminal options from the setting editor. + let options: Partial; /** - * Update the option values. + * Update the cached option values. */ function updateOptions(settings: ISettingRegistry.ISettings): void { - options = settings.composite as Partial; - Object.keys(options).forEach((key: keyof Terminal.IOptions) => { - Terminal.defaultOptions[key] = options[key]; - }); + options = settings.composite; } /** * Update terminal */ - function updateTerminal(widget: MainAreaWidget): void { + function updateTerminal(widget: MainAreaWidget): void { const terminal = widget.content; if (!terminal) { return; } - Object.keys(options).forEach((key: keyof Terminal.IOptions) => { + Object.keys(options).forEach((key: keyof ITerminal.IOptions) => { terminal.setOption(key, options[key]); }); } @@ -137,25 +149,60 @@ function activate( updateTracker(); }); }) - .catch((reason: Error) => { - console.error(reason.message); + .catch(Private.showErrorMessage); + + // Subscribe to changes in theme. + themeManager.themeChanged.connect((sender, args) => { + tracker.forEach(widget => { + const terminal = widget.content; + if (terminal.getOption('theme') === 'inherit') { + terminal.setOption('theme', 'inherit'); + } }); + }); - addCommands(app, tracker, settingRegistry); + addCommands(app, tracker, settingRegistry, options); if (mainMenu) { - // Add some commands to the application view menu. - const viewGroup = [ - CommandIDs.increaseFont, - CommandIDs.decreaseFont, - CommandIDs.toggleTheme - ].map(command => { - return { command }; + // Add "Terminal Theme" menu below "JupyterLab Themes" menu. + const themeMenu = new Menu({ commands }); + themeMenu.title.label = 'Terminal Theme'; + themeMenu.addItem({ + command: CommandIDs.setTheme, + args: { theme: 'inherit', isPalette: false } + }); + themeMenu.addItem({ + command: CommandIDs.setTheme, + args: { theme: 'light', isPalette: false } }); - mainMenu.settingsMenu.addGroup(viewGroup, 40); + themeMenu.addItem({ + command: CommandIDs.setTheme, + args: { theme: 'dark', isPalette: false } + }); + + // Add some commands to the "View" menu. + mainMenu.settingsMenu.addGroup( + [ + { command: CommandIDs.increaseFont }, + { command: CommandIDs.decreaseFont }, + { type: 'submenu', submenu: themeMenu } + ], + 40 + ); // Add terminal creation to the file menu. mainMenu.fileMenu.newMenu.addGroup([{ command: CommandIDs.createNew }], 20); + + // Add terminal close-and-shutdown to the file menu. + mainMenu.fileMenu.closeAndCleaners.add({ + tracker, + action: 'Shutdown', + name: 'Terminal', + closeAndCleanup: (current: MainAreaWidget) => { + // The widget is automatically disposed upon session shutdown. + return current.content.session.shutdown(); + } + } as IFileMenu.ICloseAndCleaner>); } if (palette) { @@ -164,11 +211,25 @@ function activate( CommandIDs.createNew, CommandIDs.refresh, CommandIDs.increaseFont, - CommandIDs.decreaseFont, - CommandIDs.toggleTheme + CommandIDs.decreaseFont ].forEach(command => { palette.addItem({ command, category, args: { isPalette: true } }); }); + palette.addItem({ + command: CommandIDs.setTheme, + category, + args: { theme: 'inherit', isPalette: true } + }); + palette.addItem({ + command: CommandIDs.setTheme, + category, + args: { theme: 'light', isPalette: true } + }); + palette.addItem({ + command: CommandIDs.setTheme, + category, + args: { theme: 'dark', isPalette: true } + }); } // Add a launcher item if the launcher is available. @@ -194,8 +255,9 @@ function activate( */ export function addCommands( app: JupyterFrontEnd, - tracker: InstanceTracker>, - settingRegistry: ISettingRegistry + tracker: InstanceTracker>, + settingRegistry: ISettingRegistry, + options: Partial ) { const { commands, serviceManager } = app; @@ -204,31 +266,33 @@ export function addCommands( label: args => (args['isPalette'] ? 'New Terminal' : 'Terminal'), caption: 'Start a new terminal session', iconClass: args => (args['isPalette'] ? '' : TERMINAL_ICON_CLASS), - execute: args => { + execute: async args => { + // wait for the widget to lazy load + let Terminal: typeof WidgetModuleType.Terminal; + try { + Terminal = (await Private.ensureWidget()).Terminal; + } catch (err) { + Private.showErrorMessage(err); + } + const name = args['name'] as string; - const term = new Terminal(); - const promise = name + + const session = await (name ? serviceManager.terminals .connectTo(name) .catch(() => serviceManager.terminals.startNew()) - : serviceManager.terminals.startNew(); + : serviceManager.terminals.startNew()); + + const term = new Terminal(session, options); term.title.icon = TERMINAL_ICON_CLASS; term.title.label = '...'; + let main = new MainAreaWidget({ content: term }); app.shell.add(main); - - return promise - .then(session => { - term.session = session; - tracker.add(main); - app.shell.activateById(main.id); - - return main; - }) - .catch(() => { - term.dispose(); - }); + void tracker.add(main); + app.shell.activateById(main.id); + return main; } }); @@ -238,7 +302,7 @@ export function addCommands( // Check for a running terminal with the given name. const widget = tracker.find(value => { let content = value.content; - return (content.session && content.session.name === name) || false; + return content.session.name === name || false; }); if (widget) { app.shell.activateById(widget.id); @@ -252,61 +316,100 @@ export function addCommands( commands.addCommand(CommandIDs.refresh, { label: 'Refresh Terminal', caption: 'Refresh the current terminal session', - execute: () => { + execute: async () => { let current = tracker.currentWidget; if (!current) { return; } app.shell.activateById(current.id); - - return current.content.refresh().then(() => { + try { + await current.content.refresh(); if (current) { current.content.activate(); } - }); + } catch (err) { + Private.showErrorMessage(err); + } }, isEnabled: () => tracker.currentWidget !== null }); - function showErrorMessage(error: Error): void { - console.error(`Failed to set ${plugin.id}: ${error.message}`); - } - commands.addCommand(CommandIDs.increaseFont, { label: 'Increase Terminal Font Size', - execute: () => { - let { fontSize } = Terminal.defaultOptions; + execute: async () => { + let { fontSize } = ITerminal.defaultOptions; if (fontSize < 72) { - return settingRegistry - .set(plugin.id, 'fontSize', fontSize + 1) - .catch(showErrorMessage); + try { + await settingRegistry.set(plugin.id, 'fontSize', fontSize + 1); + } catch (err) { + Private.showErrorMessage(err); + } } } }); commands.addCommand(CommandIDs.decreaseFont, { label: 'Decrease Terminal Font Size', - execute: () => { - let { fontSize } = Terminal.defaultOptions; + execute: async () => { + let { fontSize } = ITerminal.defaultOptions; if (fontSize > 9) { - return settingRegistry - .set(plugin.id, 'fontSize', fontSize - 1) - .catch(showErrorMessage); + try { + await settingRegistry.set(plugin.id, 'fontSize', fontSize - 1); + } catch (err) { + Private.showErrorMessage(err); + } } } }); - commands.addCommand(CommandIDs.toggleTheme, { - label: 'Use Dark Terminal Theme', - caption: 'Whether to use the dark terminal theme', - isToggled: () => Terminal.defaultOptions.theme === 'dark', - execute: () => { - let { theme } = Terminal.defaultOptions; - theme = theme === 'dark' ? 'light' : 'dark'; - return settingRegistry - .set(plugin.id, 'theme', theme) - .then(() => commands.notifyCommandChanged(CommandIDs.toggleTheme)) - .catch(showErrorMessage); + commands.addCommand(CommandIDs.setTheme, { + label: args => { + const theme = args['theme'] as string; + const displayName = theme[0].toUpperCase() + theme.substring(1); + return args['isPalette'] + ? `Use ${displayName} Terminal Theme` + : displayName; + }, + caption: 'Set the terminal theme', + isToggled: args => args['theme'] === ITerminal.defaultOptions.theme, + execute: async args => { + const theme = args['theme'] as ITerminal.Theme; + try { + await settingRegistry.set(plugin.id, 'theme', theme); + commands.notifyCommandChanged(CommandIDs.setTheme); + } catch (err) { + Private.showErrorMessage(err); + } } }); } + +/** + * A namespace for private data. + */ +namespace Private { + /** + * A Promise for the initial load of the terminal widget. + */ + export let widgetReady: Promise; + + /** + * Lazy-load the widget (and xterm library and addons) + */ + export function ensureWidget(): Promise { + if (widgetReady) { + return widgetReady; + } + + widgetReady = import('@jupyterlab/terminal/lib/widget'); + + return widgetReady; + } + + /** + * Utility function for consistent error reporting + */ + export function showErrorMessage(error: Error): void { + console.error(`Failed to configure ${plugin.id}: ${error.message}`); + } +} diff --git a/packages/terminal-extension/tsconfig.json b/packages/terminal-extension/tsconfig.json index 6d8f1c50..827e4678 100644 --- a/packages/terminal-extension/tsconfig.json +++ b/packages/terminal-extension/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfigbase", "compilerOptions": { "outDir": "lib", - "rootDir": "src" + "rootDir": "src", + "types": ["webpack-env"] }, "include": ["src/*"], "references": [ diff --git a/packages/terminal/package.json b/packages/terminal/package.json index 6dacc444..2b675779 100644 --- a/packages/terminal/package.json +++ b/packages/terminal/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/terminal", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Terminal Emulator Widget", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -31,20 +31,20 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", + "@phosphor/domutils": "^1.1.2", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "xterm": "~3.10.1" + "@phosphor/widgets": "^1.7.0", + "xterm": "~3.13.2" }, "devDependencies": { "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + } } diff --git a/packages/terminal/src/index.ts b/packages/terminal/src/index.ts index 4fb60c86..dfc065d7 100644 --- a/packages/terminal/src/index.ts +++ b/packages/terminal/src/index.ts @@ -1,27 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { IInstanceTracker, MainAreaWidget } from '@jupyterlab/apputils'; - -import { Token } from '@phosphor/coreutils'; - -import { Terminal } from './widget'; - import '../style/index.css'; +export * from './tokens'; export * from './widget'; - -/** - * A class that tracks editor widgets. - */ -export interface ITerminalTracker - extends IInstanceTracker> {} - -/* tslint:disable */ -/** - * The editor tracker token. - */ -export const ITerminalTracker = new Token( - '@jupyterlab/terminal:ITerminalTracker' -); -/* tslint:enable */ diff --git a/packages/terminal/src/tokens.ts b/packages/terminal/src/tokens.ts new file mode 100644 index 00000000..2349d344 --- /dev/null +++ b/packages/terminal/src/tokens.ts @@ -0,0 +1,144 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import { Widget } from '@phosphor/widgets'; + +import { Token } from '@phosphor/coreutils'; + +import { IInstanceTracker, MainAreaWidget } from '@jupyterlab/apputils'; + +import { TerminalSession } from '@jupyterlab/services'; + +/** + * A class that tracks editor widgets. + */ +export interface ITerminalTracker + extends IInstanceTracker> {} + +/* tslint:disable */ +/** + * The editor tracker token. + */ +export const ITerminalTracker = new Token( + '@jupyterlab/terminal:ITerminalTracker' +); +/* tslint:enable */ + +/** + * The namespace for terminals. Separated from the widget so it can be lazy + * loaded. + */ +export namespace ITerminal { + export interface ITerminal extends Widget { + /** + * The terminal session associated with the widget. + */ + session: TerminalSession.ISession; + + /** + * Get a config option for the terminal. + */ + getOption(option: K): IOptions[K]; + + /** + * Set a config option for the terminal. + */ + setOption(option: K, value: IOptions[K]): void; + + /** + * Refresh the terminal session. + */ + refresh(): Promise; + } + /** + * Options for the terminal widget. + */ + export interface IOptions { + /** + * The font family used to render text. + */ + fontFamily: string | null; + + /** + * The font size of the terminal in pixels. + */ + fontSize: number; + + /** + * The line height used to render text. + */ + lineHeight: number | null; + + /** + * The theme of the terminal. + */ + theme: Theme; + + /** + * The amount of buffer scrollback to be used + * with the terminal + */ + scrollback: number | null; + + /** + * Whether to shut down the session when closing a terminal or not. + */ + shutdownOnClose: boolean; + + /** + * Whether to blink the cursor. Can only be set at startup. + */ + cursorBlink: boolean; + + /** + * An optional command to run when the session starts. + */ + initialCommand: string; + + /** + * Whether to enable screen reader support. + * + * Set to false if you run into performance problems from DOM overhead + */ + screenReaderMode: boolean; + + /** + * Whether to enable using Ctrl+V to paste. + * + * This setting has no effect on macOS, where Cmd+V is available. + */ + pasteWithCtrlV: boolean; + } + + /** + * The default options used for creating terminals. + */ + export const defaultOptions: IOptions = { + theme: 'inherit', + fontFamily: 'Menlo, Consolas, "DejaVu Sans Mono", monospace', + fontSize: 13, + lineHeight: 1.0, + scrollback: 1000, + shutdownOnClose: false, + cursorBlink: true, + initialCommand: '', + screenReaderMode: true, + pasteWithCtrlV: true + }; + + /** + * A type for the terminal theme. + */ + export type Theme = 'light' | 'dark' | 'inherit'; + + /** + * A type for the terminal theme. + */ + export interface IThemeObject { + foreground: string; + background: string; + cursor: string; + cursorAccent: string; + selection: string; + } +} diff --git a/packages/terminal/src/widget.ts b/packages/terminal/src/widget.ts index 1b981f80..f6a89738 100644 --- a/packages/terminal/src/widget.ts +++ b/packages/terminal/src/widget.ts @@ -3,6 +3,8 @@ import { TerminalSession } from '@jupyterlab/services'; +import { Platform } from '@phosphor/domutils'; + import { Message, MessageLoop } from '@phosphor/messaging'; import { Widget } from '@phosphor/widgets'; @@ -11,6 +13,8 @@ import { Terminal as Xterm } from 'xterm'; import { fit } from 'xterm/lib/addons/fit/fit'; +import { ITerminal } from '.'; + /** * The class name added to a terminal widget. */ @@ -24,27 +28,32 @@ const TERMINAL_BODY_CLASS = 'jp-Terminal-body'; /** * A widget which manages a terminal session. */ -export class Terminal extends Widget { +export class Terminal extends Widget implements ITerminal.ITerminal { /** * Construct a new terminal widget. * + * @param session - The terminal session object. + * * @param options - The terminal configuration options. */ - constructor(options: Partial = {}) { + constructor( + session: TerminalSession.ISession, + options: Partial = {} + ) { super(); + this.session = session; + // Initialize settings. - this._options = { ...Terminal.defaultOptions, ...options }; + this._options = { ...ITerminal.defaultOptions, ...options }; const { initialCommand, theme, ...other } = this._options; - const { lightTheme, darkTheme } = Private; - const xtermTheme = theme === 'light' ? lightTheme : darkTheme; - const xtermOptions = { theme: xtermTheme, ...other }; + const xtermOptions = { + theme: Private.getXTermTheme(theme), + ...other + }; this.addClass(TERMINAL_CLASS); - if (theme === 'light') { - this.addClass('jp-mod-light'); - } // Create the xterm. this._term = new Xterm(xtermOptions); @@ -52,34 +61,19 @@ export class Terminal extends Widget { this.id = `jp-Terminal-${Private.id++}`; this.title.label = 'Terminal'; - } - /** - * The terminal session associated with the widget. - */ - get session(): TerminalSession.ISession | null { - return this._session; - } - set session(value: TerminalSession.ISession | null) { - if (this._session && !this._session.isDisposed) { - this._session.messageReceived.disconnect(this._onMessage, this); - } - this._session = value || null; - if (!value) { - return; - } - value.ready.then(() => { - if (this.isDisposed || value !== this._session) { + session.messageReceived.connect(this._onMessage, this); + session.terminated.connect(this.dispose, this); + + void session.ready.then(() => { + if (this.isDisposed) { return; } - value.messageReceived.connect( - this._onMessage, - this - ); - this.title.label = `Terminal ${value.name}`; + + this.title.label = `Terminal ${session.name}`; this._setSessionSize(); if (this._options.initialCommand) { - this._session.send({ + this.session.send({ type: 'stdin', content: [this._options.initialCommand + '\r'] }); @@ -88,44 +82,50 @@ export class Terminal extends Widget { } /** - * Set a config option for the terminal. + * The terminal session associated with the widget. */ - getOption( + readonly session: TerminalSession.ISession; + + /** + * Get a config option for the terminal. + */ + getOption( option: K - ): Terminal.IOptions[K] { + ): ITerminal.IOptions[K] { return this._options[option]; } /** * Set a config option for the terminal. */ - setOption( + setOption( option: K, - value: Terminal.IOptions[K] + value: ITerminal.IOptions[K] ): void { - if (this._options[option] === value) { + if ( + option !== 'theme' && + (this._options[option] === value || option === 'initialCommand') + ) { return; } this._options[option] = value; - if (option === 'initialCommand') { - return; - } - - if (option === 'theme') { - if (value === 'light') { - this.addClass('jp-mod-light'); - this._term.setOption('theme', Private.lightTheme); - } else { - this.removeClass('jp-mod-light'); - this._term.setOption('theme', Private.darkTheme); - } - } else { - this._term.setOption(option, value); - this._needsResize = true; + switch (option) { + case 'shutdownOnClose': // Do not transmit to XTerm + break; + case 'theme': + this._term.setOption( + 'theme', + Private.getXTermTheme(value as ITerminal.Theme) + ); + break; + default: + this._term.setOption(option, value); + break; } + this._needsResize = true; this.update(); } @@ -133,21 +133,28 @@ export class Terminal extends Widget { * Dispose of the resources held by the terminal widget. */ dispose(): void { - this._session = null; + if (!this.session.isDisposed) { + if (this.getOption('shutdownOnClose')) { + this.session.shutdown().catch(reason => { + console.error(`Terminal not shut down: ${reason}`); + }); + } + } this._term.dispose(); super.dispose(); } /** * Refresh the terminal session. + * + * #### Notes + * Failure to reconnect to the session should be caught appropriately */ - refresh(): Promise { - if (!this._session) { - return Promise.reject(void 0); - } - return this._session.reconnect().then(() => { + async refresh(): Promise { + if (!this.isDisposed) { + await this.session.reconnect(); this._term.clear(); - }); + } } /** @@ -232,18 +239,41 @@ export class Terminal extends Widget { * Initialize the terminal object. */ private _initializeTerm(): void { - this._term.on('data', (data: string) => { - if (this._session) { - this._session.send({ - type: 'stdin', - content: [data] - }); + const term = this._term; + term.on('data', (data: string) => { + if (this.isDisposed) { + return; } + this.session.send({ + type: 'stdin', + content: [data] + }); }); - this._term.on('title', (title: string) => { + term.on('title', (title: string) => { this.title.label = title; }); + + // Do not add any Ctrl+C/Ctrl+V handling on macOS, + // where Cmd+C/Cmd+V works as intended. + if (Platform.IS_MAC) { + return; + } + + term.attachCustomKeyEventHandler(event => { + if (event.ctrlKey && event.key === 'c' && term.hasSelection()) { + // Return so that the usual OS copy happens + // instead of interrupt signal. + return false; + } + + if (event.ctrlKey && event.key === 'v' && this._options.pasteWithCtrlV) { + // Return so that the usual paste happens. + return false; + } + + return true; + }); } /** @@ -292,82 +322,17 @@ export class Terminal extends Widget { this._offsetHeight, this._offsetWidth ]; - if (this._session) { - this._session.send({ type: 'set_size', content }); + if (!this.isDisposed) { + this.session.send({ type: 'set_size', content }); } } - private _term: Xterm; + private readonly _term: Xterm; private _needsResize = true; - private _session: TerminalSession.ISession | null = null; private _termOpened = false; private _offsetWidth = -1; private _offsetHeight = -1; - private _options: Terminal.IOptions; -} - -/** - * The namespace for `Terminal` class statics. - */ -export namespace Terminal { - /** - * Options for the terminal widget. - */ - export interface IOptions { - /** - * The font family used to render text. - */ - fontFamily: string | null; - - /** - * The font size of the terminal in pixels. - */ - fontSize: number; - - /** - * The line height used to render text. - */ - lineHeight: number | null; - - /** - * The theme of the terminal. - */ - theme: Theme; - - /** - * The amount of buffer scrollback to be used - * with the terminal - */ - scrollback: number | null; - - /** - * Whether to blink the cursor. Can only be set at startup. - */ - cursorBlink: boolean; - - /** - * An optional command to run when the session starts. - */ - initialCommand: string; - } - - /** - * The default options used for creating terminals. - */ - export const defaultOptions: IOptions = { - theme: 'dark', - fontFamily: 'courier-new, courier, monospace', - fontSize: 13, - lineHeight: 1.0, - scrollback: 1000, - cursorBlink: true, - initialCommand: '' - }; - - /** - * A type for the terminal theme. - */ - export type Theme = 'light' | 'dark'; + private _options: ITerminal.IOptions; } /** @@ -382,7 +347,7 @@ namespace Private { /** * The light terminal theme. */ - export const lightTheme = { + export const lightTheme: ITerminal.IThemeObject = { foreground: '#000', background: '#fff', cursor: '#616161', // md-grey-700 @@ -393,11 +358,46 @@ namespace Private { /** * The dark terminal theme. */ - export const darkTheme = { + export const darkTheme: ITerminal.IThemeObject = { foreground: '#fff', background: '#000', cursor: '#fff', cursorAccent: '#000', selection: 'rgba(255, 255, 255, 0.3)' }; + + /** + * The current theme. + */ + export const inheritTheme = (): ITerminal.IThemeObject => ({ + foreground: getComputedStyle(document.body).getPropertyValue( + '--jp-ui-font-color0' + ), + background: getComputedStyle(document.body).getPropertyValue( + '--jp-layout-color0' + ), + cursor: getComputedStyle(document.body).getPropertyValue( + '--jp-ui-font-color1' + ), + cursorAccent: getComputedStyle(document.body).getPropertyValue( + '--jp-ui-inverse-font-color0' + ), + selection: getComputedStyle(document.body).getPropertyValue( + '--jp-ui-font-color3' + ) + }); + + export function getXTermTheme( + theme: ITerminal.Theme + ): ITerminal.IThemeObject { + switch (theme) { + case 'light': + return lightTheme; + case 'dark': + return darkTheme; + case 'inherit': + default: + return inheritTheme(); + } + } } diff --git a/packages/terminal/style/index.css b/packages/terminal/style/index.css index 52755033..a725aafd 100644 --- a/packages/terminal/style/index.css +++ b/packages/terminal/style/index.css @@ -8,11 +8,6 @@ .jp-Terminal { min-width: 240px; min-height: 120px; - background: black; -} - -.jp-Terminal.jp-mod-light { - background: white; } .jp-Terminal-body { diff --git a/packages/theme-dark-extension/package.json b/packages/theme-dark-extension/package.json index cb91511d..4a16ce66 100644 --- a/packages/theme-dark-extension/package.json +++ b/packages/theme-dark-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/theme-dark-extension", - "version": "1.0.0-alpha.4", + "version": "1.0.0-alpha.10", "description": "JupyterLab - Default Dark Theme", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -30,18 +30,17 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/apputils": "^1.0.0-alpha.3" + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9" }, "devDependencies": { "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "extension": true, "themePath": "style/index.css" diff --git a/packages/theme-dark-extension/src/index.ts b/packages/theme-dark-extension/src/index.ts index ca901f1b..1c760b59 100644 --- a/packages/theme-dark-extension/src/index.ts +++ b/packages/theme-dark-extension/src/index.ts @@ -20,6 +20,7 @@ const plugin: JupyterFrontEndPlugin = { manager.register({ name: 'JupyterLab Dark', isLight: false, + themeScrollbars: true, load: () => manager.loadCSS(style), unload: () => Promise.resolve(undefined) }); diff --git a/packages/theme-dark-extension/style/icons/jupyter/search_arrow_down.svg b/packages/theme-dark-extension/style/icons/jupyter/search_arrow_down.svg old mode 100755 new mode 100644 index c170d160..d6553fb2 --- a/packages/theme-dark-extension/style/icons/jupyter/search_arrow_down.svg +++ b/packages/theme-dark-extension/style/icons/jupyter/search_arrow_down.svg @@ -1,11 +1,11 @@ + viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"> - - + + diff --git a/packages/theme-dark-extension/style/icons/jupyter/search_arrow_up.svg b/packages/theme-dark-extension/style/icons/jupyter/search_arrow_up.svg old mode 100755 new mode 100644 index 6e37e815..25d8a178 --- a/packages/theme-dark-extension/style/icons/jupyter/search_arrow_up.svg +++ b/packages/theme-dark-extension/style/icons/jupyter/search_arrow_up.svg @@ -1,11 +1,11 @@ + viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"> - - + + diff --git a/packages/theme-dark-extension/style/icons/jupyter/search_case_sensitive.svg b/packages/theme-dark-extension/style/icons/jupyter/search_case_sensitive.svg old mode 100755 new mode 100644 index 4d90a697..f3375e6a --- a/packages/theme-dark-extension/style/icons/jupyter/search_case_sensitive.svg +++ b/packages/theme-dark-extension/style/icons/jupyter/search_case_sensitive.svg @@ -4,16 +4,16 @@ viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"> + c0-0.3,0.1-0.6,0.2-0.8c0.1-0.2,0.3-0.4,0.4-0.5C12,7,12.2,6.9,12.5,6.8s0.5-0.1,0.7-0.2c0.3-0.1,0.5-0.1,0.7-0.1 + c0.2,0,0.4-0.1,0.6-0.1c0.2,0,0.3-0.1,0.4-0.2c0.1-0.1,0.2-0.2,0.2-0.4c0-1-1.1-1-1.3-1c-0.4,0-1.4,0-1.4,1.2h-0.9 + c0-0.4,0.1-0.7,0.2-1c0.1-0.2,0.3-0.4,0.5-0.6c0.2-0.2,0.5-0.3,0.8-0.3C13.3,4,13.6,4,13.9,4c0.3,0,0.5,0,0.8,0.1 + c0.3,0,0.5,0.1,0.7,0.2c0.2,0.1,0.4,0.3,0.5,0.5C16,5,16,5.2,16,5.6v2.9c0,0.2,0,0.4,0,0.5c0,0.1,0.1,0.2,0.3,0.2c0.1,0,0.2,0,0.3,0 + V9.8z M15.2,6.9C13.9,7.5,12,7.1,12,8.3c0,1.4,3.1,1,3.1-0.5V6.9z"/> diff --git a/packages/theme-dark-extension/style/icons/jupyter/search_regex.svg b/packages/theme-dark-extension/style/icons/jupyter/search_regex.svg old mode 100755 new mode 100644 index 24cf5a0d..1c948c79 --- a/packages/theme-dark-extension/style/icons/jupyter/search_regex.svg +++ b/packages/theme-dark-extension/style/icons/jupyter/search_regex.svg @@ -4,7 +4,7 @@ viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"> @@ -12,8 +12,8 @@ - - + + diff --git a/packages/theme-dark-extension/style/icons/md/ic_directions_run_24px.svg b/packages/theme-dark-extension/style/icons/md/ic_directions_run_24px.svg deleted file mode 100755 index a854cee6..00000000 --- a/packages/theme-dark-extension/style/icons/md/ic_directions_run_24px.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/theme-dark-extension/style/icons/md/stop-circle.svg b/packages/theme-dark-extension/style/icons/md/stop-circle.svg new file mode 100644 index 00000000..547bad62 --- /dev/null +++ b/packages/theme-dark-extension/style/icons/md/stop-circle.svg @@ -0,0 +1,15 @@ + diff --git a/packages/theme-dark-extension/style/urls.css b/packages/theme-dark-extension/style/urls.css index 6adbc0a0..0c555d39 100644 --- a/packages/theme-dark-extension/style/urls.css +++ b/packages/theme-dark-extension/style/urls.css @@ -49,7 +49,6 @@ --jp-icon-console: url('icons/jupyter/console.svg'); --jp-icon-copy: url('icons/md/copy.svg'); --jp-icon-cut: url('icons/md/cut.svg'); - --jp-icon-directions-run: url('icons/md/ic_directions_run_24px.svg'); --jp-icon-directory-selected: url('icons/jupyter/directory_selected.svg'); --jp-icon-directory: url('icons/jupyter/directory.svg'); --jp-icon-download: url('icons/md/download.svg'); @@ -99,6 +98,7 @@ --jp-icon-spreadsheet-selected: url('icons/jupyter/csv_selected.svg'); --jp-icon-spreadsheet: url('icons/jupyter/csv.svg'); --jp-icon-stop: url('icons/md/stop.svg'); + --jp-icon-stop-circle: url('icons/md/stop-circle.svg'); --jp-icon-terminal: url('icons/jupyter/terminal.svg'); --jp-icon-tab: url('icons/md/ic_tab_24px.svg'); --jp-icon-text-editor: url('icons/jupyter/texteditor.svg'); diff --git a/packages/theme-dark-extension/style/variables.css b/packages/theme-dark-extension/style/variables.css index c5493b1e..4ba8867b 100644 --- a/packages/theme-dark-extension/style/variables.css +++ b/packages/theme-dark-extension/style/variables.css @@ -120,10 +120,10 @@ all of MD as it is not optimized for dense, information rich UIs. */ /* Defaults use Material Design specification */ - --jp-ui-font-color0: white; - --jp-ui-font-color1: var(--md-grey-300); - --jp-ui-font-color2: var(--md-grey-500); - --jp-ui-font-color3: var(--md-grey-700); + --jp-ui-font-color0: rgba(255, 255, 255, 1); + --jp-ui-font-color1: rgba(255, 255, 255, 0.87); + --jp-ui-font-color2: rgba(255, 255, 255, 0.54); + --jp-ui-font-color3: rgba(255, 255, 255, 0.38); /* * Use these against the brand/accent/warn/error colors. @@ -327,6 +327,7 @@ all of MD as it is not optimized for dense, information rich UIs. --jp-input-background: var(--md-grey-800); --jp-input-border-color: var(--jp-border-color1); --jp-input-active-border-color: var(--jp-brand-color1); + --jp-input-active-box-shadow-color: rgba(19, 124, 189, 0.3); /* General editor styles */ @@ -371,7 +372,27 @@ all of MD as it is not optimized for dense, information rich UIs. /* Search-related styles */ - --jp-search-toggle-off-opacity: 0.5; - --jp-search-toggle-hover-opacity: 0.75; + --jp-search-toggle-off-opacity: 0.6; + --jp-search-toggle-hover-opacity: 0.8; --jp-search-toggle-on-opacity: 1; + --jp-search-selected-match-background-color: rgb(255, 225, 0); + --jp-search-selected-match-color: black; + --jp-search-unselected-match-background-color: var( + --jp-inverse-layout-color0 + ); + --jp-search-unselected-match-color: var(--jp-ui-inverse-font-color0); + + /* scrollbar related styles. Supports every browser except Edge. */ + + /* colors based on JetBrain's Darcula theme */ + + --jp-scrollbar-background-color: #3f4244; + --jp-scrollbar-thumb-color: 88, 96, 97; /* need to specify thumb color as an RGB triplet */ + + --jp-scrollbar-endpad: 3px; /* the minimum gap between the thumb and the ends of a scrollbar */ + + /* hacks for setting the thumb shape. These do nothing in Firefox */ + + --jp-scrollbar-thumb-margin: 3.5px; /* the space in between the sides of the thumb and the track */ + --jp-scrollbar-thumb-radius: 9px; /* set to a large-ish value for rounded endcaps on the thumb */ } diff --git a/packages/theme-light-extension/package.json b/packages/theme-light-extension/package.json index 8094a629..53060935 100644 --- a/packages/theme-light-extension/package.json +++ b/packages/theme-light-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/theme-light-extension", - "version": "1.0.0-alpha.4", + "version": "1.0.0-alpha.10", "description": "JupyterLab - Default Light Theme", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -30,18 +30,17 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/apputils": "^1.0.0-alpha.3" + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9" }, "devDependencies": { "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "extension": true, "themePath": "style/index.css" diff --git a/packages/theme-light-extension/src/index.ts b/packages/theme-light-extension/src/index.ts index e864f65f..6bc0df7f 100644 --- a/packages/theme-light-extension/src/index.ts +++ b/packages/theme-light-extension/src/index.ts @@ -20,6 +20,7 @@ const plugin: JupyterFrontEndPlugin = { manager.register({ name: 'JupyterLab Light', isLight: true, + themeScrollbars: false, load: () => manager.loadCSS(style), unload: () => Promise.resolve(undefined) }); diff --git a/packages/theme-light-extension/style/icons/jupyter/search_arrow_down.svg b/packages/theme-light-extension/style/icons/jupyter/search_arrow_down.svg old mode 100755 new mode 100644 index c170d160..ada7f71e --- a/packages/theme-light-extension/style/icons/jupyter/search_arrow_down.svg +++ b/packages/theme-light-extension/style/icons/jupyter/search_arrow_down.svg @@ -1,11 +1,11 @@ + viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"> - - + + diff --git a/packages/theme-light-extension/style/icons/jupyter/search_arrow_up.svg b/packages/theme-light-extension/style/icons/jupyter/search_arrow_up.svg old mode 100755 new mode 100644 index 6e37e815..308856c3 --- a/packages/theme-light-extension/style/icons/jupyter/search_arrow_up.svg +++ b/packages/theme-light-extension/style/icons/jupyter/search_arrow_up.svg @@ -1,11 +1,11 @@ - + - - + + diff --git a/packages/theme-light-extension/style/icons/jupyter/search_case_sensitive.svg b/packages/theme-light-extension/style/icons/jupyter/search_case_sensitive.svg old mode 100755 new mode 100644 index 4d90a697..8d863c17 --- a/packages/theme-light-extension/style/icons/jupyter/search_case_sensitive.svg +++ b/packages/theme-light-extension/style/icons/jupyter/search_case_sensitive.svg @@ -4,16 +4,19 @@ viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"> - - - - + + + + + + diff --git a/packages/theme-light-extension/style/icons/jupyter/search_regex.svg b/packages/theme-light-extension/style/icons/jupyter/search_regex.svg old mode 100755 new mode 100644 index 24cf5a0d..e009ad00 --- a/packages/theme-light-extension/style/icons/jupyter/search_regex.svg +++ b/packages/theme-light-extension/style/icons/jupyter/search_regex.svg @@ -4,16 +4,17 @@ viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"> - + - + - - - + + + diff --git a/packages/theme-light-extension/style/icons/md/caretdown.svg b/packages/theme-light-extension/style/icons/md/caretdown.svg index 35179da0..24ccb2b4 100644 --- a/packages/theme-light-extension/style/icons/md/caretdown.svg +++ b/packages/theme-light-extension/style/icons/md/caretdown.svg @@ -1,4 +1,10 @@ - - - + + + + + + \ No newline at end of file diff --git a/packages/theme-light-extension/style/icons/md/ic_directions_run_24px.svg b/packages/theme-light-extension/style/icons/md/ic_directions_run_24px.svg deleted file mode 100755 index df78475f..00000000 --- a/packages/theme-light-extension/style/icons/md/ic_directions_run_24px.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/theme-light-extension/style/icons/md/stop-circle.svg b/packages/theme-light-extension/style/icons/md/stop-circle.svg new file mode 100644 index 00000000..e7a19f2f --- /dev/null +++ b/packages/theme-light-extension/style/icons/md/stop-circle.svg @@ -0,0 +1,15 @@ + diff --git a/packages/theme-light-extension/style/urls.css b/packages/theme-light-extension/style/urls.css index c267c2ce..fef4d80d 100644 --- a/packages/theme-light-extension/style/urls.css +++ b/packages/theme-light-extension/style/urls.css @@ -48,7 +48,6 @@ --jp-icon-console: url('icons/jupyter/console.svg'); --jp-icon-copy: url('icons/md/copy.svg'); --jp-icon-cut: url('icons/md/cut.svg'); - --jp-icon-directions-run: url('icons/md/ic_directions_run_24px.svg'); --jp-icon-directory-selected: url('icons/jupyter/directory_selected.svg'); --jp-icon-directory: url('icons/jupyter/directory.svg'); --jp-icon-download: url('icons/md/download.svg'); @@ -98,6 +97,7 @@ --jp-icon-spreadsheet-selected: url('icons/jupyter/csv_selected.svg'); --jp-icon-spreadsheet: url('icons/jupyter/csv.svg'); --jp-icon-stop: url('icons/md/stop.svg'); + --jp-icon-stop-circle: url('icons/md/stop-circle.svg'); --jp-icon-tab: url('icons/md/ic_tab_24px.svg'); --jp-icon-terminal: url('icons/jupyter/terminal.svg'); --jp-icon-text-editor: url('icons/jupyter/texteditor.svg'); diff --git a/packages/theme-light-extension/style/variables.css b/packages/theme-light-extension/style/variables.css index ad6f9ad6..8afd956b 100644 --- a/packages/theme-light-extension/style/variables.css +++ b/packages/theme-light-extension/style/variables.css @@ -324,6 +324,7 @@ all of MD as it is not optimized for dense, information rich UIs. --jp-input-background: var(--md-grey-100); --jp-input-border-color: var(--jp-border-color1); --jp-input-active-border-color: var(--jp-brand-color1); + --jp-input-active-box-shadow-color: rgba(19, 124, 189, 0.3); /* General editor styles */ @@ -368,7 +369,13 @@ all of MD as it is not optimized for dense, information rich UIs. /* Search-related styles */ - --jp-search-toggle-off-opacity: 0.4; - --jp-search-toggle-hover-opacity: 0.65; + --jp-search-toggle-off-opacity: 0.5; + --jp-search-toggle-hover-opacity: 0.8; --jp-search-toggle-on-opacity: 1; + --jp-search-selected-match-background-color: rgb(245, 200, 0); + --jp-search-selected-match-color: black; + --jp-search-unselected-match-background-color: var( + --jp-inverse-layout-color0 + ); + --jp-search-unselected-match-color: var(--jp-ui-inverse-font-color0); } diff --git a/packages/tooltip-extension/package.json b/packages/tooltip-extension/package.json index 4ad0b284..b18e71b4 100644 --- a/packages/tooltip-extension/package.json +++ b/packages/tooltip-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/tooltip-extension", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Tooltip Extension", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -31,28 +31,27 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/console": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/fileeditor": "^1.0.0-alpha.3", - "@jupyterlab/notebook": "^1.0.0-alpha.4", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/tooltip": "^1.0.0-alpha.3", + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/console": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/fileeditor": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/tooltip": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", - "@phosphor/widgets": "^1.6.0" + "@phosphor/widgets": "^1.7.0" }, "devDependencies": { "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "extension": true, "schemaDir": "schema" diff --git a/packages/tooltip-extension/src/index.ts b/packages/tooltip-extension/src/index.ts index f8b3009a..8d214b27 100644 --- a/packages/tooltip-extension/src/index.ts +++ b/packages/tooltip-extension/src/index.ts @@ -207,7 +207,7 @@ const files: JupyterFrontEndPlugin = { } }); }; - Session.listRunning().then(models => { + void Session.listRunning().then(models => { onRunningChanged(sessions, models); }); sessions.runningChanged.connect(onRunningChanged); diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index 4f000818..2fb21ded 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/tooltip", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Tooltip Widget", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -31,21 +31,20 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0" + "@phosphor/widgets": "^1.7.0" }, "devDependencies": { "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + } } diff --git a/packages/tooltip/src/index.ts b/packages/tooltip/src/index.ts index e0130d87..dfc065d7 100644 --- a/packages/tooltip/src/index.ts +++ b/packages/tooltip/src/index.ts @@ -1,65 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { Kernel } from '@jupyterlab/services'; - -import { Token } from '@phosphor/coreutils'; - -import { Widget } from '@phosphor/widgets'; - -import { CodeEditor } from '@jupyterlab/codeeditor'; - -import { RenderMimeRegistry } from '@jupyterlab/rendermime'; - import '../style/index.css'; +export * from './tokens'; export * from './widget'; - -/* tslint:disable */ -/** - * The tooltip manager token. - */ -export const ITooltipManager = new Token( - '@jupyterlab/tooltip:ITooltipManager' -); -/* tslint:enable */ - -/** - * A manager to register tooltips with parent widgets. - */ -export interface ITooltipManager { - /** - * Invoke a tooltip. - */ - invoke(options: ITooltipManager.IOptions): void; -} - -/** - * A namespace for `ICompletionManager` interface specifications. - */ -export namespace ITooltipManager { - /** - * An interface for tooltip-compatible objects. - */ - export interface IOptions { - /** - * The referent anchor the tooltip follows. - */ - readonly anchor: Widget; - - /** - * The referent editor for the tooltip. - */ - readonly editor: CodeEditor.IEditor; - - /** - * The kernel the tooltip communicates with to populate itself. - */ - readonly kernel: Kernel.IKernelConnection; - - /** - * The renderer the tooltip uses to render API responses. - */ - readonly rendermime: RenderMimeRegistry; - } -} diff --git a/packages/tooltip/src/tokens.ts b/packages/tooltip/src/tokens.ts new file mode 100644 index 00000000..b7582f31 --- /dev/null +++ b/packages/tooltip/src/tokens.ts @@ -0,0 +1,61 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import { Kernel } from '@jupyterlab/services'; + +import { Token } from '@phosphor/coreutils'; + +import { Widget } from '@phosphor/widgets'; + +import { CodeEditor } from '@jupyterlab/codeeditor'; + +import { IRenderMimeRegistry } from '@jupyterlab/rendermime'; + +/* tslint:disable */ +/** + * The tooltip manager token. + */ +export const ITooltipManager = new Token( + '@jupyterlab/tooltip:ITooltipManager' +); +/* tslint:enable */ + +/** + * A manager to register tooltips with parent widgets. + */ +export interface ITooltipManager { + /** + * Invoke a tooltip. + */ + invoke(options: ITooltipManager.IOptions): void; +} + +/** + * A namespace for `ICompletionManager` interface specifications. + */ +export namespace ITooltipManager { + /** + * An interface for tooltip-compatible objects. + */ + export interface IOptions { + /** + * The referent anchor the tooltip follows. + */ + readonly anchor: Widget; + + /** + * The referent editor for the tooltip. + */ + readonly editor: CodeEditor.IEditor; + + /** + * The kernel the tooltip communicates with to populate itself. + */ + readonly kernel: Kernel.IKernelConnection; + + /** + * The renderer the tooltip uses to render API responses. + */ + readonly rendermime: IRenderMimeRegistry; + } +} diff --git a/packages/tooltip/src/widget.ts b/packages/tooltip/src/widget.ts index c945a65b..afb78fc2 100644 --- a/packages/tooltip/src/widget.ts +++ b/packages/tooltip/src/widget.ts @@ -15,7 +15,7 @@ import { HoverBox } from '@jupyterlab/apputils'; import { IRenderMime, - RenderMimeRegistry, + IRenderMimeRegistry, MimeModel } from '@jupyterlab/rendermime'; @@ -64,6 +64,7 @@ export class Tooltip extends Widget { this.anchor = options.anchor; this.addClass(TOOLTIP_CLASS); + this.hide(); this._editor = options.editor; this._rendermime = options.rendermime; @@ -74,7 +75,7 @@ export class Tooltip extends Widget { } this._content = this._rendermime.createRenderer(mimeType); - this._content.renderModel(model); + void this._content.renderModel(model); this._content.addClass(CONTENT_CLASS); layout.addWidget(this._content); } @@ -168,6 +169,9 @@ export class Tooltip extends Widget { * Handle `'update-request'` messages. */ protected onUpdateRequest(msg: Message): void { + if (this.isHidden) { + this.show(); + } this._setGeometry(); super.onUpdateRequest(msg); } @@ -228,7 +232,7 @@ export class Tooltip extends Widget { private _content: IRenderMime.IRenderer | null = null; private _editor: CodeEditor.IEditor; - private _rendermime: RenderMimeRegistry; + private _rendermime: IRenderMimeRegistry; } /** @@ -257,6 +261,6 @@ export namespace Tooltip { /** * The rendermime instance used by the tooltip model. */ - rendermime: RenderMimeRegistry; + rendermime: IRenderMimeRegistry; } } diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index 9191c9b5..158cea03 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/ui-components", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - UI components written in React", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -19,10 +23,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -34,19 +34,18 @@ "@blueprintjs/core": "^3.9.0", "@blueprintjs/icons": "^3.3.0", "@blueprintjs/select": "^3.3.0", - "react": "~16.4.2" + "react": "~16.8.4" }, "devDependencies": { - "@types/react": "~16.4.13", + "@types/react": "~16.8.18", "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "peerDependencies": { - "react": "~16.4.2" + "react": "~16.8.4" }, "publishConfig": { "access": "public" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + } } diff --git a/packages/ui-components/src/index.tsx b/packages/ui-components/src/index.tsx index eb717862..7acfa826 100644 --- a/packages/ui-components/src/index.tsx +++ b/packages/ui-components/src/index.tsx @@ -35,6 +35,7 @@ export { Intent } from '@blueprintjs/core/lib/cjs/common/intent'; interface IButtonProps extends IBPButtonProps { title?: string; + type?: 'button' | 'submit' | 'reset'; } interface IInputGroupProps extends IBPInputGroupProps { diff --git a/packages/ui-components/style/index.css b/packages/ui-components/style/index.css index be9d933c..06f97a8d 100644 --- a/packages/ui-components/style/index.css +++ b/packages/ui-components/style/index.css @@ -15,7 +15,7 @@ html { } body { - color: #182026; + color: unset; font-family: var(--jp-ui-font-family); } @@ -32,6 +32,7 @@ strong { font-weight: unset; } +/* Override Blueprint's _typography.scss styles */ a { text-decoration: unset; color: unset; @@ -42,12 +43,14 @@ a:hover { color: unset; } +/* Override Blueprint's _accessibility.scss styles */ :focus { outline: unset; outline-offset: unset; -moz-outline-radius: unset; } +/* Styles for ui-components */ .jp-Button { border-radius: var(--jp-border-radius); padding: 0px 12px; @@ -63,10 +66,6 @@ a:hover { text-transform: none; } -/* .jp-InputGroup { - -} */ - .jp-InputGroup input { box-sizing: border-box; border-radius: 0; @@ -76,10 +75,9 @@ a:hover { } .jp-InputGroup input:focus { - /* box-shadow: inset 0 0 0 var(--jp-border-width) var(--jp-input-active-border-color), - inset 0 0 0 3px rgba(19, 124, 189, 0.3); */ - box-shadow: inset 0 0 0 var(--jp-border-width) rgba(19, 124, 189, 0.3), - inset 0 0 0 3px rgba(19, 124, 189, 0.3); + box-shadow: inset 0 0 0 var(--jp-border-width) + var(--jp-input-active-box-shadow-color), + inset 0 0 0 3px var(--jp-input-active-box-shadow-color); } .jp-InputGroup input::placeholder, @@ -108,10 +106,6 @@ input::placeholder { color: var(--jp-ui-font-color0); } -/* .jp-Select { - -} */ - select { box-sizing: border-box; } diff --git a/packages/vdom-extension/README.md b/packages/vdom-extension/README.md index 0eab5655..c112293c 100644 --- a/packages/vdom-extension/README.md +++ b/packages/vdom-extension/README.md @@ -61,7 +61,7 @@ VDOM({ Using the [vdom Python library](https://github.com/nteract/vdom): ```python -from vdom.helpers import h1, p, img, div, b +from vdom import h1, p, img, div, b div( h1('Our Incredibly Declarative Example'), diff --git a/packages/vdom-extension/package.json b/packages/vdom-extension/package.json index 1291e24c..016dc2b7 100644 --- a/packages/vdom-extension/package.json +++ b/packages/vdom-extension/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/vdom-extension", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - VDOM Renderer", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -18,10 +22,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -30,25 +30,22 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.3", - "@nteract/transform-vdom": "^1.1.1", - "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "react": "~16.4.2", - "react-dom": "~16.4.2" + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/vdom": "^1.0.0-alpha.9" }, "devDependencies": { - "@types/react": "~16.4.13", - "@types/react-dom": "~16.0.7", "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { - "mimeExtension": true + "extension": true } } diff --git a/packages/vdom-extension/src/index.ts b/packages/vdom-extension/src/index.ts new file mode 100644 index 00000000..1b460219 --- /dev/null +++ b/packages/vdom-extension/src/index.ts @@ -0,0 +1,116 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import { + JupyterFrontEnd, + JupyterFrontEndPlugin, + ILayoutRestorer +} from '@jupyterlab/application'; + +import { InstanceTracker } from '@jupyterlab/apputils'; + +import { MimeDocumentFactory, MimeDocument } from '@jupyterlab/docregistry'; + +import { INotebookTracker } from '@jupyterlab/notebook'; + +import { IRenderMimeRegistry } from '@jupyterlab/rendermime'; + +import { RenderedVDOM, IVDOMTracker } from '@jupyterlab/vdom'; + +/** + * The CSS class for a VDOM icon. + */ +const CSS_ICON_CLASS = 'jp-MaterialIcon jp-VDOMIcon'; + +/** + * The MIME type for VDOM. + */ +export const MIME_TYPE = 'application/vdom.v1+json'; + +/** + * The name of the factory that creates VDOM widgets. + */ +const FACTORY_NAME = 'VDOM'; + +const plugin: JupyterFrontEndPlugin = { + id: '@jupyterlab/vdom-extension:factory', + requires: [IRenderMimeRegistry, INotebookTracker, ILayoutRestorer], + provides: IVDOMTracker, + autoStart: true, + activate: ( + app: JupyterFrontEnd, + rendermime: IRenderMimeRegistry, + notebooks: INotebookTracker, + restorer: ILayoutRestorer + ) => { + const tracker = new InstanceTracker({ + namespace: 'vdom-widget' + }); + + // Add a renderer factory to application rendermime registry. + rendermime.addFactory( + { + safe: false, + mimeTypes: [MIME_TYPE], + createRenderer: options => new RenderedVDOM(options) + }, + 0 + ); + + notebooks.widgetAdded.connect((sender, panel) => { + // Get the notebook's context and rendermime; + const { context, rendermime } = panel; + + // Add the renderer factory to the notebook's rendermime registry; + rendermime.addFactory( + { + safe: false, + mimeTypes: [MIME_TYPE], + createRenderer: options => new RenderedVDOM(options, context) + }, + 0 + ); + }); + + app.docRegistry.addFileType({ + name: 'vdom', + mimeTypes: [MIME_TYPE], + extensions: ['.vdom', '.vdom.json'], + iconClass: CSS_ICON_CLASS + }); + + const factory = new MimeDocumentFactory({ + renderTimeout: 1000, + dataType: 'json', + rendermime, + name: FACTORY_NAME, + primaryFileType: app.docRegistry.getFileType('vdom'), + fileTypes: ['vdom', 'json'], + defaultFor: ['vdom'] + }); + + factory.widgetCreated.connect((sender, widget) => { + widget.context.pathChanged.connect(() => { + void tracker.save(widget); + }); + void tracker.add(widget); + }); + + // Add widget factory to document registry. + app.docRegistry.addWidgetFactory(factory); + + // Handle state restoration. + restorer.restore(tracker, { + command: 'docmanager:open', + args: widget => ({ + path: widget.context.path, + factory: FACTORY_NAME + }), + name: widget => widget.context.path + }); + + return tracker; + } +}; + +export default plugin; diff --git a/packages/vdom-extension/src/index.tsx b/packages/vdom-extension/src/index.tsx deleted file mode 100644 index 7a9c6402..00000000 --- a/packages/vdom-extension/src/index.tsx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Jupyter Development Team. -// Distributed under the terms of the Modified BSD License. - -import { Message } from '@phosphor/messaging'; - -import { Widget } from '@phosphor/widgets'; - -import { IRenderMime } from '@jupyterlab/rendermime-interfaces'; - -import * as React from 'react'; - -import * as ReactDOM from 'react-dom'; - -import VDOM from '@nteract/transform-vdom'; - -import '../style/index.css'; - -/** - * The CSS class to add to the VDOM Widget. - */ -const CSS_CLASS = 'jp-RenderedVDOM'; - -/** - * The CSS class for a VDOM icon. - */ -const CSS_ICON_CLASS = 'jp-MaterialIcon jp-VDOMIcon'; - -/** - * The MIME type for VDOM. - */ -export const MIME_TYPE = 'application/vdom.v1+json'; - -/** - * A renderer for declarative virtual DOM content. - */ -export class RenderedVDOM extends Widget implements IRenderMime.IRenderer { - /** - * Create a new widget for rendering DOM. - */ - constructor(options: IRenderMime.IRendererOptions) { - super(); - this.addClass(CSS_CLASS); - this.addClass('jp-RenderedHTML'); - this.addClass('jp-RenderedHTMLCommon'); - this._mimeType = options.mimeType; - } - - /** - * Render VDOM into this widget's node. - */ - renderModel(model: IRenderMime.IMimeModel): Promise { - const data = model.data[this._mimeType] as any; - return new Promise(resolve => { - ReactDOM.render(, this.node, resolve); - }); - } - - /** - * Called before the widget is detached from the DOM. - */ - protected onBeforeDetach(msg: Message): void { - // Unmount the component so it can tear down. - ReactDOM.unmountComponentAtNode(this.node); - } - - private _mimeType: string; -} - -/** - * A mime renderer factory for VDOM data. - */ -export const rendererFactory: IRenderMime.IRendererFactory = { - safe: true, - mimeTypes: [MIME_TYPE], - createRenderer: options => new RenderedVDOM(options) -}; - -const extensions: IRenderMime.IExtension | IRenderMime.IExtension[] = [ - { - id: '@jupyterlab/vdom-extension:factory', - rendererFactory, - rank: 0, - dataType: 'json', - fileTypes: [ - { - name: 'vdom', - mimeTypes: [MIME_TYPE], - extensions: ['.vdom', '.vdom.json'], - iconClass: CSS_ICON_CLASS - } - ], - documentWidgetFactoryOptions: { - name: 'VDOM', - primaryFileType: 'vdom', - fileTypes: ['vdom', 'json'], - defaultFor: ['vdom'] - } - } -]; - -export default extensions; diff --git a/packages/vdom-extension/src/transform-vdom.d.ts b/packages/vdom-extension/src/transform-vdom.d.ts deleted file mode 100644 index 066f8b31..00000000 --- a/packages/vdom-extension/src/transform-vdom.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Type definitions for @nteract/transform-vdom v1.1.1 -// https://github.com/jupyterlab/jupyterlab -// Definitions by: Grant Nestor - -declare module '@nteract/transform-vdom' { - import * as React from 'react'; - - interface IVDOMElement { - tagName: 'string'; - attributes: Object; - children: Array; - key?: number | string | null; - } - - interface IVDOMProps extends React.Props { - data: IVDOMElement; - } - - export default class VDOM extends React.Component {} -} diff --git a/packages/vdom-extension/style/index.css b/packages/vdom-extension/style/index.css index dfd141bf..3aa74aba 100644 --- a/packages/vdom-extension/style/index.css +++ b/packages/vdom-extension/style/index.css @@ -21,10 +21,6 @@ padding: 5px; } -/* Output styles */ -.jp-OutputArea .jp-RenderedVDOM { -} - /* Document icon */ .jp-VDOMIcon { background-image: var(--jp-icon-vdom); diff --git a/packages/vdom-extension/tsconfig.json b/packages/vdom-extension/tsconfig.json index 7686b51c..f1e4e041 100644 --- a/packages/vdom-extension/tsconfig.json +++ b/packages/vdom-extension/tsconfig.json @@ -7,7 +7,22 @@ "include": ["src/*"], "references": [ { - "path": "../rendermime-interfaces" + "path": "../application" + }, + { + "path": "../apputils" + }, + { + "path": "../docregistry" + }, + { + "path": "../notebook" + }, + { + "path": "../rendermime" + }, + { + "path": "../vdom" } ] } diff --git a/packages/vdom/README.md b/packages/vdom/README.md new file mode 100644 index 00000000..c112293c --- /dev/null +++ b/packages/vdom/README.md @@ -0,0 +1,78 @@ +# vdom-extension + +A JupyterLab extension for rendering VirtualDOM using React + +![demo](http://g.recordit.co/EIwAIBsGBh.gif) + +## Prerequisites + +- JupyterLab ^0.27.0 + +## Usage + +To render VDOM output in IPython: + +```python +from IPython.display import display + +def VDOM(data={}): + bundle = {} + bundle['application/vdom.v1+json'] = data + display(bundle, raw=True) + +VDOM({ + 'tagName': 'div', + 'attributes': {}, + 'children': [{ + 'tagName': 'h1', + 'attributes': {}, + 'children': 'Our Incredibly Declarative Example', + 'key': 0 + }, { + 'tagName': 'p', + 'attributes': {}, + 'children': ['Can you believe we wrote this ', { + 'tagName': 'b', + 'attributes': {}, + 'children': 'in Python', + 'key': 1 + }, '?'], + 'key': 1 + }, { + 'tagName': 'img', + 'attributes': { + 'src': 'https://media.giphy.com/media/xUPGcguWZHRC2HyBRS/giphy.gif' + }, + 'key': 2 + }, { + 'tagName': 'p', + 'attributes': {}, + 'children': ['What will ', { + 'tagName': 'b', + 'attributes': {}, + 'children': 'you', + 'key': 1 + }, ' create next?'], + 'key': 3 + }] +}) +``` + +Using the [vdom Python library](https://github.com/nteract/vdom): + +```python +from vdom import h1, p, img, div, b + +div( + h1('Our Incredibly Declarative Example'), + p('Can you believe we wrote this ', b('in Python'), '?'), + img(src="https://media.giphy.com/media/xUPGcguWZHRC2HyBRS/giphy.gif"), + p('What will ', b('you'), ' create next?'), +) +``` + +To render a `.vdom` or `.vdom.json` file, simply open it: + +## Development + +See the [JupyterLab Contributor Documentation](https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md). diff --git a/packages/vdom/package.json b/packages/vdom/package.json new file mode 100644 index 00000000..2c3415fb --- /dev/null +++ b/packages/vdom/package.json @@ -0,0 +1,54 @@ +{ + "name": "@jupyterlab/vdom", + "version": "1.0.0-alpha.9", + "description": "A viewer for VDOM documents.", + "homepage": "https://github.com/jupyterlab/jupyterlab", + "bugs": { + "url": "https://github.com/jupyterlab/jupyterlab/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, + "license": "BSD-3-Clause", + "author": "Project Jupyter", + "files": [ + "lib/*.d.ts", + "lib/*.js", + "style/*" + ], + "main": "lib/index.js", + "types": "lib/index.d.ts", + "directories": { + "lib": "lib/" + }, + "scripts": { + "build": "tsc -b", + "clean": "rimraf lib", + "docs": "typedoc --options tdoptions.json --theme ../../typedoc-theme src", + "prepublishOnly": "npm run build", + "watch": "tsc -b --watch" + }, + "dependencies": { + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@nteract/transform-vdom": "^4.0.1", + "@phosphor/coreutils": "^1.3.0", + "@phosphor/messaging": "^1.2.2", + "@phosphor/widgets": "^1.7.0", + "react": "~16.8.4", + "react-dom": "~16.8.4" + }, + "devDependencies": { + "@types/react": "~16.8.18", + "@types/react-dom": "^16.8.4", + "rimraf": "~2.6.2", + "typedoc": "^0.14.2", + "typescript": "~3.5.1" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/vdom/src/index.tsx b/packages/vdom/src/index.tsx new file mode 100644 index 00000000..05ee6b17 --- /dev/null +++ b/packages/vdom/src/index.tsx @@ -0,0 +1,126 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import * as React from 'react'; + +import * as ReactDOM from 'react-dom'; + +import { IClientSession, IInstanceTracker } from '@jupyterlab/apputils'; + +import { DocumentRegistry, MimeDocument } from '@jupyterlab/docregistry'; + +import { IRenderMime } from '@jupyterlab/rendermime-interfaces'; + +import { Kernel } from '@jupyterlab/services'; + +import VDOM, { SerializedEvent } from '@nteract/transform-vdom'; + +import { Token } from '@phosphor/coreutils'; + +import { Message } from '@phosphor/messaging'; + +import { Widget } from '@phosphor/widgets'; + +import '../style/index.css'; + +/** + * The CSS class to add to the VDOM Widget. + */ +const CSS_CLASS = 'jp-RenderedVDOM'; + +/** + * A class that tracks VDOM widgets. + */ +export interface IVDOMTracker extends IInstanceTracker {} + +/** + * The VDOM tracker token. + */ +export const IVDOMTracker = new Token( + '@jupyterlab/vdom:IVDOMTracker' +); + +/** + * A renderer for declarative virtual DOM content. + */ +export class RenderedVDOM extends Widget implements IRenderMime.IRenderer { + /** + * Create a new widget for rendering DOM. + */ + constructor( + options: IRenderMime.IRendererOptions, + context?: DocumentRegistry.IContext + ) { + super(); + this.addClass(CSS_CLASS); + this.addClass('jp-RenderedHTML'); + this.addClass('jp-RenderedHTMLCommon'); + this._mimeType = options.mimeType; + if (context) { + this._session = context.session; + } + } + + /** + * Dispose of the widget. + */ + dispose(): void { + // Dispose of comm disposables + for (let targetName in this._comms) { + this._comms[targetName].dispose(); + } + super.dispose(); + } + + /** + * Called before the widget is detached from the DOM. + */ + protected onBeforeDetach(msg: Message): void { + // Dispose of React component(s). + ReactDOM.unmountComponentAtNode(this.node); + } + + /** + * Render VDOM into this widget's node. + */ + renderModel(model: IRenderMime.IMimeModel): Promise { + return new Promise((resolve, reject) => { + const data = model.data[this._mimeType] as any; + ReactDOM.render( + , + this.node, + () => { + resolve(); + } + ); + }); + } + + /** + * Handle events for VDOM element. + */ + handleVDOMEvent = (targetName: string, event: SerializedEvent): void => { + // When a VDOM element's event handler is called, send a serialized + // representation of the event to the registered comm channel for the + // kernel to handle + if (this._timer) { + window.clearTimeout(this._timer); + } + if (this._session) { + this._timer = window.setTimeout(() => { + if (!this._comms[targetName]) { + this._comms[targetName] = this._session.kernel.connectToComm( + targetName + ); + this._comms[targetName].open(); + } + this._comms[targetName].send(JSON.stringify(event)); + }, 16); + } + }; + + private _mimeType: string; + private _session?: IClientSession; + private _comms: { [targetName: string]: Kernel.IComm } = {}; + private _timer: number; +} diff --git a/packages/vdom/style/index.css b/packages/vdom/style/index.css new file mode 100644 index 00000000..3aa74aba --- /dev/null +++ b/packages/vdom/style/index.css @@ -0,0 +1,29 @@ +/** + Copyright (c) Jupyter Development Team. + Distributed under the terms of the Modified BSD License. +*/ + +/* Add CSS variables to :root */ +:root { + --jp-icon-vdom: url('./react.svg'); +} + +/* Base styles */ +.jp-RenderedVDOM { + width: 100%; + height: 100%; + padding: 0; + overflow: auto; +} + +/* Document styles */ +.jp-MimeDocument .jp-RenderedVDOM { + padding: 5px; +} + +/* Document icon */ +.jp-VDOMIcon { + background-image: var(--jp-icon-vdom); + background-size: 24px; + background-position: center !important; +} diff --git a/packages/vdom/style/react.svg b/packages/vdom/style/react.svg new file mode 100644 index 00000000..5592ebec --- /dev/null +++ b/packages/vdom/style/react.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + diff --git a/packages/vdom/tdoptions.json b/packages/vdom/tdoptions.json new file mode 100644 index 00000000..64583dc9 --- /dev/null +++ b/packages/vdom/tdoptions.json @@ -0,0 +1,20 @@ +{ + "excludeNotExported": true, + "mode": "file", + "target": "es5", + "module": "es5", + "lib": [ + "lib.es2015.d.ts", + "lib.es2015.collection.d.ts", + "lib.es2015.promise.d.ts", + "lib.dom.d.ts" + ], + "out": "../../docs/api/vdom", + "baseUrl": ".", + "paths": { + "@jupyterlab/*": ["../packages/*"] + }, + "esModuleInterop": true, + "jsx": "react", + "types": [] +} diff --git a/packages/vdom/tsconfig.json b/packages/vdom/tsconfig.json new file mode 100644 index 00000000..d98fff4c --- /dev/null +++ b/packages/vdom/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfigbase", + "compilerOptions": { + "outDir": "lib", + "rootDir": "src" + }, + "include": ["src/*"], + "references": [ + { + "path": "../apputils" + }, + { + "path": "../docregistry" + }, + { + "path": "../rendermime-interfaces" + }, + { + "path": "../services" + } + ] +} diff --git a/packages/vega4-extension/README.md b/packages/vega5-extension/README.md similarity index 88% rename from packages/vega4-extension/README.md rename to packages/vega5-extension/README.md index bea727ca..677f347e 100644 --- a/packages/vega4-extension/README.md +++ b/packages/vega5-extension/README.md @@ -1,6 +1,6 @@ -# vega4-extension +# vega5-extension -A JupyterLab extension for rendering [Vega](https://vega.github.io/vega) 4 and [Vega-Lite](https://vega.github.io/vega-lite) 2. +A JupyterLab extension for rendering [Vega](https://vega.github.io/vega) 5 and [Vega-Lite](https://vega.github.io/vega-lite) 3. ![demo](http://g.recordit.co/USoTkuCOfR.gif) @@ -16,8 +16,8 @@ To render Vega-Lite output in IPython: from IPython.display import display display({ - "application/vnd.vegalite.v2+json": { - "$schema": "https://vega.github.io/schema/vega-lite/v2.json", + "application/vnd.vegalite.v3+json": { + "$schema": "https://vega.github.io/schema/vega-lite/v3.json", "description": "A simple bar chart with embedded data.", "data": { "values": [ @@ -57,8 +57,8 @@ Provide vega-embed options via metadata: from IPython.display import display display({ - "application/vnd.vegalite.v2+json": { - "$schema": "https://vega.github.io/schema/vega-lite/v2.json", + "application/vnd.vegalite.v3+json": { + "$schema": "https://vega.github.io/schema/vega-lite/v3.json", "description": "A simple bar chart with embedded data.", "data": { "values": [ diff --git a/packages/vega4-extension/package.json b/packages/vega5-extension/package.json similarity index 68% rename from packages/vega4-extension/package.json rename to packages/vega5-extension/package.json index 9535b32a..902dd4ef 100644 --- a/packages/vega4-extension/package.json +++ b/packages/vega5-extension/package.json @@ -1,11 +1,15 @@ { - "name": "@jupyterlab/vega4-extension", - "version": "1.0.0-alpha.3", - "description": "JupyterLab - Vega 4 and Vega-Lite 2 Mime Renderer Extension", + "name": "@jupyterlab/vega5-extension", + "version": "1.0.0-alpha.9", + "description": "JupyterLab - Vega 5 and Vega-Lite 3 Mime Renderer Extension", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -18,10 +22,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc -b", "clean": "rimraf lib", @@ -30,22 +30,22 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.3", + "@jupyterlab/rendermime-interfaces": "^1.3.0-alpha.9", "@phosphor/coreutils": "^1.3.0", - "@phosphor/widgets": "^1.6.0", - "vega-embed": "3.18.2" + "@phosphor/widgets": "^1.7.0", + "vega": "^5.3.5", + "vega-embed": "^4.0.0", + "vega-lite": "^3.2.1" }, "devDependencies": { - "@types/json-stable-stringify": "^1.0.32", - "@types/webpack-env": "~1.13.6", + "@types/webpack-env": "^1.13.9", "rimraf": "~2.6.2", "typedoc": "^0.14.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" }, "publishConfig": { "access": "public" }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c", "jupyterlab": { "mimeExtension": true } diff --git a/packages/vega4-extension/src/index.ts b/packages/vega5-extension/src/index.ts similarity index 79% rename from packages/vega4-extension/src/index.ts rename to packages/vega5-extension/src/index.ts index a58579a2..f422bc56 100644 --- a/packages/vega4-extension/src/index.ts +++ b/packages/vega5-extension/src/index.ts @@ -16,17 +16,17 @@ import '../style/index.css'; /** * The CSS class to add to the Vega and Vega-Lite widget. */ -const VEGA_COMMON_CLASS = 'jp-RenderedVegaCommon4'; +const VEGA_COMMON_CLASS = 'jp-RenderedVegaCommon5'; /** * The CSS class to add to the Vega. */ -const VEGA_CLASS = 'jp-RenderedVega4'; +const VEGA_CLASS = 'jp-RenderedVega5'; /** * The CSS class to add to the Vega-Lite. */ -const VEGALITE_CLASS = 'jp-RenderedVegaLite2'; +const VEGALITE_CLASS = 'jp-RenderedVegaLite3'; /** * The MIME type for Vega. @@ -34,7 +34,7 @@ const VEGALITE_CLASS = 'jp-RenderedVegaLite2'; * #### Notes * The version of this follows the major version of Vega. */ -export const VEGA_MIME_TYPE = 'application/vnd.vega.v4+json'; +export const VEGA_MIME_TYPE = 'application/vnd.vega.v5+json'; /** * The MIME type for Vega-Lite. @@ -42,7 +42,7 @@ export const VEGA_MIME_TYPE = 'application/vnd.vega.v4+json'; * #### Notes * The version of this follows the major version of Vega-Lite. */ -export const VEGALITE_MIME_TYPE = 'application/vnd.vegalite.v2+json'; +export const VEGALITE_MIME_TYPE = 'application/vnd.vegalite.v3+json'; /** * A widget for rendering Vega or Vega-Lite data, for usage with rendermime. @@ -84,7 +84,7 @@ export class RenderedVega extends Widget implements IRenderMime.IRenderer { const el = document.createElement('div'); // clear the output before attaching a chart - this.node.innerHTML = ''; + this.node.textContent = ''; this.node.appendChild(el); this._result = await vega.default(el, spec, { @@ -130,34 +130,34 @@ export const rendererFactory: IRenderMime.IRendererFactory = { }; const extension: IRenderMime.IExtension = { - id: '@jupyterlab/vega-extension:factory', + id: '@jupyterlab/vega5-extension:factory', rendererFactory, - rank: 50, // prefer over vega 2 extension + rank: 50, dataType: 'json', documentWidgetFactoryOptions: [ { name: 'Vega', - primaryFileType: 'vega4', - fileTypes: ['vega4', 'json'], - defaultFor: ['vega4'] + primaryFileType: 'vega5', + fileTypes: ['vega5', 'json'], + defaultFor: ['vega5'] }, { name: 'Vega-Lite', - primaryFileType: 'vega-lite2', - fileTypes: ['vega-lite2', 'json'], - defaultFor: ['vega-lite2'] + primaryFileType: 'vega-lite3', + fileTypes: ['vega-lite3', 'json'], + defaultFor: ['vega-lite3'] } ], fileTypes: [ { mimeTypes: [VEGA_MIME_TYPE], - name: 'vega4', + name: 'vega5', extensions: ['.vg', '.vg.json', '.vega'], iconClass: 'jp-MaterialIcon jp-VegaIcon' }, { mimeTypes: [VEGALITE_MIME_TYPE], - name: 'vega-lite2', + name: 'vega-lite3', extensions: ['.vl', '.vl.json', '.vegalite'], iconClass: 'jp-MaterialIcon jp-VegaIcon' } @@ -188,22 +188,7 @@ namespace Private { return vegaReady; } - vegaReady = new Promise((resolve, reject) => { - require.ensure( - ['vega-embed'], - // see https://webpack.js.org/api/module-methods/#require-ensure - // this argument MUST be named `require` for the WebPack parser - require => { - vega = require('vega-embed') as typeof VegaModuleType; - resolve(vega); - }, - (error: any) => { - console.error(error); - reject(); - }, - 'vega' - ); - }); + vegaReady = import('vega-embed'); return vegaReady; } diff --git a/packages/vega4-extension/src/json.d.ts b/packages/vega5-extension/src/json.d.ts similarity index 100% rename from packages/vega4-extension/src/json.d.ts rename to packages/vega5-extension/src/json.d.ts diff --git a/packages/vega4-extension/style/index.css b/packages/vega5-extension/style/index.css similarity index 100% rename from packages/vega4-extension/style/index.css rename to packages/vega5-extension/style/index.css diff --git a/packages/vega4-extension/tdoptions.json b/packages/vega5-extension/tdoptions.json similarity index 89% rename from packages/vega4-extension/tdoptions.json rename to packages/vega5-extension/tdoptions.json index f7e43cbe..f969b1a0 100644 --- a/packages/vega4-extension/tdoptions.json +++ b/packages/vega5-extension/tdoptions.json @@ -9,7 +9,7 @@ "lib.es2015.promise.d.ts", "lib.dom.d.ts" ], - "out": "../../docs/api/vega4-extension", + "out": "../../docs/api/vega5-extension", "baseUrl": ".", "paths": { "@jupyterlab/*": ["../packages/*"] diff --git a/packages/vega4-extension/tsconfig.json b/packages/vega5-extension/tsconfig.json similarity index 100% rename from packages/vega4-extension/tsconfig.json rename to packages/vega5-extension/tsconfig.json diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh index 4316777a..6c336016 100644 --- a/scripts/travis_script.sh +++ b/scripts/travis_script.sh @@ -21,11 +21,6 @@ if [[ $GROUP == js ]]; then jlpm build:test FORCE_COLOR=1 jlpm coverage --loglevel success - # Run the services node example. - pushd packages/services/examples/node - python main.py - popd - jlpm run clean fi @@ -61,49 +56,66 @@ if [[ $GROUP == integrity ]]; then # Build the packages individually. jlpm run build:src - # Make sure the examples build - jlpm run build:examples - # Make sure we have CSS that can be converted with postcss jlpm global add postcss-cli jlpm config set prefix ~/.yarn ~/.yarn/bin/postcss packages/**/style/*.css --dir /tmp - # Make sure we can successfully load the dev app. - python -m jupyterlab.browser_check --dev-mode - - # Make sure core mode works - jlpm run build:core - python -m jupyterlab.browser_check --core-mode - - # Make sure we can run the built app. - jupyter labextension install ./jupyterlab/tests/mock_packages/extension - python -m jupyterlab.browser_check - jupyter labextension list - - # Make sure the deprecated `selenium_check` command still works - python -m jupyterlab.selenium_check + # run twine check on the python build assets. + # this must be done before altering any versions below. + python -m pip install -U twine wheel + python setup.py sdist + python setup.py bdist_wheel + twine check dist/* + + # Make sure we can bump the version + # This must be done at the end so as not to interfere + # with the other checks + git config --global user.email "you@example.com" + git config --global user.name "CI" + git stash + git checkout -b commit_${BUILD_SOURCEVERSION} + git clean -df + jlpm bumpversion minor --force + git commit -a -m "minor" + jlpm bumpversion major --force + git commit -a -m "major" + jlpm bumpversion release --force # switch to rc + git commit -a -m "release" + jlpm bumpversion build --force + git commit -a -m "build" + VERSION=$(python setup.py --version) + if [[ $VERSION != *rc1 ]]; then exit 1; fi + + # make sure we can patch release + jlpm bumpversion release --force # switch to final + git commit -a -m "release" + jlpm patch:release --force + git commit -a -m "patched" + jlpm patch:release console --force + git commit -a -m "patched single" + jlpm patch:release filebrowser notebook --force + git commit -a -m "patched multiple" + + # make sure we can bump major JS releases + jlpm bumpversion minor --force + jlpm bump:js:major console --force + jlpm bump:js:major console notebook --force + + # Make sure that a prepublish would include the proper files. + jlpm run prepublish:check +fi - # Make sure we can non-dev install. - virtualenv -p $(which python3) test_install - ./test_install/bin/pip install -q ".[test]" # this populates /share/jupyter/lab - ./test_install/bin/python -m jupyterlab.browser_check - # Make sure we can run the build - ./test_install/bin/jupyter lab build - # Make sure we can start and kill the lab server - ./test_install/bin/jupyter lab --no-browser & - TASK_PID=$! - # Make sure the task is running - ps -p $TASK_PID || exit 1 - sleep 5 - kill $TASK_PID - wait $TASK_PID -fi +if [[ $GROUP == usage ]]; then + # Build the examples. + jlpm run build:packages + jlpm run build:examples + # Test the examples + jlpm run test:examples -if [[ $GROUP == cli ]]; then # Test the cli apps. jupyter lab clean jupyter lab build @@ -161,4 +173,50 @@ if [[ $GROUP == cli ]]; then python -m jupyterlab.browser_check --dev-mode rm -rf packages/foo jlpm run integrity + + ## Test app directory support being a symlink + mkdir tmp + pushd tmp + mkdir real_app_dir + ln -s real_app_dir link_app_dir + # verify that app directory is not resolved + env JUPYTERLAB_DIR=./link_app_dir jupyter lab path | grep link_app_dir + popd + + # Build the examples. + jlpm run build:examples + + # Test the examples + jlpm run test:examples + + # Make sure we can successfully load the dev app. + python -m jupyterlab.browser_check --dev-mode + + # Make sure core mode works + jlpm run build:core + python -m jupyterlab.browser_check --core-mode + + # Make sure we can run the built app. + jupyter labextension install ./jupyterlab/tests/mock_packages/extension + python -m jupyterlab.browser_check + jupyter labextension list + + # Make sure the deprecated `selenium_check` command still works + python -m jupyterlab.selenium_check + + # Make sure we can non-dev install. + virtualenv -p $(which python3) test_install + ./test_install/bin/pip install -q ".[test]" # this populates /share/jupyter/lab + ./test_install/bin/python -m jupyterlab.browser_check + # Make sure we can run the build + ./test_install/bin/jupyter lab build + + # Make sure we can start and kill the lab server + ./test_install/bin/jupyter lab --no-browser & + TASK_PID=$! + # Make sure the task is running + ps -p $TASK_PID || exit 1 + sleep 5 + kill $TASK_PID + wait $TASK_PID fi diff --git a/setup.cfg b/setup.cfg index 927a403b..97d9271c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,11 @@ [metadata] license_file = LICENSE +[bdist_wheel] +universal=1 + [tool:pytest] testpaths=jupyterlab/tests -norecursedirs=node_modules +norecursedirs=node_modules .git _build addopts = --pdbcls=IPython.terminal.debugger:Pdb -ignore=tests +ignore=tests examples diff --git a/setup.py b/setup.py index 6a1fdc74..8ea60dd4 100644 --- a/setup.py +++ b/setup.py @@ -21,11 +21,9 @@ NAME = 'jupyterlab' DESCRIPTION = 'The JupyterLab notebook server extension.' -LONG_DESCRIPTION = """ -An extensible, comprehensive Jupyter web application. -Development happens on https://github.com/jupyter/jupyterlab, with chat on -https://gitter.im/jupyterlab/jupyterlab. -""" + +with open(pjoin(HERE, 'README.md')) as fid: + LONG_DESCRIPTION = fid.read() ensure_python(['>=3.5']) @@ -108,6 +106,7 @@ def run(self): name=NAME, description=DESCRIPTION, long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', version=VERSION, packages=find_packages(), cmdclass=cmdclass, @@ -133,14 +132,15 @@ def run(self): setup_args['install_requires'] = [ 'notebook>=4.3.1', - 'jupyterlab_server>=0.3.0,<0.4.0' + 'tornado<6', + 'jupyterlab_server>=0.3.3,<0.4.0' ] setup_args['extras_require'] = { 'test': [ - 'pytest==4.0', - 'requests', - 'pytest-check-links' + 'pytest', + 'pytest-check-links', + 'requests' ], 'docs': [ 'sphinx', diff --git a/tests/convert-to-jest.js b/tests/convert-to-jest.js index 85c86166..bd5311a3 100644 --- a/tests/convert-to-jest.js +++ b/tests/convert-to-jest.js @@ -74,11 +74,13 @@ utils.writeJSONFile(path.join(testSrc, 'tsconfig.json'), tsData); // Git remove old tests infra ['karma-cov.conf.js', 'karma.conf.js', 'run-test.py'].forEach(fname => { - utils.run(`git rm -f ./test-${name}/${fname}`); + utils.run(`git rm -f ./test-${name}/${fname} || true`); }); -// Copy run.py from coreutils -fs.copySync(path.join(coreUtils, 'run.py'), path.join(testSrc, 'run.py')); +// Copy common files from coreutils +['run.py', 'babel.config.js'].forEach(fname => { + fs.copySync(path.join(coreUtils, fname), path.join(testSrc, fname)); +}); // Add new files to git utils.run(`git add ./test-${name}/run.py ./test-${name}/jest.config.js`); diff --git a/tests/karma-cov.conf.js b/tests/karma-cov.conf.js index 2b3ac0f9..e1d6224d 100644 --- a/tests/karma-cov.conf.js +++ b/tests/karma-cov.conf.js @@ -8,7 +8,10 @@ module.exports = function(config) { // instrument only testing sources with Istanbul { test: /\.js$/, - use: { loader: 'istanbul-instrumenter-loader' }, + use: { + loader: 'istanbul-instrumenter-loader', + options: { esModules: true } + }, include: process.env.KARMA_COVER_FOLDER } ); diff --git a/tests/package.json b/tests/package.json index de5852e5..1471f3d5 100644 --- a/tests/package.json +++ b/tests/package.json @@ -1,31 +1,32 @@ { "name": "@jupyterlab/test-root", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/completer": "^1.0.0-alpha.3", - "@jupyterlab/console": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/csvviewer": "^1.0.0-alpha.3", - "@jupyterlab/docmanager": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/filebrowser": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor": "^1.0.0-alpha.3", - "@jupyterlab/imageviewer": "^1.0.0-alpha.3", - "@jupyterlab/inspector": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu": "^1.0.0-alpha.3", - "@jupyterlab/mathjax2-extension": "^1.0.0-alpha.3", - "@jupyterlab/notebook": "^1.0.0-alpha.4", - "@jupyterlab/observables": "^2.2.0-alpha.3", - "@jupyterlab/outputarea": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/terminal": "^1.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@babel/preset-env": "^7.4.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/cells": "^1.0.0-alpha.10", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/completer": "^1.0.0-alpha.9", + "@jupyterlab/console": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/csvviewer": "^1.0.0-alpha.9", + "@jupyterlab/docmanager": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/filebrowser": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor": "^1.0.0-alpha.9", + "@jupyterlab/imageviewer": "^1.0.0-alpha.9", + "@jupyterlab/inspector": "^1.0.0-alpha.9", + "@jupyterlab/mainmenu": "^1.0.0-alpha.9", + "@jupyterlab/mathjax2-extension": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/observables": "^2.2.0-alpha.9", + "@jupyterlab/outputarea": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/terminal": "^1.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/commands": "^1.6.1", "@phosphor/coreutils": "^1.3.0", @@ -34,40 +35,41 @@ "@phosphor/messaging": "^1.2.2", "@phosphor/signaling": "^1.2.2", "@phosphor/virtualdom": "^1.1.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", "expect.js": "~0.3.1", "json-to-html": "~0.1.2", - "react": "~16.4.2", + "karma-babel-preprocessor": "^8.0.0", + "react": "~16.8.4", "simulate-event": "~1.4.0" }, "devDependencies": { - "css-loader": "~0.28.7", - "es6-promise": "~4.1.1", - "file-loader": "~1.1.11", - "fork-ts-checker-webpack-plugin": "^0.4.2", - "fs-extra": "~4.0.2", + "css-loader": "~2.1.1", + "es6-promise": "~4.2.6", + "file-loader": "~3.0.1", + "fork-ts-checker-webpack-plugin": "^1.3.4", + "fs-extra": "^8.0.1", "istanbul-instrumenter-loader": "~3.0.0", "json-loader": "^0.5.7", - "karma": "~2.0.4", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", - "karma-coverage": "~0.5.5", - "karma-coverage-istanbul-reporter": "~1.3.1", - "karma-firefox-launcher": "~0.1.7", - "karma-ie-launcher": "~0.2.0", - "karma-mocha": "~0.2.2", - "karma-mocha-reporter": "~1.3.0", + "karma-coverage": "^1.1.2", + "karma-coverage-istanbul-reporter": "^2.0.5", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", "karma-sourcemap-loader": "~0.3.7", - "karma-webpack": "~2.0.9", - "mocha": "~3.5.3", - "puppeteer": "^1.5.0", - "raw-loader": "~0.5.1", + "karma-webpack": "^3.0.5", + "mocha": "^6.1.4", + "puppeteer": "~1.17.0", + "raw-loader": "~2.0.0", "rimraf": "~2.6.2", - "style-loader": "~0.21.0", - "thread-loader": "^1.1.5", - "ts-loader": "~5.0.0", - "typescript": "~3.3.1", - "url-loader": "~1.0.1", - "webpack": "~4.12.0" + "style-loader": "~0.23.1", + "thread-loader": "^2.1.2", + "ts-loader": "^6.0.2", + "typescript": "~3.5.1", + "url-loader": "~1.1.2", + "webpack": "^4.32.2" } } diff --git a/tests/test-application/babel.config.js b/tests/test-application/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-application/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-application/package.json b/tests/test-application/package.json index 89e2ef6c..2dfa1546 100644 --- a/tests/test-application/package.json +++ b/tests/test-application/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-application", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,24 +12,24 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/application": "^1.0.0-alpha.3", - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/application": "^1.0.0-alpha.9", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/commands": "^1.6.1", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", "simulate-event": "~1.4.0", - "ts-jest": "^23.1.4" + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-application/src/layoutrestorer.spec.ts b/tests/test-application/src/layoutrestorer.spec.ts index b99acd13..db201bdd 100644 --- a/tests/test-application/src/layoutrestorer.spec.ts +++ b/tests/test-application/src/layoutrestorer.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { ILabShell, LayoutRestorer } from '@jupyterlab/application/src'; +import { ILabShell, LayoutRestorer } from '@jupyterlab/application'; import { InstanceTracker } from '@jupyterlab/apputils'; @@ -15,8 +15,6 @@ import { PromiseDelegate } from '@phosphor/coreutils'; import { DockPanel, Widget } from '@phosphor/widgets'; -const NAMESPACE = 'jupyterlab-layout-restorer-tests'; - describe('apputils', () => { describe('LayoutRestorer', () => { describe('#constructor()', () => { @@ -24,7 +22,7 @@ describe('apputils', () => { const restorer = new LayoutRestorer({ first: Promise.resolve(void 0), registry: new CommandRegistry(), - state: new StateDB({ namespace: NAMESPACE }) + state: new StateDB() }); expect(restorer).to.be.an.instanceof(LayoutRestorer); }); @@ -35,7 +33,7 @@ describe('apputils', () => { const restorer = new LayoutRestorer({ first: Promise.resolve(void 0), registry: new CommandRegistry(), - state: new StateDB({ namespace: NAMESPACE }) + state: new StateDB() }); expect(restorer.restored).to.be.an.instanceof(Promise); }); @@ -45,7 +43,7 @@ describe('apputils', () => { const restorer = new LayoutRestorer({ first: ready.promise, registry: new CommandRegistry(), - state: new StateDB({ namespace: NAMESPACE }) + state: new StateDB() }); let promise = restorer.restored; ready.resolve(void 0); @@ -59,7 +57,7 @@ describe('apputils', () => { const restorer = new LayoutRestorer({ first: ready.promise, registry: new CommandRegistry(), - state: new StateDB({ namespace: NAMESPACE }) + state: new StateDB() }); const currentWidget = new Widget(); const mode: DockPanel.Mode = 'single-document'; @@ -83,7 +81,7 @@ describe('apputils', () => { const restorer = new LayoutRestorer({ first: Promise.resolve(void 0), registry: new CommandRegistry(), - state: new StateDB({ namespace: NAMESPACE }) + state: new StateDB() }); const layout = await restorer.fetch(); expect(layout).to.not.equal(null); @@ -94,7 +92,7 @@ describe('apputils', () => { const restorer = new LayoutRestorer({ first: ready.promise, registry: new CommandRegistry(), - state: new StateDB({ namespace: NAMESPACE }) + state: new StateDB() }); const currentWidget = new Widget(); // The `fresh` attribute is only here to check against the return value. @@ -123,7 +121,7 @@ describe('apputils', () => { namespace: 'foo-widget' }); const registry = new CommandRegistry(); - const state = new StateDB({ namespace: NAMESPACE }); + const state = new StateDB(); const ready = new PromiseDelegate(); const restorer = new LayoutRestorer({ first: ready.promise, @@ -157,7 +155,7 @@ describe('apputils', () => { // no op }), registry: new CommandRegistry(), - state: new StateDB({ namespace: NAMESPACE }) + state: new StateDB() }); const dehydrated: ILabShell.ILayout = { mainArea: { currentWidget: null, dock: null, mode: null }, @@ -176,7 +174,7 @@ describe('apputils', () => { const restorer = new LayoutRestorer({ first: ready.promise, registry: new CommandRegistry(), - state: new StateDB({ namespace: NAMESPACE }) + state: new StateDB() }); const currentWidget = new Widget(); // The `fresh` attribute is only here to check against the return value. diff --git a/tests/test-application/src/router.spec.ts b/tests/test-application/src/router.spec.ts index cd73ca68..68b9fd45 100644 --- a/tests/test-application/src/router.spec.ts +++ b/tests/test-application/src/router.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { Router } from '@jupyterlab/application/src'; +import { Router } from '@jupyterlab/application'; import { CommandRegistry } from '@phosphor/commands'; diff --git a/tests/test-application/src/shell.spec.ts b/tests/test-application/src/shell.spec.ts index 947ef0e0..5673aa45 100644 --- a/tests/test-application/src/shell.spec.ts +++ b/tests/test-application/src/shell.spec.ts @@ -11,7 +11,7 @@ import { Widget } from '@phosphor/widgets'; import { simulate } from 'simulate-event'; -import { LabShell } from '@jupyterlab/application/src'; +import { LabShell } from '@jupyterlab/application'; class ContentWidget extends Widget { activated = false; @@ -24,6 +24,12 @@ class ContentWidget extends Widget { describe('LabShell', () => { let shell: LabShell; + beforeAll(() => { + console.log( + 'Expecting 5 console errors logged in this suite: "Widgets added to app shell must have unique id property."' + ); + }); + beforeEach(() => { shell = new LabShell(); Widget.attach(shell, document.body); diff --git a/tests/test-apputils/babel.config.js b/tests/test-apputils/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-apputils/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-apputils/package.json b/tests/test-apputils/package.json index a85b653f..36fb860b 100644 --- a/tests/test-apputils/package.json +++ b/tests/test-apputils/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-apputils", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,26 +12,26 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/commands": "^1.6.1", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", "@phosphor/virtualdom": "^1.1.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "react": "~16.4.2", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "react": "~16.8.4", "simulate-event": "~1.4.0", - "ts-jest": "^23.1.4" + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-apputils/src/clientsession.spec.ts b/tests/test-apputils/src/clientsession.spec.ts index 84308f72..69564309 100644 --- a/tests/test-apputils/src/clientsession.spec.ts +++ b/tests/test-apputils/src/clientsession.spec.ts @@ -5,11 +5,15 @@ import { expect } from 'chai'; import { SessionManager } from '@jupyterlab/services'; -import { ClientSession, IClientSession } from '@jupyterlab/apputils/src'; +import { ClientSession, Dialog, IClientSession } from '@jupyterlab/apputils'; import { UUID } from '@phosphor/coreutils'; -import { acceptDialog, dismissDialog } from '@jupyterlab/testutils'; +import { + acceptDialog, + dismissDialog, + testEmission +} from '@jupyterlab/testutils'; describe('@jupyterlab/apputils', () => { describe('ClientSession', () => { @@ -19,6 +23,7 @@ describe('@jupyterlab/apputils', () => { beforeAll(() => manager.ready); beforeEach(() => { + Dialog.flush(); session = new ClientSession({ manager, kernelPreference: { name: manager.specs.default } @@ -26,7 +31,12 @@ describe('@jupyterlab/apputils', () => { }); afterEach(async () => { - await session.shutdown(); + Dialog.flush(); + try { + await session.shutdown(); + } catch (error) { + console.warn('Session shutdown failed.', error); + } session.dispose(); }); @@ -186,11 +196,13 @@ describe('@jupyterlab/apputils', () => { await session.initialize(); expect(other.kernel.id).to.equal(session.kernel.id); + await other.shutdown(); other.dispose(); }); it('should connect to an existing kernel', async () => { - // Dispose the session so it can be re-instantiated. + // Shut down and dispose the session so it can be re-instantiated. + await session.shutdown(); session.dispose(); const other = await manager.startNew({ path: UUID.uuid4() }); @@ -199,6 +211,8 @@ describe('@jupyterlab/apputils', () => { session = new ClientSession({ manager, kernelPreference }); await session.initialize(); expect(session.kernel.id).to.equal(other.kernel.id); + // We don't call other.shutdown() here because that + // is handled by the afterEach() handler above. other.dispose(); }); @@ -302,26 +316,20 @@ describe('@jupyterlab/apputils', () => { }); describe('#restart()', () => { - it( - 'should restart if the user accepts the dialog', - async () => { - let called = false; - - await session.initialize(); - session.statusChanged.connect((sender, args) => { - if (args === 'restarting') { - called = true; - } - }); - - const restart = session.restart(); - - await acceptDialog(); - expect(await restart).to.equal(true); - expect(called).to.equal(true); - }, - 30000 - ); + it('should restart if the user accepts the dialog', async () => { + const emission = testEmission(session.statusChanged, { + find: (_, args) => args === 'restarting' + }); + await session.initialize(); + await session.kernel.ready; + const restart = session.restart(); + + await acceptDialog(); + expect(await restart).to.equal(true); + await emission; + // Wait for the restarted kernel to be ready + await session.kernel.ready; + }); it('should not restart if the user rejects the dialog', async () => { let called = false; @@ -373,47 +381,41 @@ describe('@jupyterlab/apputils', () => { }); describe('#restartKernel()', () => { - it( - 'should restart if the user accepts the dialog', - async () => { - let called = false; - - session.statusChanged.connect((sender, args) => { - if (args === 'restarting') { - called = true; - } - }); - await session.initialize(); - - const restart = ClientSession.restartKernel(session.kernel); - - await acceptDialog(); - await restart; - expect(called).to.equal(true); - }, - 30000 - ); // Allow for slower CI - - it( - 'should not restart if the user rejects the dialog', - async () => { - let called = false; - - await session.initialize(); - session.statusChanged.connect((sender, args) => { - if (args === 'restarting') { - called = true; - } - }); - - const restart = ClientSession.restartKernel(session.kernel); - - await dismissDialog(); - await restart; - expect(called).to.equal(false); - }, - 30000 - ); // Allow for slower CI + it('should restart if the user accepts the dialog', async () => { + let called = false; + + session.statusChanged.connect((sender, args) => { + if (args === 'restarting') { + called = true; + } + }); + await session.initialize(); + await session.kernel.ready; + + const restart = ClientSession.restartKernel(session.kernel); + + await acceptDialog(); + expect(await restart).to.equal(true); + expect(called).to.equal(true); + }, 30000); // Allow for slower CI + + it('should not restart if the user rejects the dialog', async () => { + let called = false; + + session.statusChanged.connect((sender, args) => { + if (args === 'restarting') { + called = true; + } + }); + await session.initialize(); + await session.kernel.ready; + + const restart = ClientSession.restartKernel(session.kernel); + + await dismissDialog(); + expect(await restart).to.equal(false); + expect(called).to.equal(false); + }, 30000); // Allow for slower CI }); describe('.getDefaultKernel()', () => { diff --git a/tests/test-apputils/src/commandlinker.spec.ts b/tests/test-apputils/src/commandlinker.spec.ts index 267516af..d1da67cb 100644 --- a/tests/test-apputils/src/commandlinker.spec.ts +++ b/tests/test-apputils/src/commandlinker.spec.ts @@ -9,7 +9,7 @@ import { h, VirtualNode, VirtualDOM } from '@phosphor/virtualdom'; import { simulate } from 'simulate-event'; -import { CommandLinker } from '@jupyterlab/apputils/src'; +import { CommandLinker } from '@jupyterlab/apputils'; describe('@jupyterlab/apputils', () => { describe('CommandLinker', () => { diff --git a/tests/test-apputils/src/dialog.spec.tsx b/tests/test-apputils/src/dialog.spec.tsx index 2966294f..71c700ce 100644 --- a/tests/test-apputils/src/dialog.spec.tsx +++ b/tests/test-apputils/src/dialog.spec.tsx @@ -1,9 +1,9 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { expect } from 'chai'; +// import { expect } from 'chai'; -import { Dialog, showDialog } from '@jupyterlab/apputils/src'; +import { Dialog, showDialog } from '@jupyterlab/apputils'; import { each } from '@phosphor/algorithm'; @@ -66,7 +66,7 @@ describe('@jupyterlab/apputils', () => { describe('#constructor()', () => { it('should create a new dialog', () => { - expect(dialog).to.be.an.instanceof(Dialog); + expect(dialog).toBeInstanceOf(Dialog); }); it('should accept options', () => { @@ -76,20 +76,20 @@ describe('@jupyterlab/apputils', () => { buttons: [Dialog.okButton()] }); - expect(dialog).to.be.an.instanceof(Dialog); + expect(dialog).toBeInstanceOf(Dialog); dialog.dispose(); }); }); describe('#launch()', () => { - it('should attach the dialog to the host', async () => { + it.skip('should attach the dialog to the host', async () => { const host = document.createElement('div'); const dialog = new TestDialog({ host }); document.body.appendChild(host); - dialog.launch(); - await waitForDialog(); - expect(host.firstChild).to.equal(dialog.node); + void dialog.launch(); + await waitForDialog(host); + expect(host.contains(dialog.node)).toBe(true); dialog.dispose(); document.body.removeChild(host); }); @@ -99,15 +99,15 @@ describe('@jupyterlab/apputils', () => { await waitForDialog(); dialog.resolve(); - expect((await prompt).button.accept).to.equal(true); + expect((await prompt).button.accept).toBe(true); }); - it('should resolve with `false` when accepted', async () => { + it('should resolve with `false` when rejected', async () => { const prompt = dialog.launch(); await waitForDialog(); dialog.reject(); - expect((await prompt).button.accept).to.equal(false); + expect((await prompt).button.accept).toBe(false); }); it('should resolve with `false` when closed', async () => { @@ -115,7 +115,7 @@ describe('@jupyterlab/apputils', () => { await waitForDialog(); dialog.close(); - expect((await prompt).button.accept).to.equal(false); + expect((await prompt).button.accept).toBe(false); }); it('should return focus to the original focused element', async () => { @@ -123,15 +123,15 @@ describe('@jupyterlab/apputils', () => { document.body.appendChild(input); input.focus(); - expect(document.activeElement).to.equal(input); + expect(document.activeElement).toBe(input); const prompt = dialog.launch(); await waitForDialog(); - expect(document.activeElement).to.not.equal(input); + expect(document.activeElement).not.toBe(input); dialog.resolve(); await prompt; - expect(document.activeElement).to.equal(input); + expect(document.activeElement).toBe(input); document.body.removeChild(input); }); }); @@ -142,7 +142,7 @@ describe('@jupyterlab/apputils', () => { await waitForDialog(); dialog.resolve(); - expect((await prompt).button.accept).to.equal(true); + expect((await prompt).button.accept).toBe(true); }); it('should resolve with the item at the given index', async () => { @@ -150,7 +150,7 @@ describe('@jupyterlab/apputils', () => { await waitForDialog(); dialog.resolve(0); - expect((await prompt).button.accept).to.equal(false); + expect((await prompt).button.accept).toBe(false); }); }); @@ -163,8 +163,8 @@ describe('@jupyterlab/apputils', () => { const result = await prompt; - expect(result.button.label).to.equal('CANCEL'); - expect(result.button.accept).to.equal(false); + expect(result.button.label).toBe('CANCEL'); + expect(result.button.accept).toBe(false); }); }); @@ -175,7 +175,7 @@ describe('@jupyterlab/apputils', () => { await waitForDialog(); simulate(dialog.node, 'keydown', { keyCode: 27 }); - expect((await prompt).button.accept).to.equal(false); + expect((await prompt).button.accept).toBe(false); }); it('should accept on enter key', async () => { @@ -183,18 +183,18 @@ describe('@jupyterlab/apputils', () => { await waitForDialog(); simulate(dialog.node, 'keydown', { keyCode: 13 }); - expect((await prompt).button.accept).to.equal(true); + expect((await prompt).button.accept).toBe(true); }); it('should cycle to the first button on a tab key', async () => { const prompt = dialog.launch(); await waitForDialog(); - expect(document.activeElement.className).to.contain('jp-mod-accept'); + expect(document.activeElement.className).toContain('jp-mod-accept'); simulate(dialog.node, 'keydown', { keyCode: 9 }); - expect(document.activeElement.className).to.contain('jp-mod-reject'); + expect(document.activeElement.className).toContain('jp-mod-reject'); simulate(document.activeElement, 'click'); - expect((await prompt).button.accept).to.equal(false); + expect((await prompt).button.accept).toBe(false); }); }); @@ -206,9 +206,9 @@ describe('@jupyterlab/apputils', () => { const canceled = !dialog.node.dispatchEvent(generate('contextmenu')); - expect(canceled).to.equal(true); + expect(canceled).toBe(true); simulate(dialog.node, 'keydown', { keyCode: 27 }); - expect((await prompt).button.accept).to.equal(false); + expect((await prompt).button.accept).toBe(false); }); }); @@ -220,7 +220,7 @@ describe('@jupyterlab/apputils', () => { const canceled = !dialog.node.dispatchEvent(generate('click')); - expect(canceled).to.equal(true); + expect(canceled).toBe(true); dialog.resolve(); await prompt; }); @@ -230,7 +230,7 @@ describe('@jupyterlab/apputils', () => { await waitForDialog(); simulate(dialog.node.querySelector('.jp-mod-reject'), 'click'); - expect((await prompt).button.accept).to.equal(false); + expect((await prompt).button.accept).toBe(false); }); }); @@ -244,14 +244,14 @@ describe('@jupyterlab/apputils', () => { document.body.appendChild(target); document.body.appendChild(host); target.focus(); - expect(document.activeElement).to.equal(target); + expect(document.activeElement).toBe(target); const prompt = dialog.launch(); await waitForDialog(); simulate(target, 'focus'); - expect(document.activeElement).to.not.equal(target); - expect(document.activeElement.className).to.contain('jp-mod-accept'); + expect(document.activeElement).not.toBe(target); + expect(document.activeElement.className).toContain('jp-mod-accept'); dialog.resolve(); await prompt; dialog.dispose(); @@ -262,16 +262,16 @@ describe('@jupyterlab/apputils', () => { describe('#onAfterAttach()', () => { it('should attach event listeners', () => { Widget.attach(dialog, document.body); - expect(dialog.methods).to.contain('onAfterAttach'); + expect(dialog.methods).toContain('onAfterAttach'); ['keydown', 'contextmenu', 'click', 'focus'].forEach(event => { simulate(dialog.node, event); - expect(dialog.events).to.contain(event); + expect(dialog.events).toContain(event); }); }); it('should focus the default button', () => { Widget.attach(dialog, document.body); - expect(document.activeElement.className).to.contain('jp-mod-accept'); + expect(document.activeElement.className).toContain('jp-mod-accept'); }); it('should focus the primary element', () => { @@ -283,7 +283,7 @@ describe('@jupyterlab/apputils', () => { const dialog = new TestDialog({ body, focusNodeSelector: 'input' }); Widget.attach(dialog, document.body); - expect(document.activeElement.localName).to.equal('input'); + expect(document.activeElement.localName).toBe('input'); dialog.dispose(); }); }); @@ -292,11 +292,11 @@ describe('@jupyterlab/apputils', () => { it('should remove event listeners', () => { Widget.attach(dialog, document.body); Widget.detach(dialog); - expect(dialog.methods).to.contain('onAfterDetach'); + expect(dialog.methods).toContain('onAfterDetach'); dialog.events = []; ['keydown', 'contextmenu', 'click', 'focus'].forEach(event => { simulate(dialog.node, event); - expect(dialog.events).to.not.contain(event); + expect(dialog.events).not.toContain(event); }); }); @@ -307,7 +307,7 @@ describe('@jupyterlab/apputils', () => { input.focus(); Widget.attach(dialog, document.body); Widget.detach(dialog); - expect(document.activeElement).to.equal(input); + expect(document.activeElement).toBe(input); document.body.removeChild(input); }); }); @@ -318,13 +318,13 @@ describe('@jupyterlab/apputils', () => { await waitForDialog(); dialog.close(); - expect((await prompt).button.accept).to.equal(false); + expect((await prompt).button.accept).toBe(false); }); }); describe('.defaultRenderer', () => { it('should be an instance of a Renderer', () => { - expect(Dialog.defaultRenderer).to.be.an.instanceof(Dialog.Renderer); + expect(Dialog.defaultRenderer).toBeInstanceOf(Dialog.Renderer); }); }); @@ -345,7 +345,7 @@ describe('@jupyterlab/apputils', () => { it('should create the header of the dialog', () => { const widget = renderer.createHeader('foo'); - expect(widget.hasClass('jp-Dialog-header')).to.equal(true); + expect(widget.hasClass('jp-Dialog-header')).toBe(true); }); }); @@ -353,8 +353,8 @@ describe('@jupyterlab/apputils', () => { it('should create the body from a string', () => { const widget = renderer.createBody('foo'); - expect(widget.hasClass('jp-Dialog-body')).to.equal(true); - expect(widget.node.firstChild.textContent).to.equal('foo'); + expect(widget.hasClass('jp-Dialog-body')).toBe(true); + expect(widget.node.firstChild.textContent).toBe('foo'); }); it('should create the body from a virtual node', () => { @@ -373,9 +373,9 @@ describe('@jupyterlab/apputils', () => { const select = widget.node.querySelector('select'); Widget.attach(widget, document.body); - expect(button.className).to.contain('jp-mod-styled'); - expect(input.className).to.contain('jp-mod-styled'); - expect(select.className).to.contain('jp-mod-styled'); + expect(button.className).toContain('jp-mod-styled'); + expect(input.className).toContain('jp-mod-styled'); + expect(select.className).toContain('jp-mod-styled'); widget.dispose(); }); @@ -383,7 +383,7 @@ describe('@jupyterlab/apputils', () => { const body = new Widget(); renderer.createBody(body); - expect(body.hasClass('jp-Dialog-body')).to.equal(true); + expect(body.hasClass('jp-Dialog-body')).toBe(true); }); }); @@ -396,14 +396,12 @@ describe('@jupyterlab/apputils', () => { const footer = renderer.createFooter(nodes); const buttonNodes = footer.node.querySelectorAll('button'); - expect(footer.hasClass('jp-Dialog-footer')).to.equal(true); - expect(footer.node.contains(nodes[0])).to.equal(true); - expect(footer.node.contains(nodes[1])).to.equal(true); - - // tslint:disable-next-line - expect(buttonNodes.length).to.be.ok; + expect(footer.hasClass('jp-Dialog-footer')).toBe(true); + expect(footer.node.contains(nodes[0])).toBe(true); + expect(footer.node.contains(nodes[1])).toBe(true); + expect(buttonNodes.length).toBeGreaterThan(0); each(buttonNodes, (node: Element) => { - expect(node.className).to.contain('jp-mod-styled'); + expect(node.className).toContain('jp-mod-styled'); }); }); }); @@ -411,45 +409,43 @@ describe('@jupyterlab/apputils', () => { describe('#createButtonNode()', () => { it('should create a button node for the dialog', () => { let node = renderer.createButtonNode(data); - expect(node.className).to.contain('jp-Dialog-button'); - // tslint:disable-next-line - expect(node.querySelector('.jp-Dialog-buttonIcon')).to.be.ok; - // tslint:disable-next-line - expect(node.querySelector('.jp-Dialog-buttonLabel')).to.be.ok; + expect(node.className).toContain('jp-Dialog-button'); + expect(node.querySelector('.jp-Dialog-buttonIcon')).toBeTruthy(); + expect(node.querySelector('.jp-Dialog-buttonLabel')).toBeTruthy(); }); }); describe('#renderIcon()', () => { it('should render an icon element for a dialog item', () => { let node = renderer.renderIcon(data); - expect(node.className).to.contain('jp-Dialog-buttonIcon'); - expect(node.textContent).to.equal('foo'); + expect(node.className).toContain('jp-Dialog-buttonIcon'); + expect(node.textContent).toBe('foo'); }); }); describe('#createItemClass()', () => { it('should create the class name for the button', () => { let value = renderer.createItemClass(data); - expect(value).to.contain('jp-Dialog-button'); - expect(value).to.contain('jp-mod-reject'); - expect(value).to.contain(data.className); + expect(value).toContain('jp-Dialog-button'); + expect(value).toContain('jp-mod-reject'); + expect(value).toContain(data.className); }); }); describe('#createIconClass()', () => { it('should create the class name for the button icon', () => { let value = renderer.createIconClass(data); - expect(value).to.contain('jp-Dialog-buttonIcon'); - expect(value).to.contain(data.iconClass); + expect(value).toContain('jp-Dialog-buttonIcon'); + expect(value).toContain(data.iconClass); }); }); describe('#renderLabel()', () => { it('should render a label element for a button', () => { let node = renderer.renderLabel(data); - expect(node.className).to.equal('jp-Dialog-buttonLabel'); - expect(node.title).to.equal(data.caption); - expect(node.textContent).to.equal(data.label); + expect(node.className).toBe('jp-Dialog-buttonLabel'); + expect(node.title).toBe(data.caption); + expect(node.textContent).toBe(data.label); }); }); }); @@ -460,7 +456,7 @@ describe('@jupyterlab/apputils', () => { const dialog = showDialog(); await dismissDialog(); - expect((await dialog).button.accept).to.equal(false); + expect((await dialog).button.accept).toBe(false); }); it('should accept dialog options', async () => { @@ -480,8 +476,8 @@ describe('@jupyterlab/apputils', () => { const result = await prompt; - expect(result.button.accept).to.equal(false); - expect(result.value).to.equal(null); + expect(result.button.accept).toBe(false); + expect(result.value).toBe(null); document.body.removeChild(node); }); @@ -498,8 +494,8 @@ describe('@jupyterlab/apputils', () => { const result = await prompt; - expect(result.button.accept).to.equal(true); - expect(result.value).to.equal(null); + expect(result.button.accept).toBe(true); + expect(result.value).toBe(null); }); it('should accept a widget body', async () => { @@ -509,8 +505,8 @@ describe('@jupyterlab/apputils', () => { const result = await prompt; - expect(result.button.accept).to.equal(true); - expect(result.value).to.equal(null); + expect(result.button.accept).toBe(true); + expect(result.value).toBe(null); }); it('should give the value from the widget', async () => { @@ -520,8 +516,8 @@ describe('@jupyterlab/apputils', () => { const result = await prompt; - expect(result.button.accept).to.equal(true); - expect(result.value).to.equal('foo'); + expect(result.button.accept).toBe(true); + expect(result.value).toBe('foo'); }); }); }); diff --git a/tests/test-apputils/src/iframe.spec.ts b/tests/test-apputils/src/iframe.spec.ts index 63d7c77e..444d696d 100644 --- a/tests/test-apputils/src/iframe.spec.ts +++ b/tests/test-apputils/src/iframe.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { IFrame } from '@jupyterlab/apputils/src'; +import { IFrame } from '@jupyterlab/apputils'; describe('@jupyterlab/apputils', () => { describe('IFrame', () => { diff --git a/tests/test-apputils/src/inputdialog.spec.ts b/tests/test-apputils/src/inputdialog.spec.ts new file mode 100644 index 00000000..1d8d7f51 --- /dev/null +++ b/tests/test-apputils/src/inputdialog.spec.ts @@ -0,0 +1,197 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import { getItem, getText, getNumber } from '@jupyterlab/apputils'; + +import { + acceptDialog, + dismissDialog, + waitForDialog +} from '@jupyterlab/testutils'; + +describe('@jupyterlab/apputils', () => { + describe('getItem()', () => { + it('should accept at least two arguments', async () => { + const dialog = getItem({ + label: 'list', + items: ['item1'] + }); + + await dismissDialog(); + expect((await dialog).button.accept).toBe(false); + }); + + it('should accept options', async () => { + const dialog = getItem({ + label: 'list', + items: ['item1', 'item2'], + current: 1, + editable: false, + title: 'Pick a choice', + placeholder: 'item' + }); + + await acceptDialog(); + + const result = await dialog; + + expect(result.button.accept).toBe(true); + expect(result.value).toBe('item2'); + }); + + it('should be editable', async () => { + const node = document.createElement('div'); + + document.body.appendChild(node); + + const prompt = getItem({ + label: 'list', + items: ['item1', 'item2'], + title: 'Pick a choice', + placeholder: 'item', + editable: true, + host: node + }); + + await waitForDialog(node); + const body = node.getElementsByClassName('jp-Input-Dialog').item(0); + const input = body.getElementsByTagName('input').item(0); + input.value = 'item3'; + + await acceptDialog(); + + const result = await prompt; + + expect(result.button.accept).toBe(true); + expect(result.value).toBe('item3'); + document.body.removeChild(node); + }); + }); + + describe('getText()', () => { + it('should accept at least one argument', async () => { + const dialog = getText({ + label: 'text' + }); + + await dismissDialog(); + expect((await dialog).button.accept).toBe(false); + }); + + it('should accept options', async () => { + const dialog = getText({ + label: 'text', + title: 'Give a text', + placeholder: 'your text', + text: 'answer' + }); + + await acceptDialog(); + + const result = await dialog; + + expect(result.button.accept).toBe(true); + expect(result.value).toBe('answer'); + }); + + it('should be editable', async () => { + const node = document.createElement('div'); + + document.body.appendChild(node); + + const prompt = getText({ + label: 'text', + host: node + }); + + await waitForDialog(node); + const body = node.getElementsByClassName('jp-Input-Dialog').item(0); + const input = body.getElementsByTagName('input').item(0); + input.value = 'my answer'; + + await acceptDialog(); + + const result = await prompt; + + expect(result.button.accept).toBe(true); + expect(result.value).toBe('my answer'); + document.body.removeChild(node); + }); + }); + + describe('getNumber()', () => { + it('should accept at least one argument', async () => { + const dialog = getNumber({ + label: 'number' + }); + + await dismissDialog(); + expect((await dialog).button.accept).toBe(false); + }); + + it('should accept options', async () => { + const dialog = getNumber({ + label: 'number', + title: 'Pick a number', + value: 10 + }); + + await acceptDialog(); + + const result = await dialog; + + expect(result.button.accept).toBe(true); + expect(result.value).toBe(10); + }); + + it('should be editable', async () => { + const node = document.createElement('div'); + + document.body.appendChild(node); + + const prompt = getNumber({ + label: 'text', + title: 'Pick a number', + host: node + }); + + await waitForDialog(node); + const body = node.getElementsByClassName('jp-Input-Dialog').item(0); + const input = body.getElementsByTagName('input').item(0); + input.value = '25'; + + await acceptDialog(); + + const result = await prompt; + + expect(result.button.accept).toBe(true); + expect(result.value).toBe(25); + document.body.removeChild(node); + }); + + it('should return NaN if empty', async () => { + const node = document.createElement('div'); + + document.body.appendChild(node); + + const prompt = getNumber({ + label: 'text', + title: 'Pick a number', + host: node + }); + + await waitForDialog(node); + const body = node.getElementsByClassName('jp-Input-Dialog').item(0); + const input = body.getElementsByTagName('input').item(0); + input.value = ''; + + await acceptDialog(); + + const result = await prompt; + + expect(result.button.accept).toBe(true); + expect(result.value).toBe(Number.NaN); + document.body.removeChild(node); + }); + }); +}); diff --git a/tests/test-apputils/src/instancetracker.spec.ts b/tests/test-apputils/src/instancetracker.spec.ts index f5b18153..f68c7444 100644 --- a/tests/test-apputils/src/instancetracker.spec.ts +++ b/tests/test-apputils/src/instancetracker.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { InstanceTracker } from '@jupyterlab/apputils/src'; +import { InstanceTracker } from '@jupyterlab/apputils'; import { signalToPromise, testEmission } from '@jupyterlab/testutils'; @@ -50,7 +50,7 @@ describe('@jupyterlab/apputils', () => { Widget.attach(widget, document.body); widget.node.focus(); simulate(widget.node, 'focus'); - tracker.add(widget); + void tracker.add(widget); await promise; Widget.detach(widget); }); @@ -61,7 +61,7 @@ describe('@jupyterlab/apputils', () => { const tracker = new InstanceTracker({ namespace }); const widget = new Widget(); let promise = signalToPromise(tracker.widgetAdded); - tracker.add(widget); + void tracker.add(widget); const [sender, args] = await promise; expect(sender).to.equal(tracker); expect(args).to.equal(widget); @@ -81,7 +81,7 @@ describe('@jupyterlab/apputils', () => { return total === 1; } }); - tracker.add(one); + void tracker.add(one); tracker.inject(two); Widget.attach(two, document.body); two.node.focus(); @@ -101,7 +101,7 @@ describe('@jupyterlab/apputils', () => { const tracker = new InstanceTracker({ namespace }); const widget = new Widget(); widget.node.tabIndex = -1; - tracker.add(widget); + void tracker.add(widget); expect(tracker.currentWidget).to.equal(widget); widget.dispose(); }); @@ -110,9 +110,9 @@ describe('@jupyterlab/apputils', () => { const tracker = new InstanceTracker({ namespace }); const panel = new Panel(); const widget0 = createWidget(); - tracker.add(widget0); + void tracker.add(widget0); const widget1 = createWidget(); - tracker.add(widget1); + void tracker.add(widget1); panel.addWidget(widget0); panel.addWidget(widget1); Widget.attach(panel, document.body); @@ -128,9 +128,9 @@ describe('@jupyterlab/apputils', () => { it('should revert to the previously added widget on widget disposal', () => { const tracker = new TestTracker({ namespace }); const widget0 = new Widget(); - tracker.add(widget0); + void tracker.add(widget0); const widget1 = new Widget(); - tracker.add(widget1); + void tracker.add(widget1); expect(tracker.currentWidget).to.equal(widget1); widget1.dispose(); expect(tracker.currentWidget).to.equal(widget0); @@ -141,7 +141,7 @@ describe('@jupyterlab/apputils', () => { const tracker = new InstanceTracker({ namespace }); const widgets = [createWidget(), createWidget(), createWidget()]; each(widgets, widget => { - tracker.add(widget); + void tracker.add(widget); panel.addWidget(widget); }); Widget.attach(panel, document.body); @@ -168,7 +168,7 @@ describe('@jupyterlab/apputils', () => { const tracker = new InstanceTracker({ namespace }); const widgets = [createWidget(), createWidget(), createWidget()]; each(widgets, widget => { - tracker.add(widget); + void tracker.add(widget); panel.addWidget(widget); }); Widget.attach(panel, document.body); @@ -270,9 +270,9 @@ describe('@jupyterlab/apputils', () => { widgetA.id = 'A'; widgetB.id = 'B'; widgetC.id = 'C'; - tracker.add(widgetA); - tracker.add(widgetB); - tracker.add(widgetC); + void tracker.add(widgetA); + void tracker.add(widgetB); + void tracker.add(widgetC); expect(tracker.find(widget => widget.id === 'B')).to.equal(widgetB); }); @@ -284,9 +284,9 @@ describe('@jupyterlab/apputils', () => { widgetA.id = 'A'; widgetB.id = 'B'; widgetC.id = 'C'; - tracker.add(widgetA); - tracker.add(widgetB); - tracker.add(widgetC); + void tracker.add(widgetA); + void tracker.add(widgetB); + void tracker.add(widgetC); expect(tracker.find(widget => widget.id === 'D')).to.not.be.ok; }); }); @@ -300,9 +300,9 @@ describe('@jupyterlab/apputils', () => { widgetA.id = 'include-A'; widgetB.id = 'include-B'; widgetC.id = 'exclude-C'; - tracker.add(widgetA); - tracker.add(widgetB); - tracker.add(widgetC); + void tracker.add(widgetA); + void tracker.add(widgetB); + void tracker.add(widgetC); const list = tracker.filter( widget => widget.id.indexOf('include') !== -1 ); @@ -319,9 +319,9 @@ describe('@jupyterlab/apputils', () => { widgetA.id = 'A'; widgetB.id = 'B'; widgetC.id = 'C'; - tracker.add(widgetA); - tracker.add(widgetB); - tracker.add(widgetC); + void tracker.add(widgetA); + void tracker.add(widgetB); + void tracker.add(widgetC); expect(tracker.filter(widget => widget.id === 'D').length).to.equal(0); }); }); @@ -335,9 +335,9 @@ describe('@jupyterlab/apputils', () => { widgetA.id = 'A'; widgetB.id = 'B'; widgetC.id = 'C'; - tracker.add(widgetA); - tracker.add(widgetB); - tracker.add(widgetC); + void tracker.add(widgetA); + void tracker.add(widgetB); + void tracker.add(widgetC); tracker.forEach(widget => { visited += widget.id; }); @@ -350,7 +350,7 @@ describe('@jupyterlab/apputils', () => { const tracker = new InstanceTracker({ namespace }); const widget = new Widget(); expect(tracker.has(widget)).to.equal(false); - tracker.add(widget); + void tracker.add(widget); expect(tracker.has(widget)).to.equal(true); }); }); @@ -378,7 +378,7 @@ describe('@jupyterlab/apputils', () => { it('should be called when the current widget is changed', () => { const tracker = new TestTracker({ namespace }); const widget = new Widget(); - tracker.add(widget); + void tracker.add(widget); expect(tracker.methods).to.contain('onCurrentChanged'); }); }); diff --git a/tests/test-apputils/src/mainareawidget.spec.ts b/tests/test-apputils/src/mainareawidget.spec.ts index 7f996ec6..847fa9b8 100644 --- a/tests/test-apputils/src/mainareawidget.spec.ts +++ b/tests/test-apputils/src/mainareawidget.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { MainAreaWidget, Toolbar } from '@jupyterlab/apputils/src'; +import { MainAreaWidget, Toolbar } from '@jupyterlab/apputils'; import { MessageLoop } from '@phosphor/messaging'; diff --git a/tests/test-apputils/src/sanitizer.spec.ts b/tests/test-apputils/src/sanitizer.spec.ts index 53940369..f49f059a 100644 --- a/tests/test-apputils/src/sanitizer.spec.ts +++ b/tests/test-apputils/src/sanitizer.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { defaultSanitizer } from '@jupyterlab/apputils/src'; +import { defaultSanitizer } from '@jupyterlab/apputils'; describe('defaultSanitizer', () => { describe('#sanitize()', () => { @@ -108,14 +108,14 @@ describe('defaultSanitizer', () => { // Test unwanted inline CSS style stripping it('should allow harmless inline CSS', () => { - const div = '
'; + const div = '
'; expect(defaultSanitizer.sanitize(div)).to.equal(div); }); it("should strip 'content' properties from inline CSS", () => { const div = '
'; expect(defaultSanitizer.sanitize(div)).to.equal( - '
' + '
' ); }); diff --git a/tests/test-apputils/src/styling.spec.ts b/tests/test-apputils/src/styling.spec.ts index 226e6f9f..c4fd1357 100644 --- a/tests/test-apputils/src/styling.spec.ts +++ b/tests/test-apputils/src/styling.spec.ts @@ -7,7 +7,7 @@ import { VirtualDOM, h } from '@phosphor/virtualdom'; import { simulate } from 'simulate-event'; -import { Styling } from '@jupyterlab/apputils/src'; +import { Styling } from '@jupyterlab/apputils'; describe('@jupyterlab/apputils', () => { describe('Styling', () => { diff --git a/tests/test-apputils/src/toolbar.spec.ts b/tests/test-apputils/src/toolbar.spec.ts index f6ae788c..6f079b98 100644 --- a/tests/test-apputils/src/toolbar.spec.ts +++ b/tests/test-apputils/src/toolbar.spec.ts @@ -8,36 +8,29 @@ import { Toolbar, ToolbarButton, CommandToolbarButton -} from '@jupyterlab/apputils/src'; +} from '@jupyterlab/apputils'; import { toArray } from '@phosphor/algorithm'; import { CommandRegistry } from '@phosphor/commands'; -// import { ReadonlyJSONObject } from '@phosphor/coreutils'; - -// import { Message } from '@phosphor/messaging'; +import { ReadonlyJSONObject } from '@phosphor/coreutils'; import { Widget } from '@phosphor/widgets'; import { simulate } from 'simulate-event'; import { createClientSession, framePromise } from '@jupyterlab/testutils'; -import { ReadonlyJSONObject } from '@phosphor/coreutils'; describe('@jupyterlab/apputils', () => { let widget: Toolbar; - let session: ClientSession; beforeEach(async () => { widget = new Toolbar(); - session = await createClientSession(); }); afterEach(async () => { widget.dispose(); - await session.shutdown(); - session.dispose(); }); describe('Toolbar', () => { @@ -281,87 +274,102 @@ describe('@jupyterlab/apputils', () => { }); }); - describe('.createInterruptButton()', () => { - it("should have the `'jp-StopIcon'` class", async () => { - const button = Toolbar.createInterruptButton(session); - Widget.attach(button, document.body); - await framePromise(); - expect(button.node.querySelector('.jp-StopIcon')).to.exist; + describe('Kernel buttons', () => { + let session: ClientSession; + beforeEach(async () => { + session = await createClientSession(); }); - }); - describe('.createRestartButton()', () => { - it("should have the `'jp-RefreshIcon'` class", async () => { - const button = Toolbar.createRestartButton(session); - Widget.attach(button, document.body); - await framePromise(); - expect(button.node.querySelector('.jp-RefreshIcon')).to.exist; + afterEach(async () => { + await session.shutdown(); + session.dispose(); }); - }); - describe('.createKernelNameItem()', () => { - it("should display the `'display_name'` of the kernel", async () => { - const item = Toolbar.createKernelNameItem(session); - await session.initialize(); - Widget.attach(item, document.body); - await framePromise(); - expect( - (item.node.firstChild.lastChild as HTMLElement).textContent - ).to.equal(session.kernelDisplayName); + describe('.createInterruptButton()', () => { + it("should have the `'jp-StopIcon'` class", async () => { + const button = Toolbar.createInterruptButton(session); + Widget.attach(button, document.body); + await framePromise(); + expect(button.node.querySelector('.jp-StopIcon')).to.exist; + }); }); - it("should display `'No Kernel!'` if there is no kernel", async () => { - const item = Toolbar.createKernelNameItem(session); - Widget.attach(item, document.body); - await framePromise(); - expect( - (item.node.firstChild.lastChild as HTMLElement).textContent - ).to.equal('No Kernel!'); + describe('.createRestartButton()', () => { + it("should have the `'jp-RefreshIcon'` class", async () => { + const button = Toolbar.createRestartButton(session); + Widget.attach(button, document.body); + await framePromise(); + expect(button.node.querySelector('.jp-RefreshIcon')).to.exist; + }); }); - }); - describe('.createKernelStatusItem()', () => { - beforeEach(async () => { - await session.initialize(); - await session.kernel.ready; - }); - - it('should display a busy status if the kernel status is not idle', async () => { - const item = Toolbar.createKernelStatusItem(session); - let called = false; - const future = session.kernel.requestExecute({ code: 'a = 1' }); - future.onIOPub = msg => { - if (session.status === 'busy') { - expect(item.hasClass('jp-FilledCircleIcon')).to.equal(true); - called = true; - } - }; - await future.done; - expect(called).to.equal(true); - }); - - it('should show the current status in the node title', async () => { - const item = Toolbar.createKernelStatusItem(session); - const status = session.status; - expect(item.node.title.toLowerCase()).to.contain(status); - let called = false; - const future = session.kernel.requestExecute({ code: 'a = 1' }); - future.onIOPub = msg => { - if (session.status === 'busy') { - expect(item.node.title.toLowerCase()).to.contain('busy'); - called = true; - } - }; - await future.done; - expect(called).to.equal(true); - }); - - it('should handle a starting session', async () => { - await session.shutdown(); - session = await createClientSession(); - const item = Toolbar.createKernelStatusItem(session); - expect(item.node.title).to.equal('Kernel Starting'); - expect(item.hasClass('jp-FilledCircleIcon')).to.equal(true); + describe('.createKernelNameItem()', () => { + it("should display the `'display_name'` of the kernel", async () => { + const item = Toolbar.createKernelNameItem(session); + await session.initialize(); + Widget.attach(item, document.body); + await framePromise(); + expect( + (item.node.firstChild.lastChild as HTMLElement).textContent + ).to.equal(session.kernelDisplayName); + }); + + it("should display `'No Kernel!'` if there is no kernel", async () => { + const item = Toolbar.createKernelNameItem(session); + Widget.attach(item, document.body); + await framePromise(); + expect( + (item.node.firstChild.lastChild as HTMLElement).textContent + ).to.equal('No Kernel!'); + }); + }); + + describe('.createKernelStatusItem()', () => { + beforeEach(async () => { + await session.initialize(); + await session.kernel.ready; + }); + + it('should display a busy status if the kernel status is busy', async () => { + const item = Toolbar.createKernelStatusItem(session); + let called = false; + session.statusChanged.connect((_, status) => { + if (status === 'busy') { + expect(item.hasClass('jp-FilledCircleIcon')).to.equal(true); + called = true; + } + }); + const future = session.kernel.requestExecute({ code: 'a = 109\na' }); + await future.done; + expect(called).to.equal(true); + }); + + it('should show the current status in the node title', async () => { + const item = Toolbar.createKernelStatusItem(session); + const status = session.status; + expect(item.node.title.toLowerCase()).to.contain(status); + let called = false; + const future = session.kernel.requestExecute({ code: 'a = 1' }); + future.onIOPub = msg => { + if (session.status === 'busy') { + expect(item.node.title.toLowerCase()).to.contain('busy'); + called = true; + } + }; + await future.done; + expect(called).to.equal(true); + }); + + it('should handle a starting session', async () => { + await session.kernel.ready; + await session.shutdown(); + session = await createClientSession(); + const item = Toolbar.createKernelStatusItem(session); + expect(item.node.title).to.equal('Kernel Starting'); + expect(item.hasClass('jp-FilledCircleIcon')).to.equal(true); + await session.initialize(); + await session.kernel.ready; + }); }); }); }); @@ -417,7 +425,7 @@ describe('@jupyterlab/apputils', () => { }); Widget.attach(button, document.body); await framePromise(); - simulate(button.node.firstChild as HTMLElement, 'click'); + simulate(button.node.firstChild as HTMLElement, 'mousedown'); expect(called).to.equal(true); button.dispose(); }); diff --git a/tests/test-apputils/src/vdom.spec.ts b/tests/test-apputils/src/vdom.spec.ts index 447f15ae..791d64a4 100644 --- a/tests/test-apputils/src/vdom.spec.ts +++ b/tests/test-apputils/src/vdom.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { VDomModel, VDomRenderer } from '@jupyterlab/apputils/src'; +import { VDomModel, VDomRenderer } from '@jupyterlab/apputils'; import { framePromise } from '@jupyterlab/testutils'; diff --git a/tests/test-cells/babel.config.js b/tests/test-cells/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-cells/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-cells/package.json b/tests/test-cells/package.json index 8ea45912..8617c67d 100644 --- a/tests/test-cells/package.json +++ b/tests/test-cells/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-cells", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,24 +12,25 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/outputarea": "^1.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/cells": "^1.0.0-alpha.10", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/outputarea": "^1.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", + "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "ts-jest": "^23.1.4" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-cells/src/inputarea.spec.ts b/tests/test-cells/src/inputarea.spec.ts index 5270afb2..66009b3c 100644 --- a/tests/test-cells/src/inputarea.spec.ts +++ b/tests/test-cells/src/inputarea.spec.ts @@ -7,7 +7,7 @@ import { Widget } from '@phosphor/widgets'; import { CodeEditorWrapper } from '@jupyterlab/codeeditor'; -import { InputArea, InputPrompt, CodeCellModel } from '@jupyterlab/cells/src'; +import { InputArea, InputPrompt, CodeCellModel } from '@jupyterlab/cells'; const PROMPT_CLASS = 'jp-InputArea-prompt'; diff --git a/tests/test-cells/src/model.spec.ts b/tests/test-cells/src/model.spec.ts index e706269f..1f416ac3 100644 --- a/tests/test-cells/src/model.spec.ts +++ b/tests/test-cells/src/model.spec.ts @@ -12,11 +12,12 @@ import { RawCellModel, MarkdownCellModel, CodeCellModel -} from '@jupyterlab/cells/src'; +} from '@jupyterlab/cells'; import { OutputAreaModel } from '@jupyterlab/outputarea'; import { NBTestUtils } from '@jupyterlab/testutils'; +import { JSONObject } from '@phosphor/coreutils'; class TestModel extends CellModel { get type(): 'raw' { @@ -294,6 +295,43 @@ describe('cells/model', () => { model.outputs.add(data); expect(called).to.equal(true); }); + + it('should sync collapsed and jupyter.outputs_hidden metadata on construction', () => { + let model: CodeCellModel; + let jupyter: JSONObject | undefined; + + // Setting `collapsed` works + model = new CodeCellModel({ + cell: { cell_type: 'code', source: '', metadata: { collapsed: true } } + }); + expect(model.metadata.get('collapsed')).to.be.true; + jupyter = model.metadata.get('jupyter') as JSONObject; + expect(jupyter.outputs_hidden).to.be.true; + + // Setting `jupyter.outputs_hidden` works + model = new CodeCellModel({ + cell: { + cell_type: 'code', + source: '', + metadata: { jupyter: { outputs_hidden: true } } + } + }); + expect(model.metadata.get('collapsed')).to.be.true; + jupyter = model.metadata.get('jupyter') as JSONObject; + expect(jupyter.outputs_hidden).to.be.true; + + // `collapsed` takes precedence + model = new CodeCellModel({ + cell: { + cell_type: 'code', + source: '', + metadata: { collapsed: false, jupyter: { outputs_hidden: true } } + } + }); + expect(model.metadata.get('collapsed')).to.be.false; + jupyter = model.metadata.get('jupyter') as JSONObject; + expect(jupyter.outputs_hidden).to.be.false; + }); }); describe('#type', () => { @@ -402,6 +440,75 @@ describe('cells/model', () => { }); }); + describe('.metadata', () => { + it('should sync collapsed and jupyter.outputs_hidden metadata when changed', () => { + const metadata = new CodeCellModel({}).metadata; + + expect(metadata.get('collapsed')).to.be.undefined; + expect(metadata.get('jupyter')).to.be.undefined; + + // Setting collapsed sets jupyter.outputs_hidden + metadata.set('collapsed', true); + expect(metadata.get('collapsed')).to.be.true; + expect(metadata.get('jupyter')).to.deep.equal({ + outputs_hidden: true + }); + + metadata.set('collapsed', false); + expect(metadata.get('collapsed')).to.be.false; + expect(metadata.get('jupyter')).to.deep.equal({ + outputs_hidden: false + }); + + metadata.delete('collapsed'); + expect(metadata.get('collapsed')).to.be.undefined; + expect(metadata.get('jupyter')).to.be.undefined; + + // Setting jupyter.outputs_hidden sets collapsed + metadata.set('jupyter', { outputs_hidden: true }); + expect(metadata.get('collapsed')).to.be.true; + expect(metadata.get('jupyter')).to.deep.equal({ + outputs_hidden: true + }); + + metadata.set('jupyter', { outputs_hidden: false }); + expect(metadata.get('collapsed')).to.be.false; + expect(metadata.get('jupyter')).to.deep.equal({ + outputs_hidden: false + }); + + metadata.delete('jupyter'); + expect(metadata.get('collapsed')).to.be.undefined; + expect(metadata.get('jupyter')).to.be.undefined; + + // Deleting jupyter.outputs_hidden preserves other jupyter fields + metadata.set('jupyter', { outputs_hidden: true, other: true }); + expect(metadata.get('collapsed')).to.be.true; + expect(metadata.get('jupyter')).to.deep.equal({ + outputs_hidden: true, + other: true + }); + metadata.set('jupyter', { other: true }); + expect(metadata.get('collapsed')).to.be.undefined; + expect(metadata.get('jupyter')).to.deep.equal({ + other: true + }); + + // Deleting collapsed preserves other jupyter fields + metadata.set('jupyter', { outputs_hidden: true, other: true }); + expect(metadata.get('collapsed')).to.be.true; + expect(metadata.get('jupyter')).to.deep.equal({ + outputs_hidden: true, + other: true + }); + metadata.delete('collapsed'); + expect(metadata.get('collapsed')).to.be.undefined; + expect(metadata.get('jupyter')).to.deep.equal({ + other: true + }); + }); + }); + describe('.ContentFactory', () => { describe('#constructor()', () => { it('should create a new output area factory', () => { diff --git a/tests/test-cells/src/widget.spec.ts b/tests/test-cells/src/widget.spec.ts index 8c2b2866..ba5bbfed 100644 --- a/tests/test-cells/src/widget.spec.ts +++ b/tests/test-cells/src/widget.spec.ts @@ -1,8 +1,6 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { expect } from 'chai'; - import { Message, MessageLoop } from '@phosphor/messaging'; import { Widget } from '@phosphor/widgets'; @@ -24,7 +22,7 @@ import { CellFooter, CellHeader, InputArea -} from '@jupyterlab/cells/src'; +} from '@jupyterlab/cells'; import { OutputArea, OutputPrompt } from '@jupyterlab/outputarea'; @@ -103,14 +101,14 @@ describe('cells/widget', () => { describe('#constructor()', () => { it('should create a base cell widget', () => { - const widget = new Cell({ model, contentFactory }); - expect(widget).to.be.an.instanceof(Cell); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget).toBeInstanceOf(Cell); }); it('should accept a custom contentFactory', () => { const contentFactory = NBTestUtils.createBaseCellFactory(); - const widget = new Cell({ model, contentFactory }); - expect(widget).to.be.an.instanceof(Cell); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget).toBeInstanceOf(Cell); }); it('shoule accept a custom editorConfig', () => { @@ -118,10 +116,14 @@ describe('cells/widget', () => { insertSpaces: false, matchBrackets: false }; - const widget = new Cell({ editorConfig, model, contentFactory }); - expect(widget.editor.getOption('insertSpaces')).to.equal(false); - expect(widget.editor.getOption('matchBrackets')).to.equal(false); - expect(widget.editor.getOption('lineNumbers')).to.equal( + const widget = new Cell({ + editorConfig, + model, + contentFactory + }).initializeState(); + expect(widget.editor.getOption('insertSpaces')).toEqual(false); + expect(widget.editor.getOption('matchBrackets')).toEqual(false); + expect(widget.editor.getOption('lineNumbers')).toEqual( CodeEditor.defaultConfig.lineNumbers ); }); @@ -130,58 +132,58 @@ describe('cells/widget', () => { describe('#model', () => { it('should be the model used by the widget', () => { const model = new CellModel({}); - const widget = new Cell({ model, contentFactory }); - expect(widget.model).to.equal(model); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.model).toEqual(model); }); }); describe('#editorWidget', () => { it('should be a code editor widget', () => { - const widget = new Cell({ model, contentFactory }); - expect(widget.editorWidget).to.be.an.instanceof(CodeEditorWrapper); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.editorWidget).toBeInstanceOf(CodeEditorWrapper); }); }); describe('#editor', () => { it('should be a cell editor', () => { - const widget = new Cell({ model, contentFactory }); - expect(widget.editor.uuid).to.be.ok; + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.editor.uuid).toBeTruthy(); }); }); describe('#inputArea', () => { it('should be the input area for the cell', () => { - const widget = new Cell({ model }); - expect(widget.inputArea).to.be.an.instanceof(InputArea); + const widget = new Cell({ model }).initializeState(); + expect(widget.inputArea).toBeInstanceOf(InputArea); }); }); describe('#readOnly', () => { it('should be a boolean', () => { - const widget = new Cell({ model, contentFactory }); - expect(typeof widget.readOnly).to.equal('boolean'); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(typeof widget.readOnly).toEqual('boolean'); }); it('should default to false', () => { - const widget = new Cell({ model, contentFactory }); - expect(widget.readOnly).to.equal(false); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.readOnly).toEqual(false); }); it('should be settable', () => { const widget = new Cell({ model, contentFactory - }); + }).initializeState(); widget.readOnly = true; - expect(widget.readOnly).to.equal(true); + expect(widget.readOnly).toEqual(true); }); it('should ignore being set to the same value', async () => { - const widget = new LogBaseCell(); + const widget = new LogBaseCell().initializeState(); widget.readOnly = true; widget.readOnly = true; await framePromise(); - expect(widget.methods).to.deep.equal(['onUpdateRequest']); + expect(widget.methods).toEqual(['onUpdateRequest']); }); it('should reflect model metadata', () => { @@ -190,93 +192,225 @@ describe('cells/widget', () => { const widget = new Cell({ model, contentFactory - }); - expect(widget.readOnly).to.equal(false); + }).initializeState(); + expect(widget.readOnly).toEqual(true); }); }); describe('#inputCollapsed', () => { it('should be the view state of the input being collapsed', () => { - const widget = new LogBaseCell(); - expect(widget.inputHidden).to.equal(false); + const widget = new LogBaseCell().initializeState(); + expect(widget.inputHidden).toEqual(false); + widget.inputHidden = true; + expect(widget.inputHidden).toEqual(true); + }); + }); + + describe('#loadEditableState()', () => { + it('should load the editable state from the model', () => { + const model = new CellModel({}); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.readOnly).toEqual(false); + + model.metadata.set('editable', false); + widget.loadEditableState(); + expect(widget.readOnly).toEqual(true); + + model.metadata.set('editable', true); + widget.loadEditableState(); + expect(widget.readOnly).toEqual(false); + }); + }); + + describe('#saveEditableState()', () => { + it('should save the editable state to the model', () => { + const model = new CellModel({}); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.readOnly).toEqual(false); + + widget.readOnly = true; + widget.saveEditableState(); + expect(model.metadata.get('editable')).toEqual(false); + + widget.readOnly = false; + widget.saveEditableState(); + // Default values are not saved explicitly + expect(model.metadata.get('editable')).toEqual(undefined); + }); + }); + + describe('#syncEditable', () => { + it('should control automatic syncing of editable state with model', () => { + const model = new CellModel({}); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.syncEditable).toEqual(false); + expect(widget.readOnly).toEqual(false); + + // Not synced if setting widget attribute + widget.readOnly = true; + expect(model.metadata.get('editable')).toEqual(undefined); + + // Not synced if setting metadata attribute + model.metadata.set('editable', true); + expect(widget.readOnly).toEqual(true); + + widget.syncEditable = true; + + // Setting sync does an initial sync from model to view. This also sets + // the metadata to undefined if it is the default value. + expect(model.metadata.get('editable')).toEqual(undefined); + expect(widget.readOnly).toEqual(false); + + // Synced if setting widget attribute + widget.readOnly = true; + expect(model.metadata.get('editable')).toEqual(false); + + // Synced if setting metadata attribute + model.metadata.set('editable', true); + expect(widget.readOnly).toEqual(false); + }); + }); + + describe('#loadCollapseState()', () => { + it('should load the input collapse state from the model', () => { + const model = new CellModel({}); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.inputHidden).toEqual(false); + + model.metadata.set('jupyter', { source_hidden: true }); + widget.loadCollapseState(); + expect(widget.inputHidden).toEqual(true); + + model.metadata.set('jupyter', { source_hidden: false }); + widget.loadCollapseState(); + expect(widget.inputHidden).toEqual(false); + }); + }); + + describe('#saveCollapseState()', () => { + it('should save the collapse state to the model', () => { + const model = new CellModel({}); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.inputHidden).toEqual(false); + + widget.inputHidden = true; + widget.saveCollapseState(); + expect(model.metadata.get('jupyter')).toEqual({ + source_hidden: true + }); + + widget.inputHidden = false; + widget.saveCollapseState(); + // Default values are not saved explicitly + expect(model.metadata.get('jupyter')).toEqual(undefined); + }); + }); + + describe('#syncCollapse', () => { + it('should control automatic syncing of collapse state with model', () => { + const model = new CellModel({}); + const widget = new Cell({ model, contentFactory }).initializeState(); + expect(widget.syncCollapse).toEqual(false); + expect(widget.inputHidden).toEqual(false); + + // Not synced if setting widget attribute + widget.inputHidden = true; + expect(model.metadata.get('jupyter')).toEqual(undefined); + + // Not synced if setting metadata attribute + model.metadata.set('jupyter', { source_hidden: false }); + expect(widget.inputHidden).toEqual(true); + + widget.syncCollapse = true; + + // Setting sync does an initial sync from model to view. This also sets + // the metadata to undefined if it is the default value. + expect(model.metadata.get('jupyter')).toEqual(undefined); + expect(widget.inputHidden).toEqual(false); + + // Synced if setting widget attribute widget.inputHidden = true; - expect(widget.inputHidden).to.equal(true); + expect(model.metadata.get('jupyter')).toEqual({ + source_hidden: true + }); + + // Synced if setting metadata attribute + model.metadata.set('jupyter', {}); + expect(widget.inputHidden).toEqual(false); }); }); describe('#onActivateRequest()', () => { it('should focus the cell editor', async () => { - const widget = new LogBaseCell(); + const widget = new LogBaseCell().initializeState(); Widget.attach(widget, document.body); widget.activate(); await framePromise(); - expect(widget.methods).to.contain('onActivateRequest'); + expect(widget.methods).toContain('onActivateRequest'); await framePromise(); - expect(widget.editor.hasFocus()).to.equal(true); + expect(widget.editor.hasFocus()).toEqual(true); widget.dispose(); }); }); describe('#setPrompt()', () => { it('should not throw an error (full test in input area)', () => { - const widget = new Cell({ model, contentFactory }); + const widget = new Cell({ model, contentFactory }).initializeState(); expect(() => { widget.setPrompt(void 0); - }).to.not.throw; + }).not.toThrow(); expect(() => { widget.setPrompt(null); - }).to.not.throw(); + }).not.toThrow(); expect(() => { widget.setPrompt(''); - }).to.not.throw(); + }).not.toThrow(); expect(() => { widget.setPrompt('null'); - }).to.not.throw(); + }).not.toThrow(); expect(() => { widget.setPrompt('test'); - }).to.not.throw(); + }).not.toThrow(); }); }); describe('#dispose()', () => { it('should dispose of the resources held by the widget', () => { - const widget = new Cell({ model, contentFactory }); + const widget = new Cell({ model, contentFactory }).initializeState(); widget.dispose(); - expect(widget.isDisposed).to.equal(true); + expect(widget.isDisposed).toEqual(true); }); it('should be safe to call multiple times', () => { - const widget = new Cell({ model, contentFactory }); + const widget = new Cell({ model, contentFactory }).initializeState(); widget.dispose(); widget.dispose(); - expect(widget.isDisposed).to.equal(true); + expect(widget.isDisposed).toEqual(true); }); }); describe('#onAfterAttach()', () => { it('should run when widget is attached', () => { - const widget = new LogBaseCell(); - expect(widget.methods).to.not.contain('onAfterAttach'); + const widget = new LogBaseCell().initializeState(); + expect(widget.methods).not.toContain('onAfterAttach'); Widget.attach(widget, document.body); - expect(widget.methods).to.contain('onAfterAttach'); + expect(widget.methods).toContain('onAfterAttach'); widget.dispose(); }); }); describe('#onUpdateRequest()', () => { it('should update the widget', () => { - const widget = new LogBaseCell(); - expect(widget.methods).to.not.contain('onUpdateRequest'); + const widget = new LogBaseCell().initializeState(); + expect(widget.methods).not.toContain('onUpdateRequest'); MessageLoop.sendMessage(widget, Widget.Msg.UpdateRequest); - expect(widget.methods).to.contain('onUpdateRequest'); + expect(widget.methods).toContain('onUpdateRequest'); }); }); describe('#.defaultContentFactory', () => { it('should be a contentFactory', () => { - expect(Cell.defaultContentFactory).to.be.an.instanceof( - Cell.ContentFactory - ); + expect(Cell.defaultContentFactory).toBeInstanceOf(Cell.ContentFactory); }); }); @@ -284,44 +418,42 @@ describe('cells/widget', () => { describe('#constructor', () => { it('should create a ContentFactory', () => { const factory = new Cell.ContentFactory({ editorFactory }); - expect(factory).to.be.an.instanceof(Cell.ContentFactory); + expect(factory).toBeInstanceOf(Cell.ContentFactory); }); }); describe('#editorFactory', () => { it('should be the editor factory used by the content factory', () => { const factory = new Cell.ContentFactory({ editorFactory }); - expect(factory.editorFactory).to.equal(editorFactory); + expect(factory.editorFactory).toEqual(editorFactory); }); }); describe('#createCellHeader()', () => { it('should create a new cell header', () => { const factory = new Cell.ContentFactory(); - expect(factory.createCellHeader()).to.be.an.instanceof(CellHeader); + expect(factory.createCellHeader()).toBeInstanceOf(CellHeader); }); }); describe('#createCellFooter()', () => { it('should create a new cell footer', () => { const factory = new Cell.ContentFactory(); - expect(factory.createCellFooter()).to.be.an.instanceof(CellFooter); + expect(factory.createCellFooter()).toBeInstanceOf(CellFooter); }); }); describe('#createOutputPrompt()', () => { it('should create a new output prompt', () => { const factory = new Cell.ContentFactory(); - expect(factory.createOutputPrompt()).to.be.an.instanceof( - OutputPrompt - ); + expect(factory.createOutputPrompt()).toBeInstanceOf(OutputPrompt); }); }); describe('#createInputPrompt()', () => { it('should create a new input prompt', () => { const factory = new Cell.ContentFactory(); - expect(factory.createInputPrompt()).to.be.an.instanceof(InputPrompt); + expect(factory.createInputPrompt()).toBeInstanceOf(InputPrompt); }); }); }); @@ -334,20 +466,23 @@ describe('cells/widget', () => { describe('#constructor()', () => { it('should create a code cell widget', () => { const widget = new CodeCell({ model, rendermime, contentFactory }); - expect(widget).to.be.an.instanceof(CodeCell); + widget.initializeState(); + expect(widget).toBeInstanceOf(CodeCell); }); it('should accept a custom contentFactory', () => { const contentFactory = NBTestUtils.createCodeCellFactory(); const widget = new CodeCell({ model, contentFactory, rendermime }); - expect(widget).to.be.an.instanceof(CodeCell); + widget.initializeState(); + expect(widget).toBeInstanceOf(CodeCell); }); }); describe('#outputArea', () => { it('should be the output area used by the cell', () => { const widget = new CodeCell({ model, rendermime }); - expect(widget.outputArea).to.be.an.instanceof(OutputArea); + widget.initializeState(); + expect(widget.outputArea).toBeInstanceOf(OutputArea); }); }); @@ -355,78 +490,235 @@ describe('cells/widget', () => { it('should initialize from the model', () => { const collapsedModel = new CodeCellModel({}); let widget = new CodeCell({ model: collapsedModel, rendermime }); - expect(widget.outputHidden).to.equal(false); + widget.initializeState(); + expect(widget.outputHidden).toEqual(false); collapsedModel.metadata.set('collapsed', true); - collapsedModel.metadata.set('jupyter', { outputs_hidden: false }); widget = new CodeCell({ model: collapsedModel, rendermime }); - expect(widget.outputHidden).to.equal(true); + widget.initializeState(); + expect(widget.outputHidden).toEqual(true); - collapsedModel.metadata.set('collapsed', false); + collapsedModel.metadata.delete('collapsed'); collapsedModel.metadata.set('jupyter', { outputs_hidden: true }); widget = new CodeCell({ model: collapsedModel, rendermime }); - expect(widget.outputHidden).to.equal(true); + widget.initializeState(); + expect(widget.outputHidden).toEqual(true); }); it('should be the view state of the output being collapsed', () => { const widget = new CodeCell({ model, rendermime }); - expect(widget.outputHidden).to.equal(false); + widget.initializeState(); + expect(widget.outputHidden).toEqual(false); widget.outputHidden = true; - expect(widget.outputHidden).to.equal(true); + expect(widget.outputHidden).toEqual(true); }); }); describe('#outputsScrolled', () => { it('should initialize from the model', () => { - const collapsedModel = new CodeCellModel({}); - let widget = new CodeCell({ model: collapsedModel, rendermime }); - expect(widget.outputsScrolled).to.equal(false); + const model = new CodeCellModel({}); + let widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.outputsScrolled).toEqual(false); + + model.metadata.set('scrolled', false); + widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.outputsScrolled).toEqual(false); + + model.metadata.set('scrolled', 'auto'); + widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.outputsScrolled).toEqual(false); + + model.metadata.set('scrolled', true); + widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.outputsScrolled).toEqual(true); + }); + }); - collapsedModel.metadata.set('scrolled', false); - widget = new CodeCell({ model: collapsedModel, rendermime }); - expect(widget.outputsScrolled).to.equal(false); + describe('#loadScrolledState()', () => { + it('should load the output scrolled state from the model', () => { + const model = new CodeCellModel({}); + let widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.outputsScrolled).toEqual(false); - collapsedModel.metadata.set('scrolled', 'auto'); - widget = new CodeCell({ model: collapsedModel, rendermime }); - expect(widget.outputsScrolled).to.equal(false); + model.metadata.set('scrolled', true); + widget.loadScrolledState(); + expect(widget.outputsScrolled).toEqual(true); - collapsedModel.metadata.set('scrolled', true); - widget = new CodeCell({ model: collapsedModel, rendermime }); - expect(widget.outputsScrolled).to.equal(true); + model.metadata.set('scrolled', false); + widget.loadScrolledState(); + expect(widget.outputsScrolled).toEqual(false); + }); + }); + + describe('#saveScrolledState()', () => { + it('should save the collapse state to the model', () => { + const model = new CodeCellModel({}); + let widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.outputsScrolled).toEqual(false); + + widget.outputsScrolled = true; + widget.saveScrolledState(); + expect(model.metadata.get('scrolled')).toEqual(true); + + widget.outputsScrolled = false; + widget.saveScrolledState(); + // Default values are not saved explicitly + expect(model.metadata.get('scrolled')).toEqual(undefined); + }); + }); + + describe('#syncScrolled', () => { + it('should control automatic syncing of scrolled state with model', () => { + const model = new CodeCellModel({}); + let widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.syncScrolled).toEqual(false); + expect(widget.outputsScrolled).toEqual(false); + + // Not synced if setting widget attribute + widget.outputsScrolled = true; + expect(model.metadata.get('scrolled')).toEqual(undefined); + + // Not synced if setting metadata attribute + model.metadata.set('scrolled', false); + expect(widget.outputsScrolled).toEqual(true); + + widget.syncScrolled = true; + + // Setting sync does an initial sync from model to view. This also sets + // the metadata to undefined if it is the default value. + expect(model.metadata.get('scrolled')).toEqual(undefined); + expect(widget.outputsScrolled).toEqual(false); + + // Synced if setting widget attribute + widget.outputsScrolled = true; + expect(model.metadata.get('scrolled')).toEqual(true); + + // Synced if setting metadata attribute + model.metadata.set('scrolled', false); + expect(widget.outputsScrolled).toEqual(false); + }); + }); + + describe('#loadCollapseState()', () => { + it('should load the output collapse state from the model', () => { + const model = new CodeCellModel({}); + let widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + widget.loadCollapseState(); + expect(widget.outputHidden).toEqual(false); + + model.metadata.set('collapsed', true); + widget.loadCollapseState(); + expect(widget.outputHidden).toEqual(true); + + model.metadata.set('collapsed', false); + widget.loadCollapseState(); + expect(widget.outputHidden).toEqual(false); + }); + }); + + describe('#saveCollapseState()', () => { + it('should save the collapse state to the model `collapsed` metadata', () => { + const model = new CodeCellModel({}); + let widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.outputHidden).toEqual(false); + + widget.outputHidden = true; + widget.saveCollapseState(); + expect(model.metadata.get('collapsed')).toEqual(true); + + // Default values are not saved explicitly + widget.outputHidden = false; + widget.saveCollapseState(); + expect(model.metadata.get('collapsed')).toEqual(undefined); + + // Default values are explicitly deleted + model.metadata.set('collapsed', false); + widget.outputHidden = false; + widget.saveCollapseState(); + expect(model.metadata.get('collapsed')).toEqual(undefined); + }); + }); + + describe('#syncCollapse', () => { + it('should control automatic syncing of collapse state with model', () => { + const model = new CodeCellModel({}); + let widget = new CodeCell({ model, rendermime }); + widget.initializeState(); + expect(widget.syncCollapse).toEqual(false); + expect(widget.outputHidden).toEqual(false); + + // Not synced if setting widget attribute + widget.outputHidden = true; + expect(model.metadata.get('collapsed')).toEqual(undefined); + + // Not synced if setting metadata attribute + model.metadata.set('collapsed', false); + expect(widget.outputHidden).toEqual(true); + + widget.syncCollapse = true; + + // Setting sync does an initial sync from model to view. + expect(model.metadata.get('collapsed')).toEqual(undefined); + expect(widget.outputHidden).toEqual(false); + + // Synced if setting widget attribute + widget.outputHidden = true; + expect(model.metadata.get('collapsed')).toEqual(true); + + // Synced if setting metadata attribute + model.metadata.set('collapsed', false); + expect(widget.outputHidden).toEqual(false); + + // Synced if deleting collapsed metadata attribute + widget.outputHidden = true; + expect(model.metadata.get('collapsed')).toEqual(true); + model.metadata.delete('collapsed'); + expect(widget.outputHidden).toEqual(false); }); }); describe('#dispose()', () => { it('should dispose of the resources held by the widget', () => { const widget = new CodeCell({ model, rendermime, contentFactory }); + widget.initializeState(); widget.dispose(); - expect(widget.isDisposed).to.equal(true); + expect(widget.isDisposed).toEqual(true); }); it('should be safe to call multiple times', () => { const widget = new CodeCell({ model, rendermime, contentFactory }); + widget.initializeState(); widget.dispose(); widget.dispose(); - expect(widget.isDisposed).to.equal(true); + expect(widget.isDisposed).toEqual(true); }); }); describe('#onUpdateRequest()', () => { it('should update the widget', () => { - const widget = new LogCodeCell(); - expect(widget.methods).to.not.contain('onUpdateRequest'); + const widget = new LogCodeCell().initializeState(); + expect(widget.methods).not.toContain('onUpdateRequest'); MessageLoop.sendMessage(widget, Widget.Msg.UpdateRequest); - expect(widget.methods).to.contain('onUpdateRequest'); + expect(widget.methods).toContain('onUpdateRequest'); }); }); describe('#onMetadataChanged()', () => { it('should fire when model metadata changes', () => { const method = 'onMetadataChanged'; - const widget = new LogCodeCell(); - expect(widget.methods).to.not.contain(method); + const widget = new LogCodeCell().initializeState(); + expect(widget.methods).not.toContain(method); widget.model.metadata.set('foo', 1); - expect(widget.methods).to.contain(method); + expect(widget.methods).toContain(method); }); }); @@ -445,6 +737,7 @@ describe('cells/widget', () => { it('should fulfill a promise if there is no code to execute', async () => { const widget = new CodeCell({ model, rendermime, contentFactory }); + widget.initializeState(); try { await CodeCell.execute(widget, session); } catch (error) { @@ -454,12 +747,34 @@ describe('cells/widget', () => { it('should fulfill a promise if there is code to execute', async () => { const widget = new CodeCell({ model, rendermime, contentFactory }); + widget.initializeState(); let originalCount: number; widget.model.value.text = 'foo'; originalCount = widget.model.executionCount; await CodeCell.execute(widget, session); const executionCount = widget.model.executionCount; - expect(executionCount).to.not.equal(originalCount); + expect(executionCount).not.toEqual(originalCount); + }); + + it('should set the cell prompt properly while executing', async () => { + const widget = new CodeCell({ model, rendermime, contentFactory }); + widget.initializeState(); + widget.model.value.text = 'foo'; + const future1 = CodeCell.execute(widget, session); + expect(widget.promptNode.textContent).toEqual('[*]:'); + const future2 = CodeCell.execute(widget, session); + expect(widget.promptNode.textContent).toEqual('[*]:'); + await expect(future1).rejects.toThrow('Canceled'); + expect(widget.promptNode.textContent).toEqual('[*]:'); + let msg = await future2; + expect(msg).not.toBeUndefined; + + // The `if` is a Typescript type guard so that msg.content works below. + if (msg) { + expect(widget.promptNode.textContent).toEqual( + `[${msg.content.execution_count}]:` + ); + } }); }); }); @@ -471,35 +786,40 @@ describe('cells/widget', () => { describe('#constructor()', () => { it('should create a markdown cell widget', () => { const widget = new MarkdownCell({ model, rendermime, contentFactory }); - expect(widget).to.be.an.instanceof(MarkdownCell); + widget.initializeState(); + expect(widget).toBeInstanceOf(MarkdownCell); }); it('should accept a custom contentFactory', () => { const widget = new MarkdownCell({ model, rendermime, contentFactory }); - expect(widget).to.be.an.instanceof(MarkdownCell); + widget.initializeState(); + expect(widget).toBeInstanceOf(MarkdownCell); }); it('should set the default mimetype to text/x-ipythongfm', () => { const widget = new MarkdownCell({ model, rendermime, contentFactory }); - expect(widget.model.mimeType).to.equal('text/x-ipythongfm'); + widget.initializeState(); + expect(widget.model.mimeType).toEqual('text/x-ipythongfm'); }); }); describe('#rendered', () => { it('should default to true', async () => { const widget = new MarkdownCell({ model, rendermime, contentFactory }); + widget.initializeState(); Widget.attach(widget, document.body); - expect(widget.rendered).to.equal(true); + expect(widget.rendered).toEqual(true); await framePromise(); - expect(widget.node.classList.contains(RENDERED_CLASS)).to.equal(true); + expect(widget.node.classList.contains(RENDERED_CLASS)).toEqual(true); }); it('should unrender the widget', async () => { const widget = new MarkdownCell({ model, rendermime, contentFactory }); + widget.initializeState(); Widget.attach(widget, document.body); widget.rendered = false; await framePromise(); - expect(widget.node.classList.contains(RENDERED_CLASS)).to.equal(false); + expect(widget.node.classList.contains(RENDERED_CLASS)).toEqual(false); widget.dispose(); }); }); @@ -507,15 +827,17 @@ describe('cells/widget', () => { describe('#dispose()', () => { it('should dispose of the resources held by the widget', () => { const widget = new MarkdownCell({ model, rendermime, contentFactory }); + widget.initializeState(); widget.dispose(); - expect(widget.isDisposed).to.equal(true); + expect(widget.isDisposed).toEqual(true); }); it('should be safe to call multiple times', () => { const widget = new MarkdownCell({ model, rendermime, contentFactory }); + widget.initializeState(); widget.dispose(); widget.dispose(); - expect(widget.isDisposed).to.equal(true); + expect(widget.isDisposed).toEqual(true); }); }); @@ -525,10 +847,10 @@ describe('cells/widget', () => { model, rendermime, contentFactory - }); - expect(widget.methods).to.not.contain('onUpdateRequest'); + }).initializeState(); + expect(widget.methods).not.toContain('onUpdateRequest'); MessageLoop.sendMessage(widget, Widget.Msg.UpdateRequest); - expect(widget.methods).to.contain('onUpdateRequest'); + expect(widget.methods).toContain('onUpdateRequest'); }); }); }); @@ -539,8 +861,8 @@ describe('cells/widget', () => { describe('#constructor()', () => { it('should create a raw cell widget', () => { const model = new RawCellModel({}); - const widget = new RawCell({ model, contentFactory }); - expect(widget).to.be.an.instanceof(RawCell); + const widget = new RawCell({ model, contentFactory }).initializeState(); + expect(widget).toBeInstanceOf(RawCell); }); }); }); @@ -548,7 +870,7 @@ describe('cells/widget', () => { describe('CellHeader', () => { describe('#constructor()', () => { it('should create a new cell header', () => { - expect(new CellHeader()).to.be.an.instanceof(CellHeader); + expect(new CellHeader()).toBeInstanceOf(CellHeader); }); }); }); @@ -556,7 +878,7 @@ describe('cells/widget', () => { describe('CellFooter', () => { describe('#constructor()', () => { it('should create a new cell footer', () => { - expect(new CellFooter()).to.be.an.instanceof(CellFooter); + expect(new CellFooter()).toBeInstanceOf(CellFooter); }); }); }); diff --git a/tests/test-codeeditor/babel.config.js b/tests/test-codeeditor/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-codeeditor/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-codeeditor/package.json b/tests/test-codeeditor/package.json index db65fcee..04561ba8 100644 --- a/tests/test-codeeditor/package.json +++ b/tests/test-codeeditor/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-codeeditor", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,22 +12,22 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/observables": "^2.2.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/observables": "^2.2.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", "simulate-event": "~1.4.0", - "ts-jest": "^23.1.4" + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-codeeditor/src/editor.spec.ts b/tests/test-codeeditor/src/editor.spec.ts index c1c5cb8f..607f48b1 100644 --- a/tests/test-codeeditor/src/editor.spec.ts +++ b/tests/test-codeeditor/src/editor.spec.ts @@ -3,7 +3,9 @@ import { expect } from 'chai'; -import { CodeEditor } from '@jupyterlab/codeeditor/src'; +import { CodeEditor } from '@jupyterlab/codeeditor'; + +import { IObservableString } from '@jupyterlab/observables'; describe('CodeEditor.Model', () => { let model: CodeEditor.Model; @@ -58,37 +60,52 @@ describe('CodeEditor.Model', () => { describe('#value', () => { it('should be the observable value of the model', () => { let called = false; - model.value.changed.connect((sender, args) => { + const handler = ( + sender: IObservableString, + args: IObservableString.IChangedArgs + ) => { expect(sender).to.equal(model.value); expect(args.type).to.equal('set'); expect(args.value).to.equal('foo'); called = true; - }); + }; + model.value.changed.connect(handler); model.value.text = 'foo'; expect(called).to.be.true; + model.value.changed.disconnect(handler); }); it('should handle an insert', () => { let called = false; - model.value.changed.connect((sender, args) => { + const handler = ( + sender: IObservableString, + args: IObservableString.IChangedArgs + ) => { expect(args.type).to.equal('insert'); expect(args.value).to.equal('foo'); called = true; - }); + }; + model.value.changed.connect(handler); model.value.insert(0, 'foo'); expect(called).to.be.true; + model.value.changed.disconnect(handler); }); it('should handle a remove', () => { let called = false; model.value.text = 'foo'; - model.value.changed.connect((sender, args) => { + const handler = ( + sender: IObservableString, + args: IObservableString.IChangedArgs + ) => { expect(args.type).to.equal('remove'); expect(args.value).to.equal('f'); called = true; - }); + }; + model.value.changed.connect(handler); model.value.remove(0, 1); expect(called).to.be.true; + model.value.changed.disconnect(handler); }); }); diff --git a/tests/test-codeeditor/src/jsoneditor.spec.ts b/tests/test-codeeditor/src/jsoneditor.spec.ts index 5aa6842e..aed3d8d3 100644 --- a/tests/test-codeeditor/src/jsoneditor.spec.ts +++ b/tests/test-codeeditor/src/jsoneditor.spec.ts @@ -7,7 +7,7 @@ import { CodeMirrorEditorFactory } from '@jupyterlab/codemirror'; import { ObservableJSON } from '@jupyterlab/observables'; -import { JSONEditor } from '@jupyterlab/codeeditor/src'; +import { JSONEditor } from '@jupyterlab/codeeditor'; import { framePromise } from '@jupyterlab/testutils'; @@ -69,33 +69,6 @@ describe('codeeditor', () => { }); }); - describe('#collapsible', () => { - it('should default to false', () => { - expect(editor.collapsible).to.be.false; - }); - - it('should be settable in the constructor', () => { - let newEditor = new JSONEditor({ editorFactory, collapsible: true }); - expect(newEditor.collapsible).to.be.true; - }); - }); - - describe('#editorTitle', () => { - it('should default to empty string', () => { - expect(editor.editorTitle).to.equal(''); - }); - - it('should be settable in the constructor', () => { - let newEditor = new JSONEditor({ editorFactory, title: 'foo' }); - expect(newEditor.editorTitle).to.equal('foo'); - }); - - it('should be settable', () => { - editor.editorTitle = 'foo'; - expect(editor.editorTitle).to.equal('foo'); - }); - }); - describe('#headerNode', () => { it('should be the header node used by the editor', () => { expect(Array.from(editor.headerNode.classList)).to.contain( @@ -104,22 +77,6 @@ describe('codeeditor', () => { }); }); - describe('#titleNode', () => { - it('should be the title node used by the editor', () => { - expect(Array.from(editor.titleNode.classList)).to.contain( - 'jp-JSONEditor-title' - ); - }); - }); - - describe('#collapserNode', () => { - it('should be the collapser node used by the editor', () => { - expect(Array.from(editor.collapserNode.classList)).to.contain( - 'jp-JSONEditor-collapser' - ); - }); - }); - describe('#editorHostNode', () => { it('should be the editor host node used by the editor', () => { expect(Array.from(editor.editorHostNode.classList)).to.contain( @@ -340,23 +297,6 @@ describe('codeeditor', () => { let expected = '{\n "foo": 2,\n "bar": 3\n}'; expect(editor.model.value.text).to.equal(expected); }); - - it('should collapse the editor', () => { - editor.dispose(); - editor = new LogEditor({ editorFactory, collapsible: true }); - Widget.attach(editor, document.body); - simulate(editor.titleNode, 'click'); - expect(Array.from(editor.editorHostNode.classList)).to.contain( - 'jp-mod-collapsed' - ); - }); - - it('should have no effect if the editor is not collapsible', () => { - simulate(editor.titleNode, 'click'); - expect(Array.from(editor.editorHostNode.classList)).to.not.contain( - 'jp-mod-collapsed' - ); - }); }); }); diff --git a/tests/test-codeeditor/src/widget.spec.ts b/tests/test-codeeditor/src/widget.spec.ts index 86919822..b4c71674 100644 --- a/tests/test-codeeditor/src/widget.spec.ts +++ b/tests/test-codeeditor/src/widget.spec.ts @@ -9,7 +9,7 @@ import { Widget } from '@phosphor/widgets'; import { simulate } from 'simulate-event'; -import { CodeEditor, CodeEditorWrapper } from '@jupyterlab/codeeditor/src'; +import { CodeEditor, CodeEditorWrapper } from '@jupyterlab/codeeditor'; import { CodeMirrorEditor } from '@jupyterlab/codemirror'; diff --git a/tests/test-codemirror/babel.config.js b/tests/test-codemirror/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-codemirror/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-codemirror/package.json b/tests/test-codemirror/package.json index 5146e653..b0309c51 100644 --- a/tests/test-codemirror/package.json +++ b/tests/test-codemirror/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-codemirror", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,20 +12,20 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", - "chai": "~4.1.2", - "codemirror": "~5.42.0", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", + "chai": "^4.2.0", + "codemirror": "~5.47.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", "simulate-event": "~1.4.0", - "ts-jest": "^23.1.4" + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-codemirror/src/editor.spec.ts b/tests/test-codemirror/src/editor.spec.ts index 423c8982..f36540aa 100644 --- a/tests/test-codemirror/src/editor.spec.ts +++ b/tests/test-codemirror/src/editor.spec.ts @@ -10,7 +10,7 @@ import { generate, simulate } from 'simulate-event'; import { CodeEditor } from '@jupyterlab/codeeditor'; -import { CodeMirrorEditor } from '@jupyterlab/codemirror/src'; +import { CodeMirrorEditor } from '@jupyterlab/codemirror'; const UP_ARROW = 38; diff --git a/tests/test-codemirror/src/factory.spec.ts b/tests/test-codemirror/src/factory.spec.ts index 82d53c20..b7ff346f 100644 --- a/tests/test-codemirror/src/factory.spec.ts +++ b/tests/test-codemirror/src/factory.spec.ts @@ -8,7 +8,7 @@ import { CodeEditor } from '@jupyterlab/codeeditor'; import { CodeMirrorEditorFactory, CodeMirrorEditor -} from '@jupyterlab/codemirror/src'; +} from '@jupyterlab/codemirror'; class ExposeCodeMirrorEditorFactory extends CodeMirrorEditorFactory { public inlineCodeMirrorConfig: CodeMirrorEditor.IConfig; diff --git a/tests/test-codemirror/src/mode.spec.ts b/tests/test-codemirror/src/mode.spec.ts index f7c5577c..4d1c1799 100644 --- a/tests/test-codemirror/src/mode.spec.ts +++ b/tests/test-codemirror/src/mode.spec.ts @@ -5,7 +5,7 @@ import { expect } from 'chai'; import CodeMirror from 'codemirror'; -import { Mode } from '@jupyterlab/codemirror/src/mode'; +import { Mode } from '@jupyterlab/codemirror'; function fakeMode(name: string) { return { diff --git a/tests/test-completer/babel.config.js b/tests/test-completer/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-completer/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-completer/package.json b/tests/test-completer/package.json index e847d54d..a70fc5ee 100644 --- a/tests/test-completer/package.json +++ b/tests/test-completer/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-completer", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,25 +12,25 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/completer": "^1.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/completer": "^1.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", "simulate-event": "~1.4.0", - "ts-jest": "^23.1.4" + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-completer/src/handler.spec.ts b/tests/test-completer/src/handler.spec.ts index 43094598..568cedb9 100644 --- a/tests/test-completer/src/handler.spec.ts +++ b/tests/test-completer/src/handler.spec.ts @@ -14,7 +14,7 @@ import { CompletionHandler, CompleterModel, KernelConnector -} from '@jupyterlab/completer/src'; +} from '@jupyterlab/completer'; import { createClientSession } from '@jupyterlab/testutils'; @@ -237,9 +237,11 @@ describe('@jupyterlab/completer', () => { const editor = createEditorWidget().editor; const text = 'eggs\nfoo # comment\nbaz'; const want = 'eggs\nfoobar # comment\nbaz'; + const line = 1; + const column = 5; const request: Completer.ITextState = { - column: 5, - line: 1, + column, + line, lineHeight: 0, charWidth: 0, coords: null, @@ -248,10 +250,65 @@ describe('@jupyterlab/completer', () => { handler.editor = editor; handler.editor.model.value.text = text; + handler.editor.setCursorPosition({ line, column: column + 3 }); model.original = request; - model.cursor = { start: 5, end: 8 }; + model.cursor = { start: column, end: column + 3 }; (completer.selected as any).emit(patch); expect(handler.editor.model.value.text).to.equal(want); + expect(handler.editor.getCursorPosition()).to.eql({ + line, + column: column + 6 + }); + }); + + it('should be undoable and redoable', () => { + const model = new CompleterModel(); + const patch = 'foobar'; + const completer = new Completer({ editor: null, model }); + const handler = new TestCompletionHandler({ completer, connector }); + const editor = createEditorWidget().editor; + const text = 'eggs\nfoo # comment\nbaz'; + const want = 'eggs\nfoobar # comment\nbaz'; + const line = 1; + const column = 5; + const request: Completer.ITextState = { + column, + line, + lineHeight: 0, + charWidth: 0, + coords: null, + text + }; + + handler.editor = editor; + handler.editor.model.value.text = text; + handler.editor.setCursorPosition({ line, column: column + 3 }); + model.original = request; + model.cursor = { start: column, end: column + 3 }; + // Make the completion, check its value and cursor position. + (completer.selected as any).emit(patch); + expect(editor.model.value.text).to.equal(want); + expect(editor.getCursorPosition()).to.eql({ + line, + column: column + 6 + }); + console.warn(editor.getCursorPosition()); + // Undo the completion, check its value and cursor position. + editor.undo(); + expect(editor.model.value.text).to.equal(text); + expect(editor.getCursorPosition()).to.eql({ + line, + column: column + 3 + }); + console.warn(editor.getCursorPosition()); + // Redo the completion, check its value and cursor position. + editor.redo(); + expect(editor.model.value.text).to.equal(want); + expect(editor.getCursorPosition()).to.eql({ + line, + column: column + 6 + }); + console.warn(editor.getCursorPosition()); }); }); }); diff --git a/tests/test-completer/src/model.spec.ts b/tests/test-completer/src/model.spec.ts index 4eb9f228..8976ad78 100644 --- a/tests/test-completer/src/model.spec.ts +++ b/tests/test-completer/src/model.spec.ts @@ -9,7 +9,7 @@ import { JSONExt } from '@phosphor/coreutils'; import { CodeEditor } from '@jupyterlab/codeeditor'; -import { CompleterModel, Completer } from '@jupyterlab/completer/src'; +import { CompleterModel, Completer } from '@jupyterlab/completer'; function makeState(text: string): Completer.ITextState { return { @@ -361,8 +361,9 @@ describe('completer/model', () => { let model = new CompleterModel(); let patch = 'foobar'; let want: Completer.IPatch = { - text: patch, - offset: patch.length + start: 0, + end: 3, + value: patch }; let cursor: Completer.ICursorSpan = { start: 0, end: 3 }; model.original = makeState('foo'); @@ -382,8 +383,9 @@ describe('completer/model', () => { let start = currentValue.length; let end = currentValue.length; let want: Completer.IPatch = { - text: currentValue + patch, - offset: currentValue.length + patch.length + start, + end, + value: patch }; let cursor: Completer.ICursorSpan = { start, end }; model.original = makeState(currentValue); diff --git a/tests/test-completer/src/widget.spec.ts b/tests/test-completer/src/widget.spec.ts index 348af4da..f8ad6355 100644 --- a/tests/test-completer/src/widget.spec.ts +++ b/tests/test-completer/src/widget.spec.ts @@ -15,9 +15,10 @@ import { CodeEditor, CodeEditorWrapper } from '@jupyterlab/codeeditor'; import { CodeMirrorEditor } from '@jupyterlab/codemirror'; -import { Completer, CompleterModel } from '@jupyterlab/completer/src'; +import { Completer, CompleterModel } from '@jupyterlab/completer'; import { framePromise, sleep } from '@jupyterlab/testutils'; + const TEST_ITEM_CLASS = 'jp-TestItem'; const ITEM_CLASS = 'jp-Completer-item'; diff --git a/tests/test-console/package.json b/tests/test-console/package.json index 77f4ecef..7219982e 100644 --- a/tests/test-console/package.json +++ b/tests/test-console/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-console", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -13,28 +13,28 @@ "test:firefox": "python run-test.py --browsers=Firefox karma.conf.js", "test:ie": "python run-test.py --browsers=IE karma.conf.js", "watch": "tsc -b --watch", - "watch:src": "tsp -p src --watch" + "watch:src": "tsc -p src --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/console": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/cells": "^1.0.0-alpha.10", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/console": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", "@phosphor/signaling": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0" }, "devDependencies": { - "@types/chai": "~4.0.10", - "karma": "~2.0.4", + "@types/chai": "^4.1.7", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", - "puppeteer": "^1.5.0", + "puppeteer": "~1.17.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-console/src/foreign.spec.ts b/tests/test-console/src/foreign.spec.ts index 0b069b60..56f16c10 100644 --- a/tests/test-console/src/foreign.spec.ts +++ b/tests/test-console/src/foreign.spec.ts @@ -34,7 +34,11 @@ class TestParent extends Panel implements ForeignHandler.IReceiver { createCodeCell(): CodeCell { const contentFactory = NBTestUtils.createCodeCellFactory(); const model = new CodeCellModel({}); - const cell = new CodeCell({ model, rendermime, contentFactory }); + const cell = new CodeCell({ + model, + rendermime, + contentFactory + }).initializeState(); return cell; } diff --git a/tests/test-console/src/history.spec.ts b/tests/test-console/src/history.spec.ts index 6ace3409..aa54d04c 100644 --- a/tests/test-console/src/history.spec.ts +++ b/tests/test-console/src/history.spec.ts @@ -17,7 +17,14 @@ import { createClientSession, signalToPromise } from '@jupyterlab/testutils'; const mockHistory: KernelMessage.IHistoryReplyMsg = { header: null, - parent_header: {}, + parent_header: { + date: '', + msg_id: '', + msg_type: 'history_request', + username: '', + session: '', + version: '5.3' + }, metadata: null, buffers: null, channel: 'shell', @@ -55,9 +62,7 @@ describe('console/history', () => { session = await createClientSession(); }); - after(() => { - session.shutdown(); - }); + after(() => session.shutdown()); describe('ConsoleHistory', () => { describe('#constructor()', () => { diff --git a/tests/test-console/src/panel.spec.ts b/tests/test-console/src/panel.spec.ts index 14df6e79..2800ffa8 100644 --- a/tests/test-console/src/panel.spec.ts +++ b/tests/test-console/src/panel.spec.ts @@ -38,7 +38,7 @@ const contentFactory = createConsolePanelFactory(); describe('console/panel', () => { let panel: TestPanel; - const manager = new ServiceManager(); + const manager = new ServiceManager({ standby: 'never' }); before(() => { return manager.ready; @@ -87,9 +87,9 @@ describe('console/panel', () => { }); describe('#onAfterAttach()', () => { - it('should start the session', () => { + it('should start the session', async () => { Widget.attach(panel, document.body); - dismissDialog(); + await dismissDialog(); return panel.session.ready; }); }); diff --git a/tests/test-console/src/widget.spec.ts b/tests/test-console/src/widget.spec.ts index 53e80b39..5900cfc3 100644 --- a/tests/test-console/src/widget.spec.ts +++ b/tests/test-console/src/widget.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { Message } from '@phosphor/messaging'; +import { Message, MessageLoop } from '@phosphor/messaging'; import { Widget } from '@phosphor/widgets'; @@ -18,11 +18,7 @@ import { RawCell } from '@jupyterlab/cells'; -import { - createClientSession, - framePromise, - NBTestUtils -} from '@jupyterlab/testutils'; +import { createClientSession, NBTestUtils } from '@jupyterlab/testutils'; import { createConsoleFactory, @@ -35,23 +31,23 @@ class TestConsole extends CodeConsole { methods: string[] = []; protected newPromptCell(): void { - super.newPromptCell(); this.methods.push('newPromptCell'); + super.newPromptCell(); } protected onActivateRequest(msg: Message): void { - super.onActivateRequest(msg); this.methods.push('onActivateRequest'); + super.onActivateRequest(msg); } protected onAfterAttach(msg: Message): void { - super.onAfterAttach(msg); this.methods.push('onAfterAttach'); + super.onAfterAttach(msg); } protected onUpdateRequest(msg: Message): void { - super.onUpdateRequest(msg); this.methods.push('onUpdateRequest'); + super.onUpdateRequest(msg); } } @@ -153,7 +149,11 @@ describe('console/widget', () => { it('should add a code cell to the content widget', () => { const contentFactory = NBTestUtils.createCodeCellFactory(); const model = new CodeCellModel({}); - const cell = new CodeCell({ model, contentFactory, rendermime }); + const cell = new CodeCell({ + model, + contentFactory, + rendermime + }).initializeState(); Widget.attach(widget, document.body); expect(widget.cells.length).to.equal(0); widget.addCell(cell); @@ -277,13 +277,11 @@ describe('console/widget', () => { }); describe('#onActivateRequest()', () => { - it('should focus the prompt editor', async () => { + it('should focus the prompt editor', () => { expect(widget.promptCell).to.not.be.ok; expect(widget.methods).to.not.contain('onActivateRequest'); Widget.attach(widget, document.body); - await framePromise(); - widget.activate(); - await framePromise(); + MessageLoop.sendMessage(widget, Widget.Msg.ActivateRequest); expect(widget.methods).to.contain('onActivateRequest'); expect(widget.promptCell.editor.hasFocus()).to.equal(true); }); diff --git a/tests/test-coreutils/babel.config.js b/tests/test-coreutils/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-coreutils/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-coreutils/package.json b/tests/test-coreutils/package.json index 6312ecb1..9ddedf86 100644 --- a/tests/test-coreutils/package.json +++ b/tests/test-coreutils/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-coreutils", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,19 +12,19 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", "@phosphor/signaling": "^1.2.2", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "ts-jest": "^23.1.4" + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-coreutils/src/activitymonitor.spec.ts b/tests/test-coreutils/src/activitymonitor.spec.ts index 5ae52f23..4dfab6c7 100644 --- a/tests/test-coreutils/src/activitymonitor.spec.ts +++ b/tests/test-coreutils/src/activitymonitor.spec.ts @@ -5,7 +5,7 @@ import { expect } from 'chai'; import { Signal } from '@phosphor/signaling'; -import { ActivityMonitor } from '@jupyterlab/coreutils/src'; +import { ActivityMonitor } from '@jupyterlab/coreutils'; import { sleep } from '@jupyterlab/testutils'; diff --git a/tests/test-coreutils/src/markdowncodeblocks.spec.ts b/tests/test-coreutils/src/markdowncodeblocks.spec.ts index 3b4ce599..1582677c 100644 --- a/tests/test-coreutils/src/markdowncodeblocks.spec.ts +++ b/tests/test-coreutils/src/markdowncodeblocks.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { MarkdownCodeBlocks } from '@jupyterlab/coreutils/src'; +import { MarkdownCodeBlocks } from '@jupyterlab/coreutils'; const BLOCK1 = 'Here is text\n\n```\na = 10\nb = 20\n```\n\nMore text.'; const BLOCK2 = 'Here is text\n\n```a = 10```\n\nMore text.'; diff --git a/tests/test-coreutils/src/nbformat.spec.ts b/tests/test-coreutils/src/nbformat.spec.ts index 421af14e..02f4a0b3 100644 --- a/tests/test-coreutils/src/nbformat.spec.ts +++ b/tests/test-coreutils/src/nbformat.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { nbformat } from '@jupyterlab/coreutils/src'; +import { nbformat } from '@jupyterlab/coreutils'; const VALIDATE = nbformat.validateMimeValue; diff --git a/tests/test-coreutils/src/pageconfig.spec.ts b/tests/test-coreutils/src/pageconfig.spec.ts index 77ab3a29..0f302314 100644 --- a/tests/test-coreutils/src/pageconfig.spec.ts +++ b/tests/test-coreutils/src/pageconfig.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { PageConfig } from '@jupyterlab/coreutils/src'; +import { PageConfig } from '@jupyterlab/coreutils'; describe('@jupyterlab/coreutils', () => { describe('PageConfig', () => { diff --git a/tests/test-coreutils/src/path.spec.ts b/tests/test-coreutils/src/path.spec.ts index ce619f48..92388252 100644 --- a/tests/test-coreutils/src/path.spec.ts +++ b/tests/test-coreutils/src/path.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { PathExt } from '@jupyterlab/coreutils/src'; +import { PathExt } from '@jupyterlab/coreutils'; const TESTPATH = 'foo/test/simple/test-path.js'; diff --git a/tests/test-coreutils/src/poll.spec.ts b/tests/test-coreutils/src/poll.spec.ts new file mode 100644 index 00000000..ef359891 --- /dev/null +++ b/tests/test-coreutils/src/poll.spec.ts @@ -0,0 +1,477 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import { expect } from 'chai'; + +import { IPoll, Poll } from '@jupyterlab/coreutils'; + +import { sleep } from '@jupyterlab/testutils'; + +describe('Poll', () => { + let poll: Poll; + + afterEach(() => { + poll.dispose(); + }); + + describe('#constructor()', () => { + it('should create a poll', () => { + poll = new Poll({ + auto: false, + factory: () => Promise.resolve(), + name: '@jupyterlab/test-coreutils:Poll#constructor()-1' + }); + expect(poll).to.be.an.instanceof(Poll); + }); + + it('should start polling automatically', async () => { + const expected = 'started resolved'; + const ticker: IPoll.Phase[] = []; + poll = new Poll({ + name: '@jupyterlab/test-coreutils:Poll#constructor()-2', + frequency: { interval: 100 }, + factory: () => Promise.resolve() + }); + poll.ticked.connect((_, tick) => { + ticker.push(tick.phase); + }); + expect(poll.state.phase).to.equal('constructed'); + await poll.tick; + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + expect(ticker.join(' ')).to.equal(expected); + }); + + it('should not poll if `auto` is set to false', async () => { + const expected = ''; + const ticker: IPoll.Phase[] = []; + poll = new Poll({ + auto: false, + name: '@jupyterlab/test-coreutils:Poll#constructor()-2', + frequency: { interval: 100 }, + factory: () => Promise.resolve() + }); + poll.ticked.connect((_, tick) => { + ticker.push(tick.phase); + }); + expect(poll.state.phase).to.equal('constructed'); + await sleep(250); // Sleep for longer than the interval. + expect(ticker.join(' ')).to.equal(expected); + }); + + describe('#options.frequency', () => { + it('should set frequency interval', () => { + const interval = 9000; + poll = new Poll({ + factory: () => Promise.resolve(), + frequency: { interval }, + name: '@jupyterlab/test-coreutils:Poll#frequency:interval-1' + }); + expect(poll.frequency.interval).to.equal(interval); + }); + + it('should default frequency interval to `1000`', () => { + poll = new Poll({ + factory: () => Promise.resolve(), + frequency: {}, + name: '@jupyterlab/test-coreutils:Poll#frequency:interval-2' + }); + expect(poll.frequency.interval).to.equal(1000); + }); + + it('should set backoff', () => { + const backoff = false; + poll = new Poll({ + factory: () => Promise.resolve(), + frequency: { backoff }, + name: '@jupyterlab/test-coreutils:Poll#frequency:backoff-1' + }); + expect(poll.frequency.backoff).to.equal(backoff); + }); + + it('should default backoff to `true`', () => { + poll = new Poll({ + factory: () => Promise.resolve(), + name: '@jupyterlab/test-coreutils:Poll#frequency:backoff-2' + }); + expect(poll.frequency.backoff).to.equal(true); + }); + + it('should set max value', () => { + const max = 200000; + poll = new Poll({ + factory: () => Promise.resolve(), + frequency: { max }, + name: '@jupyterlab/test-coreutils:Poll#max-1' + }); + expect(poll.frequency.max).to.equal(200000); + }); + + it('should default max to 30s', () => { + const interval = 500; + const max = 30 * 1000; + poll = new Poll({ + frequency: { interval }, + factory: () => Promise.resolve(), + name: '@jupyterlab/test-coreutils:Poll#frequency:max-2' + }); + expect(poll.frequency.max).to.equal(max); + }); + it('should default max to 30s', () => { + const interval = 500; + const max = 30 * 1000; + poll = new Poll({ + frequency: { interval }, + factory: () => Promise.resolve(), + name: '@jupyterlab/test-coreutils:Poll#frequency:max-2' + }); + expect(poll.frequency.max).to.equal(max); + }); + }); + }); + + describe('#name', () => { + it('should be set to value passed in during instantation', () => { + const factory = () => Promise.resolve(); + const name = '@jupyterlab/test-coreutils:Poll#name-1'; + poll = new Poll({ factory, name }); + expect(poll.name).to.equal(name); + }); + + it('should default to `unknown`', () => { + poll = new Poll({ factory: () => Promise.resolve() }); + expect(poll.name).to.equal('unknown'); + }); + }); + + describe('#disposed', () => { + it('should emit when the poll is disposed', () => { + poll = new Poll({ + factory: () => Promise.resolve(), + name: '@jupyterlab/test-coreutils:Poll#disposed-1' + }); + let disposed = false; + poll.disposed.connect(() => { + disposed = true; + }); + poll.dispose(); + expect(disposed).to.equal(true); + }); + }); + + describe('#isDisposed', () => { + it('should indicate whether the poll is disposed', () => { + poll = new Poll({ + factory: () => Promise.resolve(), + name: '@jupyterlab/test-coreutils:Poll#isDisposed-1' + }); + expect(poll.isDisposed).to.equal(false); + poll.dispose(); + expect(poll.isDisposed).to.equal(true); + }); + }); + + describe('#tick', () => { + it('should resolve after a tick', async () => { + poll = new Poll({ + auto: false, + factory: () => Promise.resolve(), + frequency: { interval: 200, backoff: false }, + name: '@jupyterlab/test-coreutils:Poll#tick-1' + }); + const expected = 'started resolved resolved'; + const ticker: IPoll.Phase[] = []; + const tock = (poll: Poll) => { + ticker.push(poll.state.phase); + poll.tick.then(tock).catch(() => undefined); + }; + void poll.tick.then(tock); + void poll.start(); + await sleep(250); // Sleep for longer than the interval. + expect(ticker.join(' ')).to.equal(expected); + }); + + it('should resolve after `ticked` emits in lock step', async () => { + poll = new Poll({ + factory: () => + Math.random() > 0.5 ? Promise.resolve() : Promise.reject(), + frequency: { interval: 0, backoff: false }, + name: '@jupyterlab/test-coreutils:Poll#tick-2' + }); + const ticker: IPoll.Phase[] = []; + const tocker: IPoll.Phase[] = []; + poll.ticked.connect(async (_, state) => { + ticker.push(state.phase); + expect(ticker.length).to.equal(tocker.length + 1); + }); + const tock = async (poll: Poll) => { + tocker.push(poll.state.phase); + expect(ticker.join(' ')).to.equal(tocker.join(' ')); + poll.tick.then(tock).catch(() => undefined); + }; + // Kick off the promise listener, but void its settlement to verify that + // the poll's internal sync of the promise and the signal is correct. + void poll.tick.then(tock); + await poll.stop(); + await poll.start(); + await poll.tick; + await poll.refresh(); + await poll.tick; + await poll.refresh(); + await poll.tick; + await poll.refresh(); + await poll.tick; + await poll.stop(); + await poll.start(); + await poll.tick; + await sleep(100); + await poll.tick; + expect(ticker.join(' ')).to.equal(tocker.join(' ')); + }); + }); + + describe('#ticked', () => { + it('should emit a tick identical to the poll state', async () => { + poll = new Poll({ + factory: () => Promise.resolve(), + frequency: { interval: 100, backoff: false }, + name: '@jupyterlab/test-coreutils:Poll#ticked-3' + }); + poll.ticked.connect((_, tick) => { + expect(tick).to.equal(poll.state); + }); + await sleep(250); + }); + }); + + describe('#dispose()', () => { + it('should dispose the poll and be safe to call repeatedly', async () => { + let rejected = false; + let tick: Promise; + poll = new Poll({ + name: '@jupyterlab/test-coreutils:Poll#dispose()-1', + factory: () => Promise.resolve() + }); + tick = poll.tick; + expect(poll.isDisposed).to.equal(false); + poll.dispose(); + expect(poll.isDisposed).to.equal(true); + try { + await tick; + } catch (error) { + rejected = true; + } + poll.dispose(); + expect(rejected).to.equal(true); + }); + }); + + describe('#refresh()', () => { + it('should refresh the poll, superseding `started`', async () => { + const expected = 'refreshed resolved'; + const ticker: IPoll.Phase[] = []; + poll = new Poll({ + name: '@jupyterlab/test-coreutils:Poll#refresh()-1', + frequency: { interval: 100 }, + factory: () => Promise.resolve() + }); + poll.ticked.connect((_, tick) => { + ticker.push(tick.phase); + }); + expect(poll.state.phase).to.equal('constructed'); + await poll.refresh(); + expect(poll.state.phase).to.equal('refreshed'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + expect(ticker.join(' ')).to.equal(expected); + }); + + it('should be safe to call multiple times', async () => { + const expected = 'started resolved refreshed resolved'; + const ticker: IPoll.Phase[] = []; + poll = new Poll({ + name: '@jupyterlab/test-coreutils:Poll#refresh()-2', + frequency: { interval: 100 }, + factory: () => Promise.resolve() + }); + poll.ticked.connect((_, tick) => { + ticker.push(tick.phase); + }); + expect(poll.state.phase).to.equal('constructed'); + await poll.tick; + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + await poll.refresh(); + expect(poll.state.phase).to.equal('refreshed'); + await poll.refresh(); + expect(poll.state.phase).to.equal('refreshed'); + await poll.refresh(); + expect(poll.state.phase).to.equal('refreshed'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + expect(ticker.join(' ')).to.equal(expected); + }); + }); + + describe('#start()', () => { + it('should start the poll if it is stopped', async () => { + const expected = 'stopped started resolved'; + const ticker: IPoll.Phase[] = []; + poll = new Poll({ + name: '@jupyterlab/test-coreutils:Poll#start()-1', + frequency: { interval: 100 }, + factory: () => Promise.resolve() + }); + poll.ticked.connect((_, tick) => { + ticker.push(tick.phase); + }); + await poll.stop(); + expect(poll.state.phase).to.equal('stopped'); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + expect(ticker.join(' ')).to.equal(expected); + }); + + it('be safe to call multiple times and no-op if unnecessary', async () => { + const expected = 'started resolved stopped started resolved'; + const ticker: IPoll.Phase[] = []; + poll = new Poll({ + auto: false, + name: '@jupyterlab/test-coreutils:Poll#start()-2', + frequency: { interval: 100 }, + factory: () => Promise.resolve() + }); + poll.ticked.connect((_, tick) => { + ticker.push(tick.phase); + }); + expect(poll.state.phase).to.equal('constructed'); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + await poll.stop(); + expect(poll.state.phase).to.equal('stopped'); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + expect(ticker.join(' ')).to.equal(expected); + }); + }); + + describe('#stop()', () => { + it('should stop the poll if it is active', async () => { + const expected = 'started stopped started resolved'; + const ticker: IPoll.Phase[] = []; + poll = new Poll({ + auto: false, + name: '@jupyterlab/test-coreutils:Poll#stop()-1', + frequency: { interval: 100 }, + factory: () => Promise.resolve() + }); + poll.ticked.connect((_, tick) => { + ticker.push(tick.phase); + }); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.stop(); + expect(poll.state.phase).to.equal('stopped'); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + expect(ticker.join(' ')).to.equal(expected); + }); + + it('be safe to call multiple times', async () => { + const expected = 'started stopped started resolved'; + const ticker: IPoll.Phase[] = []; + poll = new Poll({ + auto: false, + name: '@jupyterlab/test-coreutils:Poll#stop()-2', + frequency: { interval: 100 }, + factory: () => Promise.resolve() + }); + poll.ticked.connect((_, tick) => { + ticker.push(tick.phase); + }); + expect(poll.state.phase).to.equal('constructed'); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.stop(); + expect(poll.state.phase).to.equal('stopped'); + await poll.stop(); + expect(poll.state.phase).to.equal('stopped'); + await poll.stop(); + expect(poll.state.phase).to.equal('stopped'); + await poll.start(); + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + expect(ticker.join(' ')).to.equal(expected); + }); + }); + + describe('#schedule()', () => { + it('should schedule the next poll state', async () => { + poll = new Poll({ + factory: () => Promise.resolve(), + frequency: { interval: 100 }, + name: '@jupyterlab/test-coreutils:Poll#schedule()-1' + }); + expect(poll.state.phase).to.equal('constructed'); + await poll.tick; + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + await poll.schedule({ phase: 'refreshed' }); + expect(poll.state.phase).to.equal('refreshed'); + return; + }); + + it('should default to standby state', async () => { + poll = new Poll({ + factory: () => Promise.resolve(), + frequency: { interval: 100 }, + name: '@jupyterlab/test-coreutils:Poll#schedule()-2' + }); + expect(poll.state.phase).to.equal('constructed'); + await poll.tick; + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + await poll.schedule(); + expect(poll.state.phase).to.equal('standby'); + return; + }); + + it('should support phase transition cancellation', async () => { + poll = new Poll({ + factory: () => Promise.resolve(), + frequency: { interval: 100 }, + name: '@jupyterlab/test-coreutils:Poll#schedule()-3' + }); + expect(poll.state.phase).to.equal('constructed'); + await poll.tick; + expect(poll.state.phase).to.equal('started'); + await poll.tick; + expect(poll.state.phase).to.equal('resolved'); + await poll.schedule(); + expect(poll.state.phase).to.equal('standby'); + await poll.schedule({ + cancel: last => last.phase === 'standby', + phase: 'refreshed' + }); + expect(poll.state.phase).to.equal('standby'); + return; + }); + }); +}); diff --git a/tests/test-coreutils/src/ratelimiter.spec.ts b/tests/test-coreutils/src/ratelimiter.spec.ts new file mode 100644 index 00000000..6453326f --- /dev/null +++ b/tests/test-coreutils/src/ratelimiter.spec.ts @@ -0,0 +1,182 @@ +// Copyright (c) Jupyter Development Team. +// Distributed under the terms of the Modified BSD License. + +import { expect } from 'chai'; + +import { Debouncer, Throttler } from '@jupyterlab/coreutils'; + +import { sleep } from '@jupyterlab/testutils'; + +describe('Debouncer', () => { + let debouncer: Debouncer; + + afterEach(() => { + debouncer.dispose(); + }); + + describe('#invoke()', () => { + it('should rate limit invocations', async () => { + const limit = 500; + const wanted = [1, 1, 1, 1, 1, 1]; + let called = 0; + + debouncer = new Debouncer(() => ++called, limit); + + const one = debouncer.invoke(); + const two = debouncer.invoke(); + const three = debouncer.invoke(); + const four = debouncer.invoke(); + const five = debouncer.invoke(); + const six = debouncer.invoke(); + + expect(await one).to.equal(wanted[0]); + expect(await two).to.equal(wanted[1]); + expect(await three).to.equal(wanted[2]); + expect(await four).to.equal(wanted[3]); + expect(await five).to.equal(wanted[4]); + expect(await six).to.equal(wanted[5]); + }); + + it('should debounce invocations within an interval', async () => { + const limit = 500; + const sleeps = [200, 200, 200, 200, 600]; + const wanted = [1, 1, 1, 1, 1, 2]; + let called = 0; + + debouncer = new Debouncer(() => ++called, limit); + + const one = debouncer.invoke(); + await sleep(sleeps[0]); + const two = debouncer.invoke(); + await sleep(sleeps[1]); + const three = debouncer.invoke(); + await sleep(sleeps[2]); + const four = debouncer.invoke(); + await sleep(sleeps[3]); + const five = debouncer.invoke(); + await sleep(sleeps[4]); + const six = debouncer.invoke(); + + expect(await one).to.equal(wanted[0]); + expect(await two).to.equal(wanted[1]); + expect(await three).to.equal(wanted[2]); + expect(await four).to.equal(wanted[3]); + expect(await five).to.equal(wanted[4]); + expect(await six).to.equal(wanted[5]); + }); + }); + + describe('#stop()', () => { + it('should stop an invocation that has not fired yet', async () => { + let called = 0; + let caught = 0; + const wanted = [1, 2, 3, 4, 5, 6]; + + debouncer = new Debouncer(() => ++called); + + const one = debouncer.invoke().catch(_ => ++caught); + const two = debouncer.invoke().catch(_ => ++caught); + const three = debouncer.invoke().catch(_ => ++caught); + const four = debouncer.invoke().catch(_ => ++caught); + const five = debouncer.invoke().catch(_ => ++caught); + const six = debouncer.invoke().catch(_ => ++caught); + + void debouncer.stop(); + + expect(await one).to.equal(wanted[0]); + expect(await two).to.equal(wanted[1]); + expect(await three).to.equal(wanted[2]); + expect(await four).to.equal(wanted[3]); + expect(await five).to.equal(wanted[4]); + expect(await six).to.equal(wanted[5]); + expect(called).to.equal(0); + }); + }); +}); + +describe('Throttler', () => { + let throttler: Throttler; + + afterEach(() => { + throttler.dispose(); + }); + + describe('#invoke()', () => { + it('should rate limit invocations', async () => { + const limit = 500; + const wanted = [1, 1, 1, 1, 1, 1]; + let called = 0; + + throttler = new Throttler(() => ++called, limit); + + const one = throttler.invoke(); + const two = throttler.invoke(); + const three = throttler.invoke(); + const four = throttler.invoke(); + const five = throttler.invoke(); + const six = throttler.invoke(); + + expect(await one).to.equal(wanted[0]); + expect(await two).to.equal(wanted[1]); + expect(await three).to.equal(wanted[2]); + expect(await four).to.equal(wanted[3]); + expect(await five).to.equal(wanted[4]); + expect(await six).to.equal(wanted[5]); + }); + + it('should throttle invocations within an interval', async () => { + const limit = 500; + const sleeps = [200, 200, 200, 200, 600]; + const wanted = [1, 1, 1, 2, 2, 3]; + let called = 0; + + throttler = new Throttler(() => ++called, limit); + + const one = throttler.invoke(); + await sleep(sleeps[0]); + const two = throttler.invoke(); + await sleep(sleeps[1]); + const three = throttler.invoke(); + await sleep(sleeps[2]); + const four = throttler.invoke(); + await sleep(sleeps[3]); + const five = throttler.invoke(); + await sleep(sleeps[4]); + const six = throttler.invoke(); + + expect(await one).to.equal(wanted[0]); + expect(await two).to.equal(wanted[1]); + expect(await three).to.equal(wanted[2]); + expect(await four).to.equal(wanted[3]); + expect(await five).to.equal(wanted[4]); + expect(await six).to.equal(wanted[5]); + }); + }); + + describe('#stop()', () => { + it('should stop an invocation that has not fired yet', async () => { + let called = 0; + let caught = 0; + const wanted = [1, 2, 3, 4, 5, 6]; + + throttler = new Throttler(() => ++called); + + const one = throttler.invoke().catch(_ => ++caught); + const two = throttler.invoke().catch(_ => ++caught); + const three = throttler.invoke().catch(_ => ++caught); + const four = throttler.invoke().catch(_ => ++caught); + const five = throttler.invoke().catch(_ => ++caught); + const six = throttler.invoke().catch(_ => ++caught); + + void throttler.stop(); + + expect(await one).to.equal(wanted[0]); + expect(await two).to.equal(wanted[1]); + expect(await three).to.equal(wanted[2]); + expect(await four).to.equal(wanted[3]); + expect(await five).to.equal(wanted[4]); + expect(await six).to.equal(wanted[5]); + expect(called).to.equal(0); + }); + }); +}); diff --git a/tests/test-coreutils/src/settingregistry.spec.ts b/tests/test-coreutils/src/settingregistry.spec.ts index e7fb1eeb..34142198 100644 --- a/tests/test-coreutils/src/settingregistry.spec.ts +++ b/tests/test-coreutils/src/settingregistry.spec.ts @@ -9,7 +9,7 @@ import { SettingRegistry, Settings, StateDB -} from '@jupyterlab/coreutils/src'; +} from '@jupyterlab/coreutils'; import { signalToPromise } from '@jupyterlab/testutils'; @@ -18,10 +18,6 @@ import { JSONObject } from '@phosphor/coreutils'; class TestConnector extends StateDB { schemas: { [key: string]: ISettingRegistry.ISchema } = {}; - constructor() { - super({ namespace: 'setting-registry-tests' }); - } - async fetch(id: string): Promise { const fetched = await super.fetch(id); if (!fetched && !this.schemas[id]) { diff --git a/tests/test-coreutils/src/statedb.spec.ts b/tests/test-coreutils/src/statedb.spec.ts index ae2b35c7..c121ddd9 100644 --- a/tests/test-coreutils/src/statedb.spec.ts +++ b/tests/test-coreutils/src/statedb.spec.ts @@ -3,69 +3,69 @@ import { expect } from 'chai'; -import { StateDB } from '@jupyterlab/coreutils/src'; +import { StateDB } from '@jupyterlab/coreutils'; import { PromiseDelegate, ReadonlyJSONObject } from '@phosphor/coreutils'; describe('StateDB', () => { - beforeEach(() => { - window.localStorage.clear(); - }); - describe('#constructor()', () => { it('should create a state database', () => { - const db = new StateDB({ namespace: 'test' }); + const db = new StateDB(); expect(db).to.be.an.instanceof(StateDB); }); it('should allow an overwrite data transformation', async () => { - const transform = new PromiseDelegate(); - const db = new StateDB({ - namespace: 'test', - transform: transform.promise - }); - const prepopulate = new StateDB({ namespace: 'test' }); + const connector = new StateDB.Connector(); const key = 'foo'; const correct = 'bar'; const incorrect = 'baz'; + + expect(await connector.fetch(key)).to.be.undefined; + await connector.save(key, `{ "v": "${incorrect}"}`); + expect(JSON.parse(await connector.fetch(key)).v).to.equal(incorrect); + + const transform = new PromiseDelegate(); + const db = new StateDB({ connector, transform: transform.promise }); const transformation: StateDB.DataTransform = { type: 'overwrite', contents: { [key]: correct } }; - // By sharing a namespace, the two databases will share data. - await prepopulate.save(key, incorrect); - let value = await prepopulate.fetch(key); - expect(value).to.equal(incorrect); transform.resolve(transformation); await transform.promise; - value = await db.fetch(key); - expect(value).to.equal(correct); - await db.clear(); + expect(await db.fetch(key)).to.equal(correct); + expect(JSON.parse(await connector.fetch(key)).v).to.equal(correct); }); it('should allow a merge data transformation', async () => { - let transform = new PromiseDelegate(); - let db = new StateDB({ namespace: 'test', transform: transform.promise }); - let prepopulate = new StateDB({ namespace: 'test' }); - let key = 'baz'; - let value = 'qux'; + const connector = new StateDB.Connector(); + const k1 = 'foo'; + const v1 = 'bar'; + const k2 = 'baz'; + const v2 = 'qux'; - // By sharing a namespace, the two databases will share data. - await prepopulate.save('foo', 'bar'); - transform.resolve({ type: 'merge', contents: { [key]: value } }); - let saved = await db.fetch('foo'); - expect(saved).to.equal('bar'); - saved = await db.fetch(key); - expect(saved).to.equal(value); - await db.clear(); + expect(await connector.fetch(k1)).to.be.undefined; + expect(await connector.fetch(k2)).to.be.undefined; + await connector.save(k1, `{ "v": "${v1}"}`); + expect(JSON.parse(await connector.fetch(k1)).v).to.equal(v1); + + const transform = new PromiseDelegate(); + const db = new StateDB({ connector, transform: transform.promise }); + const transformation: StateDB.DataTransform = { + type: 'merge', + contents: { [k2]: v2 } + }; + + transform.resolve(transformation); + await transform.promise; + expect(await db.fetch(k1)).to.equal(v1); + expect(await db.fetch(k2)).to.equal(v2); }); }); describe('#changed', () => { it('should emit changes when the database is updated', async () => { - const namespace = 'test-namespace'; - const db = new StateDB({ namespace }); + const db = new StateDB(); const changes: StateDB.Change[] = [ { id: 'foo', type: 'save' }, { id: 'foo', type: 'remove' }, @@ -74,7 +74,7 @@ describe('StateDB', () => { ]; const recorded: StateDB.Change[] = []; - db.changed.connect((sender, change) => { + db.changed.connect((_, change) => { recorded.push(change); }); @@ -83,99 +83,37 @@ describe('StateDB', () => { await db.save('bar', 1); await db.remove('bar'); expect(recorded).to.deep.equal(changes); - await db.clear(); - }); - }); - - describe('#maxLength', () => { - it('should enforce the maximum length of a stored item', async () => { - const db = new StateDB({ namespace: 'test' }); - const key = 'test-key'; - const data = { a: new Array(db.maxLength).join('A') }; - let failed = false; - try { - await db.save(key, data); - } catch (e) { - failed = true; - } - expect(failed).to.equal(true); - }); - }); - - describe('#namespace', () => { - it('should be the read-only internal namespace', () => { - const namespace = 'test-namespace'; - const db = new StateDB({ namespace }); - expect(db.namespace).to.equal(namespace); }); }); describe('#clear()', () => { it('should empty the items in a state database', async () => { - const { localStorage } = window; + const connector = new StateDB.Connector(); + const db = new StateDB({ connector }); - const db = new StateDB({ namespace: 'test-namespace' }); - const key = 'foo:bar'; - const value = { qux: 'quux' }; - - expect(localStorage.length).to.equal(0); - await db.save(key, value); - expect(localStorage).to.have.length(1); + expect((await connector.list()).ids).to.be.empty; + await db.save('foo', 'bar'); + expect((await connector.list()).ids).not.to.be.empty; await db.clear(); - expect(localStorage.length).to.equal(0); - }); - - it('should only clear its own namespace', async () => { - const { localStorage } = window; - - const db1 = new StateDB({ namespace: 'test-namespace-1' }); - const db2 = new StateDB({ namespace: 'test-namespace-2' }); - - expect(localStorage.length).to.equal(0); - await db1.save('foo', { bar: null }); - expect(localStorage).to.have.length(1); - await db2.save('baz', { qux: null }); - expect(localStorage).to.have.length(2); - await db1.clear(); - expect(localStorage).to.have.length(1); - await db2.clear(); - expect(localStorage.length).to.equal(0); + expect((await connector.list()).ids).to.be.empty; }); }); describe('#fetch()', () => { it('should fetch a stored key', async () => { - const { localStorage } = window; - - const db = new StateDB({ namespace: 'test-namespace' }); + const db = new StateDB(); const key = 'foo:bar'; const value = { baz: 'qux' }; - expect(localStorage.length).to.equal(0); + expect(await db.fetch(key)).to.be.undefined; await db.save(key, value); - expect(localStorage).to.have.length(1); - const fetched = await db.fetch(key); - expect(fetched).to.deep.equal(value); - await db.clear(); - }); - - it('should resolve a nonexistent key fetch with undefined', async () => { - let { localStorage } = window; - - let db = new StateDB({ namespace: 'test-namespace' }); - let key = 'foo:bar'; - - expect(localStorage.length).to.equal(0); - const fetched = await db.fetch(key); - expect(fetched).to.be.undefined; + expect(await db.fetch(key)).to.deep.equal(value); }); }); describe('#list()', () => { it('should fetch a stored namespace', async () => { - const { localStorage } = window; - - const db = new StateDB({ namespace: 'test-namespace' }); + const db = new StateDB(); const keys = [ 'foo:bar', 'foo:baz', @@ -185,10 +123,8 @@ describe('StateDB', () => { 'abc:jkl' ]; - expect(localStorage.length).to.equal(0); - const promises = keys.map(key => db.save(key, { value: key })); - await Promise.all(promises); - expect(localStorage).to.have.length(keys.length); + await Promise.all(keys.map(key => db.save(key, { value: key }))); + let fetched = await db.list('foo'); expect(fetched.ids.length).to.equal(3); expect(fetched.values.length).to.equal(3); @@ -203,53 +139,40 @@ describe('StateDB', () => { expect(fetched.values.length).to.equal(3); sorted = fetched.ids.sort((a, b) => a.localeCompare(b)); - expect(sorted[0]).to.equal(keys[3]); expect(sorted[1]).to.equal(keys[4]); expect(sorted[2]).to.equal(keys[5]); - - await db.clear(); }); }); describe('#remove()', () => { it('should remove a stored key', async () => { - const { localStorage } = window; - - const db = new StateDB({ namespace: 'test-namespace' }); + const db = new StateDB(); const key = 'foo:bar'; const value = { baz: 'qux' }; - expect(localStorage.length).to.equal(0); + expect(await db.fetch(key)).to.be.undefined; await db.save(key, value); - expect(localStorage).to.have.length(1); + expect(await db.fetch(key)).to.deep.equal(value); await db.remove(key); - expect(localStorage.length).to.equal(0); + expect(await db.fetch(key)).to.be.undefined; }); }); describe('#save()', () => { it('should save a key and a value', async () => { - const { localStorage } = window; - - const db = new StateDB({ namespace: 'test-namespace' }); + const db = new StateDB(); const key = 'foo:bar'; const value = { baz: 'qux' }; - expect(localStorage.length).to.equal(0); await db.save(key, value); - const fetched = await db.fetch(key); - expect(fetched).to.deep.equal(value); - await db.remove(key); - expect(localStorage.length).to.equal(0); + expect(await db.fetch(key)).to.deep.equal(value); }); }); describe('#toJSON()', () => { it('return the full contents of a state database', async () => { - const { localStorage } = window; - - const db = new StateDB({ namespace: 'test-namespace' }); + const db = new StateDB(); const contents: ReadonlyJSONObject = { abc: 'def', ghi: 'jkl', @@ -259,13 +182,11 @@ describe('StateDB', () => { } }; - expect(localStorage.length).to.equal(0); await Promise.all( Object.keys(contents).map(key => db.save(key, contents[key])) ); const serialized = await db.toJSON(); expect(serialized).to.deep.equal(contents); - await db.clear(); }); }); }); diff --git a/tests/test-coreutils/src/time.spec.ts b/tests/test-coreutils/src/time.spec.ts index 10a5664c..affe9256 100644 --- a/tests/test-coreutils/src/time.spec.ts +++ b/tests/test-coreutils/src/time.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { Time } from '@jupyterlab/coreutils/src'; +import { Time } from '@jupyterlab/coreutils'; describe('@jupyterlab/coreutils', () => { describe('Time', () => { diff --git a/tests/test-coreutils/src/url.spec.ts b/tests/test-coreutils/src/url.spec.ts index d136ee4f..f21e23d1 100644 --- a/tests/test-coreutils/src/url.spec.ts +++ b/tests/test-coreutils/src/url.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { URLExt } from '@jupyterlab/coreutils/src'; +import { URLExt } from '@jupyterlab/coreutils'; describe('@jupyterlab/coreutils', () => { describe('URLExt', () => { diff --git a/tests/test-csvviewer/package.json b/tests/test-csvviewer/package.json index 7cc7d702..bd241f65 100644 --- a/tests/test-csvviewer/package.json +++ b/tests/test-csvviewer/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-csvviewer", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -13,26 +13,26 @@ "test:firefox": "python run-test.py --browsers=Firefox karma.conf.js", "test:ie": "python run-test.py --browsers=IE karma.conf.js", "watch": "tsc -b --watch", - "watch:src": "tsp -p src --watch" + "watch:src": "tsc -p src --watch" }, "dependencies": { - "@jupyterlab/csvviewer": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/csvviewer": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", "@phosphor/datagrid": "^0.1.6", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", "csv-spectrum": "~1.0.0", "simulate-event": "~1.4.0" }, "devDependencies": { - "@types/chai": "~4.0.10", - "karma": "~2.0.4", + "@types/chai": "^4.1.7", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", - "puppeteer": "^1.5.0", + "puppeteer": "~1.17.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-csvviewer/src/model.spec.ts b/tests/test-csvviewer/src/model.spec.ts index de0742c1..b9be33bc 100644 --- a/tests/test-csvviewer/src/model.spec.ts +++ b/tests/test-csvviewer/src/model.spec.ts @@ -9,67 +9,67 @@ import { DSVModel } from '@jupyterlab/csvviewer'; const CSV_TEST_FILES = [ [ 'comma_in_quotes', - require('csv-spectrum/csvs/comma_in_quotes.csv'), + require('csv-spectrum/csvs/comma_in_quotes.csv').default, require('csv-spectrum/json/comma_in_quotes.json') ], [ 'empty', - require('csv-spectrum/csvs/empty.csv'), + require('csv-spectrum/csvs/empty.csv').default, require('csv-spectrum/json/empty.json') ], [ 'empty_crlf', - require('csv-spectrum/csvs/empty_crlf.csv'), + require('csv-spectrum/csvs/empty_crlf.csv').default, require('csv-spectrum/json/empty_crlf.json') ], [ 'escaped_quotes', - require('csv-spectrum/csvs/escaped_quotes.csv'), + require('csv-spectrum/csvs/escaped_quotes.csv').default, require('csv-spectrum/json/escaped_quotes.json') ], [ 'json', - require('csv-spectrum/csvs/json.csv'), + require('csv-spectrum/csvs/json.csv').default, require('csv-spectrum/json/json.json') ], [ 'newlines', - require('csv-spectrum/csvs/newlines.csv'), + require('csv-spectrum/csvs/newlines.csv').default, require('csv-spectrum/json/newlines.json') ], [ 'newlines_crlf', - require('csv-spectrum/csvs/newlines_crlf.csv'), + require('csv-spectrum/csvs/newlines_crlf.csv').default, require('csv-spectrum/json/newlines_crlf.json') ], [ 'quotes_and_newlines', - require('csv-spectrum/csvs/quotes_and_newlines.csv'), + require('csv-spectrum/csvs/quotes_and_newlines.csv').default, require('csv-spectrum/json/quotes_and_newlines.json') ], [ 'simple', - require('csv-spectrum/csvs/simple.csv'), + require('csv-spectrum/csvs/simple.csv').default, require('csv-spectrum/json/simple.json') ], [ 'simple_crlf', - require('csv-spectrum/csvs/simple_crlf.csv'), + require('csv-spectrum/csvs/simple_crlf.csv').default, require('csv-spectrum/json/simple_crlf.json') ], [ 'utf8', - require('csv-spectrum/csvs/utf8.csv'), + require('csv-spectrum/csvs/utf8.csv').default, require('csv-spectrum/json/utf8.json') ] ]; diff --git a/tests/test-csvviewer/src/widget.spec.ts b/tests/test-csvviewer/src/widget.spec.ts index 96658dd7..6f3850ab 100644 --- a/tests/test-csvviewer/src/widget.spec.ts +++ b/tests/test-csvviewer/src/widget.spec.ts @@ -18,7 +18,7 @@ import { JSONModel, DataGrid, CellRenderer } from '@phosphor/datagrid'; function createContext(): Context { const factory = new TextModelFactory(); - const manager = new ServiceManager(); + const manager = new ServiceManager({ standby: 'never' }); const path = UUID.uuid4() + '.csv'; return new Context({ factory, manager, path }); } diff --git a/tests/test-docmanager/package.json b/tests/test-docmanager/package.json index a9070177..f86714b2 100644 --- a/tests/test-docmanager/package.json +++ b/tests/test-docmanager/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-docmanager", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -13,24 +13,24 @@ "test:firefox": "python run-test.py --browsers=Firefox karma.conf.js", "test:ie": "python run-test.py --browsers=IE karma.conf.js", "watch": "tsc -b --watch", - "watch:src": "tsp -p src --watch" + "watch:src": "tsc -p src --watch" }, "dependencies": { - "@jupyterlab/docmanager": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/docmanager": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0" }, "devDependencies": { - "@types/chai": "~4.0.10", - "karma": "~2.0.4", + "@types/chai": "^4.1.7", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", - "puppeteer": "^1.5.0", + "puppeteer": "~1.17.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-docmanager/src/manager.spec.ts b/tests/test-docmanager/src/manager.spec.ts index b5458d40..907aaf43 100644 --- a/tests/test-docmanager/src/manager.spec.ts +++ b/tests/test-docmanager/src/manager.spec.ts @@ -30,6 +30,37 @@ class WidgetFactory extends ABCWidgetFactory { } } +/** + * A test documentWidget that maintains some state in + * count + */ +class CloneTestWidget extends DocumentWidget { + constructor(args: any) { + super(args); + this.counter = args.count; + } + counter: number = 0; +} + +/** + * A widget factory for CloneTestWidget widgets + */ +class WidgetFactoryWithSharedState extends ABCWidgetFactory { + protected createNewWidget( + context: DocumentRegistry.Context + ): CloneTestWidget { + return new CloneTestWidget({ context, content: new Widget(), count: 0 }); + } + + clone(widget: CloneTestWidget, context: DocumentRegistry.Context) { + return new CloneTestWidget({ + context, + content: new Widget(), + count: widget.counter + 1 + }); + } +} + describe('@jupyterlab/docmanager', () => { let manager: DocumentManager; let services: ServiceManager.IManager; @@ -42,15 +73,20 @@ describe('@jupyterlab/docmanager', () => { canStartKernel: true, preferKernel: true }); + const widgetFactoryShared = new WidgetFactoryWithSharedState({ + name: 'CloneTestWidget', + fileTypes: [] + }); before(() => { - services = new ServiceManager(); + services = new ServiceManager({ standby: 'never' }); return services.ready; }); beforeEach(() => { const registry = new DocumentRegistry({ textModelFactory }); registry.addWidgetFactory(widgetFactory); + registry.addWidgetFactory(widgetFactoryShared); DocumentRegistry.defaultFileTypes.forEach(ft => { registry.addFileType(ft); }); @@ -319,6 +355,22 @@ describe('@jupyterlab/docmanager', () => { widget = new Widget(); expect(manager.cloneWidget(widget)).to.be.undefined; }); + + it('should allow widget factories to override clone', () => { + widget = manager.createNew('foo', 'CloneTestWidget'); + const clonedWidget: CloneTestWidget = manager.cloneWidget( + widget + ) as CloneTestWidget; + expect(clonedWidget.counter).to.equal(1); + const newWidget: CloneTestWidget = manager.createNew( + 'bar', + 'CloneTestWidget' + ) as CloneTestWidget; + expect(newWidget.counter).to.equal(0); + expect( + (manager.cloneWidget(clonedWidget) as CloneTestWidget).counter + ).to.equal(2); + }); }); describe('#closeFile()', () => { diff --git a/tests/test-docmanager/src/savehandler.spec.ts b/tests/test-docmanager/src/savehandler.spec.ts index 5302dc1b..9f7e24bb 100644 --- a/tests/test-docmanager/src/savehandler.spec.ts +++ b/tests/test-docmanager/src/savehandler.spec.ts @@ -29,7 +29,7 @@ describe('docregistry/savehandler', () => { let handler: SaveHandler; before(() => { - manager = new ServiceManager(); + manager = new ServiceManager({ standby: 'never' }); return manager.ready; }); diff --git a/tests/test-docmanager/src/widgetmanager.spec.ts b/tests/test-docmanager/src/widgetmanager.spec.ts index 6a5cd193..615f111d 100644 --- a/tests/test-docmanager/src/widgetmanager.spec.ts +++ b/tests/test-docmanager/src/widgetmanager.spec.ts @@ -43,9 +43,9 @@ class LoggingManager extends DocumentWidgetManager { return super.messageHook(handler, msg); } - setCaption(widget: Widget): void { + setCaption(widget: Widget): Promise { this.methods.push('setCaption'); - super.setCaption(widget); + return super.setCaption(widget); } onClose(widget: Widget): Promise { @@ -70,7 +70,7 @@ describe('@jupyterlab/docmanager', () => { }); before(() => { - services = new ServiceManager(); + services = new ServiceManager({ standby: 'never' }); }); beforeEach(() => { diff --git a/tests/test-docregistry/babel.config.js b/tests/test-docregistry/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-docregistry/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-docregistry/package.json b/tests/test-docregistry/package.json index 8d75114d..972f1f22 100644 --- a/tests/test-docregistry/package.json +++ b/tests/test-docregistry/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-docregistry", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,24 +12,24 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", "@phosphor/disposable": "^1.1.2", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "ts-jest": "^23.1.4" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-docregistry/src/context.spec.ts b/tests/test-docregistry/src/context.spec.ts index 8fef5737..be7a1d7a 100644 --- a/tests/test-docregistry/src/context.spec.ts +++ b/tests/test-docregistry/src/context.spec.ts @@ -13,7 +13,7 @@ import { Context, DocumentRegistry, TextModelFactory -} from '@jupyterlab/docregistry/src'; +} from '@jupyterlab/docregistry'; import { RenderMimeRegistry } from '@jupyterlab/rendermime'; @@ -30,7 +30,7 @@ describe('docregistry/context', () => { const factory = new TextModelFactory(); beforeAll(() => { - manager = new ServiceManager(); + manager = new ServiceManager({ standby: 'never' }); return manager.ready; }); @@ -251,7 +251,7 @@ describe('docregistry/context', () => { it('should be set after population', async () => { const { path } = context; - context.initialize(true); + void context.initialize(true); await context.ready; expect(context.contentsModel.path).to.equal(path); }); diff --git a/tests/test-docregistry/src/default.spec.ts b/tests/test-docregistry/src/default.spec.ts index 96abdb7e..322cd21f 100644 --- a/tests/test-docregistry/src/default.spec.ts +++ b/tests/test-docregistry/src/default.spec.ts @@ -18,7 +18,7 @@ import { IDocumentWidget, TextModelFactory, Context -} from '@jupyterlab/docregistry/src'; +} from '@jupyterlab/docregistry'; import { ServiceManager } from '@jupyterlab/services'; @@ -234,6 +234,18 @@ describe('docregistry/default', () => { expect(widget).to.be.an.instanceof(Widget); }); }); + + describe('#clone()', () => { + it('should call createNew in default implementation', () => { + const factory = createFactory(); + const context = createFileContext(); + const widget = factory.createNew(context); + const clonedWidget: IDocumentWidget = factory.clone(widget, context); + expect(clonedWidget).to.not.equal(widget); + expect(clonedWidget.hasClass('WidgetFactory')).to.be.true; + expect(clonedWidget.context).to.equal(widget.context); + }); + }); }); describe('Base64ModelFactory', () => { @@ -544,7 +556,7 @@ describe('docregistry/default', () => { }; beforeAll(async () => { - manager = new ServiceManager(); + manager = new ServiceManager({ standby: 'never' }); await manager.ready; }); @@ -587,7 +599,7 @@ describe('docregistry/default', () => { // Our promise should resolve before the widget reveal promise. expect(await Promise.race([widget.revealed, reveal])).to.equal(x); // The context ready promise should also resolve first. - context.initialize(true); + void context.initialize(true); expect( await Promise.race([widget.revealed, contextReady]) ).to.deep.equal([undefined, x]); diff --git a/tests/test-docregistry/src/mimedocument.spec.ts b/tests/test-docregistry/src/mimedocument.spec.ts index 0d49251b..d99c1d66 100644 --- a/tests/test-docregistry/src/mimedocument.spec.ts +++ b/tests/test-docregistry/src/mimedocument.spec.ts @@ -13,11 +13,15 @@ import { MimeContent, MimeDocument, MimeDocumentFactory -} from '@jupyterlab/docregistry/src'; +} from '@jupyterlab/docregistry'; import { RenderedText, IRenderMime } from '@jupyterlab/rendermime'; -import { createFileContext, defaultRenderMime } from '@jupyterlab/testutils'; +import { + createFileContext, + defaultRenderMime, + testEmission +} from '@jupyterlab/testutils'; const RENDERMIME = defaultRenderMime(); @@ -100,7 +104,7 @@ describe('docregistry/mimedocument', () => { renderTimeout: 1000, dataType: 'string' }); - dContext.initialize(true); + void dContext.initialize(true); await widget.ready; const layout = widget.layout as BoxLayout; expect(layout.widgets.length).to.equal(1); @@ -111,10 +115,10 @@ describe('docregistry/mimedocument', () => { it('should change the document contents', async () => { RENDERMIME.addFactory(fooFactory); await dContext.initialize(true); - let called = false; - dContext.model.contentChanged.connect(() => { - expect(dContext.model.toString()).to.equal('bar'); - called = true; + const emission = testEmission(dContext.model.contentChanged, { + test: () => { + expect(dContext.model.toString()).to.equal('bar'); + } }); const renderer = RENDERMIME.createRenderer('text/foo'); const widget = new LogRenderer({ @@ -125,7 +129,7 @@ describe('docregistry/mimedocument', () => { dataType: 'string' }); await widget.ready; - expect(called).to.equal(true); + await emission; }); }); }); diff --git a/tests/test-docregistry/src/registry.spec.ts b/tests/test-docregistry/src/registry.spec.ts index 52029799..2b389ed3 100644 --- a/tests/test-docregistry/src/registry.spec.ts +++ b/tests/test-docregistry/src/registry.spec.ts @@ -17,7 +17,7 @@ import { DocumentRegistry, DocumentWidget, IDocumentWidget -} from '@jupyterlab/docregistry/src'; +} from '@jupyterlab/docregistry'; class WidgetFactory extends ABCWidgetFactory { protected createNewWidget( diff --git a/tests/test-filebrowser/package.json b/tests/test-filebrowser/package.json index 047190de..1f12b1fd 100644 --- a/tests/test-filebrowser/package.json +++ b/tests/test-filebrowser/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-filebrowser", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -13,28 +13,28 @@ "test:firefox": "python run-test.py --browsers=Firefox karma.conf.js", "test:ie": "python run-test.py --browsers=IE karma.conf.js", "watch": "tsc -b --watch", - "watch:src": "tsp -p src --watch" + "watch:src": "tsc -p src --watch" }, "dependencies": { - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/docmanager": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/filebrowser": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/docmanager": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/filebrowser": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", "simulate-event": "~1.4.0" }, "devDependencies": { - "@types/chai": "~4.0.10", - "karma": "~2.0.4", + "@types/chai": "^4.1.7", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", - "puppeteer": "^1.5.0", + "puppeteer": "~1.17.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-filebrowser/src/crumbs.spec.ts b/tests/test-filebrowser/src/crumbs.spec.ts index f9b195b4..df06b260 100644 --- a/tests/test-filebrowser/src/crumbs.spec.ts +++ b/tests/test-filebrowser/src/crumbs.spec.ts @@ -67,7 +67,7 @@ describe('filebrowser/model', () => { registry = new DocumentRegistry({ textModelFactory: new TextModelFactory() }); - serviceManager = new ServiceManager(); + serviceManager = new ServiceManager({ standby: 'never' }); manager = new DocumentManager({ registry, opener, diff --git a/tests/test-filebrowser/src/model.spec.ts b/tests/test-filebrowser/src/model.spec.ts index 3f5e0630..b9886109 100644 --- a/tests/test-filebrowser/src/model.spec.ts +++ b/tests/test-filebrowser/src/model.spec.ts @@ -26,7 +26,8 @@ import { import { acceptDialog, dismissDialog, - signalToPromises + signalToPromises, + sleep } from '@jupyterlab/testutils'; import { toArray } from '@phosphor/algorithm'; @@ -42,7 +43,7 @@ class DelayedContentsManager extends ContentsManager { return new Promise(resolve => { const delay = this._delay; this._delay -= 500; - super.get(path, options).then(contents => { + void super.get(path, options).then(contents => { setTimeout(() => { resolve(contents); }, Math.max(delay, 0)); @@ -71,17 +72,17 @@ describe('filebrowser/model', () => { registry = new DocumentRegistry({ textModelFactory: new TextModelFactory() }); - serviceManager = new ServiceManager(); + serviceManager = new ServiceManager({ standby: 'never' }); manager = new DocumentManager({ registry, opener, manager: serviceManager }); - state = new StateDB({ namespace: 'filebrowser/model' }); + state = new StateDB(); }); beforeEach(async () => { - state.clear(); + await state.clear(); model = new FileBrowserModel({ manager, state }); const contents = await manager.newUntitled({ type: 'file' }); name = contents.name; @@ -252,25 +253,22 @@ describe('filebrowser/model', () => { }); it('should be resilient to a slow initial fetch', async () => { - let delayedServiceManager = new ServiceManager(); + let delayedServiceManager = new ServiceManager({ standby: 'never' }); (delayedServiceManager as any).contents = new DelayedContentsManager(); let manager = new DocumentManager({ registry, opener, manager: delayedServiceManager }); - model = new FileBrowserModel({ manager, state }); + model = new FileBrowserModel({ manager, state }); // Should delay 1000ms - const paths: string[] = []; // An initial refresh is called in the constructor. // If it is too slow, it can come in after the directory change, // causing a directory set by, e.g., the tree handler to be wrong. // This checks to make sure we are handling that case correctly. - const refresh = model.refresh().then(() => paths.push(model.path)); - const cd = model.cd('src').then(() => paths.push(model.path)); - await Promise.all([refresh, cd]); + await model.cd('src'); // should delay 500ms + await sleep(2000); expect(model.path).to.equal('src'); - expect(paths).to.eql(['', 'src']); manager.dispose(); delayedServiceManager.contents.dispose(); @@ -444,7 +442,7 @@ describe('filebrowser/model', () => { 4 ); - model.upload(file); + const uploaded = model.upload(file); expect(toArray(model.uploads())).to.deep.equal([]); expect(await start).to.deep.equal([ model, @@ -488,6 +486,7 @@ describe('filebrowser/model', () => { } ]); expect(toArray(model.uploads())).to.deep.equal([]); + await uploaded; }); after(() => { diff --git a/tests/test-fileeditor/babel.config.js b/tests/test-fileeditor/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-fileeditor/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-fileeditor/package.json b/tests/test-fileeditor/package.json index 2af8c727..60eb787f 100644 --- a/tests/test-fileeditor/package.json +++ b/tests/test-fileeditor/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-fileeditor", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,24 +12,24 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/fileeditor": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/fileeditor": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", "simulate-event": "~1.4.0", - "ts-jest": "^23.1.4" + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-fileeditor/src/widget.spec.ts b/tests/test-fileeditor/src/widget.spec.ts index 58ad678d..09d38c8a 100644 --- a/tests/test-fileeditor/src/widget.spec.ts +++ b/tests/test-fileeditor/src/widget.spec.ts @@ -29,7 +29,7 @@ import { FileEditor, FileEditorCodeWrapper, FileEditorFactory -} from '@jupyterlab/fileeditor/src'; +} from '@jupyterlab/fileeditor'; import { framePromise } from '@jupyterlab/testutils'; @@ -67,7 +67,7 @@ describe('fileeditorcodewrapper', () => { let manager: ServiceManager.IManager; beforeAll(() => { - manager = new ServiceManager(); + manager = new ServiceManager({ standby: 'never' }); return manager.ready; }); diff --git a/tests/test-imageviewer/babel.config.js b/tests/test-imageviewer/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-imageviewer/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-imageviewer/package.json b/tests/test-imageviewer/package.json index 68b5b6e3..41675a1a 100644 --- a/tests/test-imageviewer/package.json +++ b/tests/test-imageviewer/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-imageviewer", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,22 +12,22 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/imageviewer": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/imageviewer": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "ts-jest": "^23.1.4" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-imageviewer/src/widget.spec.ts b/tests/test-imageviewer/src/widget.spec.ts index 309b72c5..bbefadd6 100644 --- a/tests/test-imageviewer/src/widget.spec.ts +++ b/tests/test-imageviewer/src/widget.spec.ts @@ -18,7 +18,7 @@ import { DocumentWidget } from '@jupyterlab/docregistry'; -import { ImageViewer, ImageViewerFactory } from '@jupyterlab/imageviewer/src'; +import { ImageViewer, ImageViewerFactory } from '@jupyterlab/imageviewer'; import { createFileContext } from '@jupyterlab/testutils'; @@ -62,7 +62,7 @@ describe('ImageViewer', () => { let widget: LogImage; beforeAll(async () => { - manager = new ServiceManager(); + manager = new ServiceManager({ standby: 'never' }); await manager.ready; return manager.contents.save(IMAGE.path, IMAGE); }); diff --git a/tests/test-inspector/babel.config.js b/tests/test-inspector/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-inspector/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-inspector/package.json b/tests/test-inspector/package.json index fca74487..8c866c7c 100644 --- a/tests/test-inspector/package.json +++ b/tests/test-inspector/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-inspector", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,19 +12,19 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/inspector": "^1.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/inspector": "^1.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/signaling": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "ts-jest": "^23.1.4" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-inspector/src/inspector.spec.ts b/tests/test-inspector/src/inspector.spec.ts index 2d222b61..47002113 100644 --- a/tests/test-inspector/src/inspector.spec.ts +++ b/tests/test-inspector/src/inspector.spec.ts @@ -7,7 +7,7 @@ import { Signal } from '@phosphor/signaling'; import { Widget } from '@phosphor/widgets'; -import { IInspector, InspectorPanel } from '@jupyterlab/inspector/src'; +import { IInspector, InspectorPanel } from '@jupyterlab/inspector'; class TestInspectorPanel extends InspectorPanel { methods: string[] = []; diff --git a/tests/test-mainmenu/babel.config.js b/tests/test-mainmenu/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-mainmenu/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-mainmenu/package.json b/tests/test-mainmenu/package.json index d1e716b2..3fac488c 100644 --- a/tests/test-mainmenu/package.json +++ b/tests/test-mainmenu/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-mainmenu", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,21 +12,21 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/mainmenu": "^1.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/mainmenu": "^1.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/commands": "^1.6.1", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "ts-jest": "^23.1.4" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-mainmenu/src/edit.spec.ts b/tests/test-mainmenu/src/edit.spec.ts index 75d7d763..9a35259e 100644 --- a/tests/test-mainmenu/src/edit.spec.ts +++ b/tests/test-mainmenu/src/edit.spec.ts @@ -9,7 +9,7 @@ import { Widget } from '@phosphor/widgets'; import { InstanceTracker } from '@jupyterlab/apputils'; -import { EditMenu, IEditMenu } from '@jupyterlab/mainmenu/src'; +import { EditMenu, IEditMenu } from '@jupyterlab/mainmenu'; import { delegateExecute } from './util'; @@ -32,7 +32,7 @@ describe('@jupyterlab/mainmenu', () => { wodget = new Wodget(); menu = new EditMenu({ commands }); tracker = new InstanceTracker({ namespace: 'wodget' }); - tracker.add(wodget); + void tracker.add(wodget); }); afterEach(() => { @@ -62,9 +62,9 @@ describe('@jupyterlab/mainmenu', () => { } }; menu.undoers.add(undoer); - delegateExecute(wodget, menu.undoers, 'undo'); + void delegateExecute(wodget, menu.undoers, 'undo'); expect(wodget.state).to.equal('undo'); - delegateExecute(wodget, menu.undoers, 'redo'); + void delegateExecute(wodget, menu.undoers, 'redo'); expect(wodget.state).to.equal('redo'); }); }); @@ -84,26 +84,11 @@ describe('@jupyterlab/mainmenu', () => { } }; menu.clearers.add(clearer); - delegateExecute(wodget, menu.clearers, 'clearCurrent'); + void delegateExecute(wodget, menu.clearers, 'clearCurrent'); expect(wodget.state).to.equal('clearCurrent'); - delegateExecute(wodget, menu.clearers, 'clearAll'); + void delegateExecute(wodget, menu.clearers, 'clearAll'); expect(wodget.state).to.equal('clearAll'); }); }); - - describe('#findReplacers', () => { - it('should allow setting of an IFindReplacer', () => { - const finder: IEditMenu.IFindReplacer = { - tracker, - findAndReplace: widget => { - widget.state = 'findAndReplace'; - return; - } - }; - menu.findReplacers.add(finder); - delegateExecute(wodget, menu.findReplacers, 'findAndReplace'); - expect(wodget.state).to.equal('findAndReplace'); - }); - }); }); }); diff --git a/tests/test-mainmenu/src/file.spec.ts b/tests/test-mainmenu/src/file.spec.ts index 3f6a3baf..28308c7d 100644 --- a/tests/test-mainmenu/src/file.spec.ts +++ b/tests/test-mainmenu/src/file.spec.ts @@ -9,7 +9,7 @@ import { Widget } from '@phosphor/widgets'; import { InstanceTracker } from '@jupyterlab/apputils'; -import { FileMenu, IFileMenu } from '@jupyterlab/mainmenu/src'; +import { FileMenu, IFileMenu } from '@jupyterlab/mainmenu'; import { delegateExecute } from './util'; @@ -32,7 +32,7 @@ describe('@jupyterlab/mainmenu', () => { wodget = new Wodget(); menu = new FileMenu({ commands }); tracker = new InstanceTracker({ namespace: 'wodget' }); - tracker.add(wodget); + void tracker.add(wodget); }); afterEach(() => { @@ -66,28 +66,11 @@ describe('@jupyterlab/mainmenu', () => { } }; menu.closeAndCleaners.add(cleaner); - delegateExecute(wodget, menu.closeAndCleaners, 'closeAndCleanup'); + void delegateExecute(wodget, menu.closeAndCleaners, 'closeAndCleanup'); expect(wodget.state).to.equal('clean'); }); }); - describe('#persistAndSavers', () => { - it('should allow setting of an IPersistAndSave', () => { - const persistAndSaver: IFileMenu.IPersistAndSave = { - tracker, - name: 'Wodget', - action: 'with Save', - persistAndSave: widget => { - widget.state = 'saved'; - return Promise.resolve(void 0); - } - }; - menu.persistAndSavers.add(persistAndSaver); - delegateExecute(wodget, menu.persistAndSavers, 'persistAndSave'); - expect(wodget.state).to.equal('saved'); - }); - }); - describe('#consoleCreators', () => { it('should allow setting of an IConsoleCreator', () => { const creator: IFileMenu.IConsoleCreator = { @@ -99,7 +82,7 @@ describe('@jupyterlab/mainmenu', () => { } }; menu.consoleCreators.add(creator); - delegateExecute(wodget, menu.consoleCreators, 'createConsole'); + void delegateExecute(wodget, menu.consoleCreators, 'createConsole'); expect(wodget.state).to.equal('create'); }); }); diff --git a/tests/test-mainmenu/src/help.spec.ts b/tests/test-mainmenu/src/help.spec.ts index 33b00761..69417825 100644 --- a/tests/test-mainmenu/src/help.spec.ts +++ b/tests/test-mainmenu/src/help.spec.ts @@ -5,7 +5,7 @@ import { expect } from 'chai'; import { CommandRegistry } from '@phosphor/commands'; -import { HelpMenu } from '@jupyterlab/mainmenu/src'; +import { HelpMenu } from '@jupyterlab/mainmenu'; describe('@jupyterlab/mainmenu', () => { describe('HelpMenu', () => { diff --git a/tests/test-mainmenu/src/kernel.spec.ts b/tests/test-mainmenu/src/kernel.spec.ts index 8e1b4954..8abf277c 100644 --- a/tests/test-mainmenu/src/kernel.spec.ts +++ b/tests/test-mainmenu/src/kernel.spec.ts @@ -9,7 +9,7 @@ import { Widget } from '@phosphor/widgets'; import { InstanceTracker } from '@jupyterlab/apputils'; -import { KernelMenu, IKernelMenu } from '@jupyterlab/mainmenu/src'; +import { KernelMenu, IKernelMenu } from '@jupyterlab/mainmenu'; import { delegateExecute } from './util'; @@ -32,7 +32,7 @@ describe('@jupyterlab/mainmenu', () => { wodget = new Wodget(); menu = new KernelMenu({ commands }); tracker = new InstanceTracker({ namespace: 'wodget' }); - tracker.add(wodget); + void tracker.add(wodget); }); afterEach(() => { @@ -75,15 +75,15 @@ describe('@jupyterlab/mainmenu', () => { } }; menu.kernelUsers.add(user); - delegateExecute(wodget, menu.kernelUsers, 'interruptKernel'); + void delegateExecute(wodget, menu.kernelUsers, 'interruptKernel'); expect(wodget.state).to.equal('interrupt'); - delegateExecute(wodget, menu.kernelUsers, 'restartKernel'); + void delegateExecute(wodget, menu.kernelUsers, 'restartKernel'); expect(wodget.state).to.equal('restart'); - delegateExecute(wodget, menu.kernelUsers, 'restartKernelAndClear'); + void delegateExecute(wodget, menu.kernelUsers, 'restartKernelAndClear'); expect(wodget.state).to.equal('restartAndClear'); - delegateExecute(wodget, menu.kernelUsers, 'changeKernel'); + void delegateExecute(wodget, menu.kernelUsers, 'changeKernel'); expect(wodget.state).to.equal('change'); - delegateExecute(wodget, menu.kernelUsers, 'shutdownKernel'); + void delegateExecute(wodget, menu.kernelUsers, 'shutdownKernel'); expect(wodget.state).to.equal('shutdown'); }); }); diff --git a/tests/test-mainmenu/src/labmenu.spec.ts b/tests/test-mainmenu/src/labmenu.spec.ts index 5451dbf8..9b716289 100644 --- a/tests/test-mainmenu/src/labmenu.spec.ts +++ b/tests/test-mainmenu/src/labmenu.spec.ts @@ -7,7 +7,7 @@ import { ArrayExt } from '@phosphor/algorithm'; import { CommandRegistry } from '@phosphor/commands'; -import { JupyterLabMenu } from '@jupyterlab/mainmenu/src'; +import { JupyterLabMenu } from '@jupyterlab/mainmenu'; describe('@jupyterlab/mainmenu', () => { describe('JupyterLabMenu', () => { diff --git a/tests/test-mainmenu/src/mainmenu.spec.ts b/tests/test-mainmenu/src/mainmenu.spec.ts index f5a348a8..2d42ccc3 100644 --- a/tests/test-mainmenu/src/mainmenu.spec.ts +++ b/tests/test-mainmenu/src/mainmenu.spec.ts @@ -19,7 +19,7 @@ import { SettingsMenu, TabsMenu, ViewMenu -} from '@jupyterlab/mainmenu/src'; +} from '@jupyterlab/mainmenu'; describe('@jupyterlab/mainmenu', () => { describe('MainMenu', () => { diff --git a/tests/test-mainmenu/src/run.spec.ts b/tests/test-mainmenu/src/run.spec.ts index c9b907e5..68b76548 100644 --- a/tests/test-mainmenu/src/run.spec.ts +++ b/tests/test-mainmenu/src/run.spec.ts @@ -9,7 +9,7 @@ import { Widget } from '@phosphor/widgets'; import { InstanceTracker } from '@jupyterlab/apputils'; -import { RunMenu, IRunMenu } from '@jupyterlab/mainmenu/src'; +import { RunMenu, IRunMenu } from '@jupyterlab/mainmenu'; class Wodget extends Widget { state: string; @@ -32,7 +32,7 @@ describe('@jupyterlab/mainmenu', () => { wodget = new Wodget(); menu = new RunMenu({ commands }); tracker = new InstanceTracker({ namespace: 'wodget' }); - tracker.add(wodget); + void tracker.add(wodget); }); afterEach(() => { @@ -67,11 +67,11 @@ describe('@jupyterlab/mainmenu', () => { } }; menu.codeRunners.add(runner); - delegateExecute(wodget, menu.codeRunners, 'run'); + void delegateExecute(wodget, menu.codeRunners, 'run'); expect(wodget.state).to.equal('run'); - delegateExecute(wodget, menu.codeRunners, 'runAll'); + void delegateExecute(wodget, menu.codeRunners, 'runAll'); expect(wodget.state).to.equal('runAll'); - delegateExecute(wodget, menu.codeRunners, 'restartAndRunAll'); + void delegateExecute(wodget, menu.codeRunners, 'restartAndRunAll'); expect(wodget.state).to.equal('restartAndRunAll'); }); }); diff --git a/tests/test-mainmenu/src/util.ts b/tests/test-mainmenu/src/util.ts index 717b41c8..175980e2 100644 --- a/tests/test-mainmenu/src/util.ts +++ b/tests/test-mainmenu/src/util.ts @@ -1,7 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { IMenuExtender } from '@jupyterlab/mainmenu/src'; +import { IMenuExtender } from '@jupyterlab/mainmenu'; import { Widget } from '@phosphor/widgets'; diff --git a/tests/test-mainmenu/src/view.spec.ts b/tests/test-mainmenu/src/view.spec.ts index 33d89232..e9c04ecb 100644 --- a/tests/test-mainmenu/src/view.spec.ts +++ b/tests/test-mainmenu/src/view.spec.ts @@ -9,7 +9,7 @@ import { Widget } from '@phosphor/widgets'; import { InstanceTracker } from '@jupyterlab/apputils'; -import { ViewMenu, IViewMenu } from '@jupyterlab/mainmenu/src'; +import { ViewMenu, IViewMenu } from '@jupyterlab/mainmenu'; import { delegateExecute, delegateToggled } from './util'; @@ -34,7 +34,7 @@ describe('@jupyterlab/mainmenu', () => { wodget = new Wodget(); menu = new ViewMenu({ commands }); tracker = new InstanceTracker({ namespace: 'wodget' }); - tracker.add(wodget); + void tracker.add(wodget); }); afterEach(() => { @@ -82,9 +82,9 @@ describe('@jupyterlab/mainmenu', () => { delegateToggled(wodget, menu.editorViewers, 'lineNumbersToggled') ).to.equal(false); - delegateExecute(wodget, menu.editorViewers, 'toggleLineNumbers'); - delegateExecute(wodget, menu.editorViewers, 'toggleMatchBrackets'); - delegateExecute(wodget, menu.editorViewers, 'toggleWordWrap'); + void delegateExecute(wodget, menu.editorViewers, 'toggleLineNumbers'); + void delegateExecute(wodget, menu.editorViewers, 'toggleMatchBrackets'); + void delegateExecute(wodget, menu.editorViewers, 'toggleWordWrap'); expect( delegateToggled(wodget, menu.editorViewers, 'matchBracketsToggled') diff --git a/tests/test-notebook/package.json b/tests/test-notebook/package.json index 005a9fbb..73e59006 100644 --- a/tests/test-notebook/package.json +++ b/tests/test-notebook/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-notebook", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -13,30 +13,30 @@ "test:firefox": "python run-test.py --browsers=Firefox karma.conf.js", "test:ie": "python run-test.py --browsers=IE karma.conf.js", "watch": "tsc -b --watch", - "watch:src": "tsp -p src --watch" + "watch:src": "tsc -p src --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/notebook": "^1.0.0-alpha.4", - "@jupyterlab/observables": "^2.2.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/cells": "^1.0.0-alpha.10", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/observables": "^2.2.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", "simulate-event": "~1.4.0" }, "devDependencies": { - "@types/chai": "~4.0.10", - "karma": "~2.0.4", + "@types/chai": "^4.1.7", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", - "puppeteer": "^1.5.0", + "puppeteer": "~1.17.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-notebook/src/actions.spec.ts b/tests/test-notebook/src/actions.spec.ts index edcfa8cc..547071b5 100644 --- a/tests/test-notebook/src/actions.spec.ts +++ b/tests/test-notebook/src/actions.spec.ts @@ -797,7 +797,7 @@ describe('@jupyterlab/notebook', () => { }).timeout(60000); // Allow for slower CI }); - describe('#selectAbove(`)', () => { + describe('#selectAbove()', () => { it('should select the cell above the active cell', () => { widget.activeCellIndex = 1; NotebookActions.selectAbove(widget); @@ -823,6 +823,34 @@ describe('@jupyterlab/notebook', () => { NotebookActions.selectAbove(widget); expect(widget.mode).to.equal('edit'); }); + + it('should skip collapsed cells in edit mode', () => { + widget.activeCellIndex = 3; + widget.mode = 'edit'; + widget.widgets[1].inputHidden = true; + widget.widgets[2].inputHidden = true; + widget.widgets[3].inputHidden = false; + NotebookActions.selectAbove(widget); + expect(widget.activeCellIndex).to.equal(0); + }); + + it('should not change if in edit mode and no non-collapsed cells above', () => { + widget.activeCellIndex = 1; + widget.mode = 'edit'; + widget.widgets[0].inputHidden = true; + NotebookActions.selectAbove(widget); + expect(widget.activeCellIndex).to.equal(1); + }); + + it('should not skip collapsed cells and in command mode', () => { + widget.activeCellIndex = 3; + widget.mode = 'command'; + widget.widgets[1].inputHidden = true; + widget.widgets[2].inputHidden = true; + widget.widgets[3].inputHidden = false; + NotebookActions.selectAbove(widget); + expect(widget.activeCellIndex).to.equal(2); + }); }); describe('#selectBelow()', () => { @@ -851,6 +879,34 @@ describe('@jupyterlab/notebook', () => { NotebookActions.selectBelow(widget); expect(widget.mode).to.equal('edit'); }); + + it('should skip collapsed cells in edit mode', () => { + widget.activeCellIndex = 0; + widget.mode = 'edit'; + widget.widgets[1].inputHidden = true; + widget.widgets[2].inputHidden = true; + widget.widgets[3].inputHidden = false; + NotebookActions.selectBelow(widget); + expect(widget.activeCellIndex).to.equal(3); + }); + + it('should not change if in edit mode and no non-collapsed cells below', () => { + widget.activeCellIndex = widget.widgets.length - 2; + widget.mode = 'edit'; + widget.widgets[widget.widgets.length - 1].inputHidden = true; + NotebookActions.selectBelow(widget); + expect(widget.activeCellIndex).to.equal(widget.widgets.length - 2); + }); + + it('should not skip collapsed cells and in command mode', () => { + widget.activeCellIndex = 0; + widget.mode = 'command'; + widget.widgets[1].inputHidden = true; + widget.widgets[2].inputHidden = true; + widget.widgets[3].inputHidden = false; + NotebookActions.selectBelow(widget); + expect(widget.activeCellIndex).to.equal(1); + }); }); describe('#extendSelectionAbove()', () => { @@ -1312,71 +1368,6 @@ describe('@jupyterlab/notebook', () => { }); }); - describe('#persistViewState()', () => { - it('input hidden, output hidden and scrolled', () => { - for (const cell of widget.widgets) { - cell.inputHidden = true; - if (cell instanceof CodeCell) { - cell.outputHidden = true; - cell.outputsScrolled = true; - } - } - NotebookActions.persistViewState(widget); - for (const cell of widget.widgets) { - if (cell instanceof CodeCell) { - expect(cell.model.metadata.get('collapsed')).to.equal(true); - expect(cell.model.metadata.get('scrolled')).to.equal(true); - expect(cell.model.metadata.get('jupyter')).to.deep.equal({ - source_hidden: true, - outputs_hidden: true - }); - } else { - expect(cell.model.metadata.get('jupyter')).to.deep.equal({ - source_hidden: true - }); - } - } - }); - - it('input hidden, output hidden and not scrolled', () => { - for (const cell of widget.widgets) { - cell.inputHidden = false; - if (cell instanceof CodeCell) { - cell.outputHidden = false; - cell.outputsScrolled = false; - } - } - NotebookActions.persistViewState(widget); - for (const cell of widget.widgets) { - if (cell instanceof CodeCell) { - expect(cell.model.metadata.has('collapsed')).to.equal(false); - expect(cell.model.metadata.has('scrolled')).to.equal(false); - } - expect(cell.model.metadata.has('jupyter')).to.equal(false); - } - }); - - it('input hidden, output shown and not scrolled', () => { - for (const cell of widget.widgets) { - cell.inputHidden = true; - if (cell instanceof CodeCell) { - cell.outputHidden = false; - cell.outputsScrolled = false; - } - } - NotebookActions.persistViewState(widget); - for (const cell of widget.widgets) { - if (cell instanceof CodeCell) { - expect(cell.model.metadata.has('collapsed')).to.equal(false); - expect(cell.model.metadata.has('scrolled')).to.equal(false); - } - expect(cell.model.metadata.get('jupyter')).to.deep.equal({ - source_hidden: true - }); - } - }); - }); - describe('#setMarkdownHeader()', () => { it('should set the markdown header level of selected cells', () => { const next = widget.widgets[1]; diff --git a/tests/test-notebook/src/default-toolbar.spec.ts b/tests/test-notebook/src/default-toolbar.spec.ts index 37651662..ee60cd0a 100644 --- a/tests/test-notebook/src/default-toolbar.spec.ts +++ b/tests/test-notebook/src/default-toolbar.spec.ts @@ -54,7 +54,7 @@ describe('@jupyterlab/notebook', () => { Widget.attach(button, document.body); let promise = signalToPromise(context.fileChanged); await framePromise(); - simulate(button.node.firstChild as HTMLElement, 'click'); + simulate(button.node.firstChild as HTMLElement, 'mousedown'); await promise; button.dispose(); }); @@ -72,7 +72,7 @@ describe('@jupyterlab/notebook', () => { const button = ToolbarItems.createInsertButton(panel); Widget.attach(button, document.body); await framePromise(); - simulate(button.node.firstChild as HTMLElement, 'click'); + simulate(button.node.firstChild as HTMLElement, 'mousedown'); expect(panel.content.activeCellIndex).to.equal(1); expect(panel.content.activeCell).to.be.an.instanceof(CodeCell); button.dispose(); @@ -92,7 +92,7 @@ describe('@jupyterlab/notebook', () => { const count = panel.content.widgets.length; Widget.attach(button, document.body); await framePromise(); - simulate(button.node.firstChild as HTMLElement, 'click'); + simulate(button.node.firstChild as HTMLElement, 'mousedown'); expect(panel.content.widgets.length).to.equal(count - 1); expect(NBTestUtils.clipboard.hasData(JUPYTER_CELL_MIME)).to.equal(true); button.dispose(); @@ -112,7 +112,7 @@ describe('@jupyterlab/notebook', () => { const count = panel.content.widgets.length; Widget.attach(button, document.body); await framePromise(); - simulate(button.node.firstChild as HTMLElement, 'click'); + simulate(button.node.firstChild as HTMLElement, 'mousedown'); expect(panel.content.widgets.length).to.equal(count); expect(NBTestUtils.clipboard.hasData(JUPYTER_CELL_MIME)).to.equal(true); button.dispose(); @@ -133,7 +133,7 @@ describe('@jupyterlab/notebook', () => { Widget.attach(button, document.body); await framePromise(); NotebookActions.copy(panel.content); - simulate(button.node.firstChild as HTMLElement, 'click'); + simulate(button.node.firstChild as HTMLElement, 'mousedown'); await sleep(); expect(panel.content.widgets.length).to.equal(count + 1); button.dispose(); @@ -175,7 +175,7 @@ describe('@jupyterlab/notebook', () => { } }); await framePromise(); - simulate(button.node.firstChild as HTMLElement, 'click'); + simulate(button.node.firstChild as HTMLElement, 'mousedown'); await p.promise; }).timeout(30000); // Allow for slower CI diff --git a/tests/test-notebook/src/model.spec.ts b/tests/test-notebook/src/model.spec.ts index 9ea3ed32..6c8a8686 100644 --- a/tests/test-notebook/src/model.spec.ts +++ b/tests/test-notebook/src/model.spec.ts @@ -13,7 +13,7 @@ import { NotebookModel } from '@jupyterlab/notebook'; import { ModelDB } from '@jupyterlab/observables'; -import { signalToPromise, NBTestUtils } from '@jupyterlab/testutils'; +import { acceptDialog, NBTestUtils } from '@jupyterlab/testutils'; describe('@jupyterlab/notebook', () => { describe('NotebookModel', () => { @@ -31,12 +31,6 @@ describe('@jupyterlab/notebook', () => { expect(lang.name).to.equal('python'); }); - it('should add a single code cell by default', () => { - const model = new NotebookModel(); - expect(model.cells.length).to.equal(1); - expect(model.cells.get(0)).to.be.an.instanceof(CodeCellModel); - }); - it('should accept an optional factory', () => { const contentFactory = new NotebookModel.ContentFactory({}); const model = new NotebookModel({ contentFactory }); @@ -74,12 +68,6 @@ describe('@jupyterlab/notebook', () => { }); describe('#cells', () => { - it('should add an empty code cell by default', () => { - const model = new NotebookModel(); - expect(model.cells.length).to.equal(1); - expect(model.cells.get(0)).to.be.an.instanceof(CodeCellModel); - }); - it('should be reset when loading from disk', () => { const model = new NotebookModel(); const cell = model.contentFactory.createCodeCell({}); @@ -96,9 +84,9 @@ describe('@jupyterlab/notebook', () => { model.cells.push(cell); model.fromJSON(NBTestUtils.DEFAULT_CONTENT); model.cells.undo(); - expect(model.cells.length).to.equal(2); - expect(model.cells.get(1).value.text).to.equal('foo'); - expect(model.cells.get(1)).to.equal(cell); // should be ===. + expect(model.cells.length).to.equal(1); + expect(model.cells.get(0).value.text).to.equal('foo'); + expect(model.cells.get(0)).to.equal(cell); // should be ===. }); context('cells `changed` signal', () => { @@ -145,17 +133,6 @@ describe('@jupyterlab/notebook', () => { model.cells.push(cell); expect(model.dirty).to.equal(true); }); - - it('should add a new code cell when cells are cleared', async () => { - const model = new NotebookModel(); - let promise = signalToPromise(model.cells.changed); - model.cells.clear(); - await promise; - expect(model.cells.length).to.equal(0); - await signalToPromise(model.cells.changed); - expect(model.cells.length).to.equal(1); - expect(model.cells.get(0)).to.be.an.instanceof(CodeCellModel); - }); }); describe('cell `changed` signal', () => { @@ -204,6 +181,20 @@ describe('@jupyterlab/notebook', () => { model.fromJSON(NBTestUtils.DEFAULT_CONTENT); expect(model.nbformat).to.equal(NBTestUtils.DEFAULT_CONTENT.nbformat); }); + + it('should present a dialog when the format changes', () => { + const model = new NotebookModel(); + const content = { + ...NBTestUtils.DEFAULT_CONTENT, + metadata: { + ...NBTestUtils.DEFAULT_CONTENT.metadata, + orig_nbformat: 1 + } + }; + model.fromJSON(content); + expect(model.nbformat).to.equal(nbformat.MAJOR_VERSION); + return acceptDialog(); + }); }); describe('#nbformatMinor', () => { @@ -375,6 +366,23 @@ describe('@jupyterlab/notebook', () => { }); }); + context('#createCell()', () => { + it('should create a new code cell', () => { + const cell = factory.createCell('code', {}); + expect(cell.type).to.equal('code'); + }); + + it('should create a new code cell', () => { + const cell = factory.createCell('markdown', {}); + expect(cell.type).to.equal('markdown'); + }); + + it('should create a new code cell', () => { + const cell = factory.createCell('raw', {}); + expect(cell.type).to.equal('raw'); + }); + }); + context('#createCodeCell()', () => { it('should create a new code cell', () => { const cell = factory.createCodeCell({}); diff --git a/tests/test-notebook/src/modelfactory.spec.ts b/tests/test-notebook/src/modelfactory.spec.ts index 3500484f..4ac30b97 100644 --- a/tests/test-notebook/src/modelfactory.spec.ts +++ b/tests/test-notebook/src/modelfactory.spec.ts @@ -93,13 +93,6 @@ describe('@jupyterlab/notebook', () => { expect(model).to.be.an.instanceof(NotebookModel); }); - it('should add an empty code cell by default', () => { - const factory = new NotebookModelFactory({}); - const model = factory.createNew(); - expect(model.cells.length).to.equal(1); - expect(model.cells.get(0).type).to.equal('code'); - }); - it('should accept a language preference', () => { const factory = new NotebookModelFactory({}); const model = factory.createNew('foo'); diff --git a/tests/test-notebook/src/celltools.spec.ts b/tests/test-notebook/src/notebooktools.spec.ts similarity index 59% rename from tests/test-notebook/src/celltools.spec.ts rename to tests/test-notebook/src/notebooktools.spec.ts index 0ec829fd..0f458640 100644 --- a/tests/test-notebook/src/celltools.spec.ts +++ b/tests/test-notebook/src/notebooktools.spec.ts @@ -16,7 +16,7 @@ import { CodeMirrorEditorFactory } from '@jupyterlab/codemirror'; import { ObservableJSON } from '@jupyterlab/observables'; import { - CellTools, + NotebookTools, NotebookPanel, NotebookTracker, NotebookActions @@ -28,9 +28,14 @@ import { NBTestUtils } from '@jupyterlab/testutils'; -class LogTool extends CellTools.Tool { +class LogTool extends NotebookTools.Tool { methods: string[] = []; + protected onActiveNotebookPanelChanged(msg: Message): void { + super.onActiveNotebookPanelChanged(msg); + this.methods.push('onActiveNotebookPanelChanged'); + } + protected onActiveCellChanged(msg: Message): void { super.onActiveCellChanged(msg); this.methods.push('onActiveCellChanged'); @@ -41,13 +46,22 @@ class LogTool extends CellTools.Tool { this.methods.push('onSelectionChanged'); } - protected onMetadataChanged(msg: ObservableJSON.ChangeMessage): void { - super.onMetadataChanged(msg); - this.methods.push('onMetadataChanged'); + protected onActiveCellMetadataChanged( + msg: ObservableJSON.ChangeMessage + ): void { + super.onActiveCellMetadataChanged(msg); + this.methods.push('onActiveCellMetadataChanged'); + } + + protected onActiveNotebookPanelMetadataChanged( + msg: ObservableJSON.ChangeMessage + ): void { + super.onActiveNotebookPanelMetadataChanged(msg); + this.methods.push('onActiveNotebookPanelMetadataChanged'); } } -class LogKeySelector extends CellTools.KeySelector { +class LogKeySelector extends NotebookTools.KeySelector { events: string[] = []; methods: string[] = []; @@ -71,9 +85,11 @@ class LogKeySelector extends CellTools.KeySelector { this.methods.push('onActiveCellChanged'); } - protected onMetadataChanged(message: ObservableJSON.ChangeMessage): void { - super.onMetadataChanged(message); - this.methods.push('onMetadataChanged'); + protected onActiveCellMetadataChanged( + message: ObservableJSON.ChangeMessage + ): void { + super.onActiveCellMetadataChanged(message); + this.methods.push('onActiveCellMetadataChanged'); } protected onValueChanged(): void { @@ -83,8 +99,8 @@ class LogKeySelector extends CellTools.KeySelector { } describe('@jupyterlab/notebook', () => { - describe('celltools', () => { - let celltools: CellTools; + describe('notebooktools', () => { + let notebookTools: NotebookTools; let tabpanel: TabPanel; let tracker: NotebookTracker; let panel0: NotebookPanel; @@ -95,20 +111,18 @@ describe('@jupyterlab/notebook', () => { await context0.initialize(true); panel0 = NBTestUtils.createNotebookPanel(context0); NBTestUtils.populateNotebook(panel0.content); - const context1 = await createNotebookContext(); await context1.initialize(true); panel1 = NBTestUtils.createNotebookPanel(context1); NBTestUtils.populateNotebook(panel1.content); - tracker = new NotebookTracker({ namespace: 'notebook' }); - tracker.add(panel0); - tracker.add(panel1); - celltools = new CellTools({ tracker }); + await tracker.add(panel0); + await tracker.add(panel1); + notebookTools = new NotebookTools({ tracker }); tabpanel = new TabPanel(); tabpanel.addWidget(panel0); tabpanel.addWidget(panel1); - tabpanel.addWidget(celltools); + tabpanel.addWidget(notebookTools); tabpanel.node.style.height = '800px'; Widget.attach(tabpanel, document.body); // Give the posted messages a chance to be handled. @@ -117,75 +131,94 @@ describe('@jupyterlab/notebook', () => { afterEach(() => { tabpanel.dispose(); - celltools.dispose(); + notebookTools.dispose(); }); - describe('CellTools', () => { + describe('NotebookTools', () => { describe('#constructor()', () => { - it('should create a celltools object', () => { - expect(celltools).to.be.an.instanceof(CellTools); + it('should create a notebooktools object', () => { + expect(notebookTools).to.be.an.instanceof(NotebookTools); + }); + }); + + describe('#activeNotebookPanel', () => { + it('should be the active notebook', () => { + expect(notebookTools.activeNotebookPanel).to.equal(panel1); + tabpanel.currentIndex = 0; + simulate(panel0.node, 'focus'); + expect(notebookTools.activeNotebookPanel).to.equal(panel0); }); }); describe('#activeCell', () => { it('should be the active cell', () => { - expect(celltools.activeCell).to.equal(panel1.content.activeCell); + expect(notebookTools.activeCell).to.equal(panel1.content.activeCell); tabpanel.currentIndex = 0; simulate(panel0.node, 'focus'); - expect(celltools.activeCell).to.equal(panel0.content.activeCell); + expect(notebookTools.activeCell).to.equal(panel0.content.activeCell); }); }); describe('#selectedCells', () => { it('should be the currently selected cells', () => { - expect(celltools.selectedCells).to.deep.equal([ + expect(notebookTools.selectedCells).to.deep.equal([ panel1.content.activeCell ]); tabpanel.currentIndex = 0; simulate(panel0.node, 'focus'); - expect(celltools.selectedCells).to.deep.equal([ + expect(notebookTools.selectedCells).to.deep.equal([ panel0.content.activeCell ]); panel0.content.select(panel0.content.widgets[1]); - expect(celltools.selectedCells.length).to.equal(2); + expect(notebookTools.selectedCells.length).to.equal(2); }); }); describe('#addItem()', () => { it('should add a cell tool item', () => { - const tool = new CellTools.Tool(); - celltools.addItem({ tool }); + const tool = new NotebookTools.Tool(); + notebookTools.addItem({ tool }); tool.dispose(); }); it('should accept a rank', () => { - const tool = new CellTools.Tool(); - celltools.addItem({ tool, rank: 100 }); + const tool = new NotebookTools.Tool(); + notebookTools.addItem({ tool, rank: 100 }); tool.dispose(); }); }); }); - describe('CellTools.Tool', () => { + describe('NotebookTools.Tool', () => { describe('#constructor', () => { it('should create a new base tool', () => { - const tool = new CellTools.Tool(); - expect(tool).to.be.an.instanceof(CellTools.Tool); + const tool = new NotebookTools.Tool(); + expect(tool).to.be.an.instanceof(NotebookTools.Tool); }); }); describe('#parent', () => { - it('should be the celltools object used by the tool', () => { - const tool = new CellTools.Tool({}); - celltools.addItem({ tool }); - expect(tool.parent).to.equal(celltools); + it('should be the notebooktools object used by the tool', () => { + const tool = new NotebookTools.Tool({}); + notebookTools.addItem({ tool }); + expect(tool.notebookTools).to.equal(notebookTools); + }); + }); + + describe('#onActiveNotebookPanelChanged()', () => { + it('should be called when the active notebook panel changes', () => { + const tool = new LogTool({}); + notebookTools.addItem({ tool }); + tool.methods = []; + simulate(panel0.node, 'focus'); + expect(tool.methods).to.contain('onActiveNotebookPanelChanged'); }); }); describe('#onActiveCellChanged()', () => { it('should be called when the active cell changes', () => { const tool = new LogTool({}); - celltools.addItem({ tool }); + notebookTools.addItem({ tool }); tool.methods = []; simulate(panel0.node, 'focus'); expect(tool.methods).to.contain('onActiveCellChanged'); @@ -195,7 +228,7 @@ describe('@jupyterlab/notebook', () => { describe('#onSelectionChanged()', () => { it('should be called when the selection changes', () => { const tool = new LogTool({}); - celltools.addItem({ tool }); + notebookTools.addItem({ tool }); tool.methods = []; const current = tracker.currentWidget; current.content.select(current.content.widgets[1]); @@ -203,29 +236,43 @@ describe('@jupyterlab/notebook', () => { }); }); - describe('#onMetadataChanged()', () => { - it('should be called when the metadata changes', () => { + describe('#onActiveCellMetadataChanged()', () => { + it('should be called when the active cell metadata changes', () => { + const tool = new LogTool({}); + notebookTools.addItem({ tool }); + tool.methods = []; + const metadata = notebookTools.activeCell.model.metadata; + metadata.set('foo', 1); + metadata.set('foo', 2); + expect(tool.methods).to.contain('onActiveCellMetadataChanged'); + }); + }); + + describe('#onActiveNotebookPanelMetadataChanged()', () => { + it('should be called when the active notebook panel metadata changes', () => { const tool = new LogTool({}); - celltools.addItem({ tool }); + notebookTools.addItem({ tool }); tool.methods = []; - const metadata = celltools.activeCell.model.metadata; + const metadata = notebookTools.activeNotebookPanel.model.metadata; metadata.set('foo', 1); metadata.set('foo', 2); - expect(tool.methods).to.contain('onMetadataChanged'); + expect(tool.methods).to.contain( + 'onActiveNotebookPanelMetadataChanged' + ); }); }); }); - describe('CellTools.ActiveCellTool', () => { + describe('NotebookTools.ActiveCellTool', () => { it('should create a new active cell tool', () => { - const tool = new CellTools.ActiveCellTool(); - celltools.addItem({ tool }); - expect(tool).to.be.an.instanceof(CellTools.ActiveCellTool); + const tool = new NotebookTools.ActiveCellTool(); + notebookTools.addItem({ tool }); + expect(tool).to.be.an.instanceof(NotebookTools.ActiveCellTool); }); it('should handle a change to the active cell', () => { - const tool = new CellTools.ActiveCellTool(); - celltools.addItem({ tool }); + const tool = new NotebookTools.ActiveCellTool(); + notebookTools.addItem({ tool }); const widget = tracker.currentWidget; widget.content.activeCellIndex++; widget.content.activeCell.model.metadata.set('bar', 1); @@ -233,18 +280,22 @@ describe('@jupyterlab/notebook', () => { }); }); - describe('CellTools.MetadataEditorTool', () => { + describe('NotebookTools.CellMetadataEditorTool', () => { const editorServices = new CodeMirrorEditorFactory(); const editorFactory = editorServices.newInlineEditor.bind(editorServices); it('should create a new metadata editor tool', () => { - const tool = new CellTools.MetadataEditorTool({ editorFactory }); - expect(tool).to.be.an.instanceof(CellTools.MetadataEditorTool); + const tool = new NotebookTools.CellMetadataEditorTool({ + editorFactory + }); + expect(tool).to.be.an.instanceof(NotebookTools.CellMetadataEditorTool); }); it('should handle a change to the active cell', () => { - const tool = new CellTools.MetadataEditorTool({ editorFactory }); - celltools.addItem({ tool }); + const tool = new NotebookTools.CellMetadataEditorTool({ + editorFactory + }); + notebookTools.addItem({ tool }); const model = tool.editor.model; expect(JSON.stringify(model.value.text)).to.be.ok; const widget = tracker.currentWidget; @@ -254,17 +305,64 @@ describe('@jupyterlab/notebook', () => { }); it('should handle a change to the metadata', () => { - const tool = new CellTools.MetadataEditorTool({ editorFactory }); - celltools.addItem({ tool }); + const tool = new NotebookTools.CellMetadataEditorTool({ + editorFactory + }); + notebookTools.addItem({ tool }); const model = tool.editor.model; const previous = model.value.text; - const metadata = celltools.activeCell.model.metadata; + const metadata = notebookTools.activeCell.model.metadata; metadata.set('foo', 1); expect(model.value.text).to.not.equal(previous); }); }); - describe('CellTools.KeySelector', () => { + describe('NotebookTools.NotebookMetadataEditorTool', () => { + const editorServices = new CodeMirrorEditorFactory(); + const editorFactory = editorServices.newInlineEditor.bind(editorServices); + + it('should create a new metadata editor tool', () => { + const tool = new NotebookTools.NotebookMetadataEditorTool({ + editorFactory + }); + expect(tool).to.be.an.instanceof( + NotebookTools.NotebookMetadataEditorTool + ); + }); + + it('should handle a change to the active notebook', () => { + panel0.model.metadata.set('panel0', 1); + panel1.model.metadata.set('panel1', 1); + const tool = new NotebookTools.NotebookMetadataEditorTool({ + editorFactory + }); + notebookTools.addItem({ tool }); + const model = tool.editor.model; + expect(JSON.stringify(model.value.text)).to.be.ok; + + simulate(panel0.node, 'focus'); + expect(JSON.stringify(model.value.text)).to.contain('panel0'); + expect(JSON.stringify(model.value.text)).to.not.contain('panel1'); + + simulate(panel1.node, 'focus'); + expect(JSON.stringify(model.value.text)).to.not.contain('panel0'); + expect(JSON.stringify(model.value.text)).to.contain('panel1'); + }); + + it('should handle a change to the metadata', () => { + const tool = new NotebookTools.NotebookMetadataEditorTool({ + editorFactory + }); + notebookTools.addItem({ tool }); + const model = tool.editor.model; + const widget = tracker.currentWidget; + expect(JSON.stringify(model.value.text)).to.not.contain('newvalue'); + widget.content.model.metadata.set('newvalue', 1); + expect(JSON.stringify(model.value.text)).to.contain('newvalue'); + }); + }); + + describe('NotebookTools.KeySelector', () => { let tool: LogKeySelector; beforeEach(() => { @@ -275,7 +373,7 @@ describe('@jupyterlab/notebook', () => { baz: [1, 2, 'a'] } }); - celltools.addItem({ tool }); + notebookTools.addItem({ tool }); simulate(panel0.node, 'focus'); tabpanel.currentIndex = 2; }); @@ -286,7 +384,7 @@ describe('@jupyterlab/notebook', () => { describe('#constructor()', () => { it('should create a new key selector', () => { - expect(tool).to.be.an.instanceof(CellTools.KeySelector); + expect(tool).to.be.an.instanceof(NotebookTools.KeySelector); }); }); @@ -310,7 +408,7 @@ describe('@jupyterlab/notebook', () => { select.selectedIndex = 1; simulate(select, 'change'); expect(tool.events).to.contain('change'); - const metadata = celltools.activeCell.model.metadata; + const metadata = notebookTools.activeCell.model.metadata; expect(metadata.get('foo')).to.deep.equal([1, 2, 'a']); }); }); @@ -350,7 +448,7 @@ describe('@jupyterlab/notebook', () => { describe('#onBeforeDetach()', () => { it('should remove event listeners', () => { const select = tool.selectNode; - celltools.dispose(); + notebookTools.dispose(); expect(tool.methods).to.contain('onBeforeDetach'); simulate(select, 'focus'); simulate(select, 'blur'); @@ -366,7 +464,7 @@ describe('@jupyterlab/notebook', () => { select.selectedIndex = 1; simulate(select, 'change'); expect(tool.methods).to.contain('onValueChanged'); - const metadata = celltools.activeCell.model.metadata; + const metadata = notebookTools.activeCell.model.metadata; expect(metadata.get('foo')).to.deep.equal([1, 2, 'a']); }); }); @@ -381,28 +479,28 @@ describe('@jupyterlab/notebook', () => { }); }); - describe('#onMetadataChanged()', () => { + describe('#onActiveCellMetadataChanged()', () => { it('should update the select value', () => { - const metadata = celltools.activeCell.model.metadata; + const metadata = notebookTools.activeCell.model.metadata; metadata.set('foo', 1); - expect(tool.methods).to.contain('onMetadataChanged'); + expect(tool.methods).to.contain('onActiveCellMetadataChanged'); expect(tool.selectNode.value).to.equal('1'); }); }); }); - describe('CellTools.createSlideShowSelector()', () => { + describe('NotebookTools.createSlideShowSelector()', () => { it('should create a slide show selector', () => { - const tool = CellTools.createSlideShowSelector(); + const tool = NotebookTools.createSlideShowSelector(); tool.selectNode.selectedIndex = -1; - celltools.addItem({ tool }); + notebookTools.addItem({ tool }); simulate(panel0.node, 'focus'); tabpanel.currentIndex = 2; - expect(tool).to.be.an.instanceof(CellTools.KeySelector); + expect(tool).to.be.an.instanceof(NotebookTools.KeySelector); expect(tool.key).to.equal('slideshow'); const select = tool.selectNode; expect(select.value).to.equal(''); - const metadata = celltools.activeCell.model.metadata; + const metadata = notebookTools.activeCell.model.metadata; expect(metadata.get('slideshow')).to.be.undefined; simulate(select, 'focus'); tool.selectNode.selectedIndex = 1; @@ -413,7 +511,7 @@ describe('@jupyterlab/notebook', () => { }); }); - describe('CellTools.createNBConvertSelector()', () => { + describe('NotebookTools.createNBConvertSelector()', () => { it('should create a raw mimetype selector', () => { let optionsMap: { [key: string]: JSONValue } = { None: '-', @@ -424,18 +522,18 @@ describe('@jupyterlab/notebook', () => { Python: 'text/x-python' }; optionsMap.None = '-'; - const tool = CellTools.createNBConvertSelector(optionsMap); + const tool = NotebookTools.createNBConvertSelector(optionsMap); tool.selectNode.selectedIndex = -1; - celltools.addItem({ tool }); + notebookTools.addItem({ tool }); simulate(panel0.node, 'focus'); NotebookActions.changeCellType(panel0.content, 'raw'); tabpanel.currentIndex = 2; - expect(tool).to.be.an.instanceof(CellTools.KeySelector); + expect(tool).to.be.an.instanceof(NotebookTools.KeySelector); expect(tool.key).to.equal('raw_mimetype'); const select = tool.selectNode; expect(select.value).to.equal(''); - const metadata = celltools.activeCell.model.metadata; + const metadata = notebookTools.activeCell.model.metadata; expect(metadata.get('raw_mimetype')).to.be.undefined; simulate(select, 'focus'); tool.selectNode.selectedIndex = 2; @@ -452,14 +550,14 @@ describe('@jupyterlab/notebook', () => { Markdown: 'text/markdown', Python: 'text/x-python' }; - const tool = CellTools.createNBConvertSelector(optionsMap); + const tool = NotebookTools.createNBConvertSelector(optionsMap); tool.selectNode.selectedIndex = -1; - celltools.addItem({ tool }); + notebookTools.addItem({ tool }); simulate(panel0.node, 'focus'); NotebookActions.changeCellType(panel0.content, 'code'); tabpanel.currentIndex = 2; - expect(tool).to.be.an.instanceof(CellTools.KeySelector); + expect(tool).to.be.an.instanceof(NotebookTools.KeySelector); expect(tool.key).to.equal('raw_mimetype'); const select = tool.selectNode; expect(select.disabled).to.equal(true); diff --git a/tests/test-notebook/src/tracker.spec.ts b/tests/test-notebook/src/tracker.spec.ts index d991a6b8..b4fc7bac 100644 --- a/tests/test-notebook/src/tracker.spec.ts +++ b/tests/test-notebook/src/tracker.spec.ts @@ -56,14 +56,14 @@ describe('@jupyterlab/notebook', () => { const tracker = new NotebookTracker({ namespace }); const panel = NBTestUtils.createNotebookPanel(context); panel.content.model.cells.clear(); - tracker.add(panel); + void tracker.add(panel); expect(tracker.activeCell).to.be.null; }); it('should be the active cell if a tracked notebook has one', () => { const tracker = new NotebookTracker({ namespace }); const panel = NBTestUtils.createNotebookPanel(context); - tracker.add(panel); + void tracker.add(panel); panel.content.model.fromJSON(NBTestUtils.DEFAULT_CONTENT); expect(tracker.activeCell).to.be.an.instanceof(Cell); panel.dispose(); @@ -79,7 +79,7 @@ describe('@jupyterlab/notebook', () => { count++; }); panel.content.model.fromJSON(NBTestUtils.DEFAULT_CONTENT); - tracker.add(panel); + void tracker.add(panel); expect(count).to.equal(1); panel.content.activeCellIndex = 1; expect(count).to.equal(2); @@ -91,7 +91,7 @@ describe('@jupyterlab/notebook', () => { it('should be called when the active cell changes', () => { const tracker = new TestTracker({ namespace }); const panel = NBTestUtils.createNotebookPanel(context); - tracker.add(panel); + void tracker.add(panel); expect(tracker.methods).to.contain('onCurrentChanged'); }); }); diff --git a/tests/test-notebook/src/widget.spec.ts b/tests/test-notebook/src/widget.spec.ts index d7f31054..6a1139cd 100644 --- a/tests/test-notebook/src/widget.spec.ts +++ b/tests/test-notebook/src/widget.spec.ts @@ -23,7 +23,11 @@ import { INotebookModel, NotebookModel } from '@jupyterlab/notebook'; import { Notebook, StaticNotebook } from '@jupyterlab/notebook'; -import { NBTestUtils, framePromise } from '@jupyterlab/testutils'; +import { + NBTestUtils, + framePromise, + signalToPromise +} from '@jupyterlab/testutils'; const contentFactory = NBTestUtils.createNotebookFactory(); const editorConfig = NBTestUtils.defaultEditorConfig; @@ -253,6 +257,25 @@ describe('@jupyter/notebook', () => { expect(widget.widgets.length).to.equal(6); }); + it('should add a default cell if the notebook model is empty', () => { + const widget = new LogStaticNotebook(options); + const model1 = new NotebookModel(); + expect(model1.cells.length).to.equal(0); + widget.model = model1; + expect(model1.cells.length).to.equal(1); + expect(model1.cells.get(0).type).to.equal('code'); + + widget.notebookConfig = { + ...widget.notebookConfig, + defaultCell: 'markdown' + }; + const model2 = new NotebookModel(); + expect(model2.cells.length).to.equal(0); + widget.model = model2; + expect(model2.cells.length).to.equal(1); + expect(model2.cells.get(0).type).to.equal('markdown'); + }); + it('should set the mime types of the cell widgets', () => { const widget = new LogStaticNotebook(options); const model = new NotebookModel(); @@ -298,6 +321,19 @@ describe('@jupyter/notebook', () => { expect(child.hasClass('jp-Notebook-cell')).to.equal(true); }); + it('should initially render markdown cells with content', () => { + const cell1 = widget.model.contentFactory.createMarkdownCell({}); + const cell2 = widget.model.contentFactory.createMarkdownCell({}); + cell1.value.text = '# Hello'; + widget.model.cells.push(cell1); + widget.model.cells.push(cell2); + expect(widget.widgets.length).to.equal(8); + const child1 = widget.widgets[6] as MarkdownCell; + const child2 = widget.widgets[7] as MarkdownCell; + expect(child1.rendered).to.equal(true); + expect(child2.rendered).to.equal(false); + }); + it('should handle a move', () => { const child = widget.widgets[1]; widget.model.cells.move(1, 2); @@ -310,6 +346,21 @@ describe('@jupyter/notebook', () => { widget.model.cells.clear(); expect(widget.widgets.length).to.equal(0); }); + + it('should add a new default cell when cells are cleared', async () => { + const model = widget.model; + widget.notebookConfig = { + ...widget.notebookConfig, + defaultCell: 'raw' + }; + let promise = signalToPromise(model.cells.changed); + model.cells.clear(); + await promise; + expect(model.cells.length).to.equal(0); + await signalToPromise(model.cells.changed); + expect(model.cells.length).to.equal(1); + expect(model.cells.get(0)).to.be.an.instanceof(RawCellModel); + }); }); }); @@ -648,6 +699,7 @@ describe('@jupyter/notebook', () => { Widget.attach(widget, document.body); MessageLoop.sendMessage(widget, Widget.Msg.ActivateRequest); const cell = widget.model.contentFactory.createMarkdownCell({}); + cell.value.text = '# Hello'; // Should be rendered with content. widget.model.cells.push(cell); const child = widget.widgets[widget.widgets.length - 1] as MarkdownCell; expect(child.rendered).to.equal(true); @@ -1105,6 +1157,7 @@ describe('@jupyter/notebook', () => { it('should preserve "command" mode if in a markdown cell', () => { const cell = widget.model.contentFactory.createMarkdownCell({}); + cell.value.text = '# Hello'; // Should be rendered with content. widget.model.cells.push(cell); const count = widget.widgets.length; const child = widget.widgets[count - 1] as MarkdownCell; @@ -1156,6 +1209,7 @@ describe('@jupyter/notebook', () => { it('should leave a markdown cell rendered', () => { const code = widget.model.contentFactory.createCodeCell({}); const md = widget.model.contentFactory.createMarkdownCell({}); + md.value.text = '# Hello'; // Should be rendered with content. widget.model.cells.push(code); widget.model.cells.push(md); const count = widget.widgets.length; @@ -1214,6 +1268,7 @@ describe('@jupyter/notebook', () => { context('dblclick', () => { it('should unrender a markdown cell', () => { const cell = widget.model.contentFactory.createMarkdownCell({}); + cell.value.text = '# Hello'; // Should be rendered with content. widget.model.cells.push(cell); const child = widget.widgets[ widget.widgets.length - 1 diff --git a/tests/test-observables/babel.config.js b/tests/test-observables/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-observables/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-observables/package.json b/tests/test-observables/package.json index 8f34df9d..76e1e268 100644 --- a/tests/test-observables/package.json +++ b/tests/test-observables/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-observables", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,19 +12,19 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/observables": "^2.2.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/observables": "^2.2.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "ts-jest": "^23.1.4" + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-observables/src/modeldb.spec.ts b/tests/test-observables/src/modeldb.spec.ts index eb39b6b8..695f77c0 100644 --- a/tests/test-observables/src/modeldb.spec.ts +++ b/tests/test-observables/src/modeldb.spec.ts @@ -11,7 +11,7 @@ import { ObservableValue, ObservableUndoableList, ObservableJSON -} from '@jupyterlab/observables/src'; +} from '@jupyterlab/observables'; describe('@jupyterlab/observables', () => { describe('ObservableValue', () => { diff --git a/tests/test-observables/src/observablejson.spec.ts b/tests/test-observables/src/observablejson.spec.ts index 26b1565c..56a19298 100644 --- a/tests/test-observables/src/observablejson.spec.ts +++ b/tests/test-observables/src/observablejson.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { IObservableJSON, ObservableJSON } from '@jupyterlab/observables/src'; +import { IObservableJSON, ObservableJSON } from '@jupyterlab/observables'; describe('@jupyterlab/observables', () => { describe('ObservableJSON', () => { @@ -41,7 +41,7 @@ describe('@jupyterlab/observables', () => { describe('ObservableJSON.ChangeMessage', () => { describe('#constructor()', () => { it('should create a new message', () => { - const message = new ObservableJSON.ChangeMessage({ + const message = new ObservableJSON.ChangeMessage('jsonvalue-changed', { key: 'foo', type: 'add', oldValue: 1, @@ -59,7 +59,10 @@ describe('@jupyterlab/observables', () => { oldValue: 'ho', newValue: 'hi' }; - const message = new ObservableJSON.ChangeMessage(args); + const message = new ObservableJSON.ChangeMessage( + 'jsonvalue-changed', + args + ); expect(message.args).to.equal(args); }); }); diff --git a/tests/test-observables/src/observablelist.spec.ts b/tests/test-observables/src/observablelist.spec.ts index 7290f480..e6f99053 100644 --- a/tests/test-observables/src/observablelist.spec.ts +++ b/tests/test-observables/src/observablelist.spec.ts @@ -5,7 +5,7 @@ import { expect } from 'chai'; import { toArray } from '@phosphor/algorithm'; -import { ObservableList } from '@jupyterlab/observables/src'; +import { ObservableList } from '@jupyterlab/observables'; describe('@jupyterlab/observables', () => { describe('ObservableList', () => { diff --git a/tests/test-observables/src/observablemap.spec.ts b/tests/test-observables/src/observablemap.spec.ts index 573860c4..68cbbff8 100644 --- a/tests/test-observables/src/observablemap.spec.ts +++ b/tests/test-observables/src/observablemap.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { ObservableMap } from '@jupyterlab/observables/src'; +import { ObservableMap } from '@jupyterlab/observables'; describe('@jupyterlab/observables', () => { describe('ObservableMap', () => { @@ -169,7 +169,7 @@ describe('@jupyterlab/observables', () => { expect(value.delete('one')).to.be.undefined; }); - it('should trigger a changed signal', () => { + it('should trigger a changed signal if actually removed', () => { const value = new ObservableMap(); value.set('one', 1); value.set('two', 2); @@ -187,6 +187,26 @@ describe('@jupyterlab/observables', () => { value.delete('two'); expect(called).to.equal(true); }); + + it('should not trigger a changed signal if not actually removed', () => { + const value = new ObservableMap(); + value.set('one', 1); + value.set('three', 3); + let called = false; + + value.changed.connect((sender, args) => { + expect(sender).to.equal(value); + expect(args.type).to.equal('remove'); + expect(args.key).to.equal('two'); + expect(args.oldValue).to.equal(2); + expect(args.newValue).to.be.undefined; + called = true; + }); + + // 'two' is not in the map + value.delete('two'); + expect(called).to.equal(false); + }); }); describe('#clear()', () => { diff --git a/tests/test-observables/src/observablestring.spec.ts b/tests/test-observables/src/observablestring.spec.ts index cb71b952..91013e97 100644 --- a/tests/test-observables/src/observablestring.spec.ts +++ b/tests/test-observables/src/observablestring.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { ObservableString } from '@jupyterlab/observables/src'; +import { ObservableString } from '@jupyterlab/observables'; describe('@jupyterlab/observables', () => { describe('ObservableString', () => { diff --git a/tests/test-observables/src/undoablelist.spec.ts b/tests/test-observables/src/undoablelist.spec.ts index 8c49e69a..e6c3b899 100644 --- a/tests/test-observables/src/undoablelist.spec.ts +++ b/tests/test-observables/src/undoablelist.spec.ts @@ -5,10 +5,7 @@ import { expect } from 'chai'; import { JSONObject } from '@phosphor/coreutils'; -import { - ObservableUndoableList, - ISerializer -} from '@jupyterlab/observables/src'; +import { ObservableUndoableList, ISerializer } from '@jupyterlab/observables'; class Test { constructor(value: JSONObject) { diff --git a/tests/test-outputarea/babel.config.js b/tests/test-outputarea/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-outputarea/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-outputarea/package.json b/tests/test-outputarea/package.json index 308a67ea..f73f8b7e 100644 --- a/tests/test-outputarea/package.json +++ b/tests/test-outputarea/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-outputarea", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,22 +12,22 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/outputarea": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/outputarea": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "ts-jest": "^23.1.4" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-outputarea/src/model.spec.ts b/tests/test-outputarea/src/model.spec.ts index f4df5cfe..38dfef8f 100644 --- a/tests/test-outputarea/src/model.spec.ts +++ b/tests/test-outputarea/src/model.spec.ts @@ -5,7 +5,7 @@ import { expect } from 'chai'; import { OutputModel } from '@jupyterlab/rendermime'; -import { OutputAreaModel } from '@jupyterlab/outputarea/src'; +import { OutputAreaModel } from '@jupyterlab/outputarea'; import { NBTestUtils } from '@jupyterlab/testutils'; diff --git a/tests/test-outputarea/src/widget.spec.ts b/tests/test-outputarea/src/widget.spec.ts index a54ac55c..7da4b1b2 100644 --- a/tests/test-outputarea/src/widget.spec.ts +++ b/tests/test-outputarea/src/widget.spec.ts @@ -15,7 +15,7 @@ import { IOutputAreaModel, OutputAreaModel, OutputArea -} from '@jupyterlab/outputarea/src'; +} from '@jupyterlab/outputarea'; import { createClientSession, @@ -257,6 +257,49 @@ describe('outputarea/widget', () => { expect(outputs[2].data).to.deep.equal({ 'text/plain': '4' }); await ipySession.shutdown(); }); + + it('should stop on an error', async () => { + let ipySession: ClientSession; + ipySession = await createClientSession({ + kernelPreference: { name: 'ipython' } + }); + await ipySession.initialize(); + await ipySession.kernel.ready; + const widget1 = new LogOutputArea({ rendermime, model }); + const future1 = OutputArea.execute('a++1', widget, ipySession); + const future2 = OutputArea.execute('a=1', widget1, ipySession); + const reply = await future1; + const reply2 = await future2; + expect(reply.content.status).to.equal('error'); + expect(reply2.content.status).to.equal('aborted'); + expect(model.length).to.equal(1); + widget1.dispose(); + await ipySession.shutdown(); + }); + + it('should allow an error given "raises-exception" metadata tag', async () => { + let ipySession: ClientSession; + ipySession = await createClientSession({ + kernelPreference: { name: 'ipython' } + }); + await ipySession.initialize(); + await ipySession.kernel.ready; + const widget1 = new LogOutputArea({ rendermime, model }); + const metadata = { tags: ['raises-exception'] }; + const future1 = OutputArea.execute( + 'a++1', + widget, + ipySession, + metadata + ); + const future2 = OutputArea.execute('a=1', widget1, ipySession); + const reply = await future1; + const reply2 = await future2; + expect(reply.content.status).to.equal('error'); + expect(reply2.content.status).to.equal('ok'); + widget1.dispose(); + await ipySession.shutdown(); + }); }); describe('.ContentFactory', () => { diff --git a/tests/test-rendermime/package.json b/tests/test-rendermime/package.json index 3f41747c..4cc9df49 100644 --- a/tests/test-rendermime/package.json +++ b/tests/test-rendermime/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-rendermime", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -13,26 +13,26 @@ "test:firefox": "python run-test.py --browsers=Firefox karma.conf.js", "test:ie": "python run-test.py --browsers=IE karma.conf.js", "watch": "tsc -b --watch", - "watch:src": "tsp -p src --watch" + "watch:src": "tsc -p src --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/mathjax2": "^1.0.0-alpha.3", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/mathjax2": "^1.0.0-alpha.9", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0" }, "devDependencies": { - "@types/chai": "~4.0.10", - "karma": "~2.0.4", + "@types/chai": "^4.1.7", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", - "puppeteer": "^1.5.0", + "puppeteer": "~1.17.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-rendermime/src/factories.spec.ts b/tests/test-rendermime/src/factories.spec.ts index 44c378be..b2f8e5d4 100644 --- a/tests/test-rendermime/src/factories.spec.ts +++ b/tests/test-rendermime/src/factories.spec.ts @@ -174,7 +174,8 @@ describe('rendermime/factories', () => { }); it('should add header anchors', async () => { - const source = require('../../../examples/filebrowser/sample.md') as string; + const source = require('../../../examples/filebrowser/sample.md') + .default as string; const f = markdownRendererFactory; const mimeType = 'text/markdown'; const model = createModel(mimeType, source); @@ -228,19 +229,19 @@ describe('rendermime/factories', () => { }); // TODO we are disabling script execution for now. - // it('should execute a script tag when attached', () => { - // const source = ''; - // const f = htmlRendererFactory; - // const mimeType = 'text/html'; - // const model = createModel(mimeType, source, true); - // const w = f.createRenderer({ mimeType, ...defaultOptions }); - // return w.renderModel(model).then(() => { - // expect((window as any).y).to.be.undefined; - // Widget.attach(w, document.body); - // expect((window as any).y).to.equal(3); - // w.dispose(); - // }); - // }); + it.skip('should execute a script tag when attached', () => { + const source = ''; + const f = htmlRendererFactory; + const mimeType = 'text/html'; + const model = createModel(mimeType, source, true); + const w = f.createRenderer({ mimeType, ...defaultOptions }); + return w.renderModel(model).then(() => { + expect((window as any).y).to.be.undefined; + Widget.attach(w, document.body); + expect((window as any).y).to.equal(3); + w.dispose(); + }); + }); it('should sanitize when untrusted', async () => { const source = '
'; diff --git a/tests/test-rendermime/src/registry.spec.ts b/tests/test-rendermime/src/registry.spec.ts index bfb56538..22b5fb82 100644 --- a/tests/test-rendermime/src/registry.spec.ts +++ b/tests/test-rendermime/src/registry.spec.ts @@ -304,7 +304,7 @@ describe('rendermime/registry', () => { const urlParent = encodeURI(pathParent); before(async () => { - const manager = new ServiceManager(); + const manager = new ServiceManager({ standby: 'never' }); const drive = new Drive({ name: 'extra' }); const path = pathParent + '/pr%25 ' + UUID.uuid4(); contents = manager.contents; diff --git a/tests/test-services/babel.config.js b/tests/test-services/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-services/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-services/package.json b/tests/test-services/package.json index be8405f0..d7104846 100644 --- a/tests/test-services/package.json +++ b/tests/test-services/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-services", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,25 +12,25 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/algorithm": "^1.1.2", "@phosphor/coreutils": "^1.3.0", "@phosphor/signaling": "^1.2.2", - "chai": "~4.1.2", - "jest": "^23.5.0", - "jest-junit": "^5.2.0", - "node-fetch": "~2.2.0", - "text-encoding": "~0.5.5", - "ts-jest": "^23.1.4", - "ws": "~6.0.0" + "chai": "^4.2.0", + "jest": "^24.7.1", + "jest-junit": "^6.3.0", + "node-fetch": "^2.6.0", + "text-encoding": "^0.7.0", + "ts-jest": "^24.0.2", + "ws": "^7.0.0" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", "@types/ws": "^6.0.1", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-services/src/config/config.spec.ts b/tests/test-services/src/config/config.spec.ts index 7007b0c8..f5fa177c 100644 --- a/tests/test-services/src/config/config.spec.ts +++ b/tests/test-services/src/config/config.spec.ts @@ -7,10 +7,7 @@ import { UUID } from '@phosphor/coreutils'; import { JSONObject } from '@phosphor/coreutils'; -import { - ConfigSection, - ConfigWithDefaults -} from '@jupyterlab/services/src/config'; +import { ConfigSection, ConfigWithDefaults } from '@jupyterlab/services'; import { expectFailure, diff --git a/tests/test-services/src/contents/index.spec.ts b/tests/test-services/src/contents/index.spec.ts index 13a4cefd..63ee387b 100644 --- a/tests/test-services/src/contents/index.spec.ts +++ b/tests/test-services/src/contents/index.spec.ts @@ -8,7 +8,7 @@ import { ContentsManager, Drive, ServerConnection -} from '@jupyterlab/services/src'; +} from '@jupyterlab/services'; import { DEFAULT_FILE, @@ -782,7 +782,7 @@ describe('drive', () => { }); }); - describe('#newUntitled()', async () => { + describe('#newUntitled()', () => { it('should create a file', async () => { const drive = new Drive(); handleRequest(drive, 201, DEFAULT_FILE); diff --git a/tests/test-services/src/contents/validate.spec.ts b/tests/test-services/src/contents/validate.spec.ts index 99df7c81..679ac3a1 100644 --- a/tests/test-services/src/contents/validate.spec.ts +++ b/tests/test-services/src/contents/validate.spec.ts @@ -6,7 +6,7 @@ import { expect } from 'chai'; import { validateContentsModel, validateCheckpointModel -} from '@jupyterlab/services/src/contents/validate'; +} from '@jupyterlab/services/lib/contents/validate'; import { DEFAULT_FILE } from '../utils'; diff --git a/tests/test-services/src/kernel/comm.spec.ts b/tests/test-services/src/kernel/comm.spec.ts index f915e251..597b5afc 100644 --- a/tests/test-services/src/kernel/comm.spec.ts +++ b/tests/test-services/src/kernel/comm.spec.ts @@ -5,7 +5,7 @@ import { expect } from 'chai'; import { PromiseDelegate } from '@phosphor/coreutils'; -import { KernelMessage, Kernel } from '@jupyterlab/services/src/kernel'; +import { KernelMessage, Kernel } from '@jupyterlab/services'; import { init } from '../utils'; @@ -20,12 +20,14 @@ comm.close("goodbye") `; const RECEIVE = ` -def _recv(msg): - data = msg["content"]["data"] - if data == "quit": - comm.close("goodbye") - else: - comm.send(data) +def create_recv(comm): + def _recv(msg): + data = msg["content"]["data"] + if data == "quit": + comm.close("goodbye") + else: + comm.send(data) + return _recv `; const SEND = ` @@ -33,13 +35,13 @@ ${RECEIVE} from ipykernel.comm import Comm comm = Comm(target_name="test", data="hello") comm.send(data="hello") -comm.on_msg(_recv) +comm.on_msg(create_recv(comm)) `; const TARGET = ` ${RECEIVE} def target_func(comm, msg): - comm.on_msg(_recv) + comm.on_msg(create_recv(comm)) get_ipython().kernel.comm_manager.register_target("test", target_func) `; @@ -218,14 +220,17 @@ describe('jupyter.services - Comm', () => { called = true; }; expect(typeof comm.onMsg).to.equal('function'); - const options: KernelMessage.IOptions = { + const msg = KernelMessage.createMessage({ msgType: 'comm_msg', channel: 'iopub', username: kernel.username, - session: kernel.clientId - }; - const msg = KernelMessage.createMessage(options); - comm.onMsg(msg as KernelMessage.ICommMsgMsg); + session: kernel.clientId, + content: { + comm_id: 'abcd', + data: {} + } + }); + comm.onMsg(msg); expect(called).to.equal(true); }); @@ -248,11 +253,11 @@ describe('jupyter.services - Comm', () => { await future.done; const encoder = new TextEncoder(); const data = encoder.encode('hello'); - future = comm.open({ foo: 'bar' }, { fizz: 'buzz' }, [ + let future2 = comm.open({ foo: 'bar' }, { fizz: 'buzz' }, [ data, data.buffer ]); - await future.done; + await future2.done; }); }); diff --git a/tests/test-services/src/kernel/ifuture.spec.ts b/tests/test-services/src/kernel/ifuture.spec.ts index f4ba7668..1e5a8666 100644 --- a/tests/test-services/src/kernel/ifuture.spec.ts +++ b/tests/test-services/src/kernel/ifuture.spec.ts @@ -3,9 +3,9 @@ import { expect } from 'chai'; -import { Kernel, KernelMessage } from '@jupyterlab/services/src/kernel'; +import { Kernel, KernelMessage } from '@jupyterlab/services'; -import { KernelTester, createMsg } from '../utils'; +import { KernelTester } from '../utils'; describe('Kernel.IFuture', () => { let tester: KernelTester; @@ -16,9 +16,7 @@ describe('Kernel.IFuture', () => { } }); - afterAll(() => { - Kernel.shutdownAll(); - }); + afterAll(() => Kernel.shutdownAll()); it('should have a msg attribute', async () => { const kernel = await Kernel.startNew(); @@ -45,24 +43,42 @@ describe('Kernel.IFuture', () => { tester.onMessage(message => { // send a reply const parentHeader = message.header; - const msg = createMsg('shell', parentHeader); - tester.send(msg); + const session = 'session'; + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'shell', + msgType: 'comm_open', + content: { comm_id: 'B', data: {}, target_name: 'C' } + }) + ); future.onReply = () => { // trigger onIOPub with a 'stream' message - const msgStream = createMsg('iopub', parentHeader); - msgStream.header.msg_type = 'stream'; - msgStream.content = { name: 'stdout', text: 'foo' }; - tester.send(msgStream); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: 'foo' } + }) + ); // trigger onDone - const msgDone = createMsg('iopub', parentHeader); - msgDone.header.msg_type = 'status'; - (msgDone as KernelMessage.IStatusMsg).content.execution_state = - 'idle'; - tester.send(msgDone); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'status', + content: { execution_state: 'idle' } + }) + ); }; future.registerMessageHook(async msg => { + // tslint:disable-next-line:await-promise await calls.push('last'); return true; }); @@ -120,21 +136,38 @@ describe('Kernel.IFuture', () => { tester.onMessage(message => { // send a reply const parentHeader = message.header; - const msg = createMsg('shell', parentHeader); - tester.send(msg); + const session = 'session'; + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'shell', + msgType: 'comm_open', + content: { comm_id: 'B', data: {}, target_name: 'C' } + }) + ); future.onReply = () => { // trigger onIOPub with a 'stream' message - const msgStream = createMsg('iopub', parentHeader); - msgStream.header.msg_type = 'stream'; - msgStream.content = { name: 'stdout', text: 'foo' }; - tester.send(msgStream); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: 'foo' } + }) + ); // trigger onDone - const msgDone = createMsg('iopub', parentHeader); - msgDone.header.msg_type = 'status'; - (msgDone as KernelMessage.IStatusMsg).content.execution_state = - 'idle'; - tester.send(msgDone); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'status', + content: { execution_state: 'idle' } + }) + ); }; future.registerMessageHook(msg => { @@ -175,21 +208,38 @@ describe('Kernel.IFuture', () => { tester.onMessage(message => { // send a reply const parentHeader = message.header; - const msg = createMsg('shell', parentHeader); - tester.send(msg); + const session = 'session'; + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'shell', + msgType: 'comm_open', + content: { comm_id: 'B', data: {}, target_name: 'C' } + }) + ); future.onReply = () => { // trigger onIOPub with a 'stream' message - const msgStream = createMsg('iopub', parentHeader); - msgStream.header.msg_type = 'stream'; - msgStream.content = { name: 'stdout', text: 'foo' }; - tester.send(msgStream); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: 'foo' } + }) + ); // trigger onDone - const msgDone = createMsg('iopub', parentHeader); - msgDone.header.msg_type = 'status'; - (msgDone as KernelMessage.IStatusMsg).content.execution_state = - 'idle'; - tester.send(msgDone); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'status', + content: { execution_state: 'idle' } + }) + ); }; future.registerMessageHook(msg => { @@ -241,21 +291,38 @@ describe('Kernel.IFuture', () => { tester.onMessage(message => { // send a reply const parentHeader = message.header; - const msg = createMsg('shell', parentHeader); - tester.send(msg); + const session = 'session'; + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'shell', + msgType: 'comm_open', + content: { comm_id: 'B', data: {}, target_name: 'C' } + }) + ); future.onReply = () => { // trigger onIOPub with a 'stream' message - const msgStream = createMsg('iopub', parentHeader); - msgStream.header.msg_type = 'stream'; - msgStream.content = { name: 'stdout', text: 'foo' }; - tester.send(msgStream); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: 'foo' } + }) + ); // trigger onDone - const msgDone = createMsg('iopub', parentHeader); - msgDone.header.msg_type = 'status'; - (msgDone as KernelMessage.IStatusMsg).content.execution_state = - 'idle'; - tester.send(msgDone); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'status', + content: { execution_state: 'idle' } + }) + ); }; future.registerMessageHook(toDelete); diff --git a/tests/test-services/src/kernel/ikernel.spec.ts b/tests/test-services/src/kernel/ikernel.spec.ts index 14f75d04..f28a9896 100644 --- a/tests/test-services/src/kernel/ikernel.spec.ts +++ b/tests/test-services/src/kernel/ikernel.spec.ts @@ -7,15 +7,14 @@ import { PageConfig } from '@jupyterlab/coreutils'; import { UUID } from '@phosphor/coreutils'; -import { JSONObject, PromiseDelegate } from '@phosphor/coreutils'; +import { PromiseDelegate } from '@phosphor/coreutils'; -import { Kernel, KernelMessage } from '@jupyterlab/services/src/kernel'; +import { Kernel, KernelMessage } from '@jupyterlab/services'; import { expectFailure, KernelTester, handleRequest, - createMsg, testEmission } from '../utils'; @@ -68,7 +67,7 @@ describe('Kernel.IKernel', () => { }); }); - describe('#iopubMessage', async () => { + describe('#iopubMessage', () => { it('should be emitted for an iopub message', async () => { let called = false; defaultKernel.iopubMessage.connect((k, msg) => { @@ -89,9 +88,11 @@ describe('Kernel.IKernel', () => { msgType: 'status', channel: 'iopub', session: tester.serverSessionId, - msgId - }) as KernelMessage.IStatusMsg; - msg.content.execution_state = 'idle'; + msgId, + content: { + execution_state: 'idle' + } + }); tester.send(msg); await emission; await tester.shutdown(); @@ -115,11 +116,12 @@ describe('Kernel.IKernel', () => { const emission = testEmission(kernel.unhandledMessage, { find: (k, msg) => msg.header.msg_id === msgId }); - const msg = KernelMessage.createShellMessage({ - msgType: 'foo', + const msg = KernelMessage.createMessage({ + msgType: 'kernel_info_request', channel: 'shell', session: tester.serverSessionId, - msgId + msgId, + content: {} }); msg.parent_header = { session: kernel.clientId }; tester.send(msg); @@ -142,11 +144,12 @@ describe('Kernel.IKernel', () => { tester.sendStatus(UUID.uuid4(), 'idle'); // Send a shell message. - const msg = KernelMessage.createShellMessage({ - msgType: 'foo', + const msg = KernelMessage.createMessage({ + msgType: 'kernel_info_request', channel: 'shell', session: tester.serverSessionId, - msgId + msgId, + content: {} }); msg.parent_header = { session: kernel.clientId }; tester.send(msg); @@ -171,21 +174,23 @@ describe('Kernel.IKernel', () => { }); // Send a shell message with the wrong client (parent) session. - const msg1 = KernelMessage.createShellMessage({ - msgType: 'foo', + const msg1 = KernelMessage.createMessage({ + msgType: 'kernel_info_request', channel: 'shell', session: tester.serverSessionId, - msgId: 'message from wrong session' + msgId: 'message from wrong session', + content: {} }); msg1.parent_header = { session: 'wrong session' }; tester.send(msg1); // Send a shell message with the right client (parent) session. - const msg2 = KernelMessage.createShellMessage({ - msgType: 'foo', + const msg2 = KernelMessage.createMessage({ + msgType: 'kernel_info_request', channel: 'shell', session: tester.serverSessionId, - msgId: msgId + msgId: msgId, + content: {} }); msg2.parent_header = { session: kernel.clientId }; tester.send(msg2); @@ -211,16 +216,17 @@ describe('Kernel.IKernel', () => { const emission = testEmission(kernel.anyMessage, { test: (k, args) => { expect(args.msg.header.msg_id).to.equal(msgId); - expect(args.msg.header.msg_type).to.equal('foo'); + expect(args.msg.header.msg_type).to.equal('kernel_info_request'); expect(args.direction).to.equal('recv'); } }); - const msg = KernelMessage.createShellMessage({ - msgType: 'foo', + const msg = KernelMessage.createMessage({ + msgType: 'kernel_info_request', channel: 'shell', session: tester.serverSessionId, - msgId + msgId, + content: {} }); msg.parent_header = { session: kernel.clientId }; tester.send(msg); @@ -244,9 +250,12 @@ describe('Kernel.IKernel', () => { it('should be emitted for an stdin message', async () => { const kernel = await tester.start(); const emission = testEmission(kernel.anyMessage, { - test: (k, args) => { - expect(args.msg.content.value).to.equal('foo'); - expect(args.direction).to.equal('send'); + test: (k, { msg, direction }) => { + if (!KernelMessage.isInputReplyMsg(msg)) { + throw new Error('Unexpected message'); + } + expect(msg.content.value).to.equal('foo'); + expect(direction).to.equal('send'); } }); kernel.sendInputReply({ value: 'foo' }); @@ -303,9 +312,7 @@ describe('Kernel.IKernel', () => { await emission; }); - // TODO: seems to be sporadically timing out if we await the restart. See - // https://github.com/jupyter/notebook/issues/3705. - it.skip('should get a restarting status', async () => { + it('should get a restarting status', async () => { const emission = testEmission(defaultKernel.statusChanged, { find: () => defaultKernel.status === 'restarting' }); @@ -440,9 +447,20 @@ describe('Kernel.IKernel', () => { }); describe('#sendShellMessage()', () => { + let tester: KernelTester; + let kernel: Kernel.IKernel; + + beforeEach(async () => { + tester = new KernelTester(); + kernel = await tester.start(); + }); + + afterEach(async () => { + await tester.shutdown(); + tester.dispose(); + }); + it('should send a message to the kernel', async () => { - const tester = new KernelTester(); - const kernel = await tester.start(); const done = new PromiseDelegate(); const msgId = UUID.uuid4(); @@ -453,26 +471,22 @@ describe('Kernel.IKernel', () => { done.reject(e); throw e; } - done.resolve(null); + done.resolve(); }); - const options: KernelMessage.IOptions = { - msgType: 'custom', + const msg = KernelMessage.createMessage({ + msgType: 'comm_info_request', channel: 'shell', username: kernel.username, session: kernel.clientId, - msgId - }; - const msg = KernelMessage.createShellMessage(options); + msgId, + content: {} + }); kernel.sendShellMessage(msg, true); await done.promise; - await tester.shutdown(); - tester.dispose(); }); it('should send a binary message', async () => { - const tester = new KernelTester(); - const kernel = await tester.start(); const done = new PromiseDelegate(); const msgId = UUID.uuid4(); @@ -485,32 +499,25 @@ describe('Kernel.IKernel', () => { done.reject(e); throw e; } - done.resolve(null); + done.resolve(); }); - const options: KernelMessage.IOptions = { - msgType: 'custom', + const encoder = new TextEncoder(); + const data = encoder.encode('hello'); + const msg = KernelMessage.createMessage({ + msgType: 'comm_info_request', channel: 'shell', username: kernel.username, session: kernel.clientId, - msgId - }; - const encoder = new TextEncoder(); - const data = encoder.encode('hello'); - const msg = KernelMessage.createShellMessage(options, {}, {}, [ - data, - data.buffer - ]); + msgId, + content: {}, + buffers: [data, data.buffer] + }); kernel.sendShellMessage(msg, true); await done.promise; - await tester.shutdown(); - tester.dispose(); }); it('should fail if the kernel is dead', async () => { - const tester = new KernelTester(); - const kernel = await tester.start(); - // Create a promise that resolves when the kernel's status changes to dead const dead = testEmission(kernel.statusChanged, { find: () => kernel.status === 'dead' @@ -518,58 +525,63 @@ describe('Kernel.IKernel', () => { tester.sendStatus(UUID.uuid4(), 'dead'); await dead; - const options: KernelMessage.IOptions = { - msgType: 'custom', + const msg = KernelMessage.createMessage({ + msgType: 'kernel_info_request', channel: 'shell', username: kernel.username, - session: kernel.clientId - }; - const msg = KernelMessage.createShellMessage(options); + session: kernel.clientId, + content: {} + }); expect(() => { kernel.sendShellMessage(msg, true); expect(false).to.equal(true); }).to.throw(/Kernel is dead/); - await tester.shutdown(); - tester.dispose(); }); it('should handle out of order messages', async () => { // This test that a future.done promise resolves when a status idle and // reply come through, even if the status comes first. - const tester = new KernelTester(); - const kernel = await tester.start(); - const options: KernelMessage.IOptions = { - msgType: 'custom', + const msg = KernelMessage.createMessage({ + msgType: 'kernel_info_request', channel: 'shell', username: kernel.username, - session: kernel.clientId - }; - const msg = KernelMessage.createShellMessage(options); + session: kernel.clientId, + content: {} + }); const future = kernel.sendShellMessage(msg, true); - let newMsg: KernelMessage.IMessage; tester.onMessage(msg => { // trigger onDone - options.msgType = 'status'; - options.channel = 'iopub'; - newMsg = KernelMessage.createMessage(options, { - execution_state: 'idle' - }); - newMsg.parent_header = msg.header; - tester.send(newMsg); + tester.send( + KernelMessage.createMessage({ + msgType: 'status', + channel: 'iopub', + username: kernel.username, + session: kernel.clientId, + content: { execution_state: 'idle' }, + parentHeader: msg.header + }) + ); future.onIOPub = () => { - options.msgType = 'custom'; - options.channel = 'shell'; - newMsg = KernelMessage.createShellMessage(options); - newMsg.parent_header = msg.header; - tester.send(newMsg); + tester.send( + KernelMessage.createMessage({ + msgType: 'comm_open', + channel: 'shell', + username: kernel.username, + session: kernel.clientId, + content: { + comm_id: 'abcd', + target_name: 'target', + data: {} + }, + parentHeader: msg.header + }) + ); }; }); await future.done; - await tester.shutdown(); - tester.dispose(); }); }); @@ -612,9 +624,7 @@ describe('Kernel.IKernel', () => { }); describe('#restart()', () => { - // TODO: seems to be sporadically timing out if we await the restart. See - // https://github.com/jupyter/notebook/issues/3705. - it.skip('should restart and resolve with a valid server response', async () => { + it('should restart and resolve with a valid server response', async () => { await defaultKernel.restart(); await defaultKernel.ready; }); @@ -646,13 +656,11 @@ describe('Kernel.IKernel', () => { await expectFailure(restart); }); - // TODO: seems to be sporadically timing out if we await the restart. See - // https://github.com/jupyter/notebook/issues/3705. - it.skip('should dispose of existing comm and future objects', async () => { + it('should dispose of existing comm and future objects', async () => { const kernel = defaultKernel; const comm = kernel.connectToComm('test'); const future = kernel.requestExecute({ code: 'foo' }); - kernel.restart(); + await kernel.restart(); await kernel.ready; expect(future.isDisposed).to.equal(true); expect(comm.isDisposed).to.equal(true); @@ -791,14 +799,33 @@ describe('Kernel.IKernel', () => { }); describe('#requestHistory()', () => { - it('should resolve the promise', async () => { + it('range messages should resolve the promise', async () => { const options: KernelMessage.IHistoryRequest = { output: true, raw: true, - hist_access_type: 'search', + hist_access_type: 'range', session: 0, start: 1, - stop: 2, + stop: 2 + }; + await defaultKernel.requestHistory(options); + }); + + it('tail messages should resolve the promise', async () => { + const options: KernelMessage.IHistoryRequest = { + output: true, + raw: true, + hist_access_type: 'tail', + n: 1 + }; + await defaultKernel.requestHistory(options); + }); + + it('search messages should resolve the promise', async () => { + const options: KernelMessage.IHistoryRequest = { + output: true, + raw: true, + hist_access_type: 'search', n: 1, pattern: '*', unique: true @@ -841,7 +868,6 @@ describe('Kernel.IKernel', () => { describe('#requestExecute()', () => { it('should send and handle incoming messages', async () => { - let newMsg: KernelMessage.IMessage; const content: KernelMessage.IExecuteRequest = { code: 'test', silent: false, @@ -851,9 +877,7 @@ describe('Kernel.IKernel', () => { stop_on_error: false }; - const options: KernelMessage.IOptions = { - msgType: 'custom', - channel: 'shell', + const options = { username: defaultKernel.username, session: defaultKernel.clientId }; @@ -865,38 +889,62 @@ describe('Kernel.IKernel', () => { expect(msg.channel).to.equal('shell'); // send a reply - options.channel = 'shell'; - newMsg = KernelMessage.createMessage(options); - newMsg.parent_header = msg.header; - tester.send(newMsg); + tester.send( + KernelMessage.createMessage({ + ...options, + msgType: 'execute_reply', + channel: 'shell', + content: { + execution_count: 1, + status: 'ok' + }, + parentHeader: msg.header as KernelMessage.IExecuteRequestMsg['header'] + }) + ); future.onReply = () => { // trigger onStdin - options.channel = 'stdin'; - newMsg = KernelMessage.createMessage(options); - newMsg.parent_header = msg.header; - tester.send(newMsg); + tester.send( + KernelMessage.createMessage({ + ...options, + channel: 'stdin', + msgType: 'input_request', + content: { + prompt: 'prompt', + password: false + }, + parentHeader: msg.header + }) + ); }; future.onStdin = () => { // trigger onIOPub with a 'stream' message - options.channel = 'iopub'; - options.msgType = 'stream'; - const streamContent: JSONObject = { name: 'stdout', text: '' }; - newMsg = KernelMessage.createMessage(options, streamContent); - newMsg.parent_header = msg.header; - tester.send(newMsg); + tester.send( + KernelMessage.createMessage({ + ...options, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: '' }, + parentHeader: msg.header + }) + ); }; future.onIOPub = ioMsg => { if (ioMsg.header.msg_type === 'stream') { // trigger onDone - options.msgType = 'status'; - newMsg = KernelMessage.createMessage(options, { - execution_state: 'idle' - }); - newMsg.parent_header = msg.header; - tester.send(newMsg); + tester.send( + KernelMessage.createMessage({ + ...options, + channel: 'iopub', + msgType: 'status', + content: { + execution_state: 'idle' + }, + parentHeader: msg.header + }) + ); } }; }); @@ -962,25 +1010,43 @@ describe('Kernel.IKernel', () => { tester.onMessage(message => { // send a reply const parentHeader = message.header; - const msg = createMsg('shell', parentHeader); - tester.send(msg); + const session = 'session'; + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'shell', + msgType: 'comm_open', + content: { comm_id: 'B', data: {}, target_name: 'C' } + }) + ); future.onReply = () => { // trigger onIOPub with a 'stream' message - const msgStream = createMsg('iopub', parentHeader); - msgStream.header.msg_type = 'stream'; - msgStream.content = { name: 'stdout', text: 'foo' }; - tester.send(msgStream); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: 'foo' } + }) + ); // trigger onDone - const msgDone = createMsg('iopub', parentHeader); - msgDone.header.msg_type = 'status'; - (msgDone as KernelMessage.IStatusMsg).content.execution_state = - 'idle'; - tester.send(msgDone); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'status', + content: { execution_state: 'idle' } + }) + ); }; kernel.registerMessageHook(parentHeader.msg_id, async msg => { // Make this hook call asynchronous + // tslint:disable-next-line:await-promise await calls.push('last'); return true; }); @@ -1030,21 +1096,38 @@ describe('Kernel.IKernel', () => { tester.onMessage(message => { // send a reply const parentHeader = message.header; - const msg = createMsg('shell', parentHeader); - tester.send(msg); + const session = 'session'; + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'shell', + msgType: 'comm_open', + content: { comm_id: 'B', data: {}, target_name: 'C' } + }) + ); future.onReply = () => { // trigger onIOPub with a 'stream' message - const msgStream = createMsg('iopub', parentHeader); - msgStream.header.msg_type = 'stream'; - msgStream.content = { name: 'stdout', text: 'foo' }; - tester.send(msgStream); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: 'foo' } + }) + ); // trigger onDone - const msgDone = createMsg('iopub', parentHeader); - msgDone.header.msg_type = 'status'; - (msgDone as KernelMessage.IStatusMsg).content.execution_state = - 'idle'; - tester.send(msgDone); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'status', + content: { execution_state: 'idle' } + }) + ); }; kernel.registerMessageHook(parentHeader.msg_id, msg => { @@ -1058,6 +1141,7 @@ describe('Kernel.IKernel', () => { }); future.onIOPub = async () => { + // tslint:disable-next-line:await-promise await calls.push('iopub'); }; }); @@ -1088,21 +1172,38 @@ describe('Kernel.IKernel', () => { tester.onMessage(message => { // send a reply const parentHeader = message.header; - const msg = createMsg('shell', parentHeader); - tester.send(msg); + const session = 'session'; + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'shell', + msgType: 'comm_open', + content: { comm_id: 'B', data: {}, target_name: 'C' } + }) + ); future.onReply = () => { // trigger onIOPub with a 'stream' message - const msgStream = createMsg('iopub', parentHeader); - msgStream.header.msg_type = 'stream'; - msgStream.content = { name: 'stdout', text: 'foo' }; - tester.send(msgStream); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: 'foo' } + }) + ); // trigger onDone - const msgDone = createMsg('iopub', parentHeader); - msgDone.header.msg_type = 'status'; - (msgDone as KernelMessage.IStatusMsg).content.execution_state = - 'idle'; - tester.send(msgDone); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'status', + content: { execution_state: 'idle' } + }) + ); }; kernel.registerMessageHook(parentHeader.msg_id, msg => { @@ -1144,21 +1245,38 @@ describe('Kernel.IKernel', () => { tester.onMessage(message => { // send a reply const parentHeader = message.header; - const msg = createMsg('shell', parentHeader); - tester.send(msg); + const session = 'session'; + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'shell', + msgType: 'comm_open', + content: { comm_id: 'B', data: {}, target_name: 'C' } + }) + ); future.onReply = () => { // trigger onIOPub with a 'stream' message - const msgStream = createMsg('iopub', parentHeader); - msgStream.header.msg_type = 'stream'; - msgStream.content = { name: 'stdout', text: 'foo' }; - tester.send(msgStream); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'stream', + content: { name: 'stdout', text: 'foo' } + }) + ); // trigger onDone - const msgDone = createMsg('iopub', parentHeader); - msgDone.header.msg_type = 'status'; - (msgDone as KernelMessage.IStatusMsg).content.execution_state = - 'idle'; - tester.send(msgDone); + tester.send( + KernelMessage.createMessage({ + parentHeader, + session, + channel: 'iopub', + msgType: 'status', + content: { execution_state: 'idle' } + }) + ); }; const toDelete = (msg: KernelMessage.IIOPubMessage) => { @@ -1311,7 +1429,12 @@ describe('Kernel.IKernel', () => { }) ); pushIopub(tester.sendStatus('idle', 'idle')); - pushReply(tester.sendExecuteReply('execute reply', {})); + pushReply( + tester.sendExecuteReply('execute reply', { + status: 'ok', + execution_count: 1 + }) + ); tester.parentHeader = undefined; }); @@ -1325,6 +1448,7 @@ describe('Kernel.IKernel', () => { kernel.registerMessageHook(future.msg.header.msg_id, async msg => { // Make this hook call asynchronous + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'kernel hook b']); return true; }); @@ -1335,17 +1459,21 @@ describe('Kernel.IKernel', () => { }); kernel.registerCommTarget('commtarget', async (comm, msg) => { + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'comm open']); comm.onMsg = async msg => { + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'comm msg']); }; comm.onClose = async msg => { + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'comm close']); }; }); future.registerMessageHook(async msg => { + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'future hook b']); return true; }); @@ -1353,19 +1481,23 @@ describe('Kernel.IKernel', () => { future.registerMessageHook(async msg => { // Delay processing until after we've checked the anyMessage results. await handlingBlock.promise; + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'future hook a']); return true; }); future.onIOPub = async msg => { + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'iopub']); }; future.onStdin = async msg => { + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'stdin']); }; future.onReply = async msg => { + // tslint:disable-next-line:await-promise await calls.push([msg.header.msg_id, 'reply']); }; diff --git a/tests/test-services/src/kernel/kernel.spec.ts b/tests/test-services/src/kernel/kernel.spec.ts index 31ab9041..2f23df8b 100644 --- a/tests/test-services/src/kernel/kernel.spec.ts +++ b/tests/test-services/src/kernel/kernel.spec.ts @@ -7,7 +7,7 @@ import { UUID } from '@phosphor/coreutils'; import { toArray } from '@phosphor/algorithm'; -import { Kernel } from '@jupyterlab/services/src/kernel'; +import { Kernel } from '@jupyterlab/services'; import { expectFailure, @@ -144,7 +144,7 @@ describe('kernel', () => { const emission = testEmission(kernel.statusChanged, { find: (k, status) => status === 'reconnecting' }); - tester.close(); + await tester.close(); await emission; }); }); diff --git a/tests/test-services/src/kernel/manager.spec.ts b/tests/test-services/src/kernel/manager.spec.ts index f565e30f..513ecff6 100644 --- a/tests/test-services/src/kernel/manager.spec.ts +++ b/tests/test-services/src/kernel/manager.spec.ts @@ -7,7 +7,7 @@ import { toArray } from '@phosphor/algorithm'; import { JSONExt } from '@phosphor/coreutils'; -import { KernelManager, Kernel } from '@jupyterlab/services/src/kernel'; +import { KernelManager, Kernel } from '@jupyterlab/services'; import { PYTHON_SPEC, @@ -17,6 +17,16 @@ import { testEmission } from '../utils'; +class TestManager extends KernelManager { + intercept: Kernel.ISpecModels | null = null; + protected async requestSpecs(): Promise { + if (this.intercept) { + handleRequest(this, 200, this.intercept); + } + return super.requestSpecs(); + } +} + const PYTHON3_SPEC = JSON.parse(JSON.stringify(PYTHON_SPEC)); PYTHON3_SPEC.name = 'Python3'; PYTHON3_SPEC.display_name = 'python3'; @@ -30,7 +40,7 @@ describe('kernel/manager', () => { }); beforeEach(() => { - manager = new KernelManager(); + manager = new KernelManager({ standby: 'never' }); expect(manager.specs).to.be.null; return manager.ready; }); @@ -47,7 +57,10 @@ describe('kernel/manager', () => { describe('#constructor()', () => { it('should take the options as an argument', () => { manager.dispose(); - manager = new KernelManager({ serverSettings: makeSettings() }); + manager = new KernelManager({ + serverSettings: makeSettings(), + standby: 'never' + }); expect(manager instanceof KernelManager).to.equal(true); }); }); @@ -56,8 +69,9 @@ describe('kernel/manager', () => { it('should get the server settings', () => { manager.dispose(); const serverSettings = makeSettings(); + const standby = 'never'; const token = serverSettings.token; - manager = new KernelManager({ serverSettings }); + manager = new KernelManager({ serverSettings, standby }); expect(manager.serverSettings.token).to.equal(token); }); }); @@ -78,16 +92,18 @@ describe('kernel/manager', () => { describe('#specsChanged', () => { it('should be emitted when the specs change', async () => { + const manager = new TestManager({ standby: 'never' }); const specs = JSONExt.deepCopy(KERNELSPECS) as Kernel.ISpecModels; - specs.default = 'shell'; - handleRequest(manager, 200, specs); let called = false; - manager.specsChanged.connect((sender, args) => { - expect(sender).to.equal(manager); - expect(args.default).to.equal(specs.default); + manager.specsChanged.connect(() => { called = true; }); + await manager.ready; + expect(manager.specs.default).to.equal('echo'); + specs.default = 'shell'; + manager.intercept = specs; await manager.refreshSpecs(); + expect(manager.specs.default).to.equal('shell'); expect(called).to.equal(true); }); }); @@ -109,7 +125,6 @@ describe('kernel/manager', () => { const kernel = await manager.startNew(); let called = false; manager.runningChanged.connect(() => { - manager.dispose(); called = true; }); await kernel.shutdown(); @@ -120,7 +135,7 @@ describe('kernel/manager', () => { describe('#isReady', () => { it('should test whether the manager is ready', async () => { manager.dispose(); - manager = new KernelManager(); + manager = new KernelManager({ standby: 'never' }); expect(manager.isReady).to.equal(false); await manager.ready; expect(manager.isReady).to.equal(true); @@ -135,11 +150,14 @@ describe('kernel/manager', () => { describe('#refreshSpecs()', () => { it('should update list of kernel specs', async () => { + const manager = new TestManager({ standby: 'never' }); const specs = JSONExt.deepCopy(KERNELSPECS) as Kernel.ISpecModels; + await manager.ready; specs.default = 'shell'; - handleRequest(manager, 200, specs); + manager.intercept = specs; + expect(manager.specs.default).not.to.equal('shell'); await manager.refreshSpecs(); - expect(manager.specs.default).to.equal(specs.default); + expect(manager.specs.default).to.equal('shell'); }); }); diff --git a/tests/test-services/src/kernel/messages.spec.ts b/tests/test-services/src/kernel/messages.spec.ts index ef563a3a..3cd805cd 100644 --- a/tests/test-services/src/kernel/messages.spec.ts +++ b/tests/test-services/src/kernel/messages.spec.ts @@ -3,57 +3,63 @@ import { expect } from 'chai'; -import { KernelMessage } from '@jupyterlab/services/src/kernel'; +import { KernelMessage } from '@jupyterlab/services'; describe('kernel/messages', () => { + const iopubStatusMsg = KernelMessage.createMessage({ + msgType: 'status', + channel: 'iopub', + session: 'baz', + content: { + execution_state: 'idle' + } + }); + describe('KernelMessage.isStreamMsg()', () => { it('should check for a stream message type', () => { - let msg = KernelMessage.createMessage({ + let msg = KernelMessage.createMessage({ msgType: 'stream', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { + name: 'stdout', + text: 'hello world' + } }); expect(KernelMessage.isStreamMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', - channel: 'iopub', - session: 'baz' - }); - expect(KernelMessage.isStreamMsg(msg)).to.equal(false); + expect(KernelMessage.isStreamMsg(iopubStatusMsg)).to.equal(false); }); }); describe('KernelMessage.isDisplayDataMsg()', () => { it('should check for a display data message type', () => { - let msg = KernelMessage.createMessage({ + let msg = KernelMessage.createMessage({ msgType: 'display_data', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { + data: {}, + metadata: {} + } }); expect(KernelMessage.isDisplayDataMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', - channel: 'iopub', - session: 'baz' - }); - expect(KernelMessage.isDisplayDataMsg(msg)).to.equal(false); + expect(KernelMessage.isDisplayDataMsg(iopubStatusMsg)).to.equal(false); }); }); describe('KernelMessage.isExecuteInputMsg()', () => { it('should check for a execute input message type', () => { - let msg = KernelMessage.createMessage({ + let msg = KernelMessage.createMessage({ msgType: 'execute_input', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { + code: '', + execution_count: 1 + } }); expect(KernelMessage.isExecuteInputMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', - channel: 'iopub', - session: 'baz' - }); - expect(KernelMessage.isExecuteInputMsg(msg)).to.equal(false); + expect(KernelMessage.isExecuteInputMsg(iopubStatusMsg)).to.equal(false); }); }); @@ -62,15 +68,11 @@ describe('kernel/messages', () => { let msg = KernelMessage.createMessage({ msgType: 'execute_result', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { data: {}, execution_count: 1, metadata: {} } }); expect(KernelMessage.isExecuteResultMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', - channel: 'iopub', - session: 'baz' - }); - expect(KernelMessage.isExecuteResultMsg(msg)).to.equal(false); + expect(KernelMessage.isExecuteResultMsg(iopubStatusMsg)).to.equal(false); }); }); @@ -79,15 +81,22 @@ describe('kernel/messages', () => { let msg = KernelMessage.createMessage({ msgType: 'status', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { + execution_state: 'idle' + } }); expect(KernelMessage.isStatusMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', + let msg2 = KernelMessage.createMessage({ + msgType: 'execute_input', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { + code: '', + execution_count: 1 + } }); - expect(KernelMessage.isStatusMsg(msg)).to.equal(false); + expect(KernelMessage.isStatusMsg(msg2)).to.equal(false); }); }); @@ -96,15 +105,11 @@ describe('kernel/messages', () => { let msg = KernelMessage.createMessage({ msgType: 'clear_output', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { wait: true } }); expect(KernelMessage.isClearOutputMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', - channel: 'iopub', - session: 'baz' - }); - expect(KernelMessage.isClearOutputMsg(msg)).to.equal(false); + expect(KernelMessage.isClearOutputMsg(iopubStatusMsg)).to.equal(false); }); }); @@ -113,15 +118,15 @@ describe('kernel/messages', () => { let msg = KernelMessage.createMessage({ msgType: 'comm_open', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { + comm_id: 'id', + data: {}, + target_name: 'target' + } }); expect(KernelMessage.isCommOpenMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', - channel: 'iopub', - session: 'baz' - }); - expect(KernelMessage.isCommOpenMsg(msg)).to.equal(false); + expect(KernelMessage.isCommOpenMsg(iopubStatusMsg)).to.equal(false); }); }); @@ -130,15 +135,15 @@ describe('kernel/messages', () => { let msg = KernelMessage.createMessage({ msgType: 'error', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { + ename: '', + evalue: '', + traceback: [] + } }); expect(KernelMessage.isErrorMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', - channel: 'iopub', - session: 'baz' - }); - expect(KernelMessage.isErrorMsg(msg)).to.equal(false); + expect(KernelMessage.isErrorMsg(iopubStatusMsg)).to.equal(false); }); }); @@ -147,15 +152,19 @@ describe('kernel/messages', () => { let msg = KernelMessage.createMessage({ msgType: 'input_request', channel: 'stdin', - session: 'baz' + session: 'baz', + content: { prompt: '', password: false } }); expect(KernelMessage.isInputRequestMsg(msg)).to.equal(true); - msg = KernelMessage.createMessage({ - msgType: 'foo', + let msg2 = KernelMessage.createMessage({ + msgType: 'input_reply', channel: 'stdin', - session: 'baz' + session: 'baz', + content: { + value: '' + } }); - expect(KernelMessage.isStatusMsg(msg)).to.equal(false); + expect(KernelMessage.isInputRequestMsg(msg2)).to.equal(false); }); }); }); diff --git a/tests/test-services/src/kernel/validate.spec.ts b/tests/test-services/src/kernel/validate.spec.ts index ea064656..15a7fbdc 100644 --- a/tests/test-services/src/kernel/validate.spec.ts +++ b/tests/test-services/src/kernel/validate.spec.ts @@ -5,28 +5,26 @@ import { expect } from 'chai'; import { JSONObject } from '@phosphor/coreutils'; -import { Kernel, KernelMessage } from '@jupyterlab/services/src/kernel'; +import { Kernel, KernelMessage } from '@jupyterlab/services'; import { validateMessage, validateModel, validateSpecModel, validateSpecModels -} from '@jupyterlab/services/src/kernel/validate'; +} from '@jupyterlab/services/lib/kernel/validate'; import { PYTHON_SPEC } from '../utils'; describe('kernel/validate', () => { describe('validateMessage', () => { it('should pass a valid message', () => { - const msg = KernelMessage.createMessage( - { - msgType: 'comm_msg', - channel: 'iopub', - session: 'foo' - }, - { comm_id: 'foo', data: {} } - ); + const msg = KernelMessage.createMessage({ + msgType: 'comm_msg', + channel: 'iopub', + session: 'foo', + content: { comm_id: 'foo', data: {} } + }); validateMessage(msg); }); @@ -34,7 +32,8 @@ describe('kernel/validate', () => { const msg = KernelMessage.createMessage({ msgType: 'comm_msg', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { comm_id: 'foo', data: {} } }); delete msg.channel; expect(() => validateMessage(msg)).to.throw(); @@ -44,7 +43,8 @@ describe('kernel/validate', () => { const msg = KernelMessage.createMessage({ msgType: 'comm_msg', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { comm_id: 'foo', data: {} } }); (msg as any).header.username = 1; expect(() => validateMessage(msg)).to.throw(); @@ -54,7 +54,8 @@ describe('kernel/validate', () => { const msg = KernelMessage.createMessage({ msgType: 'comm_msg', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { comm_id: 'foo', data: {} } }); msg.parent_header = msg.header; (msg as any).parent_header.username = 1; @@ -65,69 +66,60 @@ describe('kernel/validate', () => { const msg = KernelMessage.createMessage({ msgType: 'comm_msg', channel: 'iopub', - session: 'baz' + session: 'baz', + content: { comm_id: 'foo', data: {} } }); (msg as any).channel = 1; expect(() => validateMessage(msg)).to.throw(); }); it('should validate an iopub message', () => { - const msg = KernelMessage.createMessage( - { - msgType: 'comm_close', - channel: 'iopub', - session: 'baz' - }, - { comm_id: 'foo' } - ); + const msg = KernelMessage.createMessage({ + msgType: 'comm_close', + channel: 'iopub', + session: 'baz', + content: { comm_id: 'foo', data: {} } + }); validateMessage(msg); }); it('should ignore on an unknown iopub message type', () => { - const msg = KernelMessage.createMessage( - { - msgType: 'foo', - channel: 'iopub', - session: 'baz' - }, - {} - ); + const msg = KernelMessage.createMessage({ + msgType: 'foo', + channel: 'iopub', + session: 'baz', + content: {} + } as any); validateMessage(msg); }); it('should throw on missing iopub message content', () => { - const msg = KernelMessage.createMessage( - { - msgType: 'error', - channel: 'iopub', - session: 'baz' - }, - {} - ); + const msg = KernelMessage.createMessage({ + msgType: 'error', + channel: 'iopub', + session: 'baz', + content: {} as any + } as any); expect(() => validateMessage(msg)).to.throw(); }); it('should throw on invalid iopub message content', () => { - const msg = KernelMessage.createMessage( - { - msgType: 'clear_output', - channel: 'iopub', - session: 'baz' - }, - { wait: 1 } - ); + const msg = KernelMessage.createMessage({ + msgType: 'clear_output', + channel: 'iopub', + session: 'baz', + content: { wait: 1 as any } + }); expect(() => validateMessage(msg)).to.throw(); }); it('should handle no buffers field', () => { - const msg = KernelMessage.createMessage( - { - msgType: 'comm_msg', - channel: 'iopub', - session: 'foo' - }, - { comm_id: 'foo', data: {} } - ); + const msg = KernelMessage.createMessage({ + msgType: 'comm_msg', + channel: 'iopub', + session: 'foo', + content: { comm_id: 'foo', data: {} } + }); delete msg['buffers']; validateMessage(msg); }); diff --git a/tests/test-services/src/manager.spec.ts b/tests/test-services/src/manager.spec.ts index 7ef59365..bdf5bcbb 100644 --- a/tests/test-services/src/manager.spec.ts +++ b/tests/test-services/src/manager.spec.ts @@ -3,24 +3,24 @@ import { expect } from 'chai'; -import { ContentsManager } from '@jupyterlab/services/src/contents'; +import { ContentsManager } from '@jupyterlab/services'; -import { ServiceManager } from '@jupyterlab/services/src/manager'; +import { ServiceManager } from '@jupyterlab/services'; -import { SessionManager } from '@jupyterlab/services/src/session'; +import { SessionManager } from '@jupyterlab/services'; -import { SettingManager } from '@jupyterlab/services/src/setting'; +import { SettingManager } from '@jupyterlab/services'; -import { TerminalManager } from '@jupyterlab/services/src/terminal'; +import { TerminalManager } from '@jupyterlab/services'; -import { WorkspaceManager } from '@jupyterlab/services/src/workspace'; +import { WorkspaceManager } from '@jupyterlab/services'; describe('manager', () => { describe('ServiceManager', () => { let manager: ServiceManager.IManager; beforeEach(() => { - manager = new ServiceManager(); + manager = new ServiceManager({ standby: 'never' }); return manager.ready; }); @@ -67,7 +67,7 @@ describe('manager', () => { describe('#isReady', () => { it('should test whether the manager is ready', async () => { manager.dispose(); - manager = new ServiceManager(); + manager = new ServiceManager({ standby: 'never' }); expect(manager.isReady).to.equal(false); await manager.ready; expect(manager.isReady).to.equal(true); diff --git a/tests/test-services/src/serverconnection.spec.ts b/tests/test-services/src/serverconnection.spec.ts index 51581911..3b4ed860 100644 --- a/tests/test-services/src/serverconnection.spec.ts +++ b/tests/test-services/src/serverconnection.spec.ts @@ -5,7 +5,7 @@ import { expect } from 'chai'; import { PageConfig } from '@jupyterlab/coreutils'; -import { ServerConnection } from '@jupyterlab/services/src'; +import { ServerConnection } from '@jupyterlab/services'; import { getRequestHandler } from './utils'; diff --git a/tests/test-services/src/session/isession.spec.ts b/tests/test-services/src/session/isession.spec.ts index e2470c14..97d17ee8 100644 --- a/tests/test-services/src/session/isession.spec.ts +++ b/tests/test-services/src/session/isession.spec.ts @@ -9,9 +9,9 @@ import { UUID } from '@phosphor/coreutils'; import { Signal } from '@phosphor/signaling'; -import { Kernel, KernelMessage } from '@jupyterlab/services/src/kernel'; +import { Kernel, KernelMessage } from '@jupyterlab/services'; -import { Session } from '@jupyterlab/services/src/session'; +import { Session } from '@jupyterlab/services'; import { expectFailure, @@ -70,13 +70,10 @@ describe('session', () => { it('should emit when the kernel changes', async () => { let called: Session.IKernelChangedArgs | null = null; const object = {}; - defaultSession.kernelChanged.connect( - (s, args) => { - called = args; - Signal.disconnectReceiver(object); - }, - object - ); + defaultSession.kernelChanged.connect((s, args) => { + called = args; + Signal.disconnectReceiver(object); + }, object); const previous = defaultSession.kernel; await defaultSession.changeKernel({ name: previous.name }); await defaultSession.kernel.ready; @@ -124,11 +121,12 @@ describe('session', () => { const emission = testEmission(session.unhandledMessage, { find: (k, msg) => msg.header.msg_id === msgId }); - const msg = KernelMessage.createShellMessage({ - msgType: 'foo', + const msg = KernelMessage.createMessage({ + msgType: 'kernel_info_request', channel: 'shell', session: tester.serverSessionId, - msgId + msgId, + content: {} }); msg.parent_header = { session: session.kernel.clientId }; tester.send(msg); @@ -143,15 +141,12 @@ describe('session', () => { const newPath = UUID.uuid4(); let called = false; const object = {}; - defaultSession.propertyChanged.connect( - (s, type) => { - expect(defaultSession.path).to.equal(newPath); - expect(type).to.equal('path'); - called = true; - Signal.disconnectReceiver(object); - }, - object - ); + defaultSession.propertyChanged.connect((s, type) => { + expect(defaultSession.path).to.equal(newPath); + expect(type).to.equal('path'); + called = true; + Signal.disconnectReceiver(object); + }, object); await defaultSession.setPath(newPath); expect(called).to.equal(true); }); diff --git a/tests/test-services/src/session/manager.spec.ts b/tests/test-services/src/session/manager.spec.ts index 4ba47925..6881f7d3 100644 --- a/tests/test-services/src/session/manager.spec.ts +++ b/tests/test-services/src/session/manager.spec.ts @@ -14,10 +14,20 @@ import { ServerConnection, SessionManager, Session -} from '@jupyterlab/services/src'; +} from '@jupyterlab/services'; import { KERNELSPECS, handleRequest, testEmission } from '../utils'; +class TestManager extends SessionManager { + intercept: Kernel.ISpecModels | null = null; + protected async requestSpecs(): Promise { + if (this.intercept) { + handleRequest(this, 200, this.intercept); + } + return super.requestSpecs(); + } +} + /** * Start a new session on with a default name. */ @@ -97,17 +107,18 @@ describe('session/manager', () => { describe('#specsChanged', () => { it('should be emitted when the specs change', async () => { + const manager = new TestManager({ standby: 'never' }); const specs = JSONExt.deepCopy(KERNELSPECS) as Kernel.ISpecModels; - specs.default = 'shell'; - handleRequest(manager, 200, specs); let called = false; - manager.specsChanged.connect((sender, args) => { - expect(sender).to.equal(manager); - if (args.default === specs.default) { - called = true; - } + manager.specsChanged.connect(() => { + called = true; }); + await manager.ready; + expect(manager.specs.default).to.equal('echo'); + specs.default = 'shell'; + manager.intercept = specs; await manager.refreshSpecs(); + expect(manager.specs.default).to.equal('shell'); expect(called).to.equal(true); }); }); @@ -128,7 +139,6 @@ describe('session/manager', () => { let called = false; const s = await startNew(manager); manager.runningChanged.connect(() => { - manager.dispose(); called = true; }); await s.shutdown(); @@ -138,7 +148,6 @@ describe('session/manager', () => { it('should be emitted when a session is renamed', async () => { let called = false; manager.runningChanged.connect(() => { - manager.dispose(); called = true; }); await session.setPath(UUID.uuid4()); @@ -149,7 +158,6 @@ describe('session/manager', () => { it('should be emitted when a session changes kernels', async () => { let called = false; manager.runningChanged.connect(() => { - manager.dispose(); called = true; }); await session.changeKernel({ name: session.kernel.name }); @@ -169,12 +177,15 @@ describe('session/manager', () => { }); describe('#refreshSpecs()', () => { - it('should refresh the specs', async () => { + it('should update list of kernel specs', async () => { + const manager = new TestManager({ standby: 'never' }); const specs = JSONExt.deepCopy(KERNELSPECS) as Kernel.ISpecModels; + await manager.ready; specs.default = 'shell'; - handleRequest(manager, 200, specs); + manager.intercept = specs; + expect(manager.specs.default).not.to.equal('shell'); await manager.refreshSpecs(); - expect(manager.specs.default).to.equal(specs.default); + expect(manager.specs.default).to.equal('shell'); }); }); diff --git a/tests/test-services/src/session/session.spec.ts b/tests/test-services/src/session/session.spec.ts index 436ac702..9c17bf74 100644 --- a/tests/test-services/src/session/session.spec.ts +++ b/tests/test-services/src/session/session.spec.ts @@ -7,9 +7,9 @@ import { UUID } from '@phosphor/coreutils'; import { toArray } from '@phosphor/algorithm'; -import { ServerConnection } from '@jupyterlab/services/src/serverconnection'; +import { ServerConnection } from '@jupyterlab/services'; -import { Session } from '@jupyterlab/services/src/session'; +import { Session } from '@jupyterlab/services'; import { expectFailure, diff --git a/tests/test-services/src/session/validate.spec.ts b/tests/test-services/src/session/validate.spec.ts index 6c88a261..a1b118d9 100644 --- a/tests/test-services/src/session/validate.spec.ts +++ b/tests/test-services/src/session/validate.spec.ts @@ -3,9 +3,9 @@ import { expect } from 'chai'; -import { Session } from '@jupyterlab/services/src/session'; +import { Session } from '@jupyterlab/services'; -import { validateModel } from '@jupyterlab/services/src/session/validate'; +import { validateModel } from '@jupyterlab/services/lib/session/validate'; describe('session/validate', () => { describe('#validateModel()', () => { diff --git a/tests/test-services/src/setting/manager.spec.ts b/tests/test-services/src/setting/manager.spec.ts index 85eff9c7..a25c3bc6 100644 --- a/tests/test-services/src/setting/manager.spec.ts +++ b/tests/test-services/src/setting/manager.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; -import { ServerConnection, SettingManager } from '@jupyterlab/services/src'; +import { ServerConnection, SettingManager } from '@jupyterlab/services'; import { init } from '../utils'; diff --git a/tests/test-services/src/terminal/manager.spec.ts b/tests/test-services/src/terminal/manager.spec.ts index 07c1e7e4..f92f1ec8 100644 --- a/tests/test-services/src/terminal/manager.spec.ts +++ b/tests/test-services/src/terminal/manager.spec.ts @@ -9,7 +9,8 @@ import { ServerConnection, TerminalSession, TerminalManager -} from '@jupyterlab/services/src'; +} from '@jupyterlab/services'; +import { testEmission } from '../utils'; describe('terminal', () => { let manager: TerminalSession.IManager; @@ -20,7 +21,7 @@ describe('terminal', () => { }); beforeEach(() => { - manager = new TerminalManager(); + manager = new TerminalManager({ standby: 'never' }); return manager.ready; }); @@ -36,14 +37,15 @@ describe('terminal', () => { describe('#constructor()', () => { it('should accept no options', () => { manager.dispose(); - manager = new TerminalManager(); + manager = new TerminalManager({ standby: 'never' }); expect(manager).to.be.an.instanceof(TerminalManager); }); it('should accept options', () => { manager.dispose(); manager = new TerminalManager({ - serverSettings: ServerConnection.makeSettings() + serverSettings: ServerConnection.makeSettings(), + standby: 'never' }); expect(manager).to.be.an.instanceof(TerminalManager); }); @@ -53,8 +55,9 @@ describe('terminal', () => { it('should get the server settings', () => { manager.dispose(); const serverSettings = ServerConnection.makeSettings(); + const standby = 'never'; const token = serverSettings.token; - manager = new TerminalManager({ serverSettings }); + manager = new TerminalManager({ serverSettings, standby }); expect(manager.serverSettings.token).to.equal(token); }); }); @@ -62,7 +65,7 @@ describe('terminal', () => { describe('#isReady', () => { it('should test whether the manager is ready', async () => { manager.dispose(); - manager = new TerminalManager(); + manager = new TerminalManager({ standby: 'never' }); expect(manager.isReady).to.equal(false); await manager.ready; expect(manager.isReady).to.equal(true); @@ -121,27 +124,27 @@ describe('terminal', () => { }); it('should emit a runningChanged signal', async () => { - let called = false; session = await manager.startNew(); - manager.runningChanged.connect((sender, args) => { - expect(session.isDisposed).to.equal(false); - called = true; + const emission = testEmission(manager.runningChanged, { + test: () => { + expect(session.isDisposed).to.equal(false); + } }); await manager.shutdown(session.name); - expect(called).to.equal(true); + await emission; }); }); describe('#runningChanged', () => { it('should be emitted when the running terminals changed', async () => { - let called = false; - manager.runningChanged.connect((sender, args) => { - expect(sender).to.equal(manager); - expect(toArray(args).length).to.be.greaterThan(0); - called = true; + const emission = testEmission(manager.runningChanged, { + test: (sender, args) => { + expect(sender).to.equal(manager); + expect(toArray(args).length).to.be.greaterThan(0); + } }); await manager.startNew(); - expect(called).to.equal(true); + await emission; }); }); diff --git a/tests/test-services/src/terminal/terminal.spec.ts b/tests/test-services/src/terminal/terminal.spec.ts index b4b13706..83e10106 100644 --- a/tests/test-services/src/terminal/terminal.spec.ts +++ b/tests/test-services/src/terminal/terminal.spec.ts @@ -7,7 +7,7 @@ import { PageConfig } from '@jupyterlab/coreutils'; import { UUID } from '@phosphor/coreutils'; -import { TerminalSession } from '@jupyterlab/services/src/terminal'; +import { TerminalSession } from '@jupyterlab/services'; import { handleRequest, testEmission } from '../utils'; @@ -77,7 +77,7 @@ describe('terminal', () => { describe('.ISession', () => { describe('#terminated', () => { - it('should be emitted when the session is shut down', async () => { + it('should be emitted when the session is disposed', async () => { session = await TerminalSession.startNew(); let called = false; session.terminated.connect((sender, args) => { @@ -85,7 +85,7 @@ describe('terminal', () => { expect(args).to.be.undefined; called = true; }); - await session.shutdown(); + session.dispose(); expect(called).to.equal(true); }); }); diff --git a/tests/test-services/src/utils.ts b/tests/test-services/src/utils.ts index 6391314e..ef4cbc05 100644 --- a/tests/test-services/src/utils.ts +++ b/tests/test-services/src/utils.ts @@ -21,16 +21,16 @@ import { Contents, TerminalSession, ServerConnection -} from '@jupyterlab/services/src'; +} from '@jupyterlab/services'; -import { Kernel, KernelMessage } from '@jupyterlab/services/src/kernel'; +import { Kernel, KernelMessage } from '@jupyterlab/services'; import { deserialize, serialize -} from '@jupyterlab/services/src/kernel/serialize'; +} from '@jupyterlab/services/lib/kernel/serialize'; -import { Session } from '@jupyterlab/services/src/session'; +import { Session } from '@jupyterlab/services'; // stub for node global declare var global: any; @@ -125,23 +125,6 @@ export const KERNELSPECS: JSONObject = { } }; -/** - * Create a message from an existing message. - */ -export function createMsg( - channel: KernelMessage.Channel, - parentHeader: JSONObject -): KernelMessage.IMessage { - return { - channel: channel, - parent_header: JSON.parse(JSON.stringify(parentHeader)), - content: {}, - header: JSON.parse(JSON.stringify(parentHeader)), - metadata: {}, - buffers: [] - }; -} - /** * Get a single handler for a request. */ @@ -332,20 +315,24 @@ export class KernelTester extends SocketTester { * Send the status from the server to the client. */ sendStatus(msgId: string, status: Kernel.Status) { - return this.sendMessage( - { msgId, msgType: 'status', channel: 'iopub' }, - { execution_state: status } - ); + return this.sendMessage({ + msgId, + msgType: 'status', + channel: 'iopub', + content: { execution_state: status } + }); } /** * Send an iopub stream message. */ sendStream(msgId: string, content: KernelMessage.IStreamMsg['content']) { - return this.sendMessage( - { msgId, msgType: 'stream', channel: 'iopub' }, + return this.sendMessage({ + msgId, + msgType: 'stream', + channel: 'iopub', content - ); + }); } /** @@ -355,10 +342,12 @@ export class KernelTester extends SocketTester { msgId: string, content: KernelMessage.IDisplayDataMsg['content'] ) { - return this.sendMessage( - { msgId, msgType: 'display_data', channel: 'iopub' }, + return this.sendMessage({ + msgId, + msgType: 'display_data', + channel: 'iopub', content - ); + }); } /** @@ -368,19 +357,23 @@ export class KernelTester extends SocketTester { msgId: string, content: KernelMessage.IUpdateDisplayDataMsg['content'] ) { - return this.sendMessage( - { msgId, msgType: 'update_display_data', channel: 'iopub' }, + return this.sendMessage({ + msgId, + msgType: 'update_display_data', + channel: 'iopub', content - ); + }); } /** * Send an iopub comm open message. */ sendCommOpen(msgId: string, content: KernelMessage.ICommOpenMsg['content']) { - return this.sendMessage( - { msgId, msgType: 'comm_open', channel: 'iopub' }, + return this.sendMessage({ + msgId, + msgType: 'comm_open', + channel: 'iopub', content - ); + }); } /** @@ -390,74 +383,84 @@ export class KernelTester extends SocketTester { msgId: string, content: KernelMessage.ICommCloseMsg['content'] ) { - return this.sendMessage( - { msgId, msgType: 'comm_close', channel: 'iopub' }, + return this.sendMessage({ + msgId, + msgType: 'comm_close', + channel: 'iopub', content - ); + }); } /** * Send an iopub comm message. */ sendCommMsg(msgId: string, content: KernelMessage.ICommMsgMsg['content']) { - return this.sendMessage( - { msgId, msgType: 'comm_msg', channel: 'iopub' }, + return this.sendMessage({ + msgId, + msgType: 'comm_msg', + channel: 'iopub', content - ); + }); } sendExecuteResult( msgId: string, content: KernelMessage.IExecuteResultMsg['content'] ) { - return this.sendMessage( - { msgId, msgType: 'execute_result', channel: 'iopub' }, + return this.sendMessage({ + msgId, + msgType: 'execute_result', + channel: 'iopub', content - ); + }); } sendExecuteReply( msgId: string, - content: KernelMessage.IExecuteReply['content'] + content: KernelMessage.IExecuteReplyMsg['content'] ) { - return this.sendMessage( - { msgId, msgType: 'execute_reply', channel: 'shell' }, + return this.sendMessage({ + msgId, + msgType: 'execute_reply', + channel: 'shell', content - ); + }); } sendKernelInfoReply( msgId: string, content: KernelMessage.IInfoReplyMsg['content'] ) { - return this.sendMessage( - { msgId, msgType: 'kernel_info_reply', channel: 'shell' }, + return this.sendMessage({ + msgId, + msgType: 'kernel_info_reply', + channel: 'shell', content - ); + }); } sendInputRequest( msgId: string, content: KernelMessage.IInputRequestMsg['content'] ) { - return this.sendMessage( - { msgId, msgType: 'input_request', channel: 'stdin' }, + return this.sendMessage({ + msgId, + msgType: 'input_request', + channel: 'stdin', content - ); + }); } /** * Send a kernel message with sensible defaults. */ - sendMessage( - options: MakeOptional, - content: any + sendMessage( + options: MakeOptional, 'session'> ) { - options.session = this.serverSessionId; - const msg = KernelMessage.createMessage( - options as KernelMessage.IOptions, - content - ); + const msg = KernelMessage.createMessage({ + session: this.serverSessionId, + ...options + }); msg.parent_header = this.parentHeader; this.send(msg); return msg.header.msg_id; @@ -466,7 +469,7 @@ export class KernelTester extends SocketTester { /** * Send a kernel message from the server to the client. */ - send(msg: KernelMessage.IMessage): void { + send(msg: KernelMessage.Message): void { this.sendRaw(serialize(msg)); } @@ -614,14 +617,14 @@ export class SessionTester extends SocketTester { /** * Send the status from the server to the client. */ - sendStatus(status: string, parentHeader?: KernelMessage.IHeader) { - const options: KernelMessage.IOptions = { + sendStatus(status: Kernel.Status, parentHeader?: KernelMessage.IHeader) { + const msg = KernelMessage.createMessage({ msgType: 'status', channel: 'iopub', - session: this.serverSessionId - }; - const msg = KernelMessage.createMessage(options, { - execution_state: status + session: this.serverSessionId, + content: { + execution_state: status + } }); if (parentHeader) { msg.parent_header = parentHeader; @@ -653,19 +656,19 @@ export class SessionTester extends SocketTester { msg = new Uint8Array(msg).buffer; } const data = deserialize(msg); - if (data.header.msg_type === 'kernel_info_request') { + if (KernelMessage.isInfoRequestMsg(data)) { // First send status busy message. this.sendStatus('busy', data.header); // Then send the kernel_info_reply message. - const options: KernelMessage.IOptions = { + const reply = KernelMessage.createMessage({ msgType: 'kernel_info_reply', channel: 'shell', - session: this.serverSessionId - }; - const msg = KernelMessage.createMessage(options, EXAMPLE_KERNEL_INFO); - msg.parent_header = data.header; - this.send(msg); + session: this.serverSessionId, + content: EXAMPLE_KERNEL_INFO + }); + reply.parent_header = data.header; + this.send(reply); // Then send status idle message. this.sendStatus('idle', data.header); @@ -749,22 +752,19 @@ export async function testEmission( ): Promise { const done = new PromiseDelegate(); const object = {}; - signal.connect( - (sender: T, args: U) => { - if (!options.find || options.find(sender, args)) { - try { - Signal.disconnectReceiver(object); - if (options.test) { - options.test(sender, args); - } - } catch (e) { - done.reject(e); + signal.connect((sender: T, args: U) => { + if (!options.find || options.find(sender, args)) { + try { + Signal.disconnectReceiver(object); + if (options.test) { + options.test(sender, args); } - done.resolve(options.value || undefined); + } catch (e) { + done.reject(e); } - }, - object - ); + done.resolve(options.value || undefined); + } + }, object); return done.promise; } diff --git a/tests/test-services/src/workspace/manager.spec.ts b/tests/test-services/src/workspace/manager.spec.ts index 437b23b6..189ad587 100644 --- a/tests/test-services/src/workspace/manager.spec.ts +++ b/tests/test-services/src/workspace/manager.spec.ts @@ -49,7 +49,7 @@ describe('workspace', () => { }); }); - describe('#list()', async () => { + describe('#list()', () => { it('should fetch a workspace list supporting arbitrary IDs', async () => { const ids = ['foo', 'bar', 'baz', 'f/o/o', 'b/a/r', 'b/a/z']; const promises = ids.map(id => diff --git a/tests/test-statusbar/babel.config.js b/tests/test-statusbar/babel.config.js new file mode 100644 index 00000000..8b5c7642 --- /dev/null +++ b/tests/test-statusbar/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@jupyterlab/testutils/lib/babel.config'); diff --git a/tests/test-statusbar/package.json b/tests/test-statusbar/package.json index 7f7d6bc7..908a0885 100644 --- a/tests/test-statusbar/package.json +++ b/tests/test-statusbar/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-statusbar", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -12,19 +12,19 @@ "watch:src": "tsc -b --watch" }, "dependencies": { - "@jupyterlab/statusbar": "^1.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/statusbar": "^1.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/signaling": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2", - "jest": "^23.5.0", - "ts-jest": "^23.1.4" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0", + "jest": "^24.7.1", + "ts-jest": "^24.0.2" }, "devDependencies": { - "@types/chai": "~4.0.10", - "@types/jest": "^23.3.1", - "puppeteer": "^1.5.0", + "@types/chai": "^4.1.7", + "@types/jest": "^24.0.13", + "puppeteer": "~1.17.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-statusbar/src/statusbar.spec.ts b/tests/test-statusbar/src/statusbar.spec.ts index 89fb3648..1cddb79a 100644 --- a/tests/test-statusbar/src/statusbar.spec.ts +++ b/tests/test-statusbar/src/statusbar.spec.ts @@ -7,7 +7,7 @@ import { Signal } from '@phosphor/signaling'; import { Widget } from '@phosphor/widgets'; -import { StatusBar } from '@jupyterlab/statusbar/src'; +import { StatusBar } from '@jupyterlab/statusbar'; describe('@jupyterlab/statusbar', () => { describe('StatusBar', () => { diff --git a/tests/test-terminal/package.json b/tests/test-terminal/package.json index 0aa85a15..2e16c825 100644 --- a/tests/test-terminal/package.json +++ b/tests/test-terminal/package.json @@ -1,6 +1,6 @@ { "name": "@jupyterlab/test-terminal", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "private": true, "scripts": { "build": "tsc -b", @@ -13,22 +13,22 @@ "test:firefox": "python run-test.py --browsers=Firefox karma.conf.js", "test:ie": "python run-test.py --browsers=IE karma.conf.js", "watch": "tsc -b --watch", - "watch:src": "tsp -p src --watch" + "watch:src": "tsc -p src --watch" }, "dependencies": { - "@jupyterlab/services": "^4.0.0-alpha.3", - "@jupyterlab/terminal": "^1.0.0-alpha.3", - "@jupyterlab/testutils": "^1.0.0-alpha.3", + "@jupyterlab/services": "^4.0.0-alpha.9", + "@jupyterlab/terminal": "^1.0.0-alpha.9", + "@jupyterlab/testutils": "^1.0.0-alpha.9", "@phosphor/messaging": "^1.2.2", - "@phosphor/widgets": "^1.6.0", - "chai": "~4.1.2" + "@phosphor/widgets": "^1.7.0", + "chai": "^4.2.0" }, "devDependencies": { - "@types/chai": "~4.0.10", - "karma": "~2.0.4", + "@types/chai": "^4.1.7", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", - "puppeteer": "^1.5.0", + "puppeteer": "~1.17.0", "rimraf": "~2.6.2", - "typescript": "~3.3.1" + "typescript": "~3.5.1" } } diff --git a/tests/test-terminal/run-test.py b/tests/test-terminal/run-test.py index 173af144..56a4da8b 100644 --- a/tests/test-terminal/run-test.py +++ b/tests/test-terminal/run-test.py @@ -1,10 +1,8 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -import os +import os.path as osp from jupyterlab.tests.test_app import run_karma -HERE = os.path.realpath(os.path.dirname(__file__)) - if __name__ == '__main__': - run_karma(HERE) + run_karma(osp.dirname(osp.realpath(__file__))) diff --git a/tests/test-terminal/src/terminal.spec.ts b/tests/test-terminal/src/terminal.spec.ts index eea683dd..ef30b626 100644 --- a/tests/test-terminal/src/terminal.spec.ts +++ b/tests/test-terminal/src/terminal.spec.ts @@ -57,7 +57,7 @@ describe('terminal/index', () => { }); beforeEach(() => { - widget = new LogTerminal(); + widget = new LogTerminal(session); Widget.attach(widget, document.body); return framePromise(); }); @@ -73,13 +73,11 @@ describe('terminal/index', () => { }); describe('#session', () => { - it('should be `null` by default', () => { - expect(widget.session).to.be.null; + it('should be the constructor value', () => { + expect(widget.session).to.equal(session); }); it('should set the title when ready', async () => { - widget.session = session; - expect(widget.session).to.equal(session); await session.ready; expect(widget.title.label).to.contain(session.name); }); @@ -105,8 +103,8 @@ describe('terminal/index', () => { }); describe('#theme', () => { - it('should be dark by default', () => { - expect(widget.getOption('theme')).to.equal('dark'); + it('should be set to inherit by default', () => { + expect(widget.getOption('theme')).to.equal('inherit'); }); it('should be light if we change it', () => { @@ -127,7 +125,6 @@ describe('terminal/index', () => { describe('#refresh()', () => { it('should refresh the widget', () => { - widget.session = session; return widget.refresh(); }); }); @@ -141,7 +138,6 @@ describe('terminal/index', () => { describe('#onAfterAttach()', () => { it('should post an update request', async () => { - widget.session = session; Widget.detach(widget); Widget.attach(widget, document.body); await framePromise(); @@ -151,7 +147,6 @@ describe('terminal/index', () => { describe('#onAfterShow()', () => { it('should post an update request', async () => { - widget.session = session; widget.hide(); Widget.detach(widget); Widget.attach(widget, document.body); @@ -180,7 +175,7 @@ describe('terminal/index', () => { MessageLoop.sendMessage(widget, Widget.Msg.UpdateRequest); expect(widget.methods).to.contain('onUpdateRequest'); const style = window.getComputedStyle(widget.node); - expect(style.backgroundColor).to.equal('rgb(0, 0, 0)'); + expect(style.backgroundColor).to.equal('rgba(0, 0, 0, 0)'); }); }); diff --git a/testutils/package.json b/testutils/package.json index c8735d23..27ab90d5 100644 --- a/testutils/package.json +++ b/testutils/package.json @@ -1,11 +1,15 @@ { "name": "@jupyterlab/testutils", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.9", "description": "JupyterLab - Test Utilities", "homepage": "https://github.com/jupyterlab/jupyterlab", "bugs": { "url": "https://github.com/jupyterlab/jupyterlab/issues" }, + "repository": { + "type": "git", + "url": "https://github.com/jupyterlab/jupyterlab.git" + }, "license": "BSD-3-Clause", "author": "Project Jupyter", "files": [ @@ -20,10 +24,6 @@ "directories": { "lib": "lib/" }, - "repository": { - "type": "git", - "url": "https://github.com/jupyterlab/jupyterlab.git" - }, "scripts": { "build": "tsc", "clean": "rimraf lib", @@ -31,26 +31,25 @@ "watch": "tsc --watch" }, "dependencies": { - "@jupyterlab/apputils": "^1.0.0-alpha.3", - "@jupyterlab/cells": "^1.0.0-alpha.4", - "@jupyterlab/codeeditor": "^1.0.0-alpha.3", - "@jupyterlab/codemirror": "^1.0.0-alpha.3", - "@jupyterlab/coreutils": "^3.0.0-alpha.3", - "@jupyterlab/docregistry": "^1.0.0-alpha.3", - "@jupyterlab/notebook": "^1.0.0-alpha.4", - "@jupyterlab/rendermime": "^1.0.0-alpha.3", - "@jupyterlab/services": "^4.0.0-alpha.3", + "@jupyterlab/apputils": "^1.0.0-alpha.9", + "@jupyterlab/cells": "^1.0.0-alpha.10", + "@jupyterlab/codeeditor": "^1.0.0-alpha.9", + "@jupyterlab/codemirror": "^1.0.0-alpha.9", + "@jupyterlab/coreutils": "^3.0.0-alpha.9", + "@jupyterlab/docregistry": "^1.0.0-alpha.9", + "@jupyterlab/notebook": "^1.0.0-alpha.10", + "@jupyterlab/rendermime": "^1.0.0-alpha.9", + "@jupyterlab/services": "^4.0.0-alpha.9", "@phosphor/coreutils": "^1.3.0", "@phosphor/signaling": "^1.2.2", "identity-obj-proxy": "^3.0.0", "json-to-html": "~0.1.2", - "node-fetch": "~2.2.0", + "node-fetch": "^2.6.0", "path": "~0.12.7", "simulate-event": "~1.4.0" }, "devDependencies": { - "@types/node-fetch": "^2.1.2", - "typescript": "~3.3.1" - }, - "gitHead": "31f68f6d1717b58c344a5fb4f4baf3b123b7c75c" + "@types/node-fetch": "^2.3.4", + "typescript": "~3.5.1" + } } diff --git a/testutils/src/babel.config.ts b/testutils/src/babel.config.ts new file mode 100644 index 00000000..6c3be4c4 --- /dev/null +++ b/testutils/src/babel.config.ts @@ -0,0 +1,12 @@ +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + targets: { + node: 'current' + } + } + ] + ] +}; diff --git a/testutils/src/index.ts b/testutils/src/index.ts index 8c414f44..1a6fefe8 100644 --- a/testutils/src/index.ts +++ b/testutils/src/index.ts @@ -58,22 +58,19 @@ export function testEmission( ): Promise { const done = new PromiseDelegate(); const object = {}; - signal.connect( - (sender: T, args: U) => { - if (!options.find || options.find(sender, args)) { - try { - Signal.disconnectReceiver(object); - if (options.test) { - options.test(sender, args); - } - } catch (e) { - done.reject(e); + signal.connect((sender: T, args: U) => { + if (!options.find || options.find(sender, args)) { + try { + Signal.disconnectReceiver(object); + if (options.test) { + options.test(sender, args); } - done.resolve(options.value || undefined); + } catch (e) { + done.reject(e); } - }, - object - ); + done.resolve(options.value || undefined); + } + }, object); return done.promise; } @@ -90,7 +87,7 @@ export function signalToPromises( numberValues: number ): Promise<[T, U]>[] { const values: Promise<[T, U]>[] = new Array(numberValues); - const resolvers: Array<((value: [T, U]) => void)> = new Array(numberValues); + const resolvers: Array<(value: [T, U]) => void> = new Array(numberValues); for (let i = 0; i < numberValues; i++) { values[i] = new Promise<[T, U]>(resolve => { @@ -219,40 +216,28 @@ export async function createNotebookContext( /** * Wait for a dialog to be attached to an element. */ -export function waitForDialog( - host?: HTMLElement, - timeout?: number +export async function waitForDialog( + host: HTMLElement = document.body, + timeout: number = 250 ): Promise { - return new Promise((resolve, reject) => { - let counter = 0; - const interval = 25; - const limit = Math.floor((timeout || 250) / interval); - const seek = () => { - if (++counter === limit) { - reject(new Error('Dialog not found')); - return; - } - - if ((host || document.body).getElementsByClassName('jp-Dialog')[0]) { - resolve(undefined); - return; - } - - setTimeout(seek, interval); - }; - - seek(); - }); + const interval = 25; + const limit = Math.floor(timeout / interval); + for (let counter = 0; counter < limit; counter++) { + if (host.getElementsByClassName('jp-Dialog')[0]) { + return; + } + await sleep(interval); + } + throw new Error('Dialog not found'); } /** * Accept a dialog after it is attached by accepting the default button. */ export async function acceptDialog( - host?: HTMLElement, - timeout?: number + host: HTMLElement = document.body, + timeout: number = 250 ): Promise { - host = host || document.body; await waitForDialog(host, timeout); const node = host.getElementsByClassName('jp-Dialog')[0]; @@ -269,11 +254,9 @@ export async function acceptDialog( * This promise will always resolve successfully. */ export async function dismissDialog( - host?: HTMLElement, - timeout?: number + host: HTMLElement = document.body, + timeout: number = 250 ): Promise { - host = host || document.body; - try { await waitForDialog(host, timeout); } catch (error) { @@ -302,7 +285,7 @@ namespace Private { */ export function getManager(): ServiceManager { if (!manager) { - manager = new ServiceManager(); + manager = new ServiceManager({ standby: 'never' }); } return manager; } diff --git a/testutils/src/jest-config.ts b/testutils/src/jest-config.ts index d093d3d1..32100573 100644 --- a/testutils/src/jest-config.ts +++ b/testutils/src/jest-config.ts @@ -2,14 +2,12 @@ import path = require('path'); module.exports = function(name: string, baseDir: string) { return { - transform: { - '^.+\\.tsx?$': 'ts-jest' - }, + preset: 'ts-jest/presets/js-with-babel', moduleNameMapper: { '\\.(css|less|sass|scss)$': 'identity-obj-proxy', '\\.(gif|ttf|eot|svg)$': '@jupyterlab/testutils/lib/jest-file-mock.js' }, - setupTestFrameworkScriptFile: '@jupyterlab/testutils/lib/jest-script.js', + setupFilesAfterEnv: ['@jupyterlab/testutils/lib/jest-script.js'], setupFiles: ['@jupyterlab/testutils/lib/jest-shim.js'], testPathIgnorePatterns: ['/dev_mode/', '/lib/', '/node_modules/'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], @@ -21,10 +19,10 @@ module.exports = function(name: string, baseDir: string) { ], coverageReporters: ['json', 'lcov', 'text', 'html'], coverageDirectory: path.join(baseDir, 'coverage'), - testRegex: `tests\/test-${name}\/src\/.*\.spec\.ts$`, + testRegex: `tests\/test-${name}\/src\/.*\.spec\.tsx?$`, globals: { 'ts-jest': { - tsConfigFile: `tests/test-${name}/tsconfig.json` + tsConfig: `./tsconfig.json` } } }; diff --git a/testutils/src/jest-shim.ts b/testutils/src/jest-shim.ts index f7a241b5..9c5522c1 100644 --- a/testutils/src/jest-shim.ts +++ b/testutils/src/jest-shim.ts @@ -42,7 +42,12 @@ window.focus = () => { process.on('unhandledRejection', (error, promise) => { console.error('Unhandled promise rejection somewhere in tests'); - console.error(error); - console.error(error.stack); + if (error) { + console.error(error); + const stack = (error as any).stack; + if (stack) { + console.error(stack); + } + } promise.catch(err => console.error('promise rejected', err)); }); diff --git a/testutils/src/notebook-utils.ts b/testutils/src/notebook-utils.ts index 571d1377..a885623e 100644 --- a/testutils/src/notebook-utils.ts +++ b/testutils/src/notebook-utils.ts @@ -75,7 +75,6 @@ export namespace NBTestUtils { ]; export const DEFAULT_CONTENT: nbformat.INotebookContent = require('../default.json') as nbformat.INotebookContent; - DEFAULT_CONTENT.metadata = { orig_nbformat: 1 }; export const defaultEditorConfig = { ...StaticNotebook.defaultEditorConfig }; diff --git a/testutils/tsconfig.json b/testutils/tsconfig.json index 3a4d8fe6..6f436a47 100644 --- a/testutils/tsconfig.json +++ b/testutils/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "lib", "rootDir": "src", + "module": "commonjs", "types": ["node"] }, "include": ["src/*"], diff --git a/tsconfigbase.json b/tsconfigbase.json index 8189f310..6e815981 100644 --- a/tsconfigbase.json +++ b/tsconfigbase.json @@ -3,17 +3,17 @@ "allowSyntheticDefaultImports": true, "composite": true, "declaration": true, - "noImplicitAny": true, + "esModuleInterop": true, + "incremental": true, + "jsx": "react", + "module": "esnext", + "moduleResolution": "node", "noEmitOnError": true, + "noImplicitAny": true, "noUnusedLocals": true, - "esModuleInterop": true, "preserveWatchOutput": true, - "module": "commonjs", - "moduleResolution": "node", "resolveJsonModule": true, - "target": "es2015", - "lib": ["dom", "es2015"], - "jsx": "react", + "target": "es2017", "types": [] } } diff --git a/tslint.json b/tslint.json index 40d797ea..05324b7c 100644 --- a/tslint.json +++ b/tslint.json @@ -3,6 +3,7 @@ "rules": { "prettier": [true, { "singleQuote": true }], "align": [true, "parameters", "statements"], + "await-promise": true, "ban": [ true, ["_", "forEach"], @@ -36,6 +37,7 @@ "no-duplicate-variable": true, "no-empty": true, "no-eval": true, + "no-floating-promises": true, "no-inferrable-types": false, "no-internal-module": true, "no-invalid-this": [true, "check-function-in-method"], diff --git a/yarn.lock b/yarn.lock index 596c4965..9950137b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,26 +2,636 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.51" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz#bd71d9b192af978df915829d39d4094456439a0c" +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/core@^7.1.0": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.5.tgz#081f97e8ffca65a9b4b0fdc7e274e703f000c06a" + integrity sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.4.4" + "@babel/helpers" "^7.4.4" + "@babel/parser" "^7.4.5" + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.4.5" + "@babel/types" "^7.4.4" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.11" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.4.0", "@babel/generator@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.4.tgz#174a215eb843fc392c7edcaabeaa873de6e8f041" + integrity sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ== + dependencies: + "@babel/types" "^7.4.4" + jsesc "^2.5.1" + lodash "^4.17.11" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" + integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-call-delegate@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43" + integrity sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ== + dependencies: + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" + +"@babel/helper-define-map@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz#6969d1f570b46bdc900d1eba8e5d59c48ba2c12a" + integrity sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/types" "^7.4.4" + lodash "^4.17.11" + +"@babel/helper-explode-assignable-expression@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" + integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== + dependencies: + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== dependencies: - "@babel/highlight" "7.0.0-beta.51" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/highlight@7.0.0-beta.51": - version "7.0.0-beta.51" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz#e8844ae25a1595ccfd42b89623b4376ca06d225d" +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-hoist-variables@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" + integrity sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w== + dependencies: + "@babel/types" "^7.4.4" + +"@babel/helper-member-expression-to-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" + integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-module-imports@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" + integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-module-transforms@^7.1.0", "@babel/helper-module-transforms@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz#96115ea42a2f139e619e98ed46df6019b94414b8" + integrity sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/template" "^7.4.4" + "@babel/types" "^7.4.4" + lodash "^4.17.11" + +"@babel/helper-optimise-call-expression@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" + integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-plugin-utils@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" + integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== + +"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.4.tgz#a47e02bc91fb259d2e6727c2a30013e3ac13c4a2" + integrity sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q== + dependencies: + lodash "^4.17.11" + +"@babel/helper-remap-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" + integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-wrap-function" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz#aee41783ebe4f2d3ab3ae775e1cc6f1a90cefa27" + integrity sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" + +"@babel/helper-simple-access@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" + integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== + dependencies: + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" + integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== + dependencies: + "@babel/types" "^7.4.4" + +"@babel/helper-wrap-function@^7.1.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" + integrity sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.2.0" + +"@babel/helpers@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.4.tgz#868b0ef59c1dd4e78744562d5ce1b59c89f2f2a5" + integrity sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A== + dependencies: + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" + +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== dependencies: chalk "^2.0.0" esutils "^2.0.2" - js-tokens "^3.0.0" + js-tokens "^4.0.0" -"@blueprintjs/core@^3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@blueprintjs/core/-/core-3.9.0.tgz#60f10908227de8260be920a529bc67efbe9eb686" +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.5.tgz#04af8d5d5a2b044a2a1bffacc1e5e6673544e872" + integrity sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew== + +"@babel/plugin-proposal-async-generator-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" + integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" + +"@babel/plugin-proposal-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" + integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" + +"@babel/plugin-proposal-object-rest-spread@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz#1ef173fcf24b3e2df92a678f027673b55e7e3005" + integrity sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + +"@babel/plugin-proposal-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" + integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + +"@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz#501ffd9826c0b91da22690720722ac7cb1ca9c78" + integrity sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" + +"@babel/plugin-syntax-async-generators@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" + integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg== dependencies: - "@blueprintjs/icons" "^3.3.0" - "@types/dom4" "^2.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" + integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" + integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" + integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-arrow-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" + integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-async-to-generator@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz#a3f1d01f2f21cadab20b33a82133116f14fb5894" + integrity sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + +"@babel/plugin-transform-block-scoped-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" + integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-block-scoping@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz#c13279fabf6b916661531841a23c4b7dae29646d" + integrity sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + lodash "^4.17.11" + +"@babel/plugin-transform-classes@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz#0ce4094cdafd709721076d3b9c38ad31ca715eb6" + integrity sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-define-map" "^7.4.4" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-split-export-declaration" "^7.4.4" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" + integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-destructuring@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz#9d964717829cc9e4b601fc82a26a71a4d8faf20f" + integrity sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz#361a148bc951444312c69446d76ed1ea8e4450c3" + integrity sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" + +"@babel/plugin-transform-duplicate-keys@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" + integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-exponentiation-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" + integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-for-of@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz#0267fc735e24c808ba173866c6c4d1440fc3c556" + integrity sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-function-name@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz#e1436116abb0610c2259094848754ac5230922ad" + integrity sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" + integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-member-expression-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz#fa10aa5c58a2cb6afcf2c9ffa8cb4d8b3d489a2d" + integrity sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-amd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" + integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-commonjs@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz#0bef4713d30f1d78c2e59b3d6db40e60192cac1e" + integrity sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw== + dependencies: + "@babel/helper-module-transforms" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + +"@babel/plugin-transform-modules-systemjs@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz#dc83c5665b07d6c2a7b224c00ac63659ea36a405" + integrity sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ== + dependencies: + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-umd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" + integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw== + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.5.tgz#9d269fd28a370258199b4294736813a60bbdd106" + integrity sha512-z7+2IsWafTBbjNsOxU/Iv5CvTJlr5w4+HGu1HovKYTtgJ362f7kBcQglkfmlspKKZ3bgrbSGvLfNx++ZJgCWsg== + dependencies: + regexp-tree "^0.1.6" + +"@babel/plugin-transform-new-target@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz#18d120438b0cc9ee95a47f2c72bc9768fbed60a5" + integrity sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-object-super@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" + integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + +"@babel/plugin-transform-parameters@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz#7556cf03f318bd2719fe4c922d2d808be5571e16" + integrity sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw== + dependencies: + "@babel/helper-call-delegate" "^7.4.4" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-property-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz#03e33f653f5b25c4eb572c98b9485055b389e905" + integrity sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-regenerator@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz#629dc82512c55cee01341fb27bdfcb210354680f" + integrity sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA== + dependencies: + regenerator-transform "^0.14.0" + +"@babel/plugin-transform-reserved-words@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz#4792af87c998a49367597d07fedf02636d2e1634" + integrity sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-shorthand-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" + integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-spread@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" + integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-sticky-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" + integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + +"@babel/plugin-transform-template-literals@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz#9d28fea7bbce637fb7612a0750989d8321d4bcb0" + integrity sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-typeof-symbol@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" + integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-unicode-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz#ab4634bb4f14d36728bf5978322b35587787970f" + integrity sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" + +"@babel/preset-env@^7.4.3": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.5.tgz#2fad7f62983d5af563b5f3139242755884998a58" + integrity sha512-f2yNVXM+FsR5V8UwcFeIHzHWgnhXg3NpRmy0ADvALpnhB0SLbCvrCRr4BLOUYbQNLS+Z0Yer46x9dJXpXewI7w== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-json-strings" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.4.4" + "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-transform-arrow-functions" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.4.4" + "@babel/plugin-transform-block-scoped-functions" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.4.4" + "@babel/plugin-transform-classes" "^7.4.4" + "@babel/plugin-transform-computed-properties" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/plugin-transform-duplicate-keys" "^7.2.0" + "@babel/plugin-transform-exponentiation-operator" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.4.4" + "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-member-expression-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.2.0" + "@babel/plugin-transform-modules-commonjs" "^7.4.4" + "@babel/plugin-transform-modules-systemjs" "^7.4.4" + "@babel/plugin-transform-modules-umd" "^7.2.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.5" + "@babel/plugin-transform-new-target" "^7.4.4" + "@babel/plugin-transform-object-super" "^7.2.0" + "@babel/plugin-transform-parameters" "^7.4.4" + "@babel/plugin-transform-property-literals" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.4.5" + "@babel/plugin-transform-reserved-words" "^7.2.0" + "@babel/plugin-transform-shorthand-properties" "^7.2.0" + "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-sticky-regex" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.4.4" + "@babel/plugin-transform-typeof-symbol" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.4.4" + "@babel/types" "^7.4.4" + browserslist "^4.6.0" + core-js-compat "^3.1.1" + invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.5.0" + +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.5.tgz#582bb531f5f9dc67d2fcb682979894f75e253f12" + integrity sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ== + dependencies: + regenerator-runtime "^0.13.2" + +"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" + integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.4.4" + "@babel/types" "^7.4.4" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.5.tgz#4e92d1728fd2f1897dafdd321efbff92156c3216" + integrity sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.4.4" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.4.5" + "@babel/types" "^7.4.4" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.11" + +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0" + integrity sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ== + dependencies: + esutils "^2.0.2" + lodash "^4.17.11" + to-fast-properties "^2.0.0" + +"@blueprintjs/core@^3.15.0", "@blueprintjs/core@^3.9.0": + version "3.15.1" + resolved "https://registry.yarnpkg.com/@blueprintjs/core/-/core-3.15.1.tgz#9792e9fb7e2e066dd5339fadeaf2f85b1485832a" + integrity sha512-M8ltbqqlMZuZ6SEuqo/3Fr59ZcUfd8Er7ocbm7EACVfRW7dRhOCd/TKkf2kfICNtCDwznwXk0iAePLXZhUGtQg== + dependencies: + "@blueprintjs/icons" "^3.8.0" + "@types/dom4" "^2.0.1" classnames "^2.2" dom4 "^2.0.1" normalize.css "^8.0.0" @@ -31,64 +641,223 @@ resize-observer-polyfill "^1.5.0" tslib "^1.9.0" -"@blueprintjs/icons@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@blueprintjs/icons/-/icons-3.3.0.tgz#d7f203ea97df79cb8f085b7468c516ff15332bea" +"@blueprintjs/icons@^3.3.0", "@blueprintjs/icons@^3.8.0": + version "3.8.0" + resolved "https://registry.yarnpkg.com/@blueprintjs/icons/-/icons-3.8.0.tgz#7c77c67e4a241740f803f05e4f6e3ce43c6d6560" + integrity sha512-yHaRQ3vfV9Gf3foZ4ONtxddz+u5ufkHqHj8Ia5VhPbFgG4el+cPdmsGGIIM72rgKS1KQa5Ay+ggjpByUlXvrKg== dependencies: classnames "^2.2" tslib "^1.9.0" "@blueprintjs/select@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@blueprintjs/select/-/select-3.3.0.tgz#e5ff961a846a9e90ca627b58912bda5058518941" + version "3.8.0" + resolved "https://registry.yarnpkg.com/@blueprintjs/select/-/select-3.8.0.tgz#903cc9ab50da4cec08f559be27b7fa7f9f1560e5" + integrity sha512-sWWGZx/nARtxKfoFODlEQxA7HDpddGDC4uKPNMd1ZQgKazEtMkw0rFVm550K6Aoj0wp82TqqmcxHrb0VL6Epiw== dependencies: - "@blueprintjs/core" "^3.9.0" + "@blueprintjs/core" "^3.15.0" classnames "^2.2" tslib "^1.9.0" -"@lerna/add@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.4.1.tgz#d41068317e30f530df48220d256b5e79690b1877" +"@cnakazawa/watch@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" + integrity sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA== + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" + +"@jest/console@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.7.1.tgz#32a9e42535a97aedfe037e725bd67e954b459545" + integrity sha512-iNhtIy2M8bXlAOULWVTUxmnelTLFneTNEkHCgPmgd+zNwy9zVddJ6oS5rZ9iwoscNdT5mMwUd0C51v/fSlzItg== + dependencies: + "@jest/source-map" "^24.3.0" + chalk "^2.0.1" + slash "^2.0.0" + +"@jest/core@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-24.8.0.tgz#fbbdcd42a41d0d39cddbc9f520c8bab0c33eed5b" + integrity sha512-R9rhAJwCBQzaRnrRgAdVfnglUuATXdwTRsYqs6NMdVcAl5euG8LtWDe+fVkN27YfKVBW61IojVsXKaOmSnqd/A== + dependencies: + "@jest/console" "^24.7.1" + "@jest/reporters" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + ansi-escapes "^3.0.0" + chalk "^2.0.1" + exit "^0.1.2" + graceful-fs "^4.1.15" + jest-changed-files "^24.8.0" + jest-config "^24.8.0" + jest-haste-map "^24.8.0" + jest-message-util "^24.8.0" + jest-regex-util "^24.3.0" + jest-resolve-dependencies "^24.8.0" + jest-runner "^24.8.0" + jest-runtime "^24.8.0" + jest-snapshot "^24.8.0" + jest-util "^24.8.0" + jest-validate "^24.8.0" + jest-watcher "^24.8.0" + micromatch "^3.1.10" + p-each-series "^1.0.0" + pirates "^4.0.1" + realpath-native "^1.1.0" + rimraf "^2.5.4" + strip-ansi "^5.0.0" + +"@jest/environment@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-24.8.0.tgz#0342261383c776bdd652168f68065ef144af0eac" + integrity sha512-vlGt2HLg7qM+vtBrSkjDxk9K0YtRBi7HfRFaDxoRtyi+DyVChzhF20duvpdAnKVBV6W5tym8jm0U9EfXbDk1tw== + dependencies: + "@jest/fake-timers" "^24.8.0" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + jest-mock "^24.8.0" + +"@jest/fake-timers@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.8.0.tgz#2e5b80a4f78f284bcb4bd5714b8e10dd36a8d3d1" + integrity sha512-2M4d5MufVXwi6VzZhJ9f5S/wU4ud2ck0kxPof1Iz3zWx6Y+V2eJrES9jEktB6O3o/oEyk+il/uNu9PvASjWXQw== + dependencies: + "@jest/types" "^24.8.0" + jest-message-util "^24.8.0" + jest-mock "^24.8.0" + +"@jest/reporters@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-24.8.0.tgz#075169cd029bddec54b8f2c0fc489fd0b9e05729" + integrity sha512-eZ9TyUYpyIIXfYCrw0UHUWUvE35vx5I92HGMgS93Pv7du+GHIzl+/vh8Qj9MCWFK/4TqyttVBPakWMOfZRIfxw== + dependencies: + "@jest/environment" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.2" + istanbul-lib-coverage "^2.0.2" + istanbul-lib-instrument "^3.0.1" + istanbul-lib-report "^2.0.4" + istanbul-lib-source-maps "^3.0.1" + istanbul-reports "^2.1.1" + jest-haste-map "^24.8.0" + jest-resolve "^24.8.0" + jest-runtime "^24.8.0" + jest-util "^24.8.0" + jest-worker "^24.6.0" + node-notifier "^5.2.1" + slash "^2.0.0" + source-map "^0.6.0" + string-length "^2.0.0" + +"@jest/source-map@^24.3.0": + version "24.3.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.3.0.tgz#563be3aa4d224caf65ff77edc95cd1ca4da67f28" + integrity sha512-zALZt1t2ou8le/crCeeiRYzvdnTzaIlpOWaet45lNSqNJUnXbppUUFR4ZUAlzgDmKee4Q5P/tKXypI1RiHwgag== dependencies: - "@lerna/bootstrap" "^3.4.1" - "@lerna/command" "^3.3.0" - "@lerna/filter-options" "^3.3.2" - "@lerna/npm-conf" "^3.4.1" - "@lerna/validation-error" "^3.0.0" + callsites "^3.0.0" + graceful-fs "^4.1.15" + source-map "^0.6.0" + +"@jest/test-result@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.8.0.tgz#7675d0aaf9d2484caa65e048d9b467d160f8e9d3" + integrity sha512-+YdLlxwizlfqkFDh7Mc7ONPQAhA4YylU1s529vVM1rsf67vGZH/2GGm5uO8QzPeVyaVMobCQ7FTxl38QrKRlng== + dependencies: + "@jest/console" "^24.7.1" + "@jest/types" "^24.8.0" + "@types/istanbul-lib-coverage" "^2.0.0" + +"@jest/test-sequencer@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-24.8.0.tgz#2f993bcf6ef5eb4e65e8233a95a3320248cf994b" + integrity sha512-OzL/2yHyPdCHXEzhoBuq37CE99nkme15eHkAzXRVqthreWZamEMA0WoetwstsQBCXABhczpK03JNbc4L01vvLg== + dependencies: + "@jest/test-result" "^24.8.0" + jest-haste-map "^24.8.0" + jest-runner "^24.8.0" + jest-runtime "^24.8.0" + +"@jest/transform@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-24.8.0.tgz#628fb99dce4f9d254c6fd9341e3eea262e06fef5" + integrity sha512-xBMfFUP7TortCs0O+Xtez2W7Zu1PLH9bvJgtraN1CDST6LBM/eTOZ9SfwS/lvV8yOfcDpFmwf9bq5cYbXvqsvA== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^24.8.0" + babel-plugin-istanbul "^5.1.0" + chalk "^2.0.1" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.1.15" + jest-haste-map "^24.8.0" + jest-regex-util "^24.3.0" + jest-util "^24.8.0" + micromatch "^3.1.10" + realpath-native "^1.1.0" + slash "^2.0.0" + source-map "^0.6.1" + write-file-atomic "2.4.1" + +"@jest/types@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.8.0.tgz#f31e25948c58f0abd8c845ae26fcea1491dea7ad" + integrity sha512-g17UxVr2YfBtaMUxn9u/4+siG1ptg9IGYAYwvpwn61nBg779RXnjE/m7CxYcIzEt0AbHZZAHSEZNhkE2WxURVg== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^12.0.9" + +"@lerna/add@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.14.0.tgz#799d416e67d48c285967abf883be746557aefa48" + integrity sha512-Sa79Ju6HqF3heSVpBiYPNrGtuS56U/jMzVq4CcVvhNwB34USLrzJJncGFVcfnuUvsjKeFJv+jHxUycHeRE8XYw== + dependencies: + "@lerna/bootstrap" "3.14.0" + "@lerna/command" "3.14.0" + "@lerna/filter-options" "3.14.0" + "@lerna/npm-conf" "3.13.0" + "@lerna/validation-error" "3.13.0" dedent "^0.7.0" - npm-package-arg "^6.0.0" + npm-package-arg "^6.1.0" p-map "^1.2.0" - pacote "^9.1.0" + pacote "^9.5.0" semver "^5.5.0" -"@lerna/batch-packages@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@lerna/batch-packages/-/batch-packages-3.1.2.tgz#74b5312a01a8916204cbc71237ffbe93144b99df" +"@lerna/batch-packages@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/batch-packages/-/batch-packages-3.14.0.tgz#0208663bab3ddbf57956b370aaec4c9ebee6c800" + integrity sha512-RlBkQVNTqk1qvn6PFWiWNiskllUHh6tXbTVm43mZRNd+vhAyvrQC8RWJxH0ECVvnFAt9rSNGRIVbEJ31WnNQLg== dependencies: - "@lerna/package-graph" "^3.1.2" - "@lerna/validation-error" "^3.0.0" + "@lerna/package-graph" "3.14.0" npmlog "^4.1.2" -"@lerna/bootstrap@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.4.1.tgz#10635e9b547fb7d685949ac78e0923f73da2f52a" - dependencies: - "@lerna/batch-packages" "^3.1.2" - "@lerna/command" "^3.3.0" - "@lerna/filter-options" "^3.3.2" - "@lerna/has-npm-version" "^3.3.0" - "@lerna/npm-conf" "^3.4.1" - "@lerna/npm-install" "^3.3.0" - "@lerna/rimraf-dir" "^3.3.0" - "@lerna/run-lifecycle" "^3.4.1" - "@lerna/run-parallel-batches" "^3.0.0" - "@lerna/symlink-binary" "^3.3.0" - "@lerna/symlink-dependencies" "^3.3.0" - "@lerna/validation-error" "^3.0.0" +"@lerna/bootstrap@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.14.0.tgz#dde35eac0a912097033e1daea237a50e5c3cb75b" + integrity sha512-AvnuDp8b0kX4zZgqD3v7ItPABhUsN5CmTEvZBD2JqM+xkQKhzCfz5ABcHEwDwOPWnNQmtH+/2iQdwaD7xBcAXw== + dependencies: + "@lerna/batch-packages" "3.14.0" + "@lerna/command" "3.14.0" + "@lerna/filter-options" "3.14.0" + "@lerna/has-npm-version" "3.13.3" + "@lerna/npm-install" "3.13.3" + "@lerna/package-graph" "3.14.0" + "@lerna/pulse-till-done" "3.13.0" + "@lerna/rimraf-dir" "3.13.3" + "@lerna/run-lifecycle" "3.14.0" + "@lerna/run-parallel-batches" "3.13.0" + "@lerna/symlink-binary" "3.14.0" + "@lerna/symlink-dependencies" "3.14.0" + "@lerna/validation-error" "3.13.0" dedent "^0.7.0" get-port "^3.2.0" multimatch "^2.1.0" - npm-package-arg "^6.0.0" + npm-package-arg "^6.1.0" npmlog "^4.1.2" p-finally "^1.0.0" p-map "^1.2.0" @@ -97,113 +866,138 @@ read-package-tree "^5.1.6" semver "^5.5.0" -"@lerna/changed@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.4.1.tgz#84a049359a53b8812c3a07a664bd41b1768f5938" +"@lerna/changed@3.14.1": + version "3.14.1" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.14.1.tgz#274fa67a34f234546925c139aabe20765f07a8e4" + integrity sha512-G0RgYL/WLTFzbezRBLUO2J0v39EvgZIO5bHHUtYt7zUFSfzapkPfvpdpBj+5JlMtf0B2xfxwTk+lSA4LVnbfmA== dependencies: - "@lerna/collect-updates" "^3.3.2" - "@lerna/command" "^3.3.0" - "@lerna/listable" "^3.0.0" - "@lerna/output" "^3.0.0" - "@lerna/version" "^3.4.1" + "@lerna/collect-updates" "3.14.0" + "@lerna/command" "3.14.0" + "@lerna/listable" "3.14.0" + "@lerna/output" "3.13.0" + "@lerna/version" "3.14.1" -"@lerna/check-working-tree@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.3.0.tgz#2118f301f28ccb530812e5b27a341b1e6b3c84e2" +"@lerna/check-working-tree@3.14.1": + version "3.14.1" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.14.1.tgz#4102681c31e4cebed3968db27567e3180e519822" + integrity sha512-ae/sdZPNh4SS+6c4UDuWP/QKbtIFAn/TvKsPncA1Jdo0PqXLBlug4DzkHTGkvZ5F0nj+0JrSxYteInakJV99vg== dependencies: - "@lerna/describe-ref" "^3.3.0" - "@lerna/validation-error" "^3.0.0" + "@lerna/collect-uncommitted" "3.14.1" + "@lerna/describe-ref" "3.13.3" + "@lerna/validation-error" "3.13.0" -"@lerna/child-process@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-3.3.0.tgz#71184a763105b6c8ece27f43f166498d90fe680f" +"@lerna/child-process@3.13.3": + version "3.13.3" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-3.13.3.tgz#6c084ee5cca9fc9e04d6bf4fc3f743ed26ff190c" + integrity sha512-3/e2uCLnbU+bydDnDwyadpOmuzazS01EcnOleAnuj9235CU2U97DH6OyoG1EW/fU59x11J+HjIqovh5vBaMQjQ== dependencies: chalk "^2.3.1" execa "^1.0.0" strong-log-transformer "^2.0.0" -"@lerna/clean@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.3.2.tgz#9a7e8a1e400e580de260fa124945b2939a025069" +"@lerna/clean@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.14.0.tgz#4399f4a3289106b0b8ffbffd4a6cfd2e3fe935f2" + integrity sha512-wEuAqOS9VMqh2C20KD63IySzyEnyVDqDI3LUsXw+ByUf9AJDgEHv0TCOxbDjDYaaQw1tjSBNZMyYInNeoASwhA== dependencies: - "@lerna/command" "^3.3.0" - "@lerna/filter-options" "^3.3.2" - "@lerna/prompt" "^3.3.1" - "@lerna/rimraf-dir" "^3.3.0" + "@lerna/command" "3.14.0" + "@lerna/filter-options" "3.14.0" + "@lerna/prompt" "3.13.0" + "@lerna/pulse-till-done" "3.13.0" + "@lerna/rimraf-dir" "3.13.3" p-map "^1.2.0" p-map-series "^1.0.0" p-waterfall "^1.0.0" -"@lerna/cli@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-3.2.0.tgz#3ed25bcbc0b8f0878bc6a102ee0296f01476cfdf" +"@lerna/cli@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-3.13.0.tgz#3d7b357fdd7818423e9681a7b7f2abd106c8a266" + integrity sha512-HgFGlyCZbYaYrjOr3w/EsY18PdvtsTmDfpUQe8HwDjXlPeCCUgliZjXLOVBxSjiOvPeOSwvopwIHKWQmYbwywg== dependencies: - "@lerna/global-options" "^3.1.3" + "@lerna/global-options" "3.13.0" dedent "^0.7.0" npmlog "^4.1.2" yargs "^12.0.1" -"@lerna/collect-updates@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.3.2.tgz#54df5ce59ca05e8aa04ff8a9299f89cc253a9304" +"@lerna/collect-uncommitted@3.14.1": + version "3.14.1" + resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-3.14.1.tgz#b3498c4c7f46efc79092ce4aa0a24edc535e5d1a" + integrity sha512-hQ67S+nlSJwsPylXbWlrQSZUcWa8tTNIdcMd9OY4+QxdJlZUG7CLbWSyaxi0g11WdoRJHT163mr9xQyAvIVT1A== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/describe-ref" "^3.3.0" + "@lerna/child-process" "3.13.3" + chalk "^2.3.1" + figgy-pudding "^3.5.1" + npmlog "^4.1.2" + +"@lerna/collect-updates@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.14.0.tgz#64d64ff1ec05ac53dfe6851be49d2ad261e6795e" + integrity sha512-siRHo2atAwj5KpKVOo6QTVIYDYbNs7dzTG6ow9VcFMLKX5shuaEyFA22Z3LmnxQ3sakVFdgvvVeediEz6cM3VA== + dependencies: + "@lerna/child-process" "3.13.3" + "@lerna/describe-ref" "3.13.3" minimatch "^3.0.4" npmlog "^4.1.2" slash "^1.0.0" -"@lerna/command@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.3.0.tgz#e81c4716a676b02dbe9d3f548d5f45b4ba32c25a" +"@lerna/command@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.14.0.tgz#5f5e68293c0ff1e85a20b4e96fa6bea33b7632df" + integrity sha512-PtFi5EtXB2VuSruoLsjfZdus56d7oKlZAI4iSRoaS/BBxE2Wyfn7//vW7Ow4hZCzuqb9tBcpDq+4u2pdXN1d2Q== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/package-graph" "^3.1.2" - "@lerna/project" "^3.0.0" - "@lerna/validation-error" "^3.0.0" - "@lerna/write-log-file" "^3.0.0" + "@lerna/child-process" "3.13.3" + "@lerna/package-graph" "3.14.0" + "@lerna/project" "3.13.1" + "@lerna/validation-error" "3.13.0" + "@lerna/write-log-file" "3.13.0" dedent "^0.7.0" execa "^1.0.0" is-ci "^1.0.10" lodash "^4.17.5" npmlog "^4.1.2" -"@lerna/conventional-commits@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-3.4.1.tgz#0b47f9fc0c4a10951883e949d939188da1b527bc" +"@lerna/conventional-commits@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-3.14.0.tgz#24f643550dc29d4f1249cc26d0eb453d7a1c513d" + integrity sha512-hGZ2qQZ9uEGf2eeIiIpEodSs9Qkkf/2uYEtNT7QN1RYISPUh6/lKGBssc5dpbCF64aEuxmemWLdlDf1ogG6++w== dependencies: - "@lerna/validation-error" "^3.0.0" - conventional-changelog-angular "^5.0.1" - conventional-changelog-core "^3.1.0" - conventional-recommended-bump "^4.0.1" + "@lerna/validation-error" "3.13.0" + conventional-changelog-angular "^5.0.3" + conventional-changelog-core "^3.1.6" + conventional-recommended-bump "^4.0.4" fs-extra "^7.0.0" get-stream "^4.0.0" - npm-package-arg "^6.0.0" + npm-package-arg "^6.1.0" npmlog "^4.1.2" + pify "^3.0.0" semver "^5.5.0" -"@lerna/create-symlink@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-3.3.0.tgz#91de00fd576018ba4251f0c6a5b4b7f768f22a82" +"@lerna/create-symlink@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-3.14.0.tgz#f40ae06e8cebe70c694368ebf9a4af5ab380fbea" + integrity sha512-Kw51HYOOi6UfCKncqkgEU1k/SYueSBXgkNL91FR8HAZH7EPSRTEtp9mnJo568g0+Hog5C+3cOaWySwhHpRG29A== dependencies: cmd-shim "^2.0.2" fs-extra "^7.0.0" npmlog "^4.1.2" -"@lerna/create@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.4.1.tgz#7cad78a5701d7666a0f5d0fe0e325acd8d8f5b63" +"@lerna/create@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.14.0.tgz#ec7a0d4aa81e60c918ea2ba06f3c71ee2855a936" + integrity sha512-J4PeGnzVBOSV7Cih8Uhv9xIauljR9bGcfSDN9aMzFtJhSX0xFXNvmnpXRORp7xNHV2lbxk7mNxRQxzR9CQRMuw== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.3.0" - "@lerna/npm-conf" "^3.4.1" - "@lerna/validation-error" "^3.0.0" - camelcase "^4.1.0" + "@lerna/child-process" "3.13.3" + "@lerna/command" "3.14.0" + "@lerna/npm-conf" "3.13.0" + "@lerna/validation-error" "3.13.0" + camelcase "^5.0.0" dedent "^0.7.0" fs-extra "^7.0.0" globby "^8.0.1" init-package-json "^1.10.3" - npm-package-arg "^6.0.0" + npm-package-arg "^6.1.0" + p-reduce "^1.0.0" + pacote "^9.5.0" pify "^3.0.0" semver "^5.5.0" slash "^1.0.0" @@ -211,198 +1005,279 @@ validate-npm-package-name "^3.0.0" whatwg-url "^7.0.0" -"@lerna/describe-ref@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.3.0.tgz#d373adb530d5428ab91e303ccbfcf51a98374a3a" +"@lerna/describe-ref@3.13.3": + version "3.13.3" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.13.3.tgz#13318513613f6a407d37fc5dc025ec2cfb705606" + integrity sha512-5KcLTvjdS4gU5evW8ESbZ0BF44NM5HrP3dQNtWnOUSKJRgsES8Gj0lq9AlB2+YglZfjEftFT03uOYOxnKto4Uw== dependencies: - "@lerna/child-process" "^3.3.0" + "@lerna/child-process" "3.13.3" npmlog "^4.1.2" -"@lerna/diff@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.3.0.tgz#c8130a5f508b47fad5fec81404498bc3acdf9cb5" +"@lerna/diff@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.14.0.tgz#a4860c062faf990dd3c208dcf1c6fbde5a042bdb" + integrity sha512-H6FSj0jOiQ6unVCwOK6ReT5uZN6ZIn/j/cx4YwuOtU3SMcs3UfuQRIFNeKg/tKmOcQGd39Mn9zDhmt3TAYGROA== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.3.0" - "@lerna/validation-error" "^3.0.0" + "@lerna/child-process" "3.13.3" + "@lerna/command" "3.14.0" + "@lerna/validation-error" "3.13.0" npmlog "^4.1.2" -"@lerna/exec@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.3.2.tgz#95ecaca617fd85abdb91e9a378ed06ec1763d665" +"@lerna/exec@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.14.0.tgz#da632dac4a86d59f7fe8c566af8648f8272241ff" + integrity sha512-cNFO8hWsBVLeqVQ7LsQ4rYKbbQ2eN+Ne+hWKTlUQoyRbYzgJ22TXhjKR6IMr68q0xtclcDlasfcNO+XEWESh0g== dependencies: - "@lerna/batch-packages" "^3.1.2" - "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.3.0" - "@lerna/filter-options" "^3.3.2" - "@lerna/run-parallel-batches" "^3.0.0" - "@lerna/validation-error" "^3.0.0" + "@lerna/child-process" "3.13.3" + "@lerna/command" "3.14.0" + "@lerna/filter-options" "3.14.0" + "@lerna/run-topologically" "3.14.0" + "@lerna/validation-error" "3.13.0" + p-map "^1.2.0" -"@lerna/filter-options@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.3.2.tgz#ac90702b7876ff4980dcdeaeac049c433dd01773" +"@lerna/filter-options@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.14.0.tgz#6a2e60708633f54973bf31262b58e53efb537ef2" + integrity sha512-ZmNZK9m8evxHc+2ZnDyCm8XFIKVDKpIASG1wtizr3R14t49fuYE7nR+rm4t82u9oSSmER8gb8bGzh0SKZme/jg== dependencies: - "@lerna/collect-updates" "^3.3.2" - "@lerna/filter-packages" "^3.0.0" + "@lerna/collect-updates" "3.14.0" + "@lerna/filter-packages" "3.13.0" dedent "^0.7.0" -"@lerna/filter-packages@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-3.0.0.tgz#5eb25ad1610f3e2ab845133d1f8d7d40314e838f" +"@lerna/filter-packages@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-3.13.0.tgz#f5371249e7e1a15928e5e88c544a242e0162c21c" + integrity sha512-RWiZWyGy3Mp7GRVBn//CacSnE3Kw82PxE4+H6bQ3pDUw/9atXn7NRX+gkBVQIYeKamh7HyumJtyOKq3Pp9BADQ== dependencies: - "@lerna/validation-error" "^3.0.0" + "@lerna/validation-error" "3.13.0" multimatch "^2.1.0" npmlog "^4.1.2" -"@lerna/get-npm-exec-opts@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.0.0.tgz#8fc7866e8d8e9a2f2dc385287ba32eb44de8bdeb" +"@lerna/get-npm-exec-opts@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz#d1b552cb0088199fc3e7e126f914e39a08df9ea5" + integrity sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw== dependencies: npmlog "^4.1.2" -"@lerna/global-options@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-3.1.3.tgz#cf85e24655a91d04d4efc9a80c1f83fc768d08ae" +"@lerna/get-packed@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-3.13.0.tgz#335e40d77f3c1855aa248587d3e0b2d8f4b06e16" + integrity sha512-EgSim24sjIjqQDC57bgXD9l22/HCS93uQBbGpkzEOzxAVzEgpZVm7Fm1t8BVlRcT2P2zwGnRadIvxTbpQuDPTg== + dependencies: + fs-extra "^7.0.0" + ssri "^6.0.1" + tar "^4.4.8" + +"@lerna/github-client@3.13.3": + version "3.13.3" + resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-3.13.3.tgz#bcf9b4ff40bdd104cb40cd257322f052b41bb9ce" + integrity sha512-fcJkjab4kX0zcLLSa/DCUNvU3v8wmy2c1lhdIbL7s7gABmDcV0QZq93LhnEee3VkC9UpnJ6GKG4EkD7eIifBnA== + dependencies: + "@lerna/child-process" "3.13.3" + "@octokit/plugin-enterprise-rest" "^2.1.1" + "@octokit/rest" "^16.16.0" + git-url-parse "^11.1.2" + npmlog "^4.1.2" -"@lerna/has-npm-version@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-3.3.0.tgz#8a73c2c437a0e1e68a19ccbd0dd3c014d4d39135" +"@lerna/global-options@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-3.13.0.tgz#217662290db06ad9cf2c49d8e3100ee28eaebae1" + integrity sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ== + +"@lerna/has-npm-version@3.13.3": + version "3.13.3" + resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-3.13.3.tgz#167e3f602a2fb58f84f93cf5df39705ca6432a2d" + integrity sha512-mQzoghRw4dBg0R9FFfHrj0TH0glvXyzdEZmYZ8Isvx5BSuEEwpsryoywuZSdppcvLu8o7NAdU5Tac8cJ/mT52w== dependencies: - "@lerna/child-process" "^3.3.0" + "@lerna/child-process" "3.13.3" semver "^5.5.0" -"@lerna/import@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.3.1.tgz#deca8c93c9cc03c5844b975c6da9937dd7530440" +"@lerna/import@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.14.0.tgz#de5727dc18d21c50af14b481e47b424c5bbe107c" + integrity sha512-j8z/m85FX1QYPgl5TzMNupdxsQF/NFZSmdCR19HQzqiVKC8ULGzF30WJEk66+KeZ94wYMSakINtYD+41s34pNQ== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.3.0" - "@lerna/prompt" "^3.3.1" - "@lerna/validation-error" "^3.0.0" + "@lerna/child-process" "3.13.3" + "@lerna/command" "3.14.0" + "@lerna/prompt" "3.13.0" + "@lerna/pulse-till-done" "3.13.0" + "@lerna/validation-error" "3.13.0" dedent "^0.7.0" fs-extra "^7.0.0" p-map-series "^1.0.0" -"@lerna/init@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.3.0.tgz#998f3497da3d891867c593b808b6db4b8fc4ccb9" +"@lerna/init@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.14.0.tgz#f5b92f171f9ed4168bd3d9305fffe6a46460a1d2" + integrity sha512-X3PQkQZds5ozA1xiarmVzAK6LPLNK3bBu24Api0w2KJXO7Ccs9ob/VcGdevZuzqdJo1Xg2H6oBhEqIClU9Uqqw== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.3.0" + "@lerna/child-process" "3.13.3" + "@lerna/command" "3.14.0" fs-extra "^7.0.0" p-map "^1.2.0" write-json-file "^2.3.0" -"@lerna/link@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.3.0.tgz#c0c05ff52d0f0c659fcf221627edfcd58e477a5c" +"@lerna/link@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.14.0.tgz#817243559b3d460a08bd65582e7632b1dbc6df69" + integrity sha512-xlwQhWTVOZrgAuoONY3/OIBWehDfZXmf5qFhnOy7lIxByRhEX5Vwx0ApaGxHTv3Flv7T+oI4s8UZVq5F6dT8Aw== dependencies: - "@lerna/command" "^3.3.0" - "@lerna/package-graph" "^3.1.2" - "@lerna/symlink-dependencies" "^3.3.0" + "@lerna/command" "3.14.0" + "@lerna/package-graph" "3.14.0" + "@lerna/symlink-dependencies" "3.14.0" p-map "^1.2.0" slash "^1.0.0" -"@lerna/list@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.3.2.tgz#1412b3cce2a83b1baa4ff6fb962d50b46c28ec98" +"@lerna/list@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.14.0.tgz#cfe826937c63a3652003639eb7fd36bf4b0a3660" + integrity sha512-Gp+9gaIkBfXBwc9Ng0Y74IEfAqpQpLiXwOP4IOpdINxOeDpllhMaYP6SzLaMvrfSyHRayM7Cq5/PRnHkXQ5uuQ== dependencies: - "@lerna/command" "^3.3.0" - "@lerna/filter-options" "^3.3.2" - "@lerna/listable" "^3.0.0" - "@lerna/output" "^3.0.0" + "@lerna/command" "3.14.0" + "@lerna/filter-options" "3.14.0" + "@lerna/listable" "3.14.0" + "@lerna/output" "3.13.0" -"@lerna/listable@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-3.0.0.tgz#27209b1382c87abdbc964220e75c247d803d4199" +"@lerna/listable@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-3.14.0.tgz#08f4c78e0466568e8e8a57d4ad09537f2bb7bbb9" + integrity sha512-ZK44Mo8xf/N97eQZ236SPSq0ek6+gk4HqHIx05foEMZVV1iIDH4a/nblLsJNjGQVsIdMYFPaqNJ0z+ZQfiJazQ== dependencies: + "@lerna/query-graph" "3.14.0" chalk "^2.3.1" columnify "^1.5.4" -"@lerna/log-packed@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-3.0.4.tgz#6d1f6ce5ca68b9971f2a27f0ecf3c50684be174a" +"@lerna/log-packed@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-3.13.0.tgz#497b5f692a8d0e3f669125da97b0dadfd9e480f3" + integrity sha512-Rmjrcz+6aM6AEcEVWmurbo8+AnHOvYtDpoeMMJh9IZ9SmZr2ClXzmD7wSvjTQc8BwOaiWjjC/ukcT0UYA2m7wg== dependencies: byte-size "^4.0.3" columnify "^1.5.4" has-unicode "^2.0.1" npmlog "^4.1.2" -"@lerna/npm-conf@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-3.4.1.tgz#859e931b0bc9a5eed86309cc09508810c1e7d121" +"@lerna/npm-conf@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-3.13.0.tgz#6b434ed75ff757e8c14381b9bbfe5d5ddec134a7" + integrity sha512-Jg2kANsGnhg+fbPEzE0X9nX5oviEAvWj0nYyOkcE+cgWuT7W0zpnPXC4hA4C5IPQGhwhhh0IxhWNNHtjTuw53g== dependencies: config-chain "^1.1.11" pify "^3.0.0" -"@lerna/npm-dist-tag@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-3.3.0.tgz#e1c5ab67674216d901266a16846b21cc81ff6afd" +"@lerna/npm-dist-tag@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-3.14.0.tgz#69b1f99ce9d777782afe646522cb14293d986eb5" + integrity sha512-DEyYEdufTGIC6E4RTJUsYPgqlz1Bs/XPeEQ5fd+ojWnICevj7dRrr2DfHucPiUCADlm2jbAraAQc3QPU0dXRhw== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/get-npm-exec-opts" "^3.0.0" + "@lerna/otplease" "3.14.0" + figgy-pudding "^3.5.1" + npm-package-arg "^6.1.0" + npm-registry-fetch "^3.9.0" npmlog "^4.1.2" -"@lerna/npm-install@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.3.0.tgz#16d00ffd668d11b2386b3ac68bdac2cf8320e533" +"@lerna/npm-install@3.13.3": + version "3.13.3" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.13.3.tgz#9b09852732e51c16d2e060ff2fd8bfbbb49cf7ba" + integrity sha512-7Jig9MLpwAfcsdQ5UeanAjndChUjiTjTp50zJ+UZz4CbIBIDhoBehvNMTCL2G6pOEC7sGEg6sAqJINAqred6Tg== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/get-npm-exec-opts" "^3.0.0" + "@lerna/child-process" "3.13.3" + "@lerna/get-npm-exec-opts" "3.13.0" fs-extra "^7.0.0" - npm-package-arg "^6.0.0" + npm-package-arg "^6.1.0" npmlog "^4.1.2" signal-exit "^3.0.2" write-pkg "^3.1.0" -"@lerna/npm-publish@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.3.1.tgz#30384665d7ee387343332ece62ca231207bbabea" +"@lerna/npm-publish@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.14.0.tgz#e3fc5613a2dd08cdd3323347ba87fad5dc5f11fb" + integrity sha512-ShG0qEnGkWxtjQvIRATgm/CzeoVaSyyoNRag5t8gDSR/r2u9ux72oROKQUEaE8OwcTS4rL2cyBECts8XMNmyYw== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/get-npm-exec-opts" "^3.0.0" - "@lerna/has-npm-version" "^3.3.0" - "@lerna/log-packed" "^3.0.4" + "@lerna/otplease" "3.14.0" + "@lerna/run-lifecycle" "3.14.0" + figgy-pudding "^3.5.1" fs-extra "^7.0.0" + libnpmpublish "^1.1.1" + npm-package-arg "^6.1.0" npmlog "^4.1.2" - p-map "^1.2.0" + pify "^3.0.0" + read-package-json "^2.0.13" -"@lerna/npm-run-script@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-3.3.0.tgz#3c79601c27c67121155b20e039be53130217db72" +"@lerna/npm-run-script@3.13.3": + version "3.13.3" + resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-3.13.3.tgz#9bb6389ed70cd506905d6b05b6eab336b4266caf" + integrity sha512-qR4o9BFt5hI8Od5/DqLalOJydnKpiQFEeN0h9xZi7MwzuX1Ukwh3X22vqsX4YRbipIelSFtrDzleNVUm5jj0ow== dependencies: - "@lerna/child-process" "^3.3.0" - "@lerna/get-npm-exec-opts" "^3.0.0" + "@lerna/child-process" "3.13.3" + "@lerna/get-npm-exec-opts" "3.13.0" npmlog "^4.1.2" -"@lerna/output@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-3.0.0.tgz#4ed4a30ed2f311046b714b3840a090990ba3ce35" +"@lerna/otplease@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-3.14.0.tgz#b539fd3e7a08452fc0db3b10010ca3cf0e4a73e7" + integrity sha512-rYAWzaYZ81bwnrmTkYWGgcc13bl/6DlG7pjWQWNGAJNLzO5zzj0xmXN5sMFJnNvDpSiS/ZS1sIuPvb4xnwLUkg== + dependencies: + "@lerna/prompt" "3.13.0" + figgy-pudding "^3.5.1" + +"@lerna/output@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/output/-/output-3.13.0.tgz#3ded7cc908b27a9872228a630d950aedae7a4989" + integrity sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg== dependencies: npmlog "^4.1.2" -"@lerna/package-graph@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.1.2.tgz#b70298a3a8c82e12090da33233bf242223a38f20" +"@lerna/pack-directory@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-3.14.0.tgz#229446c2e3f307a7932f2f779d7fb8b8ff7d93b0" + integrity sha512-E9PmC1oWYjYN8Z0Oeoj7X98NruMg/pcdDiRxnwJ5awnB0d/kyfoquHXCYwCQQFCnWUfto7m5lM4CSostcolEVQ== dependencies: - "@lerna/validation-error" "^3.0.0" - npm-package-arg "^6.0.0" + "@lerna/get-packed" "3.13.0" + "@lerna/package" "3.13.0" + "@lerna/run-lifecycle" "3.14.0" + figgy-pudding "^3.5.1" + npm-packlist "^1.4.1" + npmlog "^4.1.2" + tar "^4.4.8" + temp-write "^3.4.0" + +"@lerna/package-graph@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.14.0.tgz#4ccdf446dccedfbbeb4efff3eb720cb6fcb109fc" + integrity sha512-dNpA/64STD5YXhaSlg4gT6Z474WPJVCHoX1ibsVIFu0fVgH609Y69bsdmbvTRdI7r6Dcu4ZfGxdR636RTrH+Eg== + dependencies: + "@lerna/prerelease-id-from-version" "3.14.0" + "@lerna/validation-error" "3.13.0" + npm-package-arg "^6.1.0" + npmlog "^4.1.2" semver "^5.5.0" -"@lerna/package@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.0.0.tgz#14afc9a6cb1f7f7b23c1d7c7aa81bdac7d44c0e5" +"@lerna/package@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.13.0.tgz#4baeebc49a57fc9b31062cc59f5ee38384429fc8" + integrity sha512-kSKO0RJQy093BufCQnkhf1jB4kZnBvL7kK5Ewolhk5gwejN+Jofjd8DGRVUDUJfQ0CkW1o6GbUeZvs8w8VIZDg== dependencies: - npm-package-arg "^6.0.0" + load-json-file "^4.0.0" + npm-package-arg "^6.1.0" write-pkg "^3.1.0" -"@lerna/project@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.0.0.tgz#4320d2a2b4080cabcf95161d9c48475217d8a545" +"@lerna/prerelease-id-from-version@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.14.0.tgz#d5da9c26ac4a0d0ecde09018f06e41ca4dd444c2" + integrity sha512-Ap3Z/dNhqQuSrKmK+JmzYvQYI2vowxHvUVxZJiDVilW8dyNnxkCsYFmkuZytk5sxVz4VeGLNPS2RSsU5eeSS+Q== + dependencies: + semver "^5.5.0" + +"@lerna/project@3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.13.1.tgz#bce890f60187bd950bcf36c04b5260642e295e79" + integrity sha512-/GoCrpsCCTyb9sizk1+pMBrIYchtb+F1uCOn3cjn9yenyG/MfYEnlfrbV5k/UDud0Ei75YBLbmwCbigHkAKazQ== dependencies: - "@lerna/package" "^3.0.0" - "@lerna/validation-error" "^3.0.0" - cosmiconfig "^5.0.2" + "@lerna/package" "3.13.0" + "@lerna/validation-error" "3.13.0" + cosmiconfig "^5.1.0" dedent "^0.7.0" dot-prop "^4.2.0" glob-parent "^3.1.0" @@ -413,131 +1288,177 @@ resolve-from "^4.0.0" write-json-file "^2.3.0" -"@lerna/prompt@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-3.3.1.tgz#ec53f9034a7a02a671627241682947f65078ab88" +"@lerna/prompt@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-3.13.0.tgz#53571462bb3f5399cc1ca6d335a411fe093426a5" + integrity sha512-P+lWSFokdyvYpkwC3it9cE0IF2U5yy2mOUbGvvE4iDb9K7TyXGE+7lwtx2thtPvBAfIb7O13POMkv7df03HJeA== dependencies: inquirer "^6.2.0" npmlog "^4.1.2" -"@lerna/publish@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.4.1.tgz#abbbc656b3bfafc2289399a46da060b90f6baf32" - dependencies: - "@lerna/batch-packages" "^3.1.2" - "@lerna/check-working-tree" "^3.3.0" - "@lerna/child-process" "^3.3.0" - "@lerna/collect-updates" "^3.3.2" - "@lerna/command" "^3.3.0" - "@lerna/describe-ref" "^3.3.0" - "@lerna/get-npm-exec-opts" "^3.0.0" - "@lerna/npm-conf" "^3.4.1" - "@lerna/npm-dist-tag" "^3.3.0" - "@lerna/npm-publish" "^3.3.1" - "@lerna/output" "^3.0.0" - "@lerna/prompt" "^3.3.1" - "@lerna/run-lifecycle" "^3.4.1" - "@lerna/run-parallel-batches" "^3.0.0" - "@lerna/validation-error" "^3.0.0" - "@lerna/version" "^3.4.1" +"@lerna/publish@3.14.1": + version "3.14.1" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.14.1.tgz#c1f7ad8d152947bb88a1755b4305a5a431d3e610" + integrity sha512-p+By/P84XJkndBzrmcnVLMcFpGAE+sQZCQK4e3aKQrEMLDrEwXkWt/XJxzeQskPxInFA/7Icj686LOADO7p0qg== + dependencies: + "@lerna/check-working-tree" "3.14.1" + "@lerna/child-process" "3.13.3" + "@lerna/collect-updates" "3.14.0" + "@lerna/command" "3.14.0" + "@lerna/describe-ref" "3.13.3" + "@lerna/log-packed" "3.13.0" + "@lerna/npm-conf" "3.13.0" + "@lerna/npm-dist-tag" "3.14.0" + "@lerna/npm-publish" "3.14.0" + "@lerna/output" "3.13.0" + "@lerna/pack-directory" "3.14.0" + "@lerna/prerelease-id-from-version" "3.14.0" + "@lerna/prompt" "3.13.0" + "@lerna/pulse-till-done" "3.13.0" + "@lerna/run-lifecycle" "3.14.0" + "@lerna/run-topologically" "3.14.0" + "@lerna/validation-error" "3.13.0" + "@lerna/version" "3.14.1" + figgy-pudding "^3.5.1" fs-extra "^7.0.0" - libnpmaccess "^3.0.0" - npm-package-arg "^6.0.0" - npm-registry-fetch "^3.8.0" + libnpmaccess "^3.0.1" + npm-package-arg "^6.1.0" + npm-registry-fetch "^3.9.0" npmlog "^4.1.2" p-finally "^1.0.0" p-map "^1.2.0" p-pipe "^1.2.0" - p-reduce "^1.0.0" + pacote "^9.5.0" semver "^5.5.0" -"@lerna/resolve-symlink@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-3.3.0.tgz#c5d99a60cb17e2ea90b3521a0ba445478d194a44" +"@lerna/pulse-till-done@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz#c8e9ce5bafaf10d930a67d7ed0ccb5d958fe0110" + integrity sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA== + dependencies: + npmlog "^4.1.2" + +"@lerna/query-graph@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-3.14.0.tgz#2abb36f445bd924d0f85ac7aec1445e9ef1e2c6c" + integrity sha512-6YTh3vDMW2hUxHdKeRvx4bosc9lZClKaN+DzC1XKTkwDbWrsjmEzLcemKL6QnyyeuryN2f/eto7P9iSe3z3pQQ== + dependencies: + "@lerna/package-graph" "3.14.0" + figgy-pudding "^3.5.1" + +"@lerna/resolve-symlink@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-3.13.0.tgz#3e6809ef53b63fe914814bfa071cd68012e22fbb" + integrity sha512-Lc0USSFxwDxUs5JvIisS8JegjA6SHSAWJCMvi2osZx6wVRkEDlWG2B1JAfXUzCMNfHoZX0/XX9iYZ+4JIpjAtg== dependencies: fs-extra "^7.0.0" npmlog "^4.1.2" read-cmd-shim "^1.0.1" -"@lerna/rimraf-dir@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-3.3.0.tgz#687e9bb3668a9e540e281302a52d9a573860f5db" +"@lerna/rimraf-dir@3.13.3": + version "3.13.3" + resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-3.13.3.tgz#3a8e71317fde853893ef0262bc9bba6a180b7227" + integrity sha512-d0T1Hxwu3gpYVv73ytSL+/Oy8JitsmvOYUR5ouRSABsmqS7ZZCh5t6FgVDDGVXeuhbw82+vuny1Og6Q0k4ilqw== dependencies: - "@lerna/child-process" "^3.3.0" + "@lerna/child-process" "3.13.3" npmlog "^4.1.2" path-exists "^3.0.0" rimraf "^2.6.2" -"@lerna/run-lifecycle@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.4.1.tgz#6d7e44eada31cb4ec78b18ef050da0d86f6c892b" +"@lerna/run-lifecycle@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.14.0.tgz#0499eca0e7f393faf4e24e6c8737302a9059c22b" + integrity sha512-GUM3L9MzGRSW0WQ8wbLW1+SYStU1OFjW0GBzShhBnFrO4nGRrU7VchsLpcLu0hk2uCzyhsrDKzifEdOdUyMoEQ== dependencies: - "@lerna/npm-conf" "^3.4.1" - npm-lifecycle "^2.0.0" + "@lerna/npm-conf" "3.13.0" + figgy-pudding "^3.5.1" + npm-lifecycle "^2.1.1" npmlog "^4.1.2" -"@lerna/run-parallel-batches@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/run-parallel-batches/-/run-parallel-batches-3.0.0.tgz#468704934084c74991d3124d80607857d4dfa840" +"@lerna/run-parallel-batches@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/run-parallel-batches/-/run-parallel-batches-3.13.0.tgz#0276bb4e7cd0995297db82d134ca2bd08d63e311" + integrity sha512-bICFBR+cYVF1FFW+Tlm0EhWDioTUTM6dOiVziDEGE1UZha1dFkMYqzqdSf4bQzfLS31UW/KBd/2z8jy2OIjEjg== dependencies: p-map "^1.2.0" p-map-series "^1.0.0" -"@lerna/run@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.3.2.tgz#f521f4a22585c90758f34a584cb1871f8bb2a83e" - dependencies: - "@lerna/batch-packages" "^3.1.2" - "@lerna/command" "^3.3.0" - "@lerna/filter-options" "^3.3.2" - "@lerna/npm-run-script" "^3.3.0" - "@lerna/output" "^3.0.0" - "@lerna/run-parallel-batches" "^3.0.0" - "@lerna/validation-error" "^3.0.0" +"@lerna/run-topologically@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-3.14.0.tgz#2a560cb657f0ef1565c680b6001b4b01b872dc07" + integrity sha512-y+KBpC1YExFzGynovt9MY4O/bc3RrJaKeuXieiPfKGKxrdtmZe/r33oj/xePTXZq65jnw3SaU3H8S5CrrdkwDg== + dependencies: + "@lerna/query-graph" "3.14.0" + figgy-pudding "^3.5.1" + p-queue "^4.0.0" + +"@lerna/run@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.14.0.tgz#1a5d3330149fbf5092012707b775d5f57d9d0057" + integrity sha512-kGGFGLYPKozAN07CSJ7kOyLY6W3oLCQcxCathg1isSkBqQH29tWUg8qNduOlhIFLmnq/nf1JEJxxoXnF6IRLjQ== + dependencies: + "@lerna/command" "3.14.0" + "@lerna/filter-options" "3.14.0" + "@lerna/npm-run-script" "3.13.3" + "@lerna/output" "3.13.0" + "@lerna/run-topologically" "3.14.0" + "@lerna/timer" "3.13.0" + "@lerna/validation-error" "3.13.0" p-map "^1.2.0" -"@lerna/symlink-binary@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.3.0.tgz#99ea570b21baabd61ecab27582eeb1d7b2c5f9cf" +"@lerna/symlink-binary@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.14.0.tgz#db1c3204b83d91c4b43386302ee76cea4d20bc3f" + integrity sha512-AHFb4NlazxYmC+7guoamM3laIRbMSeKERMooKHJ7moe0ayGPBWsCGOH+ZFKZ+eXSDek+FnxdzayR3wf8B3LkTg== dependencies: - "@lerna/create-symlink" "^3.3.0" - "@lerna/package" "^3.0.0" + "@lerna/create-symlink" "3.14.0" + "@lerna/package" "3.13.0" fs-extra "^7.0.0" p-map "^1.2.0" - read-pkg "^3.0.0" -"@lerna/symlink-dependencies@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.3.0.tgz#13bcaed3e37986ab01b13498a459c7f609397dc3" +"@lerna/symlink-dependencies@3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.14.0.tgz#f17e5cd704a0f067636038dafeaf42b5d2f28802" + integrity sha512-kuSXxwAWiVZqFcXfUBKH4yLUH3lrnGyZmCYon7UnZitw3AK3LQY7HvV2LNNw/oatfjOAiKhPBxnYjYijKiV4oA== dependencies: - "@lerna/create-symlink" "^3.3.0" - "@lerna/resolve-symlink" "^3.3.0" - "@lerna/symlink-binary" "^3.3.0" + "@lerna/create-symlink" "3.14.0" + "@lerna/resolve-symlink" "3.13.0" + "@lerna/symlink-binary" "3.14.0" fs-extra "^7.0.0" p-finally "^1.0.0" p-map "^1.2.0" p-map-series "^1.0.0" -"@lerna/validation-error@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.0.0.tgz#a27e90051c3ba71995e2a800a43d94ad04b3e3f4" +"@lerna/timer@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-3.13.0.tgz#bcd0904551db16e08364d6c18e5e2160fc870781" + integrity sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw== + +"@lerna/validation-error@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.13.0.tgz#c86b8f07c5ab9539f775bd8a54976e926f3759c3" + integrity sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA== dependencies: npmlog "^4.1.2" -"@lerna/version@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.4.1.tgz#029448cccd3ccefb4d5f666933bd13cfb37edab0" - dependencies: - "@lerna/batch-packages" "^3.1.2" - "@lerna/check-working-tree" "^3.3.0" - "@lerna/child-process" "^3.3.0" - "@lerna/collect-updates" "^3.3.2" - "@lerna/command" "^3.3.0" - "@lerna/conventional-commits" "^3.4.1" - "@lerna/output" "^3.0.0" - "@lerna/prompt" "^3.3.1" - "@lerna/run-lifecycle" "^3.4.1" - "@lerna/validation-error" "^3.0.0" +"@lerna/version@3.14.1": + version "3.14.1" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.14.1.tgz#df081fec70fcfdcd3c470648c49b035b44a373bf" + integrity sha512-H/jykoxVIt4oDEYkBgwDfO5dmZFl3G6vP1UEttRVP1FIkI+gCN+olby8S0Qd8XprDuR5OrLboiDWQs3p7nJhLw== + dependencies: + "@lerna/batch-packages" "3.14.0" + "@lerna/check-working-tree" "3.14.1" + "@lerna/child-process" "3.13.3" + "@lerna/collect-updates" "3.14.0" + "@lerna/command" "3.14.0" + "@lerna/conventional-commits" "3.14.0" + "@lerna/github-client" "3.13.3" + "@lerna/output" "3.13.0" + "@lerna/prerelease-id-from-version" "3.14.0" + "@lerna/prompt" "3.13.0" + "@lerna/run-lifecycle" "3.14.0" + "@lerna/run-topologically" "3.14.0" + "@lerna/validation-error" "3.13.0" chalk "^2.3.1" dedent "^0.7.0" minimatch "^3.0.4" @@ -550,9 +1471,10 @@ slash "^1.0.0" temp-write "^3.4.0" -"@lerna/write-log-file@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-3.0.0.tgz#2f95fee80c6821fe1ee6ccf8173d2b4079debbd2" +"@lerna/write-log-file@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-3.13.0.tgz#b78d9e4cfc1349a8be64d91324c4c8199e822a26" + integrity sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A== dependencies: npmlog "^4.1.2" write-file-atomic "^2.3.0" @@ -560,412 +1482,568 @@ "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== dependencies: call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@nodelib/fs.stat@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.2.tgz#54c5a964462be3d4d78af631363c18d6fa91ac26" +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + +"@nteract/transform-vdom@^4.0.1": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@nteract/transform-vdom/-/transform-vdom-4.0.2.tgz#b6c7a85d0c7e825d4792adc3d7fbeeb8af5c434c" + integrity sha512-lp1wCvi/oLkCeQAJpXYzcrwuXrXZNyHGv/zHRmTQ+6TPtFAsLk0Zd0Br3uaIDPVBvY0baUN+lwkjHa1Cab0miw== + dependencies: + lodash "^4.17.4" + +"@octokit/endpoint@^5.1.0": + version "5.1.3" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.3.tgz#b503e56c74663a601e6e03c8eb6d143f4653d34d" + integrity sha512-ePx9kcUo0agRk0HaXhl+pKMXpBH1O3CAygwWIh7GT5i5kcUr8QowS0GBaZPirr1e0PqaFYr41hQfcUBA1R5AEQ== + dependencies: + deepmerge "3.2.0" + is-plain-object "^3.0.0" + universal-user-agent "^2.1.0" + url-template "^2.0.8" + +"@octokit/plugin-enterprise-rest@^2.1.1": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-2.2.2.tgz#c0e22067a043e19f96ff9c7832e2a3019f9be75c" + integrity sha512-CTZr64jZYhGWNTDGlSJ2mvIlFsm9OEO3LqWn9I/gmoHI4jRBp4kpHoFYNemG4oA75zUAcmbuWblb7jjP877YZw== + +"@octokit/request-error@^1.0.1", "@octokit/request-error@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.0.2.tgz#e6dbc5be13be1041ef8eca9225520982add574cf" + integrity sha512-T9swMS/Vc4QlfWrvyeSyp/GjhXtYaBzCcibjGywV4k4D2qVrQKfEMPy8OxMDEj7zkIIdpHwqdpVbKCvnUPqkXw== + dependencies: + deprecation "^2.0.0" + once "^1.4.0" -"@nteract/transform-vdom@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@nteract/transform-vdom/-/transform-vdom-1.1.1.tgz#49258c58a3704c89b20cc42b5be463d7802406fa" +"@octokit/request@^4.0.1": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-4.1.0.tgz#e85dc377113baf2fe24433af8feb20e8a32e21b0" + integrity sha512-RvpQAba4i+BNH0z8i0gPRc1ShlHidj4puQjI/Tno6s+Q3/Mzb0XRSHJiOhpeFrZ22V7Mwjq1E7QS27P5CgpWYA== + dependencies: + "@octokit/endpoint" "^5.1.0" + "@octokit/request-error" "^1.0.1" + deprecation "^2.0.0" + is-plain-object "^3.0.0" + node-fetch "^2.3.0" + once "^1.4.0" + universal-user-agent "^2.1.0" + +"@octokit/rest@^16.16.0": + version "16.27.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.27.0.tgz#6c2d1cba3efb8866ef2741c64d23b8f257c9dc89" + integrity sha512-UvCxVOCfHzEhOaltSKQBy81kMqQ+hglF3rAR4STut4WWr2tXvVnrIkGxeblO0TvmTt5zuxfgQfgG5kAHUT44RA== + dependencies: + "@octokit/request" "^4.0.1" + "@octokit/request-error" "^1.0.2" + atob-lite "^2.0.0" + before-after-hook "^1.4.0" + btoa-lite "^1.0.0" + deprecation "^2.0.0" + lodash.get "^4.4.2" + lodash.set "^4.3.2" + lodash.uniq "^4.5.0" + octokit-pagination-methods "^1.1.0" + once "^1.4.0" + universal-user-agent "^2.0.0" + url-template "^2.0.8" -"@phosphor/algorithm@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@phosphor/algorithm/-/algorithm-1.1.2.tgz#fd1de9104c9a7f34e92864586ddf2e7f2e7779e8" +"@phosphor/algorithm@^1.1.2", "@phosphor/algorithm@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@phosphor/algorithm/-/algorithm-1.1.3.tgz#fb0e974f4e81aadc06f948770b3060c4ec8a1e27" + integrity sha512-+dkdYTBglR+qGnLVQdCvYojNZMGxf+xSl1Jeksha3pm7niQktSFz2aR5gEPu/nI5LM8T8slTpqE4Pjvq8P+IVA== "@phosphor/application@^1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@phosphor/application/-/application-1.6.0.tgz#e1f1bf300680f982881d222a77b24ba8589d3fa2" + version "1.6.1" + resolved "https://registry.yarnpkg.com/@phosphor/application/-/application-1.6.1.tgz#2eb64a9f46deb3cad9e32e055e37ef3970e6517e" + integrity sha512-zyrY8o8Zht4vpyA7fTWHRcj+vzVuJLvAMX2UOVHMgKtaqkRRtuCEvo/cXm/JJM5DjK3x5xv8RnLaKJl6J421qA== dependencies: - "@phosphor/commands" "^1.5.0" - "@phosphor/coreutils" "^1.3.0" - "@phosphor/widgets" "^1.6.0" + "@phosphor/commands" "^1.6.2" + "@phosphor/coreutils" "^1.3.1" + "@phosphor/widgets" "^1.7.0" -"@phosphor/collections@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@phosphor/collections/-/collections-1.1.2.tgz#c4c0b8b91129905fb36a9f243f2dbbde462dab8d" +"@phosphor/collections@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@phosphor/collections/-/collections-1.1.3.tgz#c938ee4138d97377bba1f0970102071ca3ac1420" + integrity sha512-J2U1xd2e5LtqoOJt4kynrjDNeHhVpJjuY2/zA0InS5kyOuWmvy79pt/KJ22n0LBNcU/fjkImqtQmbrC2Z4q2xQ== dependencies: - "@phosphor/algorithm" "^1.1.2" + "@phosphor/algorithm" "^1.1.3" -"@phosphor/commands@^1.5.0", "@phosphor/commands@^1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@phosphor/commands/-/commands-1.6.1.tgz#6f60c2a3b759316cd1363b426df3b4036bb2c7fd" +"@phosphor/commands@^1.6.1", "@phosphor/commands@^1.6.2": + version "1.6.2" + resolved "https://registry.yarnpkg.com/@phosphor/commands/-/commands-1.6.2.tgz#f276952d76dcb6f938e5eba746b0d9080d7489ba" + integrity sha512-vQFO7ff0ZGfhPft2xJXj30EnYExZgs2l7rbgTBn9PfySNFY6Y1PGMdmEnpcYAT6BPqWrNXMPqZpRWqG3xqNN7w== dependencies: - "@phosphor/algorithm" "^1.1.2" - "@phosphor/coreutils" "^1.3.0" - "@phosphor/disposable" "^1.1.2" - "@phosphor/domutils" "^1.1.2" - "@phosphor/keyboard" "^1.1.2" - "@phosphor/signaling" "^1.2.2" + "@phosphor/algorithm" "^1.1.3" + "@phosphor/coreutils" "^1.3.1" + "@phosphor/disposable" "^1.1.3" + "@phosphor/domutils" "^1.1.3" + "@phosphor/keyboard" "^1.1.3" + "@phosphor/signaling" "^1.2.3" -"@phosphor/coreutils@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@phosphor/coreutils/-/coreutils-1.3.0.tgz#63292d381c012c5ab0d0196e83ced829b7e04a42" +"@phosphor/coreutils@^1.3.0", "@phosphor/coreutils@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@phosphor/coreutils/-/coreutils-1.3.1.tgz#441e34f42340f7faa742a88b2a181947a88d7226" + integrity sha512-9OHCn8LYRcPU/sbHm5v7viCA16Uev3gbdkwqoQqlV+EiauDHl70jmeL7XVDXdigl66Dz0LI11C99XOxp+s3zOA== "@phosphor/datagrid@^0.1.6": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@phosphor/datagrid/-/datagrid-0.1.6.tgz#c5f6d423c2899b22c137b60f07c9054bbce59004" - dependencies: - "@phosphor/algorithm" "^1.1.2" - "@phosphor/coreutils" "^1.3.0" - "@phosphor/disposable" "^1.1.2" - "@phosphor/domutils" "^1.1.2" - "@phosphor/dragdrop" "^1.3.0" - "@phosphor/messaging" "^1.2.2" - "@phosphor/signaling" "^1.2.2" - "@phosphor/widgets" "^1.6.0" - -"@phosphor/disposable@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@phosphor/disposable/-/disposable-1.1.2.tgz#a192dd6a2e6c69d5d09d39ecf334dab93778060e" + version "0.1.7" + resolved "https://registry.yarnpkg.com/@phosphor/datagrid/-/datagrid-0.1.7.tgz#255dd65ba8cd9e9c92d93f18b28e3d2bd3bbb8ae" + integrity sha512-VY+G3Umwj0xLrvyrUBU0RpYS8uPihYSO0wicfpvOazmgskDrU0LdVgS+UldQnWeVJ6GrcEwXwnMlTkyPszk+vg== + dependencies: + "@phosphor/algorithm" "^1.1.3" + "@phosphor/coreutils" "^1.3.1" + "@phosphor/disposable" "^1.1.3" + "@phosphor/domutils" "^1.1.3" + "@phosphor/dragdrop" "^1.3.1" + "@phosphor/messaging" "^1.2.3" + "@phosphor/signaling" "^1.2.3" + "@phosphor/widgets" "^1.7.0" + +"@phosphor/disposable@^1.1.2", "@phosphor/disposable@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@phosphor/disposable/-/disposable-1.1.3.tgz#912765c02e2f04b8d56efb26ecd7270207a40f41" + integrity sha512-yH5/HZzOyp37y+G/6X1hem3EfQCsUMtiStacG9W5F7mRsO4UuIXGxY3/XyJHAzy9UFrInOJD7alurQc/4wYhbQ== dependencies: - "@phosphor/algorithm" "^1.1.2" + "@phosphor/algorithm" "^1.1.3" -"@phosphor/domutils@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@phosphor/domutils/-/domutils-1.1.2.tgz#e2efeb052f398c42b93b89e9bab26af15cc00514" +"@phosphor/domutils@^1.1.2", "@phosphor/domutils@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@phosphor/domutils/-/domutils-1.1.3.tgz#5aeeaefb4bbfcc7c0942e5287a29d3c7f2b1a2bc" + integrity sha512-5CtLAhURQXXHhNXfQydDk/luG1cDVnhlu/qw7gz8/9pht0KXIAmNg/M0LKxx2oJ9+YMNCLVWxAnHAU0yrDpWSA== -"@phosphor/dragdrop@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@phosphor/dragdrop/-/dragdrop-1.3.0.tgz#7ce6ad39d6ca216d62a56f78104d02a77ae67307" +"@phosphor/dragdrop@^1.3.0", "@phosphor/dragdrop@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@phosphor/dragdrop/-/dragdrop-1.3.1.tgz#a16a274f9418916a34ea7edf9ba53bd0d0890b78" + integrity sha512-SkxyV43QiBlDU9I9Y8ou+U2Ty8BwwRbEsiet+ZTaDBp5TKDmSOfsZ/dsfUpKBDfGe4Lj95h8z9Dn8pjJsnoEuQ== dependencies: - "@phosphor/coreutils" "^1.3.0" - "@phosphor/disposable" "^1.1.2" + "@phosphor/coreutils" "^1.3.1" + "@phosphor/disposable" "^1.1.3" -"@phosphor/keyboard@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@phosphor/keyboard/-/keyboard-1.1.2.tgz#3e32234451764240a98e148034d5a8797422dd1f" +"@phosphor/keyboard@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@phosphor/keyboard/-/keyboard-1.1.3.tgz#e5fd13af0479034ef0b5fffcf43ef2d4a266b5b6" + integrity sha512-dzxC/PyHiD6mXaESRy6PZTd9JeK+diwG1pyngkyUf127IXOEzubTIbu52VSdpGBklszu33ws05BAGDa4oBE4mQ== -"@phosphor/messaging@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@phosphor/messaging/-/messaging-1.2.2.tgz#7d896ddd3797b94a347708ded13da5783db75c14" +"@phosphor/messaging@^1.2.2", "@phosphor/messaging@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@phosphor/messaging/-/messaging-1.2.3.tgz#860423261df8ac6c30344cc036b10b0e83d3c0db" + integrity sha512-89Ps4uSRNOEQoepB/0SDoyPpNUWd6VZnmbMetmeXZJHsuJ1GLxtnq3WBdl7UCVNsw3W9NC610pWaDCy/BafRlg== dependencies: - "@phosphor/algorithm" "^1.1.2" - "@phosphor/collections" "^1.1.2" + "@phosphor/algorithm" "^1.1.3" + "@phosphor/collections" "^1.1.3" -"@phosphor/properties@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@phosphor/properties/-/properties-1.1.2.tgz#78cc77eff452839da02255de48e814946cc09a28" +"@phosphor/properties@^1.1.2", "@phosphor/properties@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@phosphor/properties/-/properties-1.1.3.tgz#63e4355be5e22a411c566fd1860207038f171598" + integrity sha512-GiglqzU77s6+tFVt6zPq9uuyu/PLQPFcqZt914ZhJ4cN/7yNI/SLyMzpYZ56IRMXvzK9TUgbRna6URE3XAwFUg== -"@phosphor/signaling@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@phosphor/signaling/-/signaling-1.2.2.tgz#3fcf97ca88e38bfb357fe8fe6bf7513347a514a9" +"@phosphor/signaling@^1.2.2", "@phosphor/signaling@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@phosphor/signaling/-/signaling-1.2.3.tgz#2fde0ee810b0fab5f3fc765f81ed08ae671e76f1" + integrity sha512-DMwS0m9OgfY5ljpTsklRQPUQpTyg4obz85FyImRDacUVxUVbas95djIDEbU4s1TMzdHBBO+gfki3V4giXUvXzw== dependencies: - "@phosphor/algorithm" "^1.1.2" + "@phosphor/algorithm" "^1.1.3" -"@phosphor/virtualdom@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@phosphor/virtualdom/-/virtualdom-1.1.2.tgz#ce55c86eef31e5d0e26b1dc96ea32bd684458f41" +"@phosphor/virtualdom@^1.1.2", "@phosphor/virtualdom@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@phosphor/virtualdom/-/virtualdom-1.1.3.tgz#33ddebc710ad5bd136fd5f61d7adb4fa14e781e0" + integrity sha512-V8PHhhnZCRa5esrC4q5VthqlLtxTo9ZV1mZ6b4YEloapca1S1nggZSQhrSlltXQjtYNUaWJZUZ/BlFD8wFtIEQ== dependencies: - "@phosphor/algorithm" "^1.1.2" + "@phosphor/algorithm" "^1.1.3" -"@phosphor/widgets@^1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@phosphor/widgets/-/widgets-1.6.0.tgz#ebba8008b6b13247d03e73e5f3872c90d2c9c78f" - dependencies: - "@phosphor/algorithm" "^1.1.2" - "@phosphor/commands" "^1.5.0" - "@phosphor/coreutils" "^1.3.0" - "@phosphor/disposable" "^1.1.2" - "@phosphor/domutils" "^1.1.2" - "@phosphor/dragdrop" "^1.3.0" - "@phosphor/keyboard" "^1.1.2" - "@phosphor/messaging" "^1.2.2" - "@phosphor/properties" "^1.1.2" - "@phosphor/signaling" "^1.2.2" - "@phosphor/virtualdom" "^1.1.2" +"@phosphor/widgets@^1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@phosphor/widgets/-/widgets-1.7.0.tgz#1985372ac9e6b2a80b550d5652461c9145721be0" + integrity sha512-LavrlJHnki2x5PyBbfEdY4UJSARTu4anVZ9l2YOKGVUGE3mwl1pVJqJAghYC/M+OhSXcvHzFgxwaZxBQZ1gHbQ== + dependencies: + "@phosphor/algorithm" "^1.1.3" + "@phosphor/commands" "^1.6.2" + "@phosphor/coreutils" "^1.3.1" + "@phosphor/disposable" "^1.1.3" + "@phosphor/domutils" "^1.1.3" + "@phosphor/dragdrop" "^1.3.1" + "@phosphor/keyboard" "^1.1.3" + "@phosphor/messaging" "^1.2.3" + "@phosphor/properties" "^1.1.3" + "@phosphor/signaling" "^1.2.3" + "@phosphor/virtualdom" "^1.1.3" "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" + integrity sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg== dependencies: any-observable "^0.3.0" -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" -"@types/chai@~4.0.10": - version "4.0.10" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.10.tgz#0eb222c7353adde8e0980bea04165d4d3b6afef3" +"@types/anymatch@*": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" + integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA== -"@types/codemirror@~0.0.70": - version "0.0.70" - resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-0.0.70.tgz#2d9c850d6afbc93162c1434a827f86ad5ee90e35" +"@types/babel__core@^7.1.0": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.2.tgz#608c74f55928033fce18b99b213c16be4b3d114f" + integrity sha512-cfCCrFmiGY/yq0NuKNxIQvZFy9kY/1immpSpTngOnyIbD4+eJOG5mxphhHDv3CHL9GltO4GcKr54kGBg3RNdbg== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" -"@types/comment-json@^1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/comment-json/-/comment-json-1.1.1.tgz#b4ae889912a93e64619f97989aecaff8ce889dca" +"@types/babel__generator@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.0.2.tgz#d2112a6b21fad600d7674274293c85dce0cb47fc" + integrity sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" + integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.0.6" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.6.tgz#328dd1a8fc4cfe3c8458be9477b219ea158fd7b2" + integrity sha512-XYVgHF2sQ0YblLRMLNPB3CkFMewzFmlDsH/TneZFHUXDlABQgh88uOxuez7ZcXxayLFrqLwtDH1t+FmlFwNZxw== + dependencies: + "@babel/types" "^7.3.0" -"@types/dom4@^2.0.0": +"@types/chai@^4.1.7": + version "4.1.7" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.7.tgz#1b8e33b61a8c09cbe1f85133071baa0dbf9fa71a" + integrity sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA== + +"@types/clone@~0.1.30": + version "0.1.30" + resolved "https://registry.yarnpkg.com/@types/clone/-/clone-0.1.30.tgz#e7365648c1b42136a59c7d5040637b3b5c83b614" + integrity sha1-5zZWSMG0ITalnH1QQGN7O1yDthQ= + +"@types/codemirror@^0.0.74": + version "0.0.74" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-0.0.74.tgz#7ca146f7f3414166e7501000d691b2f18d978d10" + integrity sha512-pjc14HE6KCCk3SYoC49k/gJJHkredJy4GdSK+lGRMIBfG+Uq6vT8oZiKToFH2J7pZ5pUd69UGD6CgmFG1V17wA== + dependencies: + "@types/tern" "*" + +"@types/dom4@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/dom4/-/dom4-2.0.1.tgz#506d5781b9bcab81bd9a878b198aec7dee2a6033" + integrity sha512-kSkVAvWmMZiCYtvqjqQEwOmvKwcH+V4uiv3qPQ8pAh1Xl39xggGEo8gHUqV4waYGHezdFw0rKBR8Jt0CrQSDZA== + +"@types/domhandler@*": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/domhandler/-/domhandler-2.4.1.tgz#7b3b347f7762180fbcb1ece1ce3dd0ebbb8c64cf" + integrity sha512-cfBw6q6tT5sa1gSPFSRKzF/xxYrrmeiut7E0TxNBObiLSBTuFEHibcfEe3waQPEDbqBsq+ql/TOniw65EyDFMA== + +"@types/domutils@*": + version "1.7.2" + resolved "https://registry.yarnpkg.com/@types/domutils/-/domutils-1.7.2.tgz#89422e579c165994ad5c09ce90325da596cc105d" + integrity sha512-Nnwy1Ztwq42SSNSZSh9EXBJGrOZPR+PQ2sRT4VZy8hnsFXfCil7YlKO2hd2360HyrtFz2qwnKQ13ENrgXNxJbw== + dependencies: + "@types/domhandler" "*" + +"@types/estree@*": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== "@types/events@*": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + +"@types/fast-json-stable-stringify@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#40363bb847cb86b2c2e1599f1398d11e8329c921" + integrity sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ== "@types/fs-extra@^5.0.3": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599" + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.1.0.tgz#2a325ef97901504a3828718c390d34b8426a10a1" + integrity sha512-AInn5+UBFIK9FK5xc9yP5e3TQSPNNgjHByqYcj9g5elVBnDQcQL7PlO1CIRy2gWlbwK7UPYqi7vRvFA44dCmYQ== dependencies: "@types/node" "*" -"@types/fs-extra@~4.0.3": - version "4.0.8" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-4.0.8.tgz#6957ddaf9173195199cb96da3db44c74700463d2" +"@types/fs-extra@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-7.0.0.tgz#9c4ad9e1339e7448a76698829def1f159c1b636c" + integrity sha512-ndoMMbGyuToTy4qB6Lex/inR98nPiNHacsgMPvy+zqMLgSxbt8VtWpDArpGp69h1fEDQHn1KB+9DWD++wgbwYA== dependencies: "@types/node" "*" -"@types/glob@*", "@types/glob@~5.0.33": - version "5.0.35" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.35.tgz#1ae151c802cece940443b5ac246925c85189f32a" +"@types/glob@*", "@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== dependencies: "@types/events" "*" "@types/minimatch" "*" "@types/node" "*" "@types/handlebars@^4.0.38": - version "4.0.39" - resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.39.tgz#961fb54db68030890942e6aeffe9f93a957807bd" + version "4.1.0" + resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.1.0.tgz#3fcce9bf88f85fe73dc932240ab3fb682c624850" + integrity sha512-gq9YweFKNNB1uFK71eRqsd4niVkXrxHugqWFQkeLRJvGjnxsLr16bYtcsG4tOFwmYi0Bax+wCkbf1reUfdl4kA== + dependencies: + handlebars "*" "@types/highlight.js@^9.12.3": version "9.12.3" resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca" + integrity sha512-pGF/zvYOACZ/gLGWdQH8zSwteQS1epp68yRcVLJMgUck/MjEn/FBYmPub9pXT8C1e4a8YZfHo1CKyV8q1vKUnQ== + +"@types/htmlparser2@*": + version "3.10.0" + resolved "https://registry.yarnpkg.com/@types/htmlparser2/-/htmlparser2-3.10.0.tgz#b94d3b08f813c9eec12990ac6a34d8b17a7aebc9" + integrity sha512-keXxWwpNOTvRTWTS4cdLHPp3p6gSzitTCmLNgPJinEvS95QzjkhbEMSaQO4XkEp4ctXJu8P0j4xqEVOPsLj3vg== + dependencies: + "@types/domhandler" "*" + "@types/domutils" "*" + "@types/node" "*" -"@types/inquirer@0.0.36": - version "0.0.36" - resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-0.0.36.tgz#d27aae262b127ffc2e6dbf8e14e8caf7f7c059a3" +"@types/inquirer@^6.0.3": + version "6.0.3" + resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-6.0.3.tgz#597b3c1aa4a575899841ab99bb4f1774d0b8c090" + integrity sha512-lBsdZScFMaFYYIE3Y6CWX22B9VeY2NerT1kyU2heTc3u/W6a+Om6Au2q0rMzBrzynN0l4QoABhI0cbNdyz6fDg== dependencies: - "@types/rx" "*" "@types/through" "*" + rxjs "^6.4.0" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" + integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== + +"@types/istanbul-lib-report@*": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#e5471e7fa33c61358dd38426189c037a58433b8c" + integrity sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg== + dependencies: + "@types/istanbul-lib-coverage" "*" -"@types/jest@^23.3.1": - version "23.3.1" - resolved "https://registry.npmjs.org/@types/jest/-/jest-23.3.1.tgz#a4319aedb071d478e6f407d1c4578ec8156829cf" +"@types/istanbul-reports@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a" + integrity sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA== + dependencies: + "@types/istanbul-lib-coverage" "*" + "@types/istanbul-lib-report" "*" -"@types/json-stable-stringify@^1.0.32": - version "1.0.32" - resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.32.tgz#121f6917c4389db3923640b2e68de5fa64dda88e" +"@types/jest-diff@*": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@types/jest-diff/-/jest-diff-20.0.1.tgz#35cc15b9c4f30a18ef21852e255fdb02f6d59b89" + integrity sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA== -"@types/lodash.escape@^4.0.4": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@types/lodash.escape/-/lodash.escape-4.0.4.tgz#61312495e5ff48e142e176530903e3aac1146eb5" +"@types/jest@^24.0.13": + version "24.0.13" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.13.tgz#10f50b64cb05fb02411fbba49e9042a3a11da3f9" + integrity sha512-3m6RPnO35r7Dg+uMLj1+xfZaOgIHHHut61djNjzwExXN4/Pm9has9C6I1KMYSfz7mahDhWUOVg4HW/nZdv5Pww== + dependencies: + "@types/jest-diff" "*" + +"@types/json5@^0.0.30": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.30.tgz#44cb52f32a809734ca562e685c6473b5754a7818" + integrity sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA== + +"@types/lodash.escape@^4.0.6": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@types/lodash.escape/-/lodash.escape-4.0.6.tgz#71730c1a27bb5ac7f98f88d5e858fa4ad2df1106" + integrity sha512-/CI97B3wf1R4oD4yotsGoX/5bobL/RC8olTQ16iunzdjufcdD8GyIvNDatg1IfzVKaFBZmxuY0+WQDpdaQHLzg== dependencies: "@types/lodash" "*" "@types/lodash@*", "@types/lodash@^4.14.110": - version "4.14.116" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9" + version "4.14.132" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.132.tgz#8ce45ca8745ff2e004fac0de0ab46f61e390ffa0" + integrity sha512-RNUU1rrh85NgUJcjOOr96YXr+RHwInGbaQCZmlitqOaCKXffj8bh+Zxwuq5rjDy5OgzFldDVoqk4pyLEDiwxIw== "@types/marked@^0.4.0": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.4.1.tgz#6595701c4d0dfde9d04894d3be04b8a97a49e0d7" + version "0.4.2" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.4.2.tgz#64a89e53ea37f61cc0f3ee1732c555c2dbf6452f" + integrity sha512-cDB930/7MbzaGF6U3IwSQp6XBru8xWajF5PV2YZZeV8DyiliTuld11afVztGI9+yJZ29il5E+NpGA6ooV/Cjkg== -"@types/marked@~0.3.0": - version "0.3.0" - resolved "https://registry.npmjs.org/@types/marked/-/marked-0.3.0.tgz#583c223dd33385a1dda01aaf77b0cd0411c4b524" +"@types/marked@^0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.6.5.tgz#3cf2a56ef615dad24aaf99784ef90a9eba4e29d8" + integrity sha512-6kBKf64aVfx93UJrcyEZ+OBM5nGv4RLsI6sR1Ar34bpgvGVRoyTgpxn4ZmtxOM5aDTAaaznYuYUH8bUX3Nk3YA== "@types/mini-css-extract-plugin@^0.2.0": version "0.2.0" - resolved "http://registry.npmjs.org/@types/mini-css-extract-plugin/-/mini-css-extract-plugin-0.2.0.tgz#afb037dbbd76f6c13803927c2751d194188b5d47" + resolved "https://registry.yarnpkg.com/@types/mini-css-extract-plugin/-/mini-css-extract-plugin-0.2.0.tgz#afb037dbbd76f6c13803927c2751d194188b5d47" + integrity sha512-oHec+Vasp+K3C1Hb9HpwbA9Iw8ywqDgo9edWQJdBqxu05JH2AQsR56Zo5THpYbu1ieh/xJCvMRIHRdvrUBDmcA== dependencies: "@types/webpack" "*" "@types/minimatch@*", "@types/minimatch@3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== -"@types/minimist@~1.2.0": +"@types/minimist@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" + integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= -"@types/mocha@^5.2.5": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073" +"@types/mocha@^5.2.6": + version "5.2.6" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.6.tgz#b8622d50557dd155e9f2f634b7d68fd38de5e94b" + integrity sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw== -"@types/node-fetch@^2.1.2": - version "2.1.2" - resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.1.2.tgz#8c5da14d70321e4c4ecd5db668e3f93cf6c7399f" +"@types/node-fetch@^2.3.4": + version "2.3.4" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.3.4.tgz#a46fc4fe9f94b491bf551b6bb7f0f493b9bacd1a" + integrity sha512-ZwGXz5osL88SF+jlbbz0WJlINlOZHoSWPrLytQRWRdB6j/KVLup1OoqIxnjO6q9ToqEEP3MZFzJCotgge+IiRw== dependencies: "@types/node" "*" -"@types/node@*", "@types/node@~8.0.47": - version "8.0.58" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.58.tgz#5b3881c0be3a646874803fee3197ea7f1ed6df90" +"@types/node@*", "@types/node@^12.0.2": + version "12.0.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.2.tgz#3452a24edf9fea138b48fad4a0a028a683da1e40" + integrity sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA== + +"@types/normalize-package-data@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" + integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== "@types/prop-types@*": - version "15.5.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.5.tgz#17038dd322c2325f5da650a94d5f9974943625e3" - dependencies: - "@types/react" "*" + version "15.7.1" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6" + integrity sha512-CFzn9idOEpHrgdw8JsoTkaDDyRWk1jrzIV8djzcgpq0y9tG4B4lFT+Nxh52DVpDXV+n4+NPNv7M1Dj5uMp6XFg== -"@types/react-dom@~16.0.7": - version "16.0.7" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.7.tgz#54d0f867a76b90597e8432030d297982f25c20ba" +"@types/q@^1.5.1": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" + integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== + +"@types/react-dom@^16.8.4": + version "16.8.4" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.8.4.tgz#7fb7ba368857c7aa0f4e4511c4710ca2c5a12a88" + integrity sha512-eIRpEW73DCzPIMaNBDP5pPIpK1KXyZwNgfxiVagb5iGiz6da+9A5hslSX6GAQKdO7SayVCS/Fr2kjqprgAvkfA== dependencies: - "@types/node" "*" "@types/react" "*" -"@types/react-highlighter@^0.3.1": +"@types/react-highlighter@^0.3.4": version "0.3.4" resolved "https://registry.yarnpkg.com/@types/react-highlighter/-/react-highlighter-0.3.4.tgz#18cf2b1516164c8a7a697aa3f7d237df6c2b5a34" + integrity sha512-wM8l3QxU1P6rAeCIJUNug407Z8igm90xX9jDpjem1+pVzEI3VQpKiQj7oEinQVq7425Dmgyon8XfqbxD0mTknA== dependencies: "@types/react" "*" -"@types/react-json-tree@^0.6.3": - version "0.6.8" - resolved "https://registry.yarnpkg.com/@types/react-json-tree/-/react-json-tree-0.6.8.tgz#5a2f5848ac9175cb3c2a3294cdda5d3d3bd2a37d" +"@types/react-json-tree@^0.6.11": + version "0.6.11" + resolved "https://registry.yarnpkg.com/@types/react-json-tree/-/react-json-tree-0.6.11.tgz#644eee18b1c772d57afe584b8098af71d847a15a" + integrity sha512-HP0Sf0ZHjCi1FHLJxh/pLaxaevEW6ILlV2C5Dn3EZFTkLjWkv+EVf/l/zvtmoU9ZwuO/3TKVeWK/700UDxunTw== dependencies: "@types/react" "*" -"@types/react-paginate@^4.3.2": - version "4.3.4" - resolved "https://registry.yarnpkg.com/@types/react-paginate/-/react-paginate-4.3.4.tgz#bd378af0ffec8e24b3b6afda0ddfe551e74701a6" +"@types/react-paginate@^6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@types/react-paginate/-/react-paginate-6.2.1.tgz#2329088d78010ea49661559c8467a24ecd942784" + integrity sha512-+q8k1N0WzbMyOCsIEH/p5D6/KQD8dXYLzfvSvriYn//94icd2sqhAL2rWXkgwGvqHGCSTU9AoHtsWCJxPfquUQ== dependencies: "@types/react" "*" -"@types/react@*", "@types/react@~16.4.13": - version "16.4.13" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.13.tgz#1385f5dc3486aa493849a32ccce626a817543e28" +"@types/react@*", "@types/react@~16.8.18": + version "16.8.18" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.18.tgz#fe66fb748b0b6ca9709d38b87b2d1356d960a511" + integrity sha512-lUXdKzRqWR4FebR5tGHkLCqnvQJS4fdXKCBrNGGbglqZg2gpU+J82pMONevQODUotATs9fc9k66bx3/St8vReg== dependencies: "@types/prop-types" "*" csstype "^2.2.0" -"@types/rx-core-binding@*": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@types/rx-core-binding/-/rx-core-binding-4.0.4.tgz#d969d32f15a62b89e2862c17b3ee78fe329818d3" - dependencies: - "@types/rx-core" "*" - -"@types/rx-core@*": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/rx-core/-/rx-core-4.0.3.tgz#0b3354b1238cedbe2b74f6326f139dbc7a591d60" - -"@types/rx-lite-aggregates@*": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/rx-lite-aggregates/-/rx-lite-aggregates-4.0.3.tgz#6efb2b7f3d5f07183a1cb2bd4b1371d7073384c2" - dependencies: - "@types/rx-lite" "*" - -"@types/rx-lite-async@*": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/rx-lite-async/-/rx-lite-async-4.0.2.tgz#27fbf0caeff029f41e2d2aae638b05e91ceb600c" - dependencies: - "@types/rx-lite" "*" - -"@types/rx-lite-backpressure@*": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/rx-lite-backpressure/-/rx-lite-backpressure-4.0.3.tgz#05abb19bdf87cc740196c355e5d0b37bb50b5d56" - dependencies: - "@types/rx-lite" "*" - -"@types/rx-lite-coincidence@*": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/rx-lite-coincidence/-/rx-lite-coincidence-4.0.3.tgz#80bd69acc4054a15cdc1638e2dc8843498cd85c0" - dependencies: - "@types/rx-lite" "*" - -"@types/rx-lite-experimental@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/rx-lite-experimental/-/rx-lite-experimental-4.0.1.tgz#c532f5cbdf3f2c15da16ded8930d1b2984023cbd" - dependencies: - "@types/rx-lite" "*" - -"@types/rx-lite-joinpatterns@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/rx-lite-joinpatterns/-/rx-lite-joinpatterns-4.0.1.tgz#f70fe370518a8432f29158cc92ffb56b4e4afc3e" - dependencies: - "@types/rx-lite" "*" - -"@types/rx-lite-testing@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/rx-lite-testing/-/rx-lite-testing-4.0.1.tgz#21b19d11f4dfd6ffef5a9d1648e9c8879bfe21e9" - dependencies: - "@types/rx-lite-virtualtime" "*" - -"@types/rx-lite-time@*": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/rx-lite-time/-/rx-lite-time-4.0.3.tgz#0eda65474570237598f3448b845d2696f2dbb1c4" - dependencies: - "@types/rx-lite" "*" - -"@types/rx-lite-virtualtime@*": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/rx-lite-virtualtime/-/rx-lite-virtualtime-4.0.3.tgz#4b30cacd0fe2e53af29f04f7438584c7d3959537" - dependencies: - "@types/rx-lite" "*" - -"@types/rx-lite@*": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/rx-lite/-/rx-lite-4.0.5.tgz#b3581525dff69423798daa9a0d33c1e66a5e8c4c" +"@types/sanitize-html@^1.18.3": + version "1.18.3" + resolved "https://registry.yarnpkg.com/@types/sanitize-html/-/sanitize-html-1.18.3.tgz#5916419bac4e68ed50fa20dfdec2e597a9f932ee" + integrity sha512-rc2QO3fudRfDckthQj4xJ9oFpbWV6g1bkjNG5NSXeYo89f3qvOwBiKnFk6I12c4d3y2Qjrpst5YPh8PrdEKJcg== dependencies: - "@types/rx-core" "*" - "@types/rx-core-binding" "*" + "@types/htmlparser2" "*" -"@types/rx@*": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@types/rx/-/rx-4.1.1.tgz#598fc94a56baed975f194574e0f572fd8e627a48" - dependencies: - "@types/rx-core" "*" - "@types/rx-core-binding" "*" - "@types/rx-lite" "*" - "@types/rx-lite-aggregates" "*" - "@types/rx-lite-async" "*" - "@types/rx-lite-backpressure" "*" - "@types/rx-lite-coincidence" "*" - "@types/rx-lite-experimental" "*" - "@types/rx-lite-joinpatterns" "*" - "@types/rx-lite-testing" "*" - "@types/rx-lite-time" "*" - "@types/rx-lite-virtualtime" "*" - -"@types/sanitize-html@~1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@types/sanitize-html/-/sanitize-html-1.18.0.tgz#de5cb560a41308ea8474e93b9d10bbb4050692f5" - -"@types/semver@^5.5.0": - version "5.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" +"@types/semver@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.0.0.tgz#86ba89f02a414e39c68d02b351872e4ed31bd773" + integrity sha512-OO0srjOGH99a4LUN2its3+r6CBYcplhJ466yLqs+zvAWgphCpS8hYZEZ797tRDP/QKcqTdb/YCN6ifASoAWkrQ== "@types/shelljs@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632" + version "0.8.5" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.5.tgz#1e507b2f6d1f893269bd3e851ec24419ef9beeea" + integrity sha512-bZgjwIWu9gHCjirKJoOlLzGi5N0QgZ5t7EXEuoqyWCHTuSddURXo3FOBYDyRPNOWzZ6NbkLvZnVkn483Y/tvcQ== dependencies: "@types/glob" "*" "@types/node" "*" +"@types/stack-utils@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" + integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== + "@types/tapable@*": version "1.0.4" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370" + integrity sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ== -"@types/text-encoding@0.0.33": - version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/text-encoding/-/text-encoding-0.0.33.tgz#67618d2da2cb6055c16c7caa2e967c1c6d1e7600" +"@types/tern@*": + version "0.23.3" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.3.tgz#4b54538f04a88c9ff79de1f6f94f575a7f339460" + integrity sha512-imDtS4TAoTcXk0g7u4kkWqedB3E4qpjXzCpD2LU5M5NAXHzCDsypyvXSaG7mM8DKYkCRa7tFp4tS/lp/Wo7Q3w== + dependencies: + "@types/estree" "*" + +"@types/text-encoding@^0.0.35": + version "0.0.35" + resolved "https://registry.yarnpkg.com/@types/text-encoding/-/text-encoding-0.0.35.tgz#6f14474e0b232bc70c59677aadc65dcc5a99c3a9" + integrity sha512-jfo/A88XIiAweUa8np+1mPbm3h2w0s425YrI8t3wk5QxhH6UI7w517MboNVnGDeMSuoFwA8Rwmklno+FicvV4g== "@types/through@*": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.29.tgz#72943aac922e179339c651fa34a4428a4d722f93" + integrity sha512-9a7C5VHh+1BKblaYiq+7Tfc+EOmjMdZaD1MYtkQjSoxgB69tBjW98ry6SKsi4zEIWztLOMRuL87A3bdT/Fc/4w== dependencies: "@types/node" "*" "@types/uglify-js@*": version "3.0.4" resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082" + integrity sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ== dependencies: source-map "^0.6.1" -"@types/webpack-env@~1.13.6": - version "1.13.6" - resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.13.6.tgz#128d1685a7c34d31ed17010fc87d6a12c1de6976" +"@types/webpack-env@^1.13.9": + version "1.13.9" + resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.13.9.tgz#a67287861c928ebf4159a908d1fb1a2a34d4097a" + integrity sha512-p8zp5xqkly3g4cCmo2mKOHI9+Z/kObmDj0BmjbDDJQlgDTiEGTbm17MEwTAusV6XceCy+bNw9q/ZHXHyKo3zkg== -"@types/webpack@*", "@types/webpack@^4.4.17": - version "4.4.17" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.17.tgz#3da3e0823a051311ba510bdc32354888921fc8b4" +"@types/webpack@*", "@types/webpack@^4.4.32": + version "4.4.32" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.32.tgz#2d460cd33a15e568e93f38de5e628cf846396c51" + integrity sha512-mNARoaSJTzbiHxtZbf9NULFilu2frqD+g9Iyl9V2jPYJWXi+AC3Hz8lQWPZ5LLtgUm7iF4SDDMB/1bPrbRQgFw== dependencies: + "@types/anymatch" "*" "@types/node" "*" "@types/tapable" "*" "@types/uglify-js" "*" @@ -974,153 +2052,181 @@ "@types/ws@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-6.0.1.tgz#ca7a3f3756aa12f62a0a62145ed14c6db25d5a28" + integrity sha512-EzH8k1gyZ4xih/MaZTXwT2xOkPiIMSrhQ9b8wrlX88L0T02eYsddatQlwVFlEPyEqV0ChpdpNnE51QPH6NVT4Q== dependencies: "@types/events" "*" "@types/node" "*" -"@webassemblyjs/ast@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.12.tgz#a9acbcb3f25333c4edfa1fdf3186b1ccf64e6664" +"@types/yargs@^12.0.2", "@types/yargs@^12.0.9": + version "12.0.12" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" + integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== + +"@webassemblyjs/ast@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" + integrity sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ== dependencies: - "@webassemblyjs/helper-module-context" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/wast-parser" "1.5.12" - debug "^3.1.0" - mamacro "^0.0.3" + "@webassemblyjs/helper-module-context" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/wast-parser" "1.8.5" -"@webassemblyjs/floating-point-hex-parser@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.12.tgz#0f36044ffe9652468ce7ae5a08716a4eeff9cd9c" +"@webassemblyjs/floating-point-hex-parser@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz#1ba926a2923613edce496fd5b02e8ce8a5f49721" + integrity sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ== -"@webassemblyjs/helper-api-error@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.12.tgz#05466833ff2f9d8953a1a327746e1d112ea62aaf" +"@webassemblyjs/helper-api-error@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz#c49dad22f645227c5edb610bdb9697f1aab721f7" + integrity sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA== -"@webassemblyjs/helper-buffer@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.12.tgz#1f0de5aaabefef89aec314f7f970009cd159c73d" - dependencies: - debug "^3.1.0" +"@webassemblyjs/helper-buffer@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz#fea93e429863dd5e4338555f42292385a653f204" + integrity sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q== -"@webassemblyjs/helper-code-frame@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.12.tgz#3cdc1953093760d1c0f0caf745ccd62bdb6627c7" +"@webassemblyjs/helper-code-frame@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz#9a740ff48e3faa3022b1dff54423df9aa293c25e" + integrity sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ== dependencies: - "@webassemblyjs/wast-printer" "1.5.12" + "@webassemblyjs/wast-printer" "1.8.5" -"@webassemblyjs/helper-fsm@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.12.tgz#6bc1442b037f8e30f2e57b987cee5c806dd15027" +"@webassemblyjs/helper-fsm@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz#ba0b7d3b3f7e4733da6059c9332275d860702452" + integrity sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow== -"@webassemblyjs/helper-module-context@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.12.tgz#b5588ca78b33b8a0da75f9ab8c769a3707baa861" +"@webassemblyjs/helper-module-context@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz#def4b9927b0101dc8cbbd8d1edb5b7b9c82eb245" + integrity sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g== dependencies: - debug "^3.1.0" + "@webassemblyjs/ast" "1.8.5" mamacro "^0.0.3" -"@webassemblyjs/helper-wasm-bytecode@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.12.tgz#d12a3859db882a448891a866a05d0be63785b616" +"@webassemblyjs/helper-wasm-bytecode@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz#537a750eddf5c1e932f3744206551c91c1b93e61" + integrity sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ== -"@webassemblyjs/helper-wasm-section@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.12.tgz#ff9fe1507d368ad437e7969d25e8c1693dac1884" +"@webassemblyjs/helper-wasm-section@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz#74ca6a6bcbe19e50a3b6b462847e69503e6bfcbf" + integrity sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA== dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-buffer" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/wasm-gen" "1.5.12" - debug "^3.1.0" + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-buffer" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/wasm-gen" "1.8.5" -"@webassemblyjs/ieee754@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.5.12.tgz#ee9574bc558888f13097ce3e7900dff234ea19a4" +"@webassemblyjs/ieee754@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz#712329dbef240f36bf57bd2f7b8fb9bf4154421e" + integrity sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g== dependencies: - ieee754 "^1.1.11" + "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.5.12.tgz#0308eec652765ee567d8a5fa108b4f0b25b458e1" +"@webassemblyjs/leb128@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.8.5.tgz#044edeb34ea679f3e04cd4fd9824d5e35767ae10" + integrity sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A== dependencies: - leb "^0.3.0" + "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.5.12.tgz#d5916222ef314bf60d6806ed5ac045989bfd92ce" +"@webassemblyjs/utf8@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.8.5.tgz#a8bf3b5d8ffe986c7c1e373ccbdc2a0915f0cedc" + integrity sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw== -"@webassemblyjs/wasm-edit@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.12.tgz#821c9358e644a166f2c910e5af1b46ce795a17aa" +"@webassemblyjs/wasm-edit@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz#962da12aa5acc1c131c81c4232991c82ce56e01a" + integrity sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-buffer" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/helper-wasm-section" "1.8.5" + "@webassemblyjs/wasm-gen" "1.8.5" + "@webassemblyjs/wasm-opt" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + "@webassemblyjs/wast-printer" "1.8.5" + +"@webassemblyjs/wasm-gen@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz#54840766c2c1002eb64ed1abe720aded714f98bc" + integrity sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg== dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-buffer" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/helper-wasm-section" "1.5.12" - "@webassemblyjs/wasm-gen" "1.5.12" - "@webassemblyjs/wasm-opt" "1.5.12" - "@webassemblyjs/wasm-parser" "1.5.12" - "@webassemblyjs/wast-printer" "1.5.12" - debug "^3.1.0" + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/ieee754" "1.8.5" + "@webassemblyjs/leb128" "1.8.5" + "@webassemblyjs/utf8" "1.8.5" -"@webassemblyjs/wasm-gen@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.12.tgz#0b7ccfdb93dab902cc0251014e2e18bae3139bcb" +"@webassemblyjs/wasm-opt@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz#b24d9f6ba50394af1349f510afa8ffcb8a63d264" + integrity sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q== dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/ieee754" "1.5.12" - "@webassemblyjs/leb128" "1.5.12" - "@webassemblyjs/utf8" "1.5.12" + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-buffer" "1.8.5" + "@webassemblyjs/wasm-gen" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" -"@webassemblyjs/wasm-opt@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.12.tgz#bd758a8bc670f585ff1ae85f84095a9e0229cbc9" +"@webassemblyjs/wasm-parser@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz#21576f0ec88b91427357b8536383668ef7c66b8d" + integrity sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw== dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-buffer" "1.5.12" - "@webassemblyjs/wasm-gen" "1.5.12" - "@webassemblyjs/wasm-parser" "1.5.12" - debug "^3.1.0" + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-api-error" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/ieee754" "1.8.5" + "@webassemblyjs/leb128" "1.8.5" + "@webassemblyjs/utf8" "1.8.5" -"@webassemblyjs/wasm-parser@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.12.tgz#7b10b4388ecf98bd7a22e702aa62ec2f46d0c75e" - dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-api-error" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/ieee754" "1.5.12" - "@webassemblyjs/leb128" "1.5.12" - "@webassemblyjs/utf8" "1.5.12" - -"@webassemblyjs/wast-parser@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.5.12.tgz#9cf5ae600ecae0640437b5d4de5dd6b6088d0d8b" - dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/floating-point-hex-parser" "1.5.12" - "@webassemblyjs/helper-api-error" "1.5.12" - "@webassemblyjs/helper-code-frame" "1.5.12" - "@webassemblyjs/helper-fsm" "1.5.12" - long "^3.2.0" - mamacro "^0.0.3" +"@webassemblyjs/wast-parser@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz#e10eecd542d0e7bd394f6827c49f3df6d4eefb8c" + integrity sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/floating-point-hex-parser" "1.8.5" + "@webassemblyjs/helper-api-error" "1.8.5" + "@webassemblyjs/helper-code-frame" "1.8.5" + "@webassemblyjs/helper-fsm" "1.8.5" + "@xtuc/long" "4.2.2" -"@webassemblyjs/wast-printer@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.5.12.tgz#563ca4d01b22d21640b2463dc5e3d7f7d9dac520" +"@webassemblyjs/wast-printer@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz#114bbc481fd10ca0e23b3560fa812748b0bae5bc" + integrity sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg== dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/wast-parser" "1.5.12" - long "^3.2.0" + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/wast-parser" "1.8.5" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== JSONStream@^1.0.4, JSONStream@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.4.tgz#615bb2adb0cd34c8f4c447b5f6512fa1d8f16a2e" + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== dependencies: jsonparse "^1.2.0" through ">=2.2.7 <3" @@ -1128,187 +2234,184 @@ JSONStream@^1.0.4, JSONStream@^1.3.4: abab@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" + integrity sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w== + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abbrev@1, abbrev@1.0.x: +abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= accepts@~1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" + mime-types "~2.1.24" + negotiator "0.6.2" -acorn-dynamic-import@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" - dependencies: - acorn "^5.0.0" +acorn-dynamic-import@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" + integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== acorn-globals@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" - dependencies: - acorn "^5.0.0" - -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + version "4.3.2" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.2.tgz#4e2c2313a597fd589720395f6354b41cd5ec8006" + integrity sha512-BbzvZhVtZP+Bs1J1HcwrQe8ycfO0wStkSGxuul3He3GkHOIZ6eTqOkPuw9IP1X3+IkOo4wiJmwkobzXYz4wewQ== dependencies: - acorn "^3.0.4" + acorn "^6.0.1" + acorn-walk "^6.0.1" -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +acorn-jsx@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" + integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== -acorn@^5.0.0, acorn@^5.5.0, acorn@^5.5.3, acorn@^5.6.2: - version "5.7.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.2.tgz#91fa871883485d06708800318404e72bfb26dcc5" +acorn-walk@^6.0.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" + integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== -acorn@^5.2.1: +acorn@^5.2.1, acorn@^5.5.3: version "5.7.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -addressparser@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-1.0.1.tgz#47afbe1a2a9262191db6838e4fd1d39b40821746" +acorn@^6.0.1, acorn@^6.0.5, acorn@^6.0.7: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" + integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -agent-base@4, agent-base@^4.1.0, agent-base@^4.2.0, agent-base@~4.2.0: +agent-base@4, agent-base@^4.1.0, agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== dependencies: es6-promisify "^5.0.0" agentkeepalive@^3.4.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.1.tgz#4eba75cf2ad258fc09efd506cdb8d8c2971d35a4" + version "3.5.2" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" + integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== dependencies: humanize-ms "^1.2.1" ajv-errors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59" - -ajv-keywords@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== ajv-keywords@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" + version "3.4.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.0.tgz#4b831e7b531415a7cc518cd404e73f6193c6349d" + integrity sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw== -ajv@^5.0.0, ajv@^5.2.3, ajv@^5.3.0: +ajv@^5.0.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.1.0: - version "6.5.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.5.5: - version "6.5.5" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.5.tgz#cf97cdade71c6399a92c6d6c4177381291b781a1" +ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1: + version "6.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" + integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= -amqplib@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/amqplib/-/amqplib-0.5.2.tgz#d2d7313c7ffaa4d10bcf1e6252de4591b6cc7b63" - dependencies: - bitsyntax "~0.0.4" - bluebird "^3.4.6" - buffer-more-ints "0.0.2" - readable-stream "1.x >=1.1.9" - safe-buffer "^5.0.1" - -ansi-escapes@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== -ansi-escapes@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" +ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.0.0, ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-styles@^2.1.0, ansi-styles@^2.2.1: +ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" any-observable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" + integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== dependencies: micromatch "^3.1.4" normalize-path "^2.1.1" -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" +append-transform@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" + integrity sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw== dependencies: - default-require-extensions "^1.0.0" + default-require-extensions "^2.0.0" aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== aproba@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -1316,80 +2419,81 @@ are-we-there-yet@~1.1.2: argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= -arr-flatten@^1.0.1, arr-flatten@^1.1.0: +arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= array-differ@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + integrity sha1-7/UuN1gknTO+QCuLuOVkuytdQDE= array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" - -array-slice@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= dependencies: array-uniq "^1.0.1" array-uniq@^1.0.1, array-uniq@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= arraybuffer.slice@~0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675" + integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog== arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= asap@^2.0.0, asap@~2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= asn1.js@^4.0.0: version "4.10.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== dependencies: bn.js "^4.0.0" inherits "^2.0.1" @@ -1398,129 +2502,103 @@ asn1.js@^4.0.0: asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== dependencies: safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== dependencies: + object-assign "^4.1.1" util "0.10.3" -assertion-error@^1.0.1: +assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= -ast-types@0.9.6, ast-types@0.x.x: +ast-types@0.9.6: version "0.9.6" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.6.tgz#102c9e9e9005d3e7e3829bf0c4fa24ee862ee9b9" + integrity sha1-ECyenpAF0+fjgpvwxPok7oYu6bk= astral-regex@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== -async-limiter@~1.0.0: +async-limiter@^1.0.0, async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== -async@1.x, async@^1.4.0: +async@1.x: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= -async@^2.0.0, async@^2.1.4, async@^2.3.0, async@^2.5.0, async@~2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" +async@^2.0.0, async@^2.5.0, async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" + integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== dependencies: - lodash "^4.17.10" + lodash "^4.17.11" asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob-lite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" + integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY= atob@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - -autoprefixer@^6.3.1: - version "6.7.7" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" - dependencies: - browserslist "^1.7.6" - caniuse-db "^1.0.30000634" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^5.2.16" - postcss-value-parser "^3.2.3" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= -aws4@^1.2.1, aws4@^1.8.0: +aws4@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - -axios@^0.15.3: - version "0.15.3" - resolved "http://registry.npmjs.org/axios/-/axios-0.15.3.tgz#2c9d638b2e191a08ea1d6cc988eadd6ba5bdc053" - dependencies: - follow-redirects "1.0.0" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= dependencies: chalk "^1.1.3" esutils "^2.0.2" js-tokens "^3.0.2" -babel-core@^6.0.0, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.18.0, babel-generator@^6.26.0: +babel-generator@^6.18.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" @@ -1531,79 +2609,62 @@ babel-generator@^6.18.0, babel-generator@^6.26.0: source-map "^0.5.7" trim-right "^1.0.1" -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-jest@^23.4.2: - version "23.4.2" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-23.4.2.tgz#f276de67798a5d68f2d6e87ff518c2f6e1609877" - dependencies: - babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.2.0" - -babel-jest@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" - dependencies: - babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.2.0" +babel-jest@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.8.0.tgz#5c15ff2b28e20b0f45df43fe6b7f2aae93dba589" + integrity sha512-+5/kaZt4I9efoXzPlZASyK/lN9qdRKmmUav9smVc0ruPQD7IsfucQ87gpOE8mn2jbDuS6M/YOW6n3v9ZoIfgnw== + dependencies: + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + "@types/babel__core" "^7.1.0" + babel-plugin-istanbul "^5.1.0" + babel-preset-jest "^24.6.0" + chalk "^2.4.2" + slash "^2.0.0" babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@^4.1.6: - version "4.1.6" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" +babel-plugin-istanbul@^5.1.0: + version "5.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.4.tgz#841d16b9a58eeb407a0ddce622ba02fe87a752ba" + integrity sha512-dySz4VJMH+dpndj0wjJ8JPs/7i1TdSPb1nRrn56/92pKOF9VKC1FMFJmMXjzlGGusnCAqujP6PBCiKq0sVA+YQ== dependencies: - babel-plugin-syntax-object-rest-spread "^6.13.0" - find-up "^2.1.0" - istanbul-lib-instrument "^1.10.1" - test-exclude "^4.2.1" - -babel-plugin-jest-hoist@^23.2.0: - version "23.2.0" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" - -babel-plugin-syntax-object-rest-spread@^6.13.0: - version "6.13.0" - resolved "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + find-up "^3.0.0" + istanbul-lib-instrument "^3.3.0" + test-exclude "^5.2.3" -babel-preset-jest@^23.2.0: - version "23.2.0" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" +babel-plugin-jest-hoist@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.6.0.tgz#f7f7f7ad150ee96d7a5e8e2c5da8319579e78019" + integrity sha512-3pKNH6hMt9SbOv0F3WVmy5CWQ4uogS3k0GY5XLyQHJ9EGpAT9XWkFd2ZiXXtkwFHdAHa5j7w7kfxSP5lAIwu7w== dependencies: - babel-plugin-jest-hoist "^23.2.0" - babel-plugin-syntax-object-rest-spread "^6.13.0" + "@types/babel__traverse" "^7.0.6" -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" +babel-preset-jest@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.6.0.tgz#66f06136eefce87797539c0d63f1769cc3915984" + integrity sha512-pdZqLEdmy1ZK5kyRUfvBb2IfTPb2BUvIJczlPspS8fWmBQslNNDBqVfh7BW5leOVJMDZKzjD8XEyABTk6gQ5yw== dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + babel-plugin-jest-hoist "^24.6.0" -babel-runtime@6.x.x, babel-runtime@^6.0.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0, babel-runtime@^6.6.1: +babel-runtime@^6.0.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0, babel-runtime@^6.6.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: +babel-template@^6.16.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= dependencies: babel-runtime "^6.26.0" babel-traverse "^6.26.0" @@ -1611,9 +2672,10 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: +babel-traverse@^6.18.0, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= dependencies: babel-code-frame "^6.26.0" babel-messages "^6.23.0" @@ -1625,9 +2687,10 @@ babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: +babel-types@^6.18.0, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= dependencies: babel-runtime "^6.26.0" esutils "^2.0.2" @@ -1637,42 +2700,47 @@ babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== backo2@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" - -balanced-match@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base16@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" + integrity sha1-4pf2DX7BAUp6lxo568ipjAtoHnA= base62@^1.1.0: version "1.2.8" resolved "https://registry.yarnpkg.com/base62/-/base62-1.2.8.tgz#1264cb0fb848d875792877479dbe8bae6bae3428" + integrity sha512-V6YHUbjLxN1ymqNLb1DPHoU1CpfdL7d2YTIp5W3U4hhoG4hhxNmsFDs66M9EXxBiSEke5Bt5dwdfMwwZF70iLA== base64-arraybuffer@0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= base64-js@^1.0.2: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" + integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== base64id@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + integrity sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY= base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== dependencies: cache-base "^1.0.1" class-utils "^0.3.5" @@ -1685,106 +2753,90 @@ base@^0.11.1: bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= dependencies: tweetnacl "^0.14.3" +before-after-hook@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.4.0.tgz#2b6bf23dca4f32e628fd2747c10a37c74a4b484d" + integrity sha512-l5r9ir56nda3qu14nAXIlyq1MmUSs0meCIaFAh8HwkFwP1F8eToOuS3ah2VAHHcY04jaYD7FpJC5JTXHYRbkzg== + better-assert@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + integrity sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI= dependencies: callsite "1.0.0" big.js@^3.1.3: version "3.2.0" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== -binary-extensions@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" - -bitsyntax@~0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/bitsyntax/-/bitsyntax-0.0.4.tgz#eb10cc6f82b8c490e3e85698f07e83d46e0cba82" - dependencies: - buffer-more-ints "0.0.2" +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -bl@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398" - dependencies: - readable-stream "~2.0.5" +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== blacklist@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/blacklist/-/blacklist-1.1.4.tgz#b2dd09d6177625b2caa69835a37b28995fa9a2f2" + integrity sha1-st0J1hd2JbLKppg1o3somV+povI= -blob@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" +blob@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" + integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== -bluebird@^3.3.0, bluebird@^3.4.6, bluebird@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.2.tgz#1be0908e054a751754549c270489c1505d4ab15a" +bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3: + version "3.5.4" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714" + integrity sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== body-parser@^1.16.1: - version "1.18.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== dependencies: - bytes "3.0.0" + bytes "3.1.0" content-type "~1.0.4" debug "2.6.9" depd "~1.1.2" - http-errors "~1.6.3" - iconv-lite "0.4.23" + http-errors "1.7.2" + iconv-lite "0.4.24" on-finished "~2.3.0" - qs "6.5.2" - raw-body "2.3.3" - type-is "~1.6.16" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" boolbase@^1.0.0, boolbase@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^0.1.2: - version "0.1.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" - dependencies: - expand-range "^0.1.0" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.0, braces@^2.3.1: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== dependencies: arr-flatten "^1.1.0" array-unique "^0.3.2" @@ -1797,27 +2849,39 @@ braces@^2.3.0, braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= browser-process-hrtime@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" + version "0.1.3" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" + integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== browser-resolve@^1.11.3: version "1.11.3" - resolved "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== dependencies: resolve "1.1.7" -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== dependencies: buffer-xor "^1.0.3" cipher-base "^1.0.0" @@ -1829,6 +2893,7 @@ browserify-aes@^1.0.0, browserify-aes@^1.0.4: browserify-cipher@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== dependencies: browserify-aes "^1.0.4" browserify-des "^1.0.0" @@ -1837,6 +2902,7 @@ browserify-cipher@^1.0.0: browserify-des@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== dependencies: cipher-base "^1.0.1" des.js "^1.0.0" @@ -1846,6 +2912,7 @@ browserify-des@^1.0.0: browserify-rsa@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= dependencies: bn.js "^4.1.0" randombytes "^2.0.1" @@ -1853,6 +2920,7 @@ browserify-rsa@^4.0.0: browserify-sign@^4.0.0: version "4.0.4" resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= dependencies: bn.js "^4.1.1" browserify-rsa "^4.0.0" @@ -1865,29 +2933,47 @@ browserify-sign@^4.0.0: browserify-zlib@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== dependencies: pako "~1.0.5" -browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" +browserslist@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.0.tgz#5274028c26f4d933d5b1323307c1d1da5084c9ff" + integrity sha512-Jk0YFwXBuMOOol8n6FhgkDzn3mY9PYLYGk29zybF05SbRTsMgPqmTNeQQhOghCxq5oFqAXE3u4sYddr4C0uRhg== + dependencies: + caniuse-lite "^1.0.30000967" + electron-to-chromium "^1.3.133" + node-releases "^1.1.19" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" + fast-json-stable-stringify "2.x" bser@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= dependencies: node-int64 "^0.4.0" +btoa-lite@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" + integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= + buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== buffer-alloc@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== dependencies: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" @@ -1895,103 +2981,81 @@ buffer-alloc@^1.2.0: buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= -buffer-from@^1.0.0: +buffer-from@1.x, buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - -buffer-more-ints@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/buffer-more-ints/-/buffer-more-ints-0.0.2.tgz#26b3885d10fa13db7fc01aae3aab870199e0124c" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= buffer@^4.3.0: version "4.9.1" - resolved "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" isarray "^1.0.0" -buildmail@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/buildmail/-/buildmail-4.0.1.tgz#877f7738b78729871c9a105e3b837d2be11a7a72" - dependencies: - addressparser "1.0.1" - libbase64 "0.1.0" - libmime "3.0.0" - libqp "1.1.0" - nodemailer-fetch "1.6.0" - nodemailer-shared "1.1.0" - punycode "1.4.1" - -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" + integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= byline@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= byte-size@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-4.0.3.tgz#b7c095efc68eadf82985fccd9a2df43a74fa2ccd" - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + version "4.0.4" + resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-4.0.4.tgz#29d381709f41aae0d89c631f1c81aec88cd40b23" + integrity sha512-82RPeneC6nqCdSwCX2hZUz3JPOvN5at/nTEw/CMf05Smu3Hrpo9Psb7LjN+k+XndNArG1EY8L4+BM3aTM4BCvw== -cacache@^10.0.4: - version "10.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" - dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.1" - mississippi "^2.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.2" - ssri "^5.2.4" - unique-filename "^1.1.0" - y18n "^4.0.0" +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@^11.0.1, cacache@^11.0.2: - version "11.2.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.2.0.tgz#617bdc0b02844af56310e411c0878941d5739965" +cacache@^11.0.1, cacache@^11.3.2: + version "11.3.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa" + integrity sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg== dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - figgy-pudding "^3.1.0" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.3" + bluebird "^3.5.3" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.3" + graceful-fs "^4.1.15" + lru-cache "^5.1.1" mississippi "^3.0.0" mkdirp "^0.5.1" move-concurrently "^1.0.1" promise-inflight "^1.0.1" rimraf "^2.6.2" - ssri "^6.0.0" - unique-filename "^1.1.0" + ssri "^6.0.1" + unique-filename "^1.1.1" y18n "^4.0.0" cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== dependencies: collection-visit "^1.0.0" component-emitter "^1.2.1" @@ -2003,43 +3067,57 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" +cacheable-request@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.0.0.tgz#4a1727414e02ac4af82560c4da1b61daa3fa2b63" + integrity sha512-2N7AmszH/WPPpl5Z3XMw1HAP+8d+xugnKQAeKvxFZ/04dbT/CAznqwbl+7eSr3HkwdepNwtb2yx3CAMQWvG01Q== dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" + clone-response "^1.0.2" + get-stream "^4.0.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^1.0.1" + normalize-url "^3.1.0" + responselike "^1.0.2" call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= dependencies: - callsites "^0.2.0" + caller-callsite "^2.0.0" callsite@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + integrity sha1-KAOY5dZkvXQDi28JBRU+borxvCA= callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camel-case@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= dependencies: no-case "^2.2.0" upper-case "^1.1.1" @@ -2047,6 +3125,7 @@ camel-case@3.0.x: camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= dependencies: camelcase "^2.0.0" map-obj "^1.0.0" @@ -2054,81 +3133,60 @@ camelcase-keys@^2.0.0: camelcase-keys@^4.0.0: version "4.2.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" + integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= dependencies: camelcase "^4.1.0" map-obj "^2.0.0" quick-lru "^1.0.0" -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -caniuse-api@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" - dependencies: - browserslist "^1.3.6" - caniuse-db "^1.0.30000529" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" +camelcase@^5.0.0, camelcase@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000884" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000884.tgz#d02b25dc885ffdf80434cf68b0941ea3161a4c8b" +caniuse-lite@^1.0.30000967: + version "1.0.30000971" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000971.tgz#d1000e4546486a6977756547352bc96a4cfd2b13" + integrity sha512-TQFYFhRS0O5rdsmSbF1Wn+16latXYsQJat66f7S7lizXW1PVpWJeZw9wqqVLIjuxDRz7s7xRUj13QCfd8hKn6g== -capture-exit@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== dependencies: - rsvp "^3.3.3" - -caseless@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + rsvp "^4.8.4" caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chai@~4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c" +chai@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" + integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== dependencies: - assertion-error "^1.0.1" - check-error "^1.0.1" - deep-eql "^3.0.0" + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" get-func-name "^2.0.0" - pathval "^1.0.0" - type-detect "^4.0.0" - -chalk@1.1.1: - version "1.1.1" - resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz#509afb67066e7499f7eb3535c77445772ae2d019" - dependencies: - ansi-styles "^2.1.0" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" + pathval "^1.1.0" + type-detect "^4.0.5" -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" - resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" @@ -2136,87 +3194,83 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -check-error@^1.0.1: +check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= child_process@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/child_process/-/child_process-1.0.2.tgz#b1f7e7fc73d25e7fd1d455adc94e143830182b5a" + integrity sha1-sffn/HPSXn/R1FWtyU4UODAYK1o= chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" + version "2.1.6" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" + integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g== dependencies: anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" + async-each "^1.0.1" + braces "^2.3.2" glob-parent "^3.1.0" - inherits "^2.0.1" + inherits "^2.0.3" is-binary-path "^1.0.0" is-glob "^4.0.0" - lodash.debounce "^4.0.8" - normalize-path "^2.1.1" + normalize-path "^3.0.0" path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.5" + readdirp "^2.2.1" + upath "^1.1.1" optionalDependencies: - fsevents "^1.2.2" + fsevents "^1.2.7" -chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" +chownr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== chrome-trace-event@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz#45a91bd2c20c9411f0963b5aaeb9a1b95e09cc48" + integrity sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A== dependencies: tslib "^1.9.0" -ci-info@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.4.0.tgz#4841d53cad49f11b827b648ebde27a6e189b412f" +ci-info@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" -circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" - -circular-json@^0.5.4: - version "0.5.5" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.5.5.tgz#64182ef359042d37cd8e767fc9de878b1e9447d3" - -clap@^1.0.9: - version "1.2.3" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" - dependencies: - chalk "^1.1.3" - class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== dependencies: arr-union "^3.1.0" define-property "^0.2.5" @@ -2226,28 +3280,26 @@ class-utils@^0.3.5: classnames@^2.2: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" + integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== clean-css@4.2.x: version "4.2.1" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17" + integrity sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g== dependencies: source-map "~0.6.0" -cli-cursor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - dependencies: - restore-cursor "^1.0.1" - -cli-cursor@^2.1.0: +cli-cursor@^2.0.0, cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= dependencies: restore-cursor "^2.0.0" cli-truncate@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + integrity sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ= dependencies: slice-ansi "0.0.4" string-width "^1.0.1" @@ -2255,40 +3307,47 @@ cli-truncate@^0.2.1: cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== dependencies: string-width "^2.1.1" strip-ansi "^4.0.0" wrap-ansi "^2.0.0" -clone-response@1.0.2: +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= dependencies: mimic-response "^1.0.0" clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -closest-file-data@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/closest-file-data/-/closest-file-data-0.1.4.tgz#975f87c132f299d24a0375b9f63ca3fb88f72b3a" +clone@~2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= cmd-shim@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" + integrity sha1-b8vamUg6j9FdfTChlspp1oii79s= dependencies: graceful-fs "^4.1.2" mkdirp "~0.5.0" @@ -2296,124 +3355,91 @@ cmd-shim@^2.0.2: co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -coa@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" - dependencies: - q "^1.1.2" - -coa@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.1.tgz#f3f8b0b15073e35d70263fb1042cb2c023db38af" +coa@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" + integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== dependencies: + "@types/q" "^1.5.1" + chalk "^2.4.1" q "^1.1.2" code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codemirror@~5.42.0: - version "5.42.0" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.42.0.tgz#2d5b640ed009e89dee9ed8a2a778e2a25b65f9eb" +codemirror@~5.47.0: + version "5.47.0" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.47.0.tgz#c13a521ae5660d3acc655af252f4955065293789" + integrity sha512-kV49Fr+NGFHFc/Imsx6g180hSlkGhuHxTSDDmDHOuyln0MQYFLixDY4+bFkBVeCEiepYfDimAF/e++9jPJk4QA== collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= dependencies: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.3.0, color-convert@^1.9.0: +color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" -color-name@1.1.3, color-name@^1.0.0: +color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-string@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" - dependencies: - color-name "^1.0.0" - -color@^0.11.0: - version "0.11.4" - resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" - dependencies: - clone "^1.0.2" - color-convert "^1.3.0" - color-string "^0.3.0" - -colormin@^1.0.5: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" - dependencies: - color "^0.11.0" - css-color-names "0.0.4" - has "^1.0.1" - -colors@^1.1.0, colors@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" +colors@^1.1.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" + integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" + integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= dependencies: strip-ansi "^3.0.0" wcwidth "^1.0.0" -combine-lists@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" - dependencies: - lodash "^4.5.0" - -combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5, combined-stream@~1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" -commander@2, commander@^2.12.1, commander@^2.14.1, commander@^2.9.0, commander@~2.18.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" +commander@2, commander@^2.10.0, commander@^2.12.1, commander@^2.14.1, commander@^2.19.0, commander@^2.5.0, commander@^2.9.0, commander@~2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== -commander@2.17.x, commander@~2.17.1: +commander@2.17.x: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== -commander@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - dependencies: - graceful-readlink ">= 1.0.0" - -commander@^2.5.0: +commander@~2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - -comment-json@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-1.1.3.tgz#6986c3330fee0c4c9e00c2398cd61afa5d8f239e" - dependencies: - json-parser "^1.0.0" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= commoner@^0.10.1: version "0.10.8" resolved "https://registry.yarnpkg.com/commoner/-/commoner-0.10.8.tgz#34fc3672cd24393e8bb47e70caa0293811f4f2c5" + integrity sha1-NPw2cs0kOT6LtH5wyqApOBH08sU= dependencies: commander "^2.5.0" detective "^4.3.1" @@ -2428,156 +3454,200 @@ commoner@^0.10.1: compare-func@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" + integrity sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg= dependencies: array-ify "^1.0.0" dot-prop "^3.0.0" +compare-versions@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.4.0.tgz#e0747df5c9cb7f054d6d3dc3e1dbc444f9e92b26" + integrity sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg== + component-bind@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + integrity sha1-AMYIq33Nk4l8AAllGx06jh5zu9E= -component-emitter@1.2.1, component-emitter@^1.2.1: +component-emitter@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== component-inherit@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@1.6.2, concat-stream@^1.5.0, concat-stream@^1.6.0: +concat-stream@1.6.2, concat-stream@^1.5.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: buffer-from "^1.0.0" inherits "^2.0.3" readable-stream "^2.2.2" typedarray "^0.0.6" +concat-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" + integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.0.2" + typedarray "^0.0.6" + config-chain@^1.1.11: - version "1.1.11" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" + version "1.1.12" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" + integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== dependencies: ini "^1.3.4" proto-list "~1.2.1" connect@^3.6.0: - version "3.6.6" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== dependencies: debug "2.6.9" - finalhandler "1.1.0" - parseurl "~1.3.2" + finalhandler "1.1.2" + parseurl "~1.3.3" utils-merge "1.0.1" console-browserify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= dependencies: date-now "^0.1.4" console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -conventional-changelog-angular@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.1.tgz#f96431b76de453333a909decd02b15cb5bd2d364" +conventional-changelog-angular@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.3.tgz#299fdd43df5a1f095283ac16aeedfb0a682ecab0" + integrity sha512-YD1xzH7r9yXQte/HF9JBuEDfvjxxwDGGwZU1+ndanbY0oFgA+Po1T9JDSpPLdP0pZT6MhCAsdvFKC4TJ4MTJTA== dependencies: compare-func "^1.3.1" q "^1.5.1" -conventional-changelog-core@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.1.0.tgz#96a81bb3301b4b2a3dc2851cc54c5fb674ac1942" +conventional-changelog-core@^3.1.6: + version "3.2.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.2.tgz#de41e6b4a71011a18bcee58e744f6f8f0e7c29c0" + integrity sha512-cssjAKajxaOX5LNAJLB+UOcoWjAIBvXtDMedv/58G+YEmAXMNfC16mmPl0JDOuVJVfIqM0nqQiZ8UCm8IXbE0g== dependencies: - conventional-changelog-writer "^4.0.0" - conventional-commits-parser "^3.0.0" + conventional-changelog-writer "^4.0.5" + conventional-commits-parser "^3.0.2" dateformat "^3.0.0" get-pkg-repo "^1.0.0" - git-raw-commits "^2.0.0" + git-raw-commits "2.0.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^2.0.0" + git-semver-tags "^2.0.2" lodash "^4.2.1" normalize-package-data "^2.3.5" q "^1.5.1" - read-pkg "^1.1.0" - read-pkg-up "^1.0.1" - through2 "^2.0.0" + read-pkg "^3.0.0" + read-pkg-up "^3.0.0" + through2 "^3.0.0" -conventional-changelog-preset-loader@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.1.tgz#d134734e0cc1b91b88b30586c5991f31442029f1" +conventional-changelog-preset-loader@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.1.1.tgz#65bb600547c56d5627d23135154bcd9a907668c4" + integrity sha512-K4avzGMLm5Xw0Ek/6eE3vdOXkqnpf9ydb68XYmCc16cJ99XMMbc2oaNMuPwAsxVK6CC1yA4/I90EhmWNj0Q6HA== -conventional-changelog-writer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.0.tgz#3ed983c8ef6a3aa51fe44e82c9c75e86f1b5aa42" +conventional-changelog-writer@^4.0.5: + version "4.0.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.6.tgz#24db578ac8e7c89a409ef9bba12cf3c095990148" + integrity sha512-ou/sbrplJMM6KQpR5rKFYNVQYesFjN7WpNGdudQSWNi6X+RgyFUcSv871YBYkrUYV9EX8ijMohYVzn9RUb+4ag== dependencies: compare-func "^1.3.1" - conventional-commits-filter "^2.0.0" + conventional-commits-filter "^2.0.2" dateformat "^3.0.0" - handlebars "^4.0.2" + handlebars "^4.1.0" json-stringify-safe "^5.0.1" lodash "^4.2.1" meow "^4.0.0" - semver "^5.5.0" + semver "^6.0.0" split "^1.0.0" - through2 "^2.0.0" + through2 "^3.0.0" -conventional-commits-filter@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.0.tgz#a0ce1d1ff7a1dd7fab36bee8e8256d348d135651" +conventional-commits-filter@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz#f122f89fbcd5bb81e2af2fcac0254d062d1039c1" + integrity sha512-WpGKsMeXfs21m1zIw4s9H5sys2+9JccTzpN6toXtxhpw2VNF2JUXwIakthKBy+LN4DvJm+TzWhxOMWOs1OFCFQ== dependencies: - is-subset "^0.1.1" + lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.0.tgz#7f604549a50bd8f60443fbe515484b1c2f06a5c4" +conventional-commits-parser@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.3.tgz#c3f972fd4e056aa8b9b4f5f3d0e540da18bf396d" + integrity sha512-KaA/2EeUkO4bKjinNfGUyqPTX/6w9JGshuQRik4r/wJz7rUw3+D3fDG6sZSEqJvKILzKXFQuFkpPLclcsAuZcg== dependencies: JSONStream "^1.0.4" - is-text-path "^1.0.0" + is-text-path "^2.0.0" lodash "^4.2.1" meow "^4.0.0" split2 "^2.0.0" - through2 "^2.0.0" + through2 "^3.0.0" trim-off-newlines "^1.0.0" -conventional-recommended-bump@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-4.0.1.tgz#304a45a412cfec050a10ea2e7e4a89320eaf3991" - dependencies: - concat-stream "^1.6.0" - conventional-changelog-preset-loader "^2.0.1" - conventional-commits-filter "^2.0.0" - conventional-commits-parser "^3.0.0" - git-raw-commits "^2.0.0" - git-semver-tags "^2.0.0" +conventional-recommended-bump@^4.0.4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-4.1.1.tgz#37014fadeda267d0607e2fc81124da840a585127" + integrity sha512-JT2vKfSP9kR18RXXf55BRY1O3AHG8FPg5btP3l7LYfcWJsiXI6MCf30DepQ98E8Qhowvgv7a8iev0J1bEDkTFA== + dependencies: + concat-stream "^2.0.0" + conventional-changelog-preset-loader "^2.1.1" + conventional-commits-filter "^2.0.2" + conventional-commits-parser "^3.0.2" + git-raw-commits "2.0.0" + git-semver-tags "^2.0.2" meow "^4.0.0" q "^1.5.1" -convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" +convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== + dependencies: + safe-buffer "~5.1.1" cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== dependencies: aproba "^1.1.1" fs-write-stream-atomic "^1.0.8" @@ -2589,30 +3659,51 @@ copy-concurrently@^1.0.0: copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js-compat@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.1.2.tgz#c29ab9722517094b98622175e2218c3b7398176d" + integrity sha512-X0Ch5f6itrHxhg5HSJucX6nNLNAGr+jq+biBh6nPGc3YAWz2a8p/ZIZY8cUkDzSRNG54omAuu3hoEF8qZbu/6Q== + dependencies: + browserslist "^4.6.0" + core-js-pure "3.1.2" + semver "^6.0.0" + +core-js-pure@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.1.2.tgz#62fc435f35b7374b9b782013cdcb2f97e9f6dffa" + integrity sha512-5ckIdBF26B3ldK9PM177y2ZcATP2oweam9RskHSoqfZCrJ2As6wVg8zJ1zTriFsZf6clj/N1ThDFRGaomMsh9w== core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= -core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" +core-js@^2.2.0, core-js@^2.4.0: + version "2.6.8" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.8.tgz#dc3a1e633a04267944e0cb850d3880f340248139" + integrity sha512-RWlREFU74TEkdXzyl1bka66O3kYp8jeTXrvJZDzVVMH8AiHUSOFpL1yfhQJ+wHocAm1m+4971W1PPzfLuCv1vg== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.0.2: - version "5.0.6" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.6.tgz#dca6cf680a0bd03589aff684700858c81abeeb39" +cosmiconfig@^5.1.0, cosmiconfig@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== dependencies: + import-fresh "^2.0.0" is-directory "^0.3.1" - js-yaml "^3.9.0" + js-yaml "^3.13.1" parse-json "^4.0.0" create-ecdh@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== dependencies: bn.js "^4.1.0" elliptic "^6.0.0" @@ -2620,6 +3711,7 @@ create-ecdh@^4.0.0: create-hash@^1.1.0, create-hash@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== dependencies: cipher-base "^1.0.1" inherits "^2.0.1" @@ -2630,6 +3722,7 @@ create-hash@^1.1.0, create-hash@^1.1.2: create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== dependencies: cipher-base "^1.0.3" create-hash "^1.1.0" @@ -2641,29 +3734,24 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: create-react-class@^15.6.2: version "15.6.3" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036" + integrity sha512-M+/3Q6E6DLO6Yx3OwrWjwHBnvfXXYA7W+dFjt/ZDBemHO1DDZhsalX/NUtnTYclN6GfnBDRh4qRHjcDHmlJBJg== dependencies: fbjs "^0.8.9" loose-envify "^1.3.1" object-assign "^4.1.1" -create-react-context@^0.2.1: - version "0.2.3" - resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.3.tgz#9ec140a6914a22ef04b8b09b7771de89567cb6f3" +create-react-context@<=0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca" + integrity sha512-KkpaLARMhsTsgp0d2NA/R94F/eDLbhXERdIq3LvX2biCAXcDvHYoOqHfWCHf1+OLj+HKBotLG3KqaOOf+C1C+A== dependencies: fbjs "^0.8.0" gud "^1.0.0" -cross-spawn@^5.0.1, cross-spawn@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" @@ -2671,15 +3759,10 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== dependencies: browserify-cipher "^1.0.0" browserify-sign "^4.0.0" @@ -2693,327 +3776,303 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" -css-color-names@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - -css-loader@~0.28.7: - version "0.28.11" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.11.tgz#c3f9864a700be2711bb5a2462b2389b1a392dab7" - dependencies: - babel-code-frame "^6.26.0" - css-selector-tokenizer "^0.7.0" - cssnano "^3.10.0" - icss-utils "^2.1.0" - loader-utils "^1.0.2" - lodash.camelcase "^4.3.0" - object-assign "^4.1.1" - postcss "^5.0.6" - postcss-modules-extract-imports "^1.2.0" - postcss-modules-local-by-default "^1.2.0" - postcss-modules-scope "^1.1.0" - postcss-modules-values "^1.3.0" +css-loader@~2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea" + integrity sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w== + dependencies: + camelcase "^5.2.0" + icss-utils "^4.1.0" + loader-utils "^1.2.3" + normalize-path "^3.0.0" + postcss "^7.0.14" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^2.0.6" + postcss-modules-scope "^2.1.0" + postcss-modules-values "^2.0.0" postcss-value-parser "^3.3.0" - source-list-map "^2.0.0" + schema-utils "^1.0.0" -css-select-base-adapter@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.0.tgz#0102b3d14630df86c3eb9fa9f5456270106cf990" +css-select-base-adapter@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" + integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== css-select@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= dependencies: boolbase "~1.0.0" css-what "2.1" domutils "1.5.1" nth-check "~1.0.1" -css-select@~1.3.0-rc0: - version "1.3.0-rc0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.3.0-rc0.tgz#6f93196aaae737666ea1036a8cb14a8fcb7a9231" +css-select@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.0.2.tgz#ab4386cec9e1f668855564b17c3733b43b2a5ede" + integrity sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ== dependencies: boolbase "^1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "^1.0.1" + css-what "^2.1.2" + domutils "^1.7.0" + nth-check "^1.0.2" -css-selector-tokenizer@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" +css-tree@1.0.0-alpha.28: + version "1.0.0-alpha.28" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.28.tgz#8e8968190d886c9477bc8d61e96f61af3f7ffa7f" + integrity sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w== dependencies: - cssesc "^0.1.0" - fastparse "^1.1.1" - regexpu-core "^1.0.0" + mdn-data "~1.1.0" + source-map "^0.5.3" css-tree@1.0.0-alpha.29: version "1.0.0-alpha.29" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.29.tgz#3fa9d4ef3142cbd1c301e7664c1f352bd82f5a39" + integrity sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg== dependencies: mdn-data "~1.1.0" source-map "^0.5.3" -css-tree@1.0.0-alpha25: - version "1.0.0-alpha25" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha25.tgz#1bbfabfbf6eeef4f01d9108ff2edd0be2fe35597" - dependencies: - mdn-data "^1.0.0" - source-map "^0.5.3" - css-url-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/css-url-regex/-/css-url-regex-1.1.0.tgz#83834230cc9f74c457de59eebd1543feeb83b7ec" + integrity sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w= -css-what@2.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" +css-what@2.1, css-what@^2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== -cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano@^3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" - dependencies: - autoprefixer "^6.3.1" - decamelize "^1.1.2" - defined "^1.0.0" - has "^1.0.1" - object-assign "^4.0.1" - postcss "^5.0.14" - postcss-calc "^5.2.0" - postcss-colormin "^2.1.8" - postcss-convert-values "^2.3.4" - postcss-discard-comments "^2.0.4" - postcss-discard-duplicates "^2.0.1" - postcss-discard-empty "^2.0.1" - postcss-discard-overridden "^0.1.1" - postcss-discard-unused "^2.2.1" - postcss-filter-plugins "^2.0.0" - postcss-merge-idents "^2.1.5" - postcss-merge-longhand "^2.0.1" - postcss-merge-rules "^2.0.3" - postcss-minify-font-values "^1.0.2" - postcss-minify-gradients "^1.0.1" - postcss-minify-params "^1.0.4" - postcss-minify-selectors "^2.0.4" - postcss-normalize-charset "^1.1.0" - postcss-normalize-url "^3.0.7" - postcss-ordered-values "^2.1.0" - postcss-reduce-idents "^2.2.2" - postcss-reduce-initial "^1.0.0" - postcss-reduce-transforms "^1.0.3" - postcss-svgo "^2.1.1" - postcss-unique-selectors "^2.0.2" - postcss-value-parser "^3.2.3" - postcss-zindex "^2.0.1" - -csso@^3.5.0: +csso@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/csso/-/csso-3.5.1.tgz#7b9eb8be61628973c1b261e169d2f024008e758b" + integrity sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg== dependencies: css-tree "1.0.0-alpha.29" -csso@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" - dependencies: - clap "^1.0.9" - source-map "^0.5.3" - cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" + version "0.3.6" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.6.tgz#f85206cee04efa841f3c5982a74ba96ab20d65ad" + integrity sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A== cssstyle@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.1.1.tgz#18b038a9c44d65f7a8e428a653b9f6fe42faf5fb" + version "1.2.2" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.2.2.tgz#427ea4d585b18624f6fdbf9de7a2a1a3ba713077" + integrity sha512-43wY3kl1CVQSvL7wUY1qXkxVGkStjpkDmVjiIKX8R97uhajy8Bybay78uOtqvh7Q5GK75dNPfW0geWjE6qQQow== dependencies: cssom "0.3.x" -csstype@^2.2.0: - version "2.5.6" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.6.tgz#2ae1db2319642d8b80a668d2d025c6196071e788" - -csstype@^2.4.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.7.tgz#bf9235d5872141eccfb2d16d82993c6b149179ff" +csstype@^2.2.0, csstype@^2.4.0: + version "2.6.4" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.4.tgz#d585a6062096e324e7187f80e04f92bd0f00e37f" + integrity sha512-lAJUJP3M6HxFXbqtGRc0iZrdyeN+WzOWeY0q/VnFzI+kqVrYIzC7bWlKqCW7oCIdzoPkvfp82EVvrTlQ8zsWQg== csv-spectrum@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/csv-spectrum/-/csv-spectrum-1.0.0.tgz#591ac9ff48ad4f3eb4338457bc9801b349e3d628" + integrity sha1-WRrJ/0itTz60M4RXvJgBs0nj1ig= currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= dependencies: array-find-index "^1.0.1" custom-event@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= -d3-array@1, d3-array@^1.1.1, d3-array@^1.2.0, d3-array@^1.2.1: +d3-array@1, d3-array@^1.1.1: version "1.2.4" resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f" + integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw== -d3-collection@1, d3-collection@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e" +"d3-array@^1.2.0 || 2", d3-array@^2.0.3: + version "2.2.0" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.2.0.tgz#a9e966b8f8d78f0888d98db1fb840fc8da8ac5c7" + integrity sha512-eE0QmSh6xToqM3sxHiJYg/QFdNn52ZEgmFE8A8abU8GsHvsIOolqH8B70/8+VGAKm5MlwaExhqR3DLIjOJMLPA== -d3-color@1, d3-color@^1.2.0: +d3-color@1, d3-color@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.2.3.tgz#6c67bb2af6df3cc8d79efcc4d3a3e83e28c8048f" + integrity sha512-x37qq3ChOTLd26hnps36lexMRhNXEtVxZ4B25rL0DVdDsGQIJGB18S7y9XDwlDD6MD/ZBzITCf4JjGMM10TZkw== -d3-contour@^1.3.0: +d3-contour@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-1.3.2.tgz#652aacd500d2264cb3423cee10db69f6f59bead3" + integrity sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg== dependencies: d3-array "^1.1.1" d3-dispatch@1: version "1.0.5" resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-1.0.5.tgz#e25c10a186517cd6c82dd19ea018f07e01e39015" + integrity sha512-vwKx+lAqB1UuCeklr6Jh1bvC4SZgbSqbkGBLClItFBIYH4vqDJCA7qfoy14lXmJdnBOdxndAMxjCbImJYW7e6g== -d3-dsv@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-1.0.10.tgz#4371c489a2a654a297aca16fcaf605a6f31a6f51" +d3-dsv@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-1.1.1.tgz#aaa830ecb76c4b5015572c647cc6441e3c7bb701" + integrity sha512-1EH1oRGSkeDUlDRbhsFytAXU6cAmXFzc52YUe6MRlPClmWb85MP1J5x+YJRzya4ynZWnbELdSAvATFW/MbxaXw== dependencies: commander "2" iconv-lite "0.4" rw "1" -d3-force@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-1.1.2.tgz#16664d0ac71d8727ef5effe0b374feac8050d6cd" +d3-force@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-2.0.1.tgz#31750eee8c43535301d571195bf9683beda534e2" + integrity sha512-zh73/N6+MElRojiUG7vmn+3vltaKon7iD5vB/7r9nUaBeftXMzRo5IWEG63DLBCto4/8vr9i3m9lwr1OTJNiCg== dependencies: - d3-collection "1" d3-dispatch "1" d3-quadtree "1" d3-timer "1" -d3-format@1, d3-format@^1.3.0: +d3-format@1, d3-format@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.3.2.tgz#6a96b5e31bcb98122a30863f7d92365c00603562" + integrity sha512-Z18Dprj96ExragQ0DeGi+SYPQ7pPfRMtUXtsg/ChVIKNBCzjO8XYJvRTC1usblx52lqge56V5ect+frYTQc8WQ== -d3-geo@^1.10.0: - version "1.11.1" - resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.11.1.tgz#3f35e582c0d29296618b02a8ade0fdffb2c0e63c" +d3-geo@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.11.3.tgz#5bb08388f45e4b281491faa72d3abd43215dbd1c" + integrity sha512-n30yN9qSKREvV2fxcrhmHUdXP9TNH7ZZj3C/qnaoU0cVf/Ea85+yT7HY7i8ySPwkwjCNYtmKqQFTvLFngfkItQ== dependencies: d3-array "1" -d3-hierarchy@^1.1.6: +d3-hierarchy@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-1.1.8.tgz#7a6317bd3ed24e324641b6f1e76e978836b008cc" + integrity sha512-L+GHMSZNwTpiq4rt9GEsNcpLa4M96lXMR8M/nMG9p5hBE0jy6C+3hWtyZMenPQdwla249iJy7Nx0uKt3n+u9+w== -d3-interpolate@1, d3-interpolate@^1.2.0: +d3-interpolate@1, d3-interpolate@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.3.2.tgz#417d3ebdeb4bc4efcc8fd4361c55e4040211fd68" + integrity sha512-NlNKGopqaz9qM1PXh9gBF1KSCVh+jSFErrSlD/4hybwoNX/gt1d8CDbDW+3i+5UOHhjC6s6nMvRxcuoMVNgL2w== dependencies: d3-color "1" -d3-path@1, d3-path@^1.0.5: +d3-path@1, d3-path@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.7.tgz#8de7cd693a75ac0b5480d3abaccd94793e58aae8" + integrity sha512-q0cW1RpvA5c5ma2rch62mX8AYaiLX0+bdaSM2wxSU9tXjU4DNvkx9qiUvjkuWCj3p22UO/hlPivujqMiR9PDzA== d3-quadtree@1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-1.0.5.tgz#305394840b01f51a341a0da5008585e837fe7e9b" - -d3-scale-chromatic@^1.3.0: - version "1.3.3" - resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-1.3.3.tgz#dad4366f0edcb288f490128979c3c793583ed3c0" - dependencies: - d3-color "1" - d3-interpolate "1" + version "1.0.6" + resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-1.0.6.tgz#d1ab2a95a7f27bbde88582c94166f6ae35f32056" + integrity sha512-NUgeo9G+ENQCQ1LsRr2qJg3MQ4DJvxcDNCiohdJGHt5gRhBW6orIB5m5FJ9kK3HNL8g9F4ERVoBzcEwQBfXWVA== -d3-scale@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.1.2.tgz#4e932b7b60182aee9073ede8764c98423e5f9a94" +d3-scale@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-3.0.0.tgz#ddede1278ac3ea2bf3666de6ca625e20bed9b6c9" + integrity sha512-ktic5HBFlAZj2CN8CCl/p/JyY8bMQluN7+fA6ICE6yyoMOnSQAZ1Bb8/5LcNpNKMBMJge+5Vv4pWJhARYlQYFw== dependencies: - d3-array "^1.2.0" - d3-collection "1" + d3-array "^1.2.0 || 2" d3-format "1" d3-interpolate "1" d3-time "1" d3-time-format "2" -d3-selection@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.3.2.tgz#6e70a9df60801c8af28ac24d10072d82cbfdf652" +d3-selection@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.0.tgz#ab9ac1e664cf967ebf1b479cc07e28ce9908c474" + integrity sha512-EYVwBxQGEjLCKF2pJ4+yrErskDnz5v403qvAid96cNdCMr8rmCYfY5RGzWz24mdIbxmDf6/4EAH+K9xperD5jg== -d3-shape@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.2.2.tgz#f9dba3777a5825f9a8ce8bc928da08c17679e9a7" +d3-shape@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.5.tgz#e81aea5940f59f0a79cfccac012232a8987c6033" + integrity sha512-VKazVR3phgD+MUCldapHD7P9kcrvPcexeX/PkMJmkUov4JM8IxsSg1DvbYoYich9AtdTsa5nNk2++ImPiDiSxg== dependencies: d3-path "1" -d3-time-format@2, d3-time-format@^2.1.1: +d3-time-format@2, d3-time-format@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.1.3.tgz#ae06f8e0126a9d60d6364eac5b1533ae1bac826b" + integrity sha512-6k0a2rZryzGm5Ihx+aFMuO1GgelgIz+7HhB4PH4OEndD5q2zGn1mDfRdNrulspOfR6JXkb2sThhDK41CSK85QA== dependencies: d3-time "1" -d3-time@1, d3-time@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.0.10.tgz#8259dd71288d72eeacfd8de281c4bf5c7393053c" +d3-time@1, d3-time@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.0.11.tgz#1d831a3e25cd189eb256c17770a666368762bbce" + integrity sha512-Z3wpvhPLW4vEScGeIMUckDW7+3hWKOQfAWg/U7PlWBnQmeKQ00gCUsTtWSYulrKNA7ta8hJ+xXc6MHrMuITwEw== -d3-timer@1, d3-timer@^1.0.7: +d3-timer@1, d3-timer@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-1.0.9.tgz#f7bb8c0d597d792ff7131e1c24a36dd471a471ba" + integrity sha512-rT34J5HnQUHhcLvhSB9GjCkN0Ddd5Y8nCwDBG2u6wQEeYxT/Lf51fTFFkldeib/sE/J0clIe0pnCfs6g/lRbyg== -d3-voronoi@^1.1.2: +d3-voronoi@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.4.tgz#dd3c78d7653d2bb359284ae478645d95944c8297" + integrity sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg== d3@^3.5.6: version "3.5.17" resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" + integrity sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g= + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + integrity sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8= + dependencies: + es5-ext "^0.10.9" dargs@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= dependencies: number-is-nan "^1.0.0" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= dependencies: assert-plus "^1.0.0" -data-uri-to-buffer@1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz#77163ea9c20d8641b4707e8f18abdf9a78f34835" - data-urls@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.0.1.tgz#d416ac3896918f29ca84d81085bc3705834da579" + version "1.1.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" + integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== dependencies: abab "^2.0.0" - whatwg-mimetype "^2.1.0" + whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" date-fns@^1.27.2: - version "1.29.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" + version "1.30.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" + integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== -date-format@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/date-format/-/date-format-1.2.0.tgz#615e828e233dd1ab9bb9ae0950e0ceccfa6ecad8" +date-format@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-2.0.0.tgz#7cf7b172f1ec564f0003b39ea302c5498fb98c8f" + integrity sha512-M6UqVvZVgFYqZL1SfHsRGIQSz3ZL+qgbsV5Lp1Vj61LZVYuEwcMXYay7DRDtYs2HQQBK5hQtQ0fD9aEJ89V0LA== date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= dateformat@^1.0.6: version "1.0.12" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + integrity sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk= dependencies: get-stdin "^4.0.1" meow "^3.3.0" @@ -3021,107 +4080,137 @@ dateformat@^1.0.6: dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" + integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@2, debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9, debug@~2.6.4, debug@~2.6.6: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: 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@2.6.8: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - -debug@3.1.0, debug@^3.1.0, debug@~3.1.0: +debug@3.1.0, debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" +debug@3.2.6, debug@^3.1.0, debug@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" + integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= decamelize-keys@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= dependencies: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2: +decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -decamelize@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7" - dependencies: - xregexp "4.0.0" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= dependencies: mimic-response "^1.0.0" dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= -deep-eql@^3.0.0: +deep-eql@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== dependencies: type-detect "^4.0.0" deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" +deepmerge@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.2.0.tgz#58ef463a57c08d376547f8869fdc5bcee957f44e" + integrity sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow== + +default-require-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" + integrity sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc= dependencies: - strip-bom "^2.0.0" + strip-bom "^3.0.0" defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= dependencies: clone "^1.0.2" -define-properties@^1.1.2: +defer-to-connect@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" + integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw== + +define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== dependencies: object-keys "^1.0.12" define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= dependencies: is-descriptor "^0.1.0" define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= dependencies: is-descriptor "^1.0.0" define-property@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== dependencies: is-descriptor "^1.0.2" isobject "^3.0.1" @@ -3129,67 +4218,79 @@ define-property@^2.0.2: defined@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= -degenerator@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-1.0.4.tgz#fcf490a37ece266464d9cc431ab98c5819ced095" - dependencies: - ast-types "0.x.x" - escodegen "1.x.x" - esprima "3.x.x" - -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" +del@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" + integrity sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU= dependencies: - globby "^5.0.0" + globby "^6.1.0" is-path-cwd "^1.0.0" is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" + p-map "^1.1.1" + pify "^3.0.0" rimraf "^2.2.8" delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +deprecation@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.0.0.tgz#dd0427cd920c78bc575ec39dab2f22e7c304fb9d" + integrity sha512-lbQN037mB3VfA2JFuguM5GCJ+zPinMeCrFe+AfSZ6eqrnJA/Fs+EYMnd6Nb2mn9lf2jO9xwEd9o9lic+D4vkcw== des.js@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= dependencies: inherits "^2.0.1" minimalistic-assert "^1.0.0" +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= + detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= dependencies: repeating "^2.0.0" detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= detect-libc@^1.0.2: version "1.0.3" - resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= detect-newline@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= detective@^4.3.1: version "4.7.1" resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.1.tgz#0eca7314338442febb6d65da54c10bb1c82b246e" + integrity sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig== dependencies: acorn "^5.2.1" defined "^1.0.0" @@ -3197,6 +4298,7 @@ detective@^4.3.1: dezalgo@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" + integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= dependencies: asap "^2.0.0" wrappy "1" @@ -3204,45 +4306,60 @@ dezalgo@^1.0.0: di@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + integrity sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= -diff@3.2.0, diff@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" +diff-sequences@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.3.0.tgz#0f20e8a1df1abddaf4d9c226680952e64118b975" + integrity sha512-xLqpez+Zj9GKSnPWS0WZw1igGocZ+uua8+y+5dDNTT934N3QuY1sp2LkHzwiaYQGz60hMq0pjAshdeXm5VUOEw== + +diff@3.5.0, diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== dependencies: bn.js "^4.1.0" miller-rabin "^4.0.0" randombytes "^2.0.0" -dir-glob@^2.0.0: +dir-glob@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== dependencies: arrify "^1.0.1" path-type "^3.0.0" -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" -dom-converter@~0.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" +dom-converter@^0.2: + version "0.2.0" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" + integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== dependencies: - utila "~0.3" + utila "~0.4" -dom-helpers@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.3.1.tgz#fc1a4e15ffdf60ddde03a480a9c0fece821dd4a6" +dom-helpers@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" + integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA== + dependencies: + "@babel/runtime" "^7.1.2" dom-serialize@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + integrity sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs= dependencies: custom-event "~1.0.0" ent "~2.2.0" @@ -3250,62 +4367,54 @@ dom-serialize@^2.2.0: void-elements "^2.0.0" dom-serializer@0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== dependencies: - domelementtype "~1.1.1" - entities "~1.1.1" + domelementtype "^1.3.0" + entities "^1.1.1" dom4@^2.0.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/dom4/-/dom4-2.1.3.tgz#f71808fe1f141e4da4ebc43ad5ddb3dd521f2767" + version "2.1.4" + resolved "https://registry.yarnpkg.com/dom4/-/dom4-2.1.4.tgz#400a42cba4719a3e2eced93eff7738831d2746f6" + integrity sha512-7NNKNViuZYu4GaZMUsSbsV6MFsT/ZpYNKP1NT4YIUgAvwPR8ODuvQEZZ7vRC1u5Y4dHwQ7je/UNOlRRWkaCyvw== domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== -domelementtype@1, domelementtype@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" - -domelementtype@~1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" +domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== dependencies: webidl-conversions "^4.0.2" -domhandler@2.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" - dependencies: - domelementtype "1" - domhandler@^2.3.0: version "2.4.2" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - dependencies: - domelementtype "1" - -domutils@1.1: - version "1.1.6" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== dependencies: domelementtype "1" domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= dependencies: dom-serializer "0" domelementtype "1" -domutils@^1.5.1: +domutils@^1.5.1, domutils@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== dependencies: dom-serializer "0" domelementtype "1" @@ -3313,30 +4422,31 @@ domutils@^1.5.1: dot-prop@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" + integrity sha1-G3CK8JSknJoOfbyteQq6U52sEXc= dependencies: is-obj "^1.0.0" dot-prop@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== dependencies: is-obj "^1.0.0" -double-ended-queue@^2.1.0-0: - version "2.1.0-0" - resolved "https://registry.yarnpkg.com/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz#103d3527fd31528f40188130c841efdd78264e5c" - duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= duplexify@^3.4.2, duplexify@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== dependencies: end-of-stream "^1.0.0" inherits "^2.0.1" @@ -3346,6 +4456,7 @@ duplexify@^3.4.2, duplexify@^3.6.0: duplicate-package-checker-webpack-plugin@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/duplicate-package-checker-webpack-plugin/-/duplicate-package-checker-webpack-plugin-3.0.0.tgz#78bb89e625fa7cf8c2a59c53f62b495fda9ba287" + integrity sha512-aO50/qPC7X2ChjRFniRiscxBLT/K01bALqfcDaf8Ih5OqQ1N4iT/Abx9Ofu3/ms446vHTm46FACIuJUmgUQcDQ== dependencies: chalk "^2.3.0" find-root "^1.0.0" @@ -3355,6 +4466,7 @@ duplicate-package-checker-webpack-plugin@^3.0.0: ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= dependencies: jsbn "~0.1.0" safer-buffer "^2.1.0" @@ -3362,18 +4474,22 @@ ecc-jsbn@~0.1.1: ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.2.7: - version "1.3.62" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.62.tgz#2e8e2dc070c800ec8ce23ff9dfcceb585d6f9ed8" +electron-to-chromium@^1.3.133: + version "1.3.137" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.137.tgz#ba7c88024984c038a5c5c434529aabcea7b42944" + integrity sha512-kGi32g42a8vS/WnYE7ELJyejRT7hbr3UeOOu0WeuYuQ29gCpg9Lrf6RdcTQVXSt/v0bjCfnlb/EWOOsiKpTmkw== elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" + integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= elliptic@^6.0.0: version "6.4.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" + integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ== dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -3383,29 +4499,39 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= -encodeurl@~1.0.1: +encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= dependencies: iconv-lite "~0.4.13" end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== dependencies: once "^1.4.0" -engine.io-client@~3.1.0: - version "3.1.6" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.1.6.tgz#5bdeb130f8b94a50ac5cbeb72583e7a4a063ddfd" +engine.io-client@~3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.2.1.tgz#6f54c0475de487158a1a7c77d10178708b6add36" + integrity sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw== dependencies: component-emitter "1.2.1" component-inherit "0.0.3" @@ -3420,18 +4546,20 @@ engine.io-client@~3.1.0: yeast "0.1.2" engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.2.tgz#4c0f4cff79aaeecbbdcfdea66a823c6085409196" + version "2.1.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz#757ab970fbf2dfb32c7b74b033216d5739ef79a6" + integrity sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA== dependencies: after "0.8.2" arraybuffer.slice "~0.0.7" base64-arraybuffer "0.1.5" - blob "0.0.4" + blob "0.0.5" has-binary2 "~1.0.2" -engine.io@~3.1.0: - version "3.1.5" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.1.5.tgz#0e7ef9d690eb0b35597f1d4ad02a26ca2dba3845" +engine.io@~3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.1.tgz#b60281c35484a70ee0351ea0ebff83ec8c9522a2" + integrity sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w== dependencies: accepts "~1.3.4" base64id "1.0.0" @@ -3439,12 +4567,11 @@ engine.io@~3.1.0: debug "~3.1.0" engine.io-parser "~2.1.0" ws "~3.3.1" - optionalDependencies: - uws "~9.14.0" -enhanced-resolve@^4.0.0: +enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" + integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== dependencies: graceful-fs "^4.1.2" memory-fs "^0.4.0" @@ -3453,14 +4580,17 @@ enhanced-resolve@^4.0.0: ent@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= -entities@^1.1.1, entities@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" +entities@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== envify@^3.0.0: version "3.4.1" resolved "https://registry.yarnpkg.com/envify/-/envify-3.4.1.tgz#d7122329e8df1688ba771b12501917c9ce5cbce8" + integrity sha1-1xIjKejfFoi6dxsSUBkXyc5cvOg= dependencies: jstransform "^11.0.3" through "~2.3.4" @@ -3468,50 +4598,85 @@ envify@^3.0.0: err-code@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" + integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= errno@^0.1.3, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== dependencies: prr "~1.0.1" error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" -es-abstract@^1.5.1, es-abstract@^1.6.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" +es-abstract@^1.12.0, es-abstract@^1.5.1: + version "1.13.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" + integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== dependencies: - es-to-primitive "^1.1.1" + es-to-primitive "^1.2.0" function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" + has "^1.0.3" + is-callable "^1.1.4" is-regex "^1.0.4" + object-keys "^1.0.12" -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" +es-to-primitive@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" + integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== dependencies: - is-callable "^1.1.1" + is-callable "^1.1.4" is-date-object "^1.0.1" - is-symbol "^1.0.1" + is-symbol "^1.0.2" -es6-promise@^4.0.3, es6-promise@~4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" +es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.50" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778" + integrity sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + next-tick "^1.0.0" + +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-promise@^4.0.3, es6-promise@~4.2.6: + version "4.2.6" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" + integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== es6-promisify@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= dependencies: es6-promise "^4.0.3" +es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= + dependencies: + d "1" + es5-ext "~0.10.14" + es6-templates@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/es6-templates/-/es6-templates-0.2.3.tgz#5cb9ac9fb1ded6eb1239342b81d792bbb4078ee4" + integrity sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ= dependencies: recast "~0.11.12" through "~2.3.6" @@ -3519,14 +4684,17 @@ es6-templates@^0.2.3: escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.4, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= dependencies: esprima "^2.7.1" estraverse "^1.9.1" @@ -3535,9 +4703,10 @@ escodegen@1.8.x: optionalDependencies: source-map "~0.2.0" -escodegen@1.x.x, escodegen@^1.9.1: - version "1.11.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" +escodegen@^1.9.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" + integrity sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw== dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -3546,131 +4715,160 @@ escodegen@1.x.x, escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^2.9.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.10.0.tgz#ec07bc1d01f87d09f61d3840d112dc8a9791e30b" +eslint-config-prettier@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.3.0.tgz#c55c1fcac8ce4518aeb77906984e134d9eb5a4f0" + integrity sha512-sZwhSTHVVz78+kYD3t5pCWSYEdVSBR0PXnwjDRsUs8ytIrK8PLXw+6FKp8r3Z7rx4ZszdetWlXYKOHoUrrwPlA== dependencies: - get-stdin "^5.0.1" + get-stdin "^6.0.0" -eslint-plugin-prettier@^2.2.0, eslint-plugin-prettier@^2.6.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz#71998c60aedfa2141f7bfcbf9d1c459bf98b4fad" +eslint-plugin-prettier@^2.2.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.7.0.tgz#b4312dcf2c1d965379d7f9d5b5f8aaadc6a45904" + integrity sha512-CStQYJgALoQBw3FsBzH0VOVDRnJ/ZimUlpLm226U8qgqYJfPOY/CPK6wyRInMxh73HSKg5wyRwdS4BVYYHwokA== dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" -eslint-scope@^3.7.1: - version "3.7.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.3.tgz#bb507200d3d17f60247636160b4826284b108535" +eslint-plugin-prettier@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz#8695188f95daa93b0dc54b249347ca3b79c4686d" + integrity sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-scope@^4.0.0, eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-utils@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" + integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q== + eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint@^4.12.1: - version "4.19.1" - resolved "http://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" +eslint@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== dependencies: - ajv "^5.3.0" - babel-code-frame "^6.22.0" + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" chalk "^2.1.0" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" - debug "^3.1.0" - doctrine "^2.1.0" - eslint-scope "^3.7.1" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" - espree "^3.5.4" - esquery "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" esutils "^2.0.2" - file-entry-cache "^2.0.0" + file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" glob "^7.1.2" - globals "^11.0.1" - ignore "^3.3.3" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" + inquirer "^6.2.2" + js-yaml "^3.13.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" + lodash "^4.17.11" + minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" path-is-inside "^1.0.2" - pluralize "^7.0.0" progress "^2.0.0" - regexpp "^1.0.1" - require-uncached "^1.0.3" - semver "^5.3.0" + regexpp "^2.0.1" + semver "^5.5.1" strip-ansi "^4.0.0" - strip-json-comments "~2.0.1" - table "4.0.2" - text-table "~0.2.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" -espree@^3.5.4: - version "3.5.4" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== dependencies: - acorn "^5.5.0" - acorn-jsx "^3.0.0" + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" esprima-fb@^15001.1.0-dev-harmony-fb: version "15001.1.0-dev-harmony-fb" resolved "https://registry.yarnpkg.com/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz#30a947303c6b8d5e955bee2b99b1d233206a6901" + integrity sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE= -esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.0, esprima@^2.7.1: +esprima@2.7.x, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= -esprima@3.x.x, esprima@^3.1.3, esprima@~3.1.0: +esprima@^3.1.3, esprima@~3.1.0: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.0: +esquery@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== dependencies: estraverse "^4.0.0" esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== dependencies: estraverse "^4.1.0" estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= -eventemitter3@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" +eventemitter3@^3.0.0, eventemitter3@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" +events@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" + integrity sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA== evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== dependencies: md5.js "^1.3.4" safe-buffer "^5.1.1" @@ -3678,36 +4876,19 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: exec-sh@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" + integrity sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw== dependencies: merge "^1.2.0" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" +exec-sh@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" + integrity sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg== execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== dependencies: cross-spawn "^6.0.0" get-stream "^4.0.0" @@ -3717,31 +4898,15 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - exit@^0.1.2: version "0.1.2" - resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - -expand-braces@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" - dependencies: - array-slice "^0.2.3" - array-unique "^0.2.1" - braces "^0.1.2" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= dependencies: debug "^2.3.3" define-property "^0.2.5" @@ -3751,87 +4916,63 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-range@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" - dependencies: - is-number "^0.1.1" - repeat-string "^0.2.2" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= dependencies: - fill-range "^2.1.0" + homedir-polyfill "^1.0.1" expect.js@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/expect.js/-/expect.js-0.3.1.tgz#b0a59a0d2eff5437544ebf0ceaa6015841d09b5b" + integrity sha1-sKWaDS7/VDdUTr8M6qYBWEHQm1s= -expect@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/expect/-/expect-23.5.0.tgz#18999a0eef8f8acf99023fde766d9c323c2562ed" +expect@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-24.8.0.tgz#471f8ec256b7b6129ca2524b2a62f030df38718d" + integrity sha512-/zYvP8iMDrzaaxHVa724eJBCKqSHmO0FA7EDkBiRHxg6OipmMn1fN+C8T9L9K8yr7UONkOifu6+LLH+z76CnaA== dependencies: + "@jest/types" "^24.8.0" ansi-styles "^3.2.0" - jest-diff "^23.5.0" - jest-get-type "^22.1.0" - jest-matcher-utils "^23.5.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - -expect@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" - dependencies: - ansi-styles "^3.2.0" - jest-diff "^23.6.0" - jest-get-type "^22.1.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" + jest-get-type "^24.8.0" + jest-matcher-utils "^24.8.0" + jest-message-util "^24.8.0" + jest-regex-util "^24.3.0" extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= dependencies: is-extendable "^0.1.0" extend-shallow@^3.0.0, extend-shallow@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= dependencies: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@3, extend@^3.0.0, extend@~3.0.0, extend@~3.0.2: +extend@^3.0.0, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^2.0.4: - version "2.2.0" - resolved "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" - -external-editor@^3.0.0: +external-editor@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== dependencies: chardet "^0.7.0" iconv-lite "^0.4.24" tmp "^0.0.33" -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== dependencies: array-unique "^0.3.2" define-property "^1.0.0" @@ -3845,60 +4986,76 @@ extglob@^2.0.4: extract-zip@^1.6.6: version "1.6.7" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9" + integrity sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k= dependencies: concat-stream "1.6.2" debug "2.6.9" mkdirp "0.5.1" yauzl "2.4.1" -extsprintf@1.3.0, extsprintf@^1.2.0: +extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= -fast-deep-equal@^2.0.1: +fast-deep-equal@^2.0.1, fast-deep-equal@~2.0.1: version "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-diff@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" +fast-diff@^1.1.1, fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== fast-glob@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.2.tgz#71723338ac9b4e0e2fff1d6748a2a13d5ed352bf" + version "2.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" + integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== dependencies: "@mrmlnc/readdir-enhanced" "^2.2.1" - "@nodelib/fs.stat" "^1.0.1" + "@nodelib/fs.stat" "^1.1.2" glob-parent "^3.1.0" is-glob "^4.0.0" - merge2 "^1.2.1" + merge2 "^1.2.3" micromatch "^3.1.10" -fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastparse@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + version "1.1.2" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" + integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== fb-watchman@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= dependencies: bser "^2.0.0" fbjs@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.6.1.tgz#9636b7705f5ba9684d44b72f78321254afc860f7" + integrity sha1-lja3cF9bqWhNRLcveDISVK/IYPc= dependencies: core-js "^1.0.0" loose-envify "^1.0.0" @@ -3906,9 +5063,10 @@ fbjs@^0.6.1: ua-parser-js "^0.7.9" whatwg-fetch "^0.9.0" -fbjs@^0.8.0, fbjs@^0.8.16, fbjs@^0.8.9: +fbjs@^0.8.0, fbjs@^0.8.9: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" + integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1" @@ -3921,16 +5079,19 @@ fbjs@^0.8.0, fbjs@^0.8.16, fbjs@^0.8.9: fd-slicer@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + integrity sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU= dependencies: pend "~1.2.0" -figgy-pudding@^3.1.0, figgy-pudding@^3.2.1, figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: +figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" + integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= dependencies: escape-string-regexp "^1.0.5" object-assign "^4.1.0" @@ -3938,92 +5099,101 @@ figures@^1.7.0: figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" + flat-cache "^2.0.1" -file-loader@1.1.11, file-loader@~1.1.11: +file-loader@1.1.11: version "1.1.11" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.11.tgz#6fe886449b0f2a936e43cabaac0cdbfb369506f8" + integrity sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg== dependencies: loader-utils "^1.0.2" schema-utils "^0.4.5" -file-type@^10.4.0: - version "10.7.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-10.7.0.tgz#b6a9bf24f1d14ba514ab9087c7864d4da4a7ce76" - -file-uri-to-path@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" +file-loader@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-3.0.1.tgz#f8e0ba0b599918b51adfe45d66d1e771ad560faa" + integrity sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw== + dependencies: + loader-utils "^1.0.2" + schema-utils "^1.0.0" -fileset@^2.0.2: +fileset@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + integrity sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA= dependencies: glob "^7.0.3" minimatch "^3.0.3" -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= dependencies: extend-shallow "^2.0.1" is-number "^3.0.0" repeat-string "^1.6.1" to-regex-range "^2.1.0" -finalhandler@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== dependencies: debug "2.6.9" - encodeurl "~1.0.1" + encodeurl "~1.0.2" escape-html "~1.0.3" on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.3.1" + parseurl "~1.3.3" + statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== dependencies: commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" + make-dir "^2.0.0" + pkg-dir "^3.0.0" find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" + integrity sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ= find-root@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" @@ -4031,103 +5201,122 @@ find-up@^1.0.0: find-up@^2.0.0, 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@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" +find-up@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.0.0.tgz#c367f8024de92efb75f2d4906536d24682065c3a" + integrity sha512-zoH7ZWPkRdgwYCDVoQTzqjG8JSPANhtvLhh4KVUHyKnaUJJrNeFmWIkTcNuJmR3GLMEmGYEf2S2bjgx26JTF+Q== dependencies: - locate-path "^3.0.0" + locate-path "^5.0.0" -flat-cache@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" +findup-sync@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" + integrity sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" + detect-file "^1.0.0" + is-glob "^3.1.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" -flatten@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + +flatted@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" + integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== flush-write-stream@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== dependencies: - inherits "^2.0.1" - readable-stream "^2.0.4" + inherits "^2.0.3" + readable-stream "^2.3.6" -follow-redirects@1.0.0, follow-redirects@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.0.0.tgz#8e34298cbd2e176f254effec75a1c78cc849fd37" +fn-name@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fn-name/-/fn-name-2.0.1.tgz#5214d7537a4d06a4a301c0cc262feb84188002e7" + integrity sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc= + +follow-redirects@^1.0.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.7.0.tgz#489ebc198dc0e7f64167bd23b03c4c19b5784c76" + integrity sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ== dependencies: - debug "^2.2.0" + debug "^3.2.6" font-awesome@~4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" + integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM= -for-in@^1.0.1, for-in@^1.0.2: +for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -fork-ts-checker-webpack-plugin@^0.4.2: - version "0.4.9" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.4.9.tgz#78607899d4411fdc6faeca5b4db7654c9d8d28a2" +fork-ts-checker-webpack-plugin@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.3.4.tgz#a75b6fe8d3db0089555f083c4f77372227704244" + integrity sha512-2QDXnI2mbbly/OHx/ivtspi2l4K2g+IB0LTQ3AwsBfxyHtMFXtojlsJqGyhUggX08BC+F02CoCG0hRSPOLU2dQ== dependencies: babel-code-frame "^6.22.0" chalk "^2.4.1" chokidar "^2.0.4" - lodash.endswith "^4.2.1" - lodash.isfunction "^3.0.8" - lodash.isstring "^4.0.1" - lodash.startswith "^4.2.1" + micromatch "^3.1.10" minimatch "^3.0.4" - resolve "^1.5.0" + semver "^5.6.0" tapable "^1.0.0" + worker-rpc "^0.1.0" -form-data@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.0.0.tgz#6f0aebadcc5da16c13e1ecc11137d85f9b883b25" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.11" - -form-data@~2.3.0, form-data@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" - combined-stream "1.0.6" + combined-stream "^1.0.6" mime-types "^2.1.12" fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= dependencies: map-cache "^0.2.2" free-style@2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/free-style/-/free-style-2.5.1.tgz#5e3f684c470d3bba7e4dbb43524e0a08917e873c" + integrity sha512-X7dtUSTrlS1KRQBtiQ618NWIRDdRgD91IeajKCSh0fgTqArSixv+n3ea6F/OSvrvg14tPLR+yCq2s+O602+pRw== -from2@^2.1.0, from2@^2.1.1: +from2@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= dependencies: inherits "^2.0.1" readable-stream "^2.0.0" @@ -4135,42 +5324,39 @@ from2@^2.1.0, from2@^2.1.1: fs-access@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" + integrity sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o= dependencies: null-check "^1.0.0" -fs-extra@6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.0.tgz#8cc3f47ce07ef7b3593a11b9fb245f7e34c041d6" +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@~4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" +fs-extra@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.0.1.tgz#90294081f978b1f182f347a440a209154344285b" + integrity sha512-W+XLrggcDzlle47X/XnS7FXrXu9sDo+Ze9zpndeBxdgv88FHLm1HtmkhEwavruS6koanBjp098rUpHs65EmG7A== dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" universalify "^0.1.0" fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + version "1.2.6" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" + integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ== dependencies: minipass "^2.2.1" fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= dependencies: graceful-fs "^4.1.2" iferr "^0.1.5" @@ -4180,41 +5366,39 @@ fs-write-stream-atomic@^1.0.8: fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.2.2, fsevents@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - -fstream@^1.0.0, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -ftp@~0.3.10: - version "0.3.10" - resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d" +fsevents@^1.2.7: + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== dependencies: - readable-stream "1.1.x" - xregexp "2.0.0" + nan "^2.12.1" + node-pre-gyp "^0.12.0" -function-bind@^1.1.0, function-bind@^1.1.1: +function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +g-status@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/g-status/-/g-status-2.0.2.tgz#270fd32119e8fc9496f066fe5fe88e0a6bc78b97" + integrity sha512-kQoE9qH+T1AHKgSSD0Hkv98bobE90ILQcXAF4wvGgsr7uFqNvwmh8j+Lq3l0RVt3E3HjSbv2B9biEGcEtpHLCA== + dependencies: + arrify "^1.0.1" + matcher "^1.0.0" + simple-git "^1.85.0" gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" @@ -4225,37 +5409,35 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -generate-function@^2.0.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" - dependencies: - is-property "^1.0.2" - -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - dependencies: - is-property "^1.0.0" - -genfun@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1" +genfun@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" + integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-caller-file@^2.0.1: + version "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-func-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= -get-own-enumerable-property-symbols@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b" +get-own-enumerable-property-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203" + integrity sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg== get-pkg-repo@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" + integrity sha1-xztInAbYDMVTbCyFP54FIyBWly0= dependencies: hosted-git-info "^2.1.4" meow "^3.3.0" @@ -4266,53 +5448,46 @@ get-pkg-repo@^1.0.0: get-port@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + integrity sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw= get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - -get-stdin@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= get-stdin@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stream@3.0.0, get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" +get-stdin@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" + integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ== -get-stream@^4.0.0: +get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== dependencies: pump "^3.0.0" -get-uri@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-2.0.2.tgz#5c795e71326f6ca1286f2fc82575cd2bab2af578" - dependencies: - data-uri-to-buffer "1" - debug "2" - extend "3" - file-uri-to-path "1" - ftp "~0.3.10" - readable-stream "2" - get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= dependencies: assert-plus "^1.0.0" -git-raw-commits@^2.0.0: +git-raw-commits@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" + integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg== dependencies: dargs "^4.0.1" lodash.template "^4.0.2" @@ -4323,39 +5498,45 @@ git-raw-commits@^2.0.0: git-remote-origin-url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" + integrity sha1-UoJlna4hBxRaERJhEq0yFuxfpl8= dependencies: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.0.tgz#c218fd895bdf8e8e02f6bde555b2c3893ac73cd7" +git-semver-tags@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.2.tgz#f506ec07caade191ac0c8d5a21bdb8131b4934e3" + integrity sha512-34lMF7Yo1xEmsK2EkbArdoU79umpvm0MfzaDkSNYSJqtM5QLAVTPWgpiXSVI5o/O9EvZPSrP4Zvnec/CqhSd5w== dependencies: meow "^4.0.0" semver "^5.5.0" -gitconfiglocal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" +git-up@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.1.tgz#cb2ef086653640e721d2042fe3104857d89007c0" + integrity sha512-LFTZZrBlrCrGCG07/dm1aCjjpL1z9L3+5aEeI9SBhAqSc+kiA9Or1bgZhQFNppJX6h/f5McrvJt1mQXTFm6Qrw== dependencies: - ini "^1.3.2" + is-ssh "^1.3.0" + parse-url "^5.0.0" -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" +git-url-parse@^11.1.2: + version "11.1.2" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.1.2.tgz#aff1a897c36cc93699270587bea3dbcbbb95de67" + integrity sha512-gZeLVGY8QVKMIkckncX+iCq2/L8PlwncvDFKiWkBn9EtCfYDbliRTTp6qzyQ1VMdITUfq7293zDzfpjdiGASSQ== dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" + git-up "^4.0.0" -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" +gitconfiglocal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + integrity sha1-QdBF84UaXqiPA/JMocYXgRRGS5s= dependencies: - is-glob "^2.0.0" + ini "^1.3.2" glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= dependencies: is-glob "^3.1.0" path-dirname "^1.0.0" @@ -4363,21 +5544,24 @@ glob-parent@^3.1.0: glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.2" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" glob@^5.0.15: version "5.0.15" - resolved "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= dependencies: inflight "^1.0.4" inherits "2" @@ -4385,9 +5569,10 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.2: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" +glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.2: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -4396,98 +5581,103 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -global-modules-path@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/global-modules-path/-/global-modules-path-2.3.0.tgz#b0e2bac6beac39745f7db5c59d26a36a0b94f7dc" +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" -globals@^11.0.1: - version "11.7.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" +globals@^11.1.0, globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= dependencies: array-union "^1.0.1" - arrify "^1.0.0" glob "^7.0.3" object-assign "^4.0.1" pify "^2.0.0" pinkie-promise "^2.0.0" globby@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" + version "8.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d" + integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w== dependencies: array-union "^1.0.1" - dir-glob "^2.0.0" + dir-glob "2.0.0" fast-glob "^2.0.2" glob "^7.1.2" ignore "^3.3.5" pify "^3.0.0" slash "^1.0.0" -got@^8.3.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" +got@^9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" decompress-response "^3.3.0" duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== -growl@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== growly@^1.3.0: version "1.3.0" - resolved "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= gud@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" + integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== -handlebars@^4.0.1, handlebars@^4.0.2, handlebars@^4.0.6, handlebars@~4.0.11: - version "4.0.11" - resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - -handlebars@^4.0.3: - version "4.0.12" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" +handlebars@*, handlebars@^4.0.1, handlebars@^4.0.6, handlebars@^4.1.0, handlebars@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" + integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== dependencies: - async "^2.5.0" + neo-async "^2.6.0" optimist "^0.6.1" source-map "^0.6.1" optionalDependencies: @@ -4496,68 +5686,64 @@ handlebars@^4.0.3: har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - -har-validator@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" - dependencies: - chalk "^1.1.1" - commander "^2.9.0" - is-my-json-valid "^2.12.4" - pinkie-promise "^2.0.0" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= har-validator@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== dependencies: - ajv "^5.3.0" + ajv "^6.5.5" har-schema "^2.0.0" harmony-reflect@^1.4.6: - version "1.6.0" - resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.0.tgz#9c28a77386ec225f7b5d370f9861ba09c4eea58f" + version "1.6.1" + resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.1.tgz#c108d4f2bb451efef7a37861fdbdae72c9bdefa9" + integrity sha512-WJTeyp0JzGtHcuMsi7rw2VwtkvLa+JyfEKJCFyfcS0+CDkjQ5lHPu7zEhFZP+PDSRrEgXa5Ah0l1MbgbE41XjA== has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= dependencies: ansi-regex "^2.0.0" has-binary2@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" + integrity sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw== dependencies: isarray "2.0.1" has-cors@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + integrity sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk= has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - dependencies: - has-symbol-support-x "^1.4.1" +has-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= dependencies: get-value "^2.0.3" has-values "^0.1.4" @@ -4566,6 +5752,7 @@ has-value@^0.3.1: has-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= dependencies: get-value "^2.0.6" has-values "^1.0.0" @@ -4574,94 +5761,81 @@ has-value@^1.0.0: has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= has-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= dependencies: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.1: +has@^1.0.1, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" hash-base@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.5.tgz#e38ab4b85dfb1e0c40fe9265c0e9b54854c23812" + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== dependencies: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -he@1.1.1, he@1.1.x: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" +he@1.2.0, he@1.2.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== highlight.js@^9.13.1: - version "9.14.2" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.14.2.tgz#efbfb22dc701406e4da406056ef8c2b70ebe5b26" - -hipchat-notifier@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz#b6d249755437c191082367799d3ba9a0f23b231e" - dependencies: - lodash "^4.0.0" - request "^2.0.0" + version "9.15.6" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.6.tgz#72d4d8d779ec066af9a17cb14360c3def0aa57c4" + integrity sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ== hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= dependencies: hash.js "^1.0.3" minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" + parse-passwd "^1.0.0" hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - -html-comment-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== html-encoding-sniffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== dependencies: whatwg-encoding "^1.0.1" -html-loader@^0.5.1: +html-loader@~0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-0.5.5.tgz#6356dbeb0c49756d8ebd5ca327f16ff06ab5faea" + integrity sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog== dependencies: es6-templates "^0.2.3" fastparse "^1.1.1" @@ -4670,20 +5844,22 @@ html-loader@^0.5.1: object-assign "^4.1.1" html-minifier@^3.2.3, html-minifier@^3.5.8: - version "3.5.20" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.20.tgz#7b19fd3caa0cb79f7cde5ee5c3abdf8ecaa6bb14" + version "3.5.21" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.21.tgz#d0040e054730e354db008463593194015212d20c" + integrity sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA== dependencies: camel-case "3.0.x" clean-css "4.2.x" commander "2.17.x" - he "1.1.x" + he "1.2.x" param-case "2.1.x" relateurl "0.2.x" uglify-js "3.4.x" html-webpack-plugin@~3.2.0: version "3.2.0" - resolved "http://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" + integrity sha1-sBq71yOsqqeze2r0SS69oD2d03s= dependencies: html-minifier "^3.2.3" loader-utils "^0.2.16" @@ -4693,42 +5869,43 @@ html-webpack-plugin@~3.2.0: toposort "^1.0.0" util.promisify "1.0.0" -htmlparser2@^3.9.0: - version "3.9.2" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" +htmlparser2@^3.10.0, htmlparser2@^3.3.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== dependencies: - domelementtype "^1.3.0" + domelementtype "^1.3.1" domhandler "^2.3.0" domutils "^1.5.1" entities "^1.1.1" inherits "^2.0.1" - readable-stream "^2.0.2" - -htmlparser2@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" - dependencies: - domelementtype "1" - domhandler "2.1" - domutils "1.1" - readable-stream "1.0" + readable-stream "^3.1.1" -http-cache-semantics@3.8.1, http-cache-semantics@^3.8.1: +http-cache-semantics@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== + +http-cache-semantics@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5" + integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew== -http-errors@1.6.3, http-errors@~1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== dependencies: depd "~1.1.2" inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" http-proxy-agent@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== dependencies: agent-base "4" debug "3.1.0" @@ -4736,45 +5913,30 @@ http-proxy-agent@^2.1.0: http-proxy@^1.13.0: version "1.17.0" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" + integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g== dependencies: eventemitter3 "^3.0.0" follow-redirects "^1.0.0" requires-port "^1.0.0" -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= dependencies: assert-plus "^1.0.0" jsprim "^1.2.2" sshpk "^1.7.0" -httpntlm@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/httpntlm/-/httpntlm-1.6.1.tgz#ad01527143a2e8773cfae6a96f58656bb52a34b2" - dependencies: - httpreq ">=0.4.22" - underscore "~1.7.0" - -httpreq@>=0.4.22: - version "0.4.24" - resolved "https://registry.yarnpkg.com/httpreq/-/httpreq-0.4.24.tgz#4335ffd82cd969668a39465c929ac61d6393627f" - https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= https-proxy-agent@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" + integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== dependencies: agent-base "^4.1.0" debug "^3.1.0" @@ -4782,133 +5944,165 @@ https-proxy-agent@^2.2.1: humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= dependencies: ms "^2.0.0" -husky@~1.0.0-rc.13: - version "1.0.0-rc.13" - resolved "https://registry.yarnpkg.com/husky/-/husky-1.0.0-rc.13.tgz#49c3cc210bfeac24d4ad272f770b7505c9091828" +husky@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/husky/-/husky-2.3.0.tgz#8b78ed24d763042df7fd899991985d65a976dd13" + integrity sha512-A/ZQSEILoq+mQM3yC3RIBSaw1bYXdkKnyyKVSUiJl+iBjVZc5LQEXdGY1ZjrDxC4IzfRPiJ0IqzEQGCN5TQa/A== dependencies: - cosmiconfig "^5.0.2" - execa "^0.9.0" + cosmiconfig "^5.2.0" + execa "^1.0.0" find-up "^3.0.0" - get-stdin "^6.0.0" - is-ci "^1.1.0" - pkg-dir "^3.0.0" + get-stdin "^7.0.0" + is-ci "^2.0.0" + pkg-dir "^4.1.0" please-upgrade-node "^3.1.1" - read-pkg "^4.0.1" + read-pkg "^5.1.1" run-node "^1.0.0" - slash "^2.0.0" + slash "^3.0.0" -iconv-lite@0.4, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@^0.4.5, iconv-lite@~0.4.13: +iconv-lite@0.4, iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@^0.4.5, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@0.4.15: - version "0.4.15" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" - -iconv-lite@0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= -icss-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" +icss-utils@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.0.tgz#339dbbffb9f8729a243b701e1c29d4cc58c52f0e" + integrity sha512-3DEun4VOeMvSczifM3F2cKQrDQ5Pj6WKhkOq6HD4QTnDUAq8MQRxy5TX6Sy1iY6WPBe4gQ3p5vTECjbIkglkkQ== dependencies: - postcss "^6.0.1" + postcss "^7.0.14" identity-obj-proxy@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14" + integrity sha1-lNK9qWCERT7zb7xarsN+D3nx/BQ= dependencies: harmony-reflect "^1.4.6" -ieee754@^1.1.11, ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= ignore-walk@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== dependencies: minimatch "^3.0.4" -ignore@^3.3.3, ignore@^3.3.5: +ignore@^3.3.5: version "3.3.10" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-fresh@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390" + integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" import-local@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + integrity sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ== dependencies: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" +import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== + dependencies: + pkg-dir "^3.0.0" + resolve-cwd "^2.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= indent-string@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= dependencies: repeating "^2.0.0" indent-string@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= indexes-of@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - -inflection@~1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" - -inflection@~1.3.0: - version "1.3.8" - resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.3.8.tgz#cbd160da9f75b14c3cc63578d4f396784bf3014e" + integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== init-package-json@^1.10.3: version "1.10.3" resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" + integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== dependencies: glob "^7.1.1" npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" @@ -4919,133 +6113,125 @@ init-package-json@^1.10.3: validate-npm-package-license "^3.0.1" validate-npm-package-name "^3.0.0" -inquirer@^3.0.6, inquirer@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.0.4" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -inquirer@^6.0.0, inquirer@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" +inquirer@^6.2.0, inquirer@^6.2.2, inquirer@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" + integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" + ansi-escapes "^3.2.0" + chalk "^2.4.2" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^3.0.0" + external-editor "^3.0.3" figures "^2.0.0" - lodash "^4.17.10" + lodash "^4.17.11" mute-stream "0.0.7" run-async "^2.2.0" - rxjs "^6.1.0" + rxjs "^6.4.0" string-width "^2.1.0" - strip-ansi "^4.0.0" + strip-ansi "^5.1.0" through "^2.3.6" interpret@^1.0.0, interpret@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" - -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" + version "1.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" + integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" - resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== dependencies: loose-envify "^1.0.0" -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== -ip@^1.1.2, ip@^1.1.4, ip@^1.1.5: +ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= dependencies: kind-of "^3.0.2" is-accessor-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== dependencies: kind-of "^6.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= dependencies: binary-extensions "^1.0.0" is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" +is-buffer@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" + integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== -is-callable@^1.1.1, is-callable@^1.1.3: +is-callable@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== -is-ci@^1.0.10, is-ci@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.0.tgz#3f4a08d6303a09882cef3f0fb97439c5f5ce2d53" +is-ci@^1.0.10: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" + integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== + dependencies: + ci-info "^1.5.0" + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== dependencies: - ci-info "^1.3.0" + ci-info "^2.0.0" is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= dependencies: kind-of "^3.0.2" is-data-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== dependencies: kind-of "^6.0.0" is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== dependencies: is-accessor-descriptor "^0.1.6" is-data-descriptor "^0.1.4" @@ -5054,6 +6240,7 @@ is-descriptor@^0.1.0: is-descriptor@^1.0.0, is-descriptor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== dependencies: is-accessor-descriptor "^1.0.0" is-data-descriptor "^1.0.0" @@ -5062,256 +6249,231 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== dependencies: is-plain-object "^2.0.4" -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= -is-generator-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= dependencies: is-extglob "^2.1.0" is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== dependencies: is-extglob "^2.1.1" -is-my-ip-valid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" - -is-my-json-valid@^2.12.4: - version "2.19.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.19.0.tgz#8fd6e40363cd06b963fa877d444bfb5eddc62175" - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - is-my-ip-valid "^1.0.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - -is-number@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= dependencies: kind-of "^3.0.2" -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - -is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= is-observable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" + integrity sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA== dependencies: symbol-observable "^1.1.0" is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= is-path-in-cwd@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" + integrity sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ== dependencies: is-path-inside "^1.0.0" is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= dependencies: path-is-inside "^1.0.1" is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-plain-object@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928" + integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg== + dependencies: + isobject "^4.0.0" is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - -is-property@^1.0.0, is-property@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= dependencies: has "^1.0.1" is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= -is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - -is-retry-allowed@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" +is-ssh@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.1.tgz#f349a8cadd24e65298037a522cf7520f2e81a0f3" + integrity sha512-0eRIASHZt1E68/ixClI8bp2YK2wmBPVWEismTs6M+M099jKgrzl/3E976zIbImSIob48N2/XGe9y7ZiYdImSlg== + dependencies: + protocols "^1.1.0" is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= -is-subset@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" - -is-svg@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== dependencies: - html-comment-regex "^1.1.0" - -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + has-symbols "^1.0.0" -is-text-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" +is-text-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-2.0.0.tgz#b2484e2b720a633feb2e85b67dc193ff72c75636" + integrity sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw== dependencies: - text-extensions "^1.0.0" + text-extensions "^2.0.0" is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.2: +is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== is-wsl@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isarray@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" + integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4= isbinaryfile@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" + integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw== dependencies: buffer-alloc "^1.2.0" isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= dependencies: isarray "1.0.0" isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isobject@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" + integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== isomorphic-fetch@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= dependencies: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" @@ -5319,45 +6481,58 @@ isomorphic-fetch@^2.1.1: isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -istanbul-api@^1.1.14, istanbul-api@^1.3.1: - version "1.3.7" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" - dependencies: - async "^2.1.4" - fileset "^2.0.2" - istanbul-lib-coverage "^1.2.1" - istanbul-lib-hook "^1.2.2" - istanbul-lib-instrument "^1.10.2" - istanbul-lib-report "^1.1.5" - istanbul-lib-source-maps "^1.2.6" - istanbul-reports "^1.5.1" - js-yaml "^3.7.0" - mkdirp "^0.5.1" +istanbul-api@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-2.1.6.tgz#d61702a9d1c66ad89d92e66d401e16b0bda4a35f" + integrity sha512-x0Eicp6KsShG1k1rMgBAi/1GgY7kFGEBwQpw3PXGEmu+rBcBNhqU8g2DgY9mlepAsLPzrzrbqSgCGANnki4POA== + dependencies: + async "^2.6.2" + compare-versions "^3.4.0" + fileset "^2.0.3" + istanbul-lib-coverage "^2.0.5" + istanbul-lib-hook "^2.0.7" + istanbul-lib-instrument "^3.3.0" + istanbul-lib-report "^2.0.8" + istanbul-lib-source-maps "^3.0.6" + istanbul-reports "^2.2.4" + js-yaml "^3.13.1" + make-dir "^2.1.0" + minimatch "^3.0.4" once "^1.4.0" istanbul-instrumenter-loader@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz#9957bd59252b373fae5c52b7b5188e6fde2a0949" + integrity sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w== dependencies: convert-source-map "^1.5.0" istanbul-lib-instrument "^1.7.3" loader-utils "^1.1.0" schema-utils "^0.3.0" -istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: +istanbul-lib-coverage@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" + integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== -istanbul-lib-hook@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" +istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" + integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== + +istanbul-lib-hook@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz#c95695f383d4f8f60df1f04252a9550e15b5b133" + integrity sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA== dependencies: - append-transform "^0.4.0" + append-transform "^1.0.0" -istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2, istanbul-lib-instrument@^1.7.3: +istanbul-lib-instrument@^1.7.3: version "1.10.2" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" + integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" @@ -5367,34 +6542,50 @@ istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2, istanbul-lib-i istanbul-lib-coverage "^1.2.1" semver "^5.3.0" -istanbul-lib-report@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" - dependencies: - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" +istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" + integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== + dependencies: + "@babel/generator" "^7.4.0" + "@babel/parser" "^7.4.3" + "@babel/template" "^7.4.0" + "@babel/traverse" "^7.4.3" + "@babel/types" "^7.4.0" + istanbul-lib-coverage "^2.0.5" + semver "^6.0.0" + +istanbul-lib-report@^2.0.4, istanbul-lib-report@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" + integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ== + dependencies: + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + supports-color "^6.1.0" + +istanbul-lib-source-maps@^3.0.1, istanbul-lib-source-maps@^3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" + integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw== dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" + debug "^4.1.1" + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + rimraf "^2.6.3" + source-map "^0.6.1" -istanbul-reports@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" +istanbul-reports@^2.1.1, istanbul-reports@^2.2.4: + version "2.2.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af" + integrity sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA== dependencies: - handlebars "^4.0.3" + handlebars "^4.1.2" istanbul@^0.4.0: version "0.4.5" resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + integrity sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs= dependencies: abbrev "1.0.x" async "1.x" @@ -5411,445 +6602,405 @@ istanbul@^0.4.0: which "^1.1.1" wordwrap "^1.0.0" -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -jest-changed-files@^23.4.2: - version "23.4.2" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" +jest-changed-files@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.8.0.tgz#7e7eb21cf687587a85e50f3d249d1327e15b157b" + integrity sha512-qgANC1Yrivsq+UrLXsvJefBKVoCsKB0Hv+mBb6NMjjZ90wwxCDmU3hsCXBya30cH+LnPYjwgcU65i6yJ5Nfuug== dependencies: + "@jest/types" "^24.8.0" + execa "^1.0.0" throat "^4.0.0" -jest-cli@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-23.5.0.tgz#d316b8e34a38a610a1efc4f0403d8ef8a55e4492" +jest-cli@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.8.0.tgz#b075ac914492ed114fa338ade7362a301693e989" + integrity sha512-+p6J00jSMPQ116ZLlHJJvdf8wbjNbZdeSX9ptfHX06/MSNaXmKihQzx5vQcw0q2G6JsdVkUIdWbOWtSnaYs3yA== dependencies: - ansi-escapes "^3.0.0" + "@jest/core" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" chalk "^2.0.1" exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.1.11" - import-local "^1.0.0" - is-ci "^1.0.10" - istanbul-api "^1.3.1" - istanbul-lib-coverage "^1.2.0" - istanbul-lib-instrument "^1.10.1" - istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.4.2" - jest-config "^23.5.0" - jest-environment-jsdom "^23.4.0" - jest-get-type "^22.1.0" - jest-haste-map "^23.5.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - jest-resolve-dependencies "^23.5.0" - jest-runner "^23.5.0" - jest-runtime "^23.5.0" - jest-snapshot "^23.5.0" - jest-util "^23.4.0" - jest-validate "^23.5.0" - jest-watcher "^23.4.0" - jest-worker "^23.2.0" - micromatch "^2.3.11" - node-notifier "^5.2.1" - prompts "^0.1.9" - realpath-native "^1.0.0" - rimraf "^2.5.4" - slash "^1.0.0" - string-length "^2.0.0" - strip-ansi "^4.0.0" - which "^1.2.12" - yargs "^11.0.0" - -jest-config@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-23.5.0.tgz#3770fba03f7507ee15f3b8867c742e48f31a9773" - dependencies: - babel-core "^6.0.0" - babel-jest "^23.4.2" - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^23.4.0" - jest-environment-node "^23.4.0" - jest-get-type "^22.1.0" - jest-jasmine2 "^23.5.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.5.0" - jest-util "^23.4.0" - jest-validate "^23.5.0" - micromatch "^2.3.11" - pretty-format "^23.5.0" - -jest-config@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" - dependencies: - babel-core "^6.0.0" - babel-jest "^23.6.0" + import-local "^2.0.0" + is-ci "^2.0.0" + jest-config "^24.8.0" + jest-util "^24.8.0" + jest-validate "^24.8.0" + prompts "^2.0.1" + realpath-native "^1.1.0" + yargs "^12.0.2" + +jest-config@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.8.0.tgz#77db3d265a6f726294687cbbccc36f8a76ee0f4f" + integrity sha512-Czl3Nn2uEzVGsOeaewGWoDPD8GStxCpAe0zOYs2x2l0fZAgPbCr3uwUkgNKV3LwE13VXythM946cd5rdGkkBZw== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^24.8.0" + "@jest/types" "^24.8.0" + babel-jest "^24.8.0" chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^23.4.0" - jest-environment-node "^23.4.0" - jest-get-type "^22.1.0" - jest-jasmine2 "^23.6.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - micromatch "^2.3.11" - pretty-format "^23.6.0" - -jest-diff@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-23.5.0.tgz#250651a433dd0050290a07642946cc9baaf06fba" - dependencies: - chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.1.0" - pretty-format "^23.5.0" + jest-environment-jsdom "^24.8.0" + jest-environment-node "^24.8.0" + jest-get-type "^24.8.0" + jest-jasmine2 "^24.8.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.8.0" + jest-util "^24.8.0" + jest-validate "^24.8.0" + micromatch "^3.1.10" + pretty-format "^24.8.0" + realpath-native "^1.1.0" -jest-diff@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" +jest-diff@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.8.0.tgz#146435e7d1e3ffdf293d53ff97e193f1d1546172" + integrity sha512-wxetCEl49zUpJ/bvUmIFjd/o52J+yWcoc5ZyPq4/W1LUKGEhRYDIbP1KcF6t+PvqNrGAFk4/JhtxDq/Nnzs66g== dependencies: chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.1.0" - pretty-format "^23.6.0" + diff-sequences "^24.3.0" + jest-get-type "^24.8.0" + pretty-format "^24.8.0" jest-docblock@^21.0.0: version "21.2.0" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" + integrity sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw== -jest-docblock@^23.2.0: - version "23.2.0" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" +jest-docblock@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.3.0.tgz#b9c32dac70f72e4464520d2ba4aec02ab14db5dd" + integrity sha512-nlANmF9Yq1dufhFlKG9rasfQlrY7wINJbo3q01tu56Jv5eBU5jirylhF2O5ZBnLxzOVBGRDz/9NAwNyBtG4Nyg== dependencies: detect-newline "^2.1.0" -jest-each@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-23.5.0.tgz#77f7e2afe6132a80954b920006e78239862b10ba" - dependencies: - chalk "^2.0.1" - pretty-format "^23.5.0" - -jest-each@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" +jest-each@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-24.8.0.tgz#a05fd2bf94ddc0b1da66c6d13ec2457f35e52775" + integrity sha512-NrwK9gaL5+XgrgoCsd9svsoWdVkK4gnvyhcpzd6m487tXHqIdYeykgq3MKI1u4I+5Zf0tofr70at9dWJDeb+BA== dependencies: + "@jest/types" "^24.8.0" chalk "^2.0.1" - pretty-format "^23.6.0" - -jest-environment-jsdom@^23.4.0: - version "23.4.0" - resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" - dependencies: - jest-mock "^23.2.0" - jest-util "^23.4.0" + jest-get-type "^24.8.0" + jest-util "^24.8.0" + pretty-format "^24.8.0" + +jest-environment-jsdom@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-24.8.0.tgz#300f6949a146cabe1c9357ad9e9ecf9f43f38857" + integrity sha512-qbvgLmR7PpwjoFjM/sbuqHJt/NCkviuq9vus9NBn/76hhSidO+Z6Bn9tU8friecegbJL8gzZQEMZBQlFWDCwAQ== + dependencies: + "@jest/environment" "^24.8.0" + "@jest/fake-timers" "^24.8.0" + "@jest/types" "^24.8.0" + jest-mock "^24.8.0" + jest-util "^24.8.0" jsdom "^11.5.1" -jest-environment-node@^23.4.0: - version "23.4.0" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" +jest-environment-node@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-24.8.0.tgz#d3f726ba8bc53087a60e7a84ca08883a4c892231" + integrity sha512-vIGUEScd1cdDgR6sqn2M08sJTRLQp6Dk/eIkCeO4PFHxZMOgy+uYLPMC4ix3PEfM5Au/x3uQ/5Tl0DpXXZsJ/Q== dependencies: - jest-mock "^23.2.0" - jest-util "^23.4.0" + "@jest/environment" "^24.8.0" + "@jest/fake-timers" "^24.8.0" + "@jest/types" "^24.8.0" + jest-mock "^24.8.0" + jest-util "^24.8.0" -jest-get-type@^22.1.0: - version "22.4.3" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" +jest-get-type@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.8.0.tgz#a7440de30b651f5a70ea3ed7ff073a32dfe646fc" + integrity sha512-RR4fo8jEmMD9zSz2nLbs2j0zvPpk/KCEz3a62jJWbd2ayNo0cb+KFRxPHVhE4ZmgGJEQp0fosmNz84IfqM8cMQ== -jest-haste-map@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.5.0.tgz#d4ca618188bd38caa6cb20349ce6610e194a8065" +jest-haste-map@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.8.0.tgz#51794182d877b3ddfd6e6d23920e3fe72f305800" + integrity sha512-ZBPRGHdPt1rHajWelXdqygIDpJx8u3xOoLyUBWRW28r3tagrgoepPrzAozW7kW9HrQfhvmiv1tncsxqHJO1onQ== dependencies: + "@jest/types" "^24.8.0" + anymatch "^2.0.0" fb-watchman "^2.0.0" - graceful-fs "^4.1.11" + graceful-fs "^4.1.15" invariant "^2.2.4" - jest-docblock "^23.2.0" - jest-serializer "^23.0.1" - jest-worker "^23.2.0" - micromatch "^2.3.11" - sane "^2.0.0" + jest-serializer "^24.4.0" + jest-util "^24.8.0" + jest-worker "^24.6.0" + micromatch "^3.1.10" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^1.2.7" -jest-jasmine2@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.5.0.tgz#05fe7f1788e650eeb5a03929e6461ea2e9f3db53" +jest-jasmine2@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.8.0.tgz#a9c7e14c83dd77d8b15e820549ce8987cc8cd898" + integrity sha512-cEky88npEE5LKd5jPpTdDCLvKkdyklnaRycBXL6GNmpxe41F0WN44+i7lpQKa/hcbXaQ+rc9RMaM4dsebrYong== dependencies: - babel-traverse "^6.0.0" - chalk "^2.0.1" - co "^4.6.0" - expect "^23.5.0" - is-generator-fn "^1.0.0" - jest-diff "^23.5.0" - jest-each "^23.5.0" - jest-matcher-utils "^23.5.0" - jest-message-util "^23.4.0" - jest-snapshot "^23.5.0" - jest-util "^23.4.0" - pretty-format "^23.5.0" - -jest-jasmine2@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" - dependencies: - babel-traverse "^6.0.0" + "@babel/traverse" "^7.1.0" + "@jest/environment" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" chalk "^2.0.1" co "^4.6.0" - expect "^23.6.0" - is-generator-fn "^1.0.0" - jest-diff "^23.6.0" - jest-each "^23.6.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - pretty-format "^23.6.0" - -jest-junit@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-5.2.0.tgz#980401db7aa69999cf117c6d740a8135c22ae379" + expect "^24.8.0" + is-generator-fn "^2.0.0" + jest-each "^24.8.0" + jest-matcher-utils "^24.8.0" + jest-message-util "^24.8.0" + jest-runtime "^24.8.0" + jest-snapshot "^24.8.0" + jest-util "^24.8.0" + pretty-format "^24.8.0" + throat "^4.0.0" + +jest-junit@^6.3.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-6.4.0.tgz#23e15c979fa6338afde46f2d2ac2a6b7e8cf0d9e" + integrity sha512-GXEZA5WBeUich94BARoEUccJumhCgCerg7mXDFLxWwI2P7wL3Z7sGWk+53x343YdBLjiMR9aD/gYMVKO+0pE4Q== dependencies: - jest-config "^23.6.0" - jest-validate "^23.0.1" + jest-validate "^24.0.0" mkdirp "^0.5.1" strip-ansi "^4.0.0" xml "^1.0.1" -jest-leak-detector@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.5.0.tgz#14ac2a785bd625160a2ea968fd5d98b7dcea3e64" +jest-leak-detector@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-24.8.0.tgz#c0086384e1f650c2d8348095df769f29b48e6980" + integrity sha512-cG0yRSK8A831LN8lIHxI3AblB40uhv0z+SsQdW3GoMMVcK+sJwrIIyax5tu3eHHNJ8Fu6IMDpnLda2jhn2pD/g== dependencies: - pretty-format "^23.5.0" + pretty-format "^24.8.0" -jest-matcher-utils@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.5.0.tgz#0e2ea67744cab78c9ab15011c4d888bdd3e49e2a" +jest-matcher-utils@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.8.0.tgz#2bce42204c9af12bde46f83dc839efe8be832495" + integrity sha512-lex1yASY51FvUuHgm0GOVj7DCYEouWSlIYmCW7APSqB9v8mXmKSn5+sWVF0MhuASG0bnYY106/49JU1FZNl5hw== dependencies: chalk "^2.0.1" - jest-get-type "^22.1.0" - pretty-format "^23.5.0" - -jest-matcher-utils@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - pretty-format "^23.6.0" - -jest-message-util@^23.4.0: - version "23.4.0" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" - dependencies: - "@babel/code-frame" "^7.0.0-beta.35" + jest-diff "^24.8.0" + jest-get-type "^24.8.0" + pretty-format "^24.8.0" + +jest-message-util@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.8.0.tgz#0d6891e72a4beacc0292b638685df42e28d6218b" + integrity sha512-p2k71rf/b6ns8btdB0uVdljWo9h0ovpnEe05ZKWceQGfXYr4KkzgKo3PBi8wdnd9OtNh46VpNIJynUn/3MKm1g== + dependencies: + "@babel/code-frame" "^7.0.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" + "@types/stack-utils" "^1.0.1" chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" + micromatch "^3.1.10" + slash "^2.0.0" stack-utils "^1.0.1" -jest-mock@^23.2.0: - version "23.2.0" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" +jest-mock@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.8.0.tgz#2f9d14d37699e863f1febf4e4d5a33b7fdbbde56" + integrity sha512-6kWugwjGjJw+ZkK4mDa0Df3sDlUTsV47MSrT0nGQ0RBWJbpODDQ8MHDVtGtUYBne3IwZUhtB7elxHspU79WH3A== + dependencies: + "@jest/types" "^24.8.0" -jest-regex-util@^23.3.0: - version "23.3.0" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" +jest-pnp-resolver@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" + integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== -jest-resolve-dependencies@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.5.0.tgz#10c4d135beb9d2256de1fedc7094916c3ad74af7" - dependencies: - jest-regex-util "^23.3.0" - jest-snapshot "^23.5.0" +jest-regex-util@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.3.0.tgz#d5a65f60be1ae3e310d5214a0307581995227b36" + integrity sha512-tXQR1NEOyGlfylyEjg1ImtScwMq8Oh3iJbGTjN7p0J23EuVX1MA8rwU69K4sLbCmwzgCUbVkm0FkSF9TdzOhtg== -jest-resolve@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.5.0.tgz#3b8e7f67e84598f0caf63d1530bd8534a189d0e6" +jest-resolve-dependencies@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.8.0.tgz#19eec3241f2045d3f990dba331d0d7526acff8e0" + integrity sha512-hyK1qfIf/krV+fSNyhyJeq3elVMhK9Eijlwy+j5jqmZ9QsxwKBiP6qukQxaHtK8k6zql/KYWwCTQ+fDGTIJauw== dependencies: - browser-resolve "^1.11.3" - chalk "^2.0.1" - realpath-native "^1.0.0" + "@jest/types" "^24.8.0" + jest-regex-util "^24.3.0" + jest-snapshot "^24.8.0" -jest-resolve@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" +jest-resolve@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.8.0.tgz#84b8e5408c1f6a11539793e2b5feb1b6e722439f" + integrity sha512-+hjSzi1PoRvnuOICoYd5V/KpIQmkAsfjFO71458hQ2Whi/yf1GDeBOFj8Gxw4LrApHsVJvn5fmjcPdmoUHaVKw== dependencies: + "@jest/types" "^24.8.0" browser-resolve "^1.11.3" chalk "^2.0.1" - realpath-native "^1.0.0" - -jest-runner@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-23.5.0.tgz#570f7a044da91648b5bb9b6baacdd511076c71d7" - dependencies: + jest-pnp-resolver "^1.2.1" + realpath-native "^1.1.0" + +jest-runner@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.8.0.tgz#4f9ae07b767db27b740d7deffad0cf67ccb4c5bb" + integrity sha512-utFqC5BaA3JmznbissSs95X1ZF+d+4WuOWwpM9+Ak356YtMhHE/GXUondZdcyAAOTBEsRGAgH/0TwLzfI9h7ow== + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" + chalk "^2.4.2" exit "^0.1.2" - graceful-fs "^4.1.11" - jest-config "^23.5.0" - jest-docblock "^23.2.0" - jest-haste-map "^23.5.0" - jest-jasmine2 "^23.5.0" - jest-leak-detector "^23.5.0" - jest-message-util "^23.4.0" - jest-runtime "^23.5.0" - jest-util "^23.4.0" - jest-worker "^23.2.0" + graceful-fs "^4.1.15" + jest-config "^24.8.0" + jest-docblock "^24.3.0" + jest-haste-map "^24.8.0" + jest-jasmine2 "^24.8.0" + jest-leak-detector "^24.8.0" + jest-message-util "^24.8.0" + jest-resolve "^24.8.0" + jest-runtime "^24.8.0" + jest-util "^24.8.0" + jest-worker "^24.6.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.5.0.tgz#eb503525a196dc32f2f9974e3482d26bdf7b63ce" - dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^4.1.6" +jest-runtime@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.8.0.tgz#05f94d5b05c21f6dc54e427cd2e4980923350620" + integrity sha512-Mq0aIXhvO/3bX44ccT+czU1/57IgOMyy80oM0XR/nyD5zgBcesF84BPabZi39pJVA6UXw+fY2Q1N+4BiVUBWOA== + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.8.0" + "@jest/source-map" "^24.3.0" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + "@types/yargs" "^12.0.2" chalk "^2.0.1" - convert-source-map "^1.4.0" exit "^0.1.2" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.1.11" - jest-config "^23.5.0" - jest-haste-map "^23.5.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.5.0" - jest-snapshot "^23.5.0" - jest-util "^23.4.0" - jest-validate "^23.5.0" - micromatch "^2.3.11" - realpath-native "^1.0.0" - slash "^1.0.0" - strip-bom "3.0.0" - write-file-atomic "^2.1.0" - yargs "^11.0.0" - -jest-serializer@^23.0.1: - version "23.0.1" - resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" + glob "^7.1.3" + graceful-fs "^4.1.15" + jest-config "^24.8.0" + jest-haste-map "^24.8.0" + jest-message-util "^24.8.0" + jest-mock "^24.8.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.8.0" + jest-snapshot "^24.8.0" + jest-util "^24.8.0" + jest-validate "^24.8.0" + realpath-native "^1.1.0" + slash "^2.0.0" + strip-bom "^3.0.0" + yargs "^12.0.2" -jest-snapshot@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.5.0.tgz#cc368ebd8513e1175e2a7277f37a801b7358ae79" - dependencies: - babel-types "^6.0.0" - chalk "^2.0.1" - jest-diff "^23.5.0" - jest-matcher-utils "^23.5.0" - jest-message-util "^23.4.0" - jest-resolve "^23.5.0" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^23.5.0" - semver "^5.5.0" +jest-serializer@^24.4.0: + version "24.4.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.4.0.tgz#f70c5918c8ea9235ccb1276d232e459080588db3" + integrity sha512-k//0DtglVstc1fv+GY/VHDIjrtNjdYvYjMlbLUed4kxrE92sIUewOi5Hj3vrpB8CXfkJntRPDRjCrCvUhBdL8Q== -jest-snapshot@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" +jest-snapshot@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.8.0.tgz#3bec6a59da2ff7bc7d097a853fb67f9d415cb7c6" + integrity sha512-5ehtWoc8oU9/cAPe6fez6QofVJLBKyqkY2+TlKTOf0VllBB/mqUNdARdcjlZrs9F1Cv+/HKoCS/BknT0+tmfPg== dependencies: - babel-types "^6.0.0" + "@babel/types" "^7.0.0" + "@jest/types" "^24.8.0" chalk "^2.0.1" - jest-diff "^23.6.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-resolve "^23.6.0" + expect "^24.8.0" + jest-diff "^24.8.0" + jest-matcher-utils "^24.8.0" + jest-message-util "^24.8.0" + jest-resolve "^24.8.0" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.6.0" + pretty-format "^24.8.0" semver "^5.5.0" -jest-util@^23.4.0: - version "23.4.0" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" - dependencies: - callsites "^2.0.0" +jest-util@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.8.0.tgz#41f0e945da11df44cc76d64ffb915d0716f46cd1" + integrity sha512-DYZeE+XyAnbNt0BG1OQqKy/4GVLPtzwGx5tsnDrFcax36rVE3lTA5fbvgmbVPUZf9w77AJ8otqR4VBbfFJkUZA== + dependencies: + "@jest/console" "^24.7.1" + "@jest/fake-timers" "^24.8.0" + "@jest/source-map" "^24.3.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" + callsites "^3.0.0" chalk "^2.0.1" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - jest-message-util "^23.4.0" + graceful-fs "^4.1.15" + is-ci "^2.0.0" mkdirp "^0.5.1" - slash "^1.0.0" + slash "^2.0.0" source-map "^0.6.0" -jest-validate@^23.0.1, jest-validate@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^23.6.0" - -jest-validate@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-23.5.0.tgz#f5df8f761cf43155e1b2e21d6e9de8a2852d0231" +jest-validate@^24.0.0, jest-validate@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.8.0.tgz#624c41533e6dfe356ffadc6e2423a35c2d3b4849" + integrity sha512-+/N7VOEMW1Vzsrk3UWBDYTExTPwf68tavEPKDnJzrC6UlHtUDU/fuEdXqFoHzv9XnQ+zW6X3qMZhJ3YexfeLDA== dependencies: + "@jest/types" "^24.8.0" + camelcase "^5.0.0" chalk "^2.0.1" - jest-get-type "^22.1.0" + jest-get-type "^24.8.0" leven "^2.1.0" - pretty-format "^23.5.0" + pretty-format "^24.8.0" -jest-watcher@^23.4.0: - version "23.4.0" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" +jest-watcher@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-24.8.0.tgz#58d49915ceddd2de85e238f6213cef1c93715de4" + integrity sha512-SBjwHt5NedQoVu54M5GEx7cl7IGEFFznvd/HNT8ier7cCAx/Qgu9ZMlaTQkvK22G1YOpcWBLQPFSImmxdn3DAw== dependencies: + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" + "@types/yargs" "^12.0.9" ansi-escapes "^3.0.0" chalk "^2.0.1" + jest-util "^24.8.0" string-length "^2.0.0" -jest-worker@^23.2.0: - version "23.2.0" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" +jest-worker@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.6.0.tgz#7f81ceae34b7cde0c9827a6980c35b7cdc0161b3" + integrity sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ== dependencies: merge-stream "^1.0.1" + supports-color "^6.1.0" -jest@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/jest/-/jest-23.5.0.tgz#80de353d156ea5ea4a7332f7962ac79135fbc62e" +jest@^24.7.1: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-24.8.0.tgz#d5dff1984d0d1002196e9b7f12f75af1b2809081" + integrity sha512-o0HM90RKFRNWmAWvlyV8i5jGZ97pFwkeVoGvPW1EtLTgJc2+jcuqcbbqcSZLE/3f2S5pt0y2ZBETuhpWNl1Reg== dependencies: - import-local "^1.0.0" - jest-cli "^23.5.0" + import-local "^2.0.0" + jest-cli "^24.8.0" -js-base64@^2.1.9: - version "2.4.9" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.9.tgz#748911fb04f48a60c4771b375cac45a80df11c03" +js-levenshtein@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" + integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g== + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-tokens@^3.0.0, "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^3.0.2: +js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@3.x, js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" +js-yaml@3.13.1, js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= jsdom@^11.5.1: version "11.12.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" + integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== dependencies: abab "^2.0.0" acorn "^5.5.3" @@ -5881,92 +7032,103 @@ jsdom@^11.5.1: jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= json-loader@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - -json-parser@^1.0.0: - version "1.1.5" - resolved "https://registry.yarnpkg.com/json-parser/-/json-parser-1.1.5.tgz#e62ec5261d1a6a5fc20e812a320740c6d9005677" - dependencies: - esprima "^2.7.0" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= json-stable-stringify-without-jsonify@^1.0.1: version "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= -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-pretty-compact@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-1.2.0.tgz#0bc316b5e6831c07041fc35612487fb4e9ab98b8" +json-stringify-pretty-compact@^2.0.0, json-stringify-pretty-compact@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz#e77c419f52ff00c45a31f07f4c820c2433143885" + integrity sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ== -json-stringify-safe@5.0.x, json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json-to-html@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/json-to-html/-/json-to-html-0.1.2.tgz#7a095ae4a34b33534aad0970ca4b7417b2c11ee3" + integrity sha1-egla5KNLM1NKrQlwykt0F7LBHuM= -json3@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" +json5@2.x, json5@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" + integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== + dependencies: + minimist "^1.2.0" -json5@^0.5.0, json5@^0.5.1: +json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +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" jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - -jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= dependencies: assert-plus "1.0.0" extsprintf "1.3.0" @@ -5976,6 +7138,7 @@ jsprim@^1.2.2: jstransform@^11.0.3: version "11.0.3" resolved "https://registry.yarnpkg.com/jstransform/-/jstransform-11.0.3.tgz#09a78993e0ae4d4ef4487f6155a91f6190cb4223" + integrity sha1-CaeJk+CuTU70SH9hVakfYZDLQiM= dependencies: base62 "^1.1.0" commoner "^0.10.1" @@ -5983,221 +7146,251 @@ jstransform@^11.0.3: object-assign "^2.0.0" source-map "^0.4.2" +karma-babel-preprocessor@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/karma-babel-preprocessor/-/karma-babel-preprocessor-8.0.0.tgz#40639fa968bb14da65c2ccd507a68a5b398068cd" + integrity sha512-eeSSJgEtIVV7qKg/e+BG4RDTo+yglrGgBtuX+IHHGyhXEs4Vaqz8wSePXTiHyERvfxPfHRpxnKb5movoh62ekw== + karma-chrome-launcher@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf" + integrity sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w== dependencies: fs-access "^1.0.0" which "^1.2.1" -karma-coverage-istanbul-reporter@~1.3.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.3.3.tgz#daf26051d5a0daa5838a4ce81aa4a41724bdf36b" +karma-coverage-istanbul-reporter@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.5.tgz#ca5899d4905e44a5984dd4f963adfc1a74dce767" + integrity sha512-yPvAlKtY3y+rKKWbOo0CzBMVTvJEeMOgbMXuVv3yWvS8YtYKC98AU9vFF0mVBZ2RP1E9SgS90+PT6Kf14P3S4w== dependencies: - istanbul-api "^1.1.14" + istanbul-api "^2.1.1" minimatch "^3.0.4" -karma-coverage@~0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/karma-coverage/-/karma-coverage-0.5.5.tgz#b0d58b1025d59d5c6620263186f1d58f5d5348c5" +karma-coverage@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/karma-coverage/-/karma-coverage-1.1.2.tgz#cc09dceb589a83101aca5fe70c287645ef387689" + integrity sha512-eQawj4Cl3z/CjxslYy9ariU4uDh7cCNFZHNWXWRpl0pNeblY/4wHR7M7boTYXWrn9bY0z2pZmr11eKje/S/hIw== dependencies: dateformat "^1.0.6" istanbul "^0.4.0" + lodash "^4.17.0" minimatch "^3.0.0" source-map "^0.5.1" -karma-firefox-launcher@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-0.1.7.tgz#c05dd86533691e62f31952595098e8bd357d39f3" +karma-firefox-launcher@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-1.1.0.tgz#2c47030452f04531eb7d13d4fc7669630bb93339" + integrity sha512-LbZ5/XlIXLeQ3cqnCbYLn+rOVhuMIK9aZwlP6eOLGzWdo1UVp7t6CN3DP4SafiRLjexKwHeKHDm0c38Mtd3VxA== -karma-ie-launcher@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/karma-ie-launcher/-/karma-ie-launcher-0.2.0.tgz#eb40d9226fb8fce60308591b9f7d53e5b09be0e9" +karma-ie-launcher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/karma-ie-launcher/-/karma-ie-launcher-1.0.0.tgz#497986842c490190346cd89f5494ca9830c6d59c" + integrity sha1-SXmGhCxJAZA0bNifVJTKmDDG1Zw= dependencies: - lodash "^3.9.3" + lodash "^4.6.1" -karma-mocha-reporter@~1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/karma-mocha-reporter/-/karma-mocha-reporter-1.3.0.tgz#af6a46c08a9c55c7fd394c3a5aa2617ada1584a5" +karma-mocha-reporter@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz#15120095e8ed819186e47a0b012f3cd741895560" + integrity sha1-FRIAlejtgZGG5HoLAS8810GJVWA= dependencies: - chalk "1.1.1" - karma ">=0.13" + chalk "^2.1.0" + log-symbols "^2.1.0" + strip-ansi "^4.0.0" -karma-mocha@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-0.2.2.tgz#388ed917da15dcb196d1b915c1934ef803193f8e" +karma-mocha@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-1.3.0.tgz#eeaac7ffc0e201eb63c467440d2b69c7cf3778bf" + integrity sha1-7qrH/8DiAetjxGdEDStpx883eL8= + dependencies: + minimist "1.2.0" karma-sourcemap-loader@~0.3.7: version "0.3.7" resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.7.tgz#91322c77f8f13d46fed062b042e1009d4c4505d8" + integrity sha1-kTIsd/jxPUb+0GKwQuEAnUxFBdg= dependencies: graceful-fs "^4.1.2" -karma-webpack@~2.0.9: - version "2.0.13" - resolved "http://registry.npmjs.org/karma-webpack/-/karma-webpack-2.0.13.tgz#cf56e3056c15b7747a0bb2140fc9a6be41dd9f02" +karma-webpack@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-3.0.5.tgz#1ff1e3a690fb73ae95ee95f9ab58f341cfc7b40f" + integrity sha512-nRudGJWstvVuA6Tbju9tyGUfXTtI1UXMXoRHVmM2/78D0q6s/Ye2IC157PKNDC15PWFGR0mVIRtWLAdcfsRJoA== dependencies: async "^2.0.0" babel-runtime "^6.0.0" loader-utils "^1.0.0" lodash "^4.0.0" source-map "^0.5.6" - webpack-dev-middleware "^1.12.0" + webpack-dev-middleware "^2.0.6" -karma@>=0.13, karma@~2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/karma/-/karma-2.0.5.tgz#3710c7a2e71b1c439313f283846d88e04e4f918c" +karma@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/karma/-/karma-4.1.0.tgz#d07387c9743a575b40faf73e8a3eb5421c2193e1" + integrity sha512-xckiDqyNi512U4dXGOOSyLKPwek6X/vUizSy2f3geYevbLj+UIdvNwbn7IwfUIL2g1GXEPWt/87qFD1fBbl/Uw== dependencies: bluebird "^3.3.0" body-parser "^1.16.1" + braces "^2.3.2" chokidar "^2.0.3" colors "^1.1.0" - combine-lists "^1.0.0" connect "^3.6.0" core-js "^2.2.0" di "^0.0.1" dom-serialize "^2.2.0" - expand-braces "^0.1.1" + flatted "^2.0.0" glob "^7.1.1" graceful-fs "^4.1.2" http-proxy "^1.13.0" isbinaryfile "^3.0.0" - lodash "^4.17.4" - log4js "^2.5.3" - mime "^1.3.4" + lodash "^4.17.11" + log4js "^4.0.0" + mime "^2.3.1" minimatch "^3.0.2" optimist "^0.6.1" qjobs "^1.1.4" range-parser "^1.2.0" rimraf "^2.6.0" safe-buffer "^5.0.1" - socket.io "2.0.4" + socket.io "2.1.1" source-map "^0.6.1" tmp "0.0.33" - useragent "2.2.1" + useragent "2.3.0" -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== dependencies: json-buffer "3.0.0" kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= dependencies: is-buffer "^1.1.5" kind-of@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= dependencies: is-buffer "^1.1.5" kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - -kleur@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" +kleur@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== dependencies: - invert-kv "^1.0.0" - -leb@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/leb/-/leb-0.3.0.tgz#32bee9fad168328d6aea8522d833f4180eed1da3" + invert-kv "^2.0.0" left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" - -lerna@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.4.1.tgz#4acc5a6b9d843993db7a7bb1350274bcaf20ca80" - dependencies: - "@lerna/add" "^3.4.1" - "@lerna/bootstrap" "^3.4.1" - "@lerna/changed" "^3.4.1" - "@lerna/clean" "^3.3.2" - "@lerna/cli" "^3.2.0" - "@lerna/create" "^3.4.1" - "@lerna/diff" "^3.3.0" - "@lerna/exec" "^3.3.2" - "@lerna/import" "^3.3.1" - "@lerna/init" "^3.3.0" - "@lerna/link" "^3.3.0" - "@lerna/list" "^3.3.2" - "@lerna/publish" "^3.4.1" - "@lerna/run" "^3.3.2" - "@lerna/version" "^3.4.1" + integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== + +lerna@^3.13.2: + version "3.14.1" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.14.1.tgz#6bce5d2d4958e853f51387f8f41a8f2d9aa4a8ea" + integrity sha512-lQxmGeEECjOMI3pRh2+I6jazoEWhEfvZNIs7XaX71op33AVwyjlY/nQ1GJGrPhxYBuQnlPgH0vH/nC/lcLaVkw== + dependencies: + "@lerna/add" "3.14.0" + "@lerna/bootstrap" "3.14.0" + "@lerna/changed" "3.14.1" + "@lerna/clean" "3.14.0" + "@lerna/cli" "3.13.0" + "@lerna/create" "3.14.0" + "@lerna/diff" "3.14.0" + "@lerna/exec" "3.14.0" + "@lerna/import" "3.14.0" + "@lerna/init" "3.14.0" + "@lerna/link" "3.14.0" + "@lerna/list" "3.14.0" + "@lerna/publish" "3.14.1" + "@lerna/run" "3.14.0" + "@lerna/version" "3.14.1" import-local "^1.0.0" npmlog "^4.1.2" leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" -libbase64@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/libbase64/-/libbase64-0.1.0.tgz#62351a839563ac5ff5bd26f12f60e9830bb751e6" - -libmime@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/libmime/-/libmime-3.0.0.tgz#51a1a9e7448ecbd32cda54421675bb21bc093da6" +libnpmaccess@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.1.tgz#5b3a9de621f293d425191aa2e779102f84167fa8" + integrity sha512-RlZ7PNarCBt+XbnP7R6PoVgOq9t+kou5rvhaInoNibhPO7eMlRfS0B8yjatgn2yaHIwWNyoJDolC/6Lc5L/IQA== dependencies: - iconv-lite "0.4.15" - libbase64 "0.1.0" - libqp "1.1.0" + aproba "^2.0.0" + get-stream "^4.0.0" + npm-package-arg "^6.1.0" + npm-registry-fetch "^3.8.0" -libnpmaccess@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.0.tgz#33cc9c8a5cb53e87d06bf2e547c2eba974f619af" +libnpmpublish@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-1.1.1.tgz#ff0c6bb0b4ad2bda2ad1f5fba6760a4af37125f0" + integrity sha512-nefbvJd/wY38zdt+b9SHL6171vqBrMtZ56Gsgfd0duEKb/pB8rDT4/ObUQLrHz1tOfht1flt2zM+UGaemzAG5g== dependencies: aproba "^2.0.0" + figgy-pudding "^3.5.1" get-stream "^4.0.0" + lodash.clonedeep "^4.5.0" + normalize-package-data "^2.4.0" npm-package-arg "^6.1.0" npm-registry-fetch "^3.8.0" + semver "^5.5.1" + ssri "^6.0.1" -libqp@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/libqp/-/libqp-1.1.0.tgz#f5e6e06ad74b794fb5b5b66988bf728ef1dedbe8" +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -lint-staged@^7.1.0: - version "7.2.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.2.2.tgz#0983d55d497f19f36d11ff2c8242b2f56cc2dd05" +lint-staged@^8.1.5: + version "8.1.7" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-8.1.7.tgz#a8988bc83bdffa97d04adb09dbc0b1f3a58fa6fc" + integrity sha512-egT0goFhIFoOGk6rasPngTFh2qDqxZddM0PwI58oi66RxCDcn5uDwxmiasWIF0qGnchHSYVJ8HPRD5LrFo7TKA== dependencies: chalk "^2.3.1" commander "^2.14.1" - cosmiconfig "^5.0.2" + cosmiconfig "^5.2.0" debug "^3.1.0" dedent "^0.7.0" - execa "^0.9.0" + del "^3.0.0" + execa "^1.0.0" find-parent-dir "^0.3.0" + g-status "^2.0.2" is-glob "^4.0.0" is-windows "^1.0.2" - jest-validate "^23.5.0" - listr "^0.14.1" - lodash "^4.17.5" + listr "^0.14.2" + listr-update-renderer "^0.5.0" + lodash "^4.17.11" log-symbols "^2.2.0" micromatch "^3.1.8" npm-which "^3.0.1" @@ -6205,17 +7398,20 @@ lint-staged@^7.1.0: path-is-inside "^1.0.2" pify "^3.0.0" please-upgrade-node "^3.0.2" - staged-git-files "1.1.1" + staged-git-files "1.1.2" string-argv "^0.0.2" stringify-object "^3.2.2" + yup "^0.27.0" listr-silent-renderer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + integrity sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4= -listr-update-renderer@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" +listr-update-renderer@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz#4ea8368548a7b8aecb7e06d8c95cb45ae2ede6a2" + integrity sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA== dependencies: chalk "^1.1.3" cli-truncate "^0.2.1" @@ -6223,35 +7419,38 @@ listr-update-renderer@^0.4.0: figures "^1.7.0" indent-string "^3.0.0" log-symbols "^1.0.2" - log-update "^1.0.2" + log-update "^2.3.0" strip-ansi "^3.0.1" -listr-verbose-renderer@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" +listr-verbose-renderer@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz#f1132167535ea4c1261102b9f28dac7cba1e03db" + integrity sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw== dependencies: - chalk "^1.1.3" - cli-cursor "^1.0.2" + chalk "^2.4.1" + cli-cursor "^2.1.0" date-fns "^1.27.2" - figures "^1.7.0" + figures "^2.0.0" -listr@^0.14.1: - version "0.14.2" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.2.tgz#cbe44b021100a15376addfc2d79349ee430bfe14" +listr@^0.14.2: + version "0.14.3" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.3.tgz#2fea909604e434be464c50bddba0d496928fa586" + integrity sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA== dependencies: "@samverschueren/stream-to-observable" "^0.3.0" is-observable "^1.1.0" is-promise "^2.1.0" is-stream "^1.1.0" listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.4.0" - listr-verbose-renderer "^0.4.0" - p-map "^1.1.1" - rxjs "^6.1.0" + listr-update-renderer "^0.5.0" + listr-verbose-renderer "^0.5.0" + p-map "^2.0.0" + rxjs "^6.3.3" load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -6262,19 +7461,22 @@ load-json-file@^1.0.0: load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= dependencies: graceful-fs "^4.1.2" parse-json "^4.0.0" pify "^3.0.0" strip-bom "^3.0.0" -loader-runner@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" +loader-runner@^2.3.0, loader-runner@^2.3.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== -loader-utils@1.1.0, loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.0.3, loader-utils@^1.1.0: +loader-utils@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= dependencies: big.js "^3.1.3" emojis-list "^2.0.0" @@ -6283,15 +7485,26 @@ loader-utils@1.1.0, loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.0. loader-utils@^0.2.16: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g= dependencies: big.js "^3.1.3" emojis-list "^2.0.0" json5 "^0.5.0" object-assign "^4.0.1" +loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.0.3, loader-utils@^1.1.0, loader-utils@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + 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" @@ -6299,124 +7512,87 @@ locate-path@^2.0.0: locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: p-locate "^3.0.0" path-exists "^3.0.0" -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: - lodash._basecopy "^3.0.0" - lodash.keys "^3.0.0" - -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basecreate@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash._isiterateecall@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + p-locate "^4.1.0" lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - -lodash.create@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" - dependencies: - lodash._baseassign "^3.0.0" - lodash._basecreate "^3.0.0" - lodash._isiterateecall "^3.0.0" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= lodash.curry@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170" - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - -lodash.endswith@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.endswith/-/lodash.endswith-4.2.1.tgz#fed59ac1738ed3e236edd7064ec456448b37bc09" + integrity sha1-JI42By7ekGUB11lmIAqG2riyMXA= lodash.escape@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" + integrity sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg= lodash.escaperegexp@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" + integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= lodash.flow@^3.3.0: version "3.5.0" resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" + integrity sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o= -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" +lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= -lodash.isfunction@^3.0.8: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" +lodash.ismatch@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" + integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - -lodash.mergewith@^4.6.0: +lodash.mergewith@^4.6.1: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" + integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ== + +lodash.set@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" + integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - -lodash.startswith@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.startswith/-/lodash.startswith-4.2.1.tgz#c598c4adce188a27e53145731cdc6c0e7177600c" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= lodash.template@^4.0.2: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= dependencies: lodash._reinterpolate "~3.0.0" lodash.templatesettings "^4.0.0" @@ -6424,84 +7600,73 @@ lodash.template@^4.0.2: lodash.templatesettings@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= dependencies: lodash._reinterpolate "~3.0.0" lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^3.9.3: - version "3.10.1" - resolved "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.0: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - -log-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" - dependencies: - chalk "^1.0.0" +lodash@^4.0.0, lodash@^4.17.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.6.1: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -log-symbols@^2.2.0: +log-symbols@2.2.0, log-symbols@^2.1.0, log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== dependencies: chalk "^2.0.1" -log-update@^1.0.2: +log-symbols@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + integrity sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg= dependencies: - ansi-escapes "^1.0.0" - cli-cursor "^1.0.2" + chalk "^1.0.0" -log4js@^2.5.3: - version "2.11.0" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-2.11.0.tgz#bf3902eff65c6923d9ce9cfbd2db54160e34005a" - dependencies: - circular-json "^0.5.4" - date-format "^1.2.0" - debug "^3.1.0" - semver "^5.5.0" - streamroller "0.7.0" - optionalDependencies: - amqplib "^0.5.2" - axios "^0.15.3" - hipchat-notifier "^1.1.0" - loggly "^1.1.0" - mailgun-js "^0.18.0" - nodemailer "^2.5.0" - redis "^2.7.1" - slack-node "~0.2.0" - -loggly@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/loggly/-/loggly-1.1.1.tgz#0a0fc1d3fa3a5ec44fdc7b897beba2a4695cebee" +log-update@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" + integrity sha1-iDKP19HOeTiykoN0bwsbwSayRwg= dependencies: - json-stringify-safe "5.0.x" - request "2.75.x" - timespan "2.3.x" + ansi-escapes "^3.0.0" + cli-cursor "^2.0.0" + wrap-ansi "^3.0.1" -long@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" +log4js@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-4.3.0.tgz#dfca01d9ac0b862c2ed51a06cf57aeb96166713f" + integrity sha512-ivqZBkBvWLJ8rXfhb4E0979olSwnYBPSZy/5WhLNXwntqRgUhxHnqcXGmVw0t+XmLNTr3GAWEzjqHMzu4KM7rA== + dependencies: + date-format "^2.0.0" + debug "^4.1.1" + flatted "^2.0.0" + rfdc "^1.1.2" + streamroller "^1.0.5" -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" +loglevelnext@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/loglevelnext/-/loglevelnext-1.0.5.tgz#36fc4f5996d6640f539ff203ba819641680d75a2" + integrity sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A== + dependencies: + es6-symbol "^3.1.1" + object.assign "^4.1.0" loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: js-tokens "^3.0.0 || ^4.0.0" -loud-rejection@^1.0.0: +loud-rejection@^1.0.0, loud-rejection@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= dependencies: currently-unhandled "^0.4.1" signal-exit "^3.0.0" @@ -6509,52 +7674,57 @@ loud-rejection@^1.0.0: lower-case@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= -lowercase-keys@1.0.0, lowercase-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" - -lru-cache@2.2.x: - version "2.2.4" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== -lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" +lru-cache@4.1.x, lru-cache@^4.1.2, lru-cache@^4.1.3: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" -mailcomposer@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/mailcomposer/-/mailcomposer-4.0.1.tgz#0e1c44b2a07cf740ee17dc149ba009f19cadfeb4" +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: - buildmail "4.0.1" - libmime "3.0.0" + yallist "^3.0.2" -mailgun-js@^0.18.0: - version "0.18.1" - resolved "https://registry.yarnpkg.com/mailgun-js/-/mailgun-js-0.18.1.tgz#ee39aa18d7bb598a5ce9ede84afb681defc8a6b0" - dependencies: - async "~2.6.0" - debug "~3.1.0" - form-data "~2.3.0" - inflection "~1.12.0" - is-stream "^1.1.0" - path-proxy "~1.0.0" - promisify-call "^2.0.2" - proxy-agent "~3.0.0" - tsscmp "~1.0.0" +macos-release@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.2.0.tgz#ab58d55dd4714f0a05ad4b0e90f4370fef5cdea8" + integrity sha512-iV2IDxZaX8dIcM7fG6cI46uNmHUxHE4yN+Z8tKHAW1TBPMZDIKHf/3L+YnOuj/FK9il14UaVdHmiQ1tsi90ltA== make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== dependencies: pify "^3.0.0" +make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-error@1.x: + version "1.3.5" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" + integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== + make-fetch-happen@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083" + integrity sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ== dependencies: agentkeepalive "^3.4.1" cacache "^11.0.1" @@ -6570,72 +7740,94 @@ make-fetch-happen@^4.0.1: makeerror@1.0.x: version "1.0.11" - resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= dependencies: tmpl "1.0.x" mamacro@^0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" + integrity sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA== + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= map-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" + integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= dependencies: object-visit "^1.0.0" -marked@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.5.1.tgz#062f43b88b02ee80901e8e8d8e6a620ddb3aa752" +marked@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.2.tgz#c574be8b545a8b48641456ca1dbe0e37b6dccc1a" + integrity sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA== marked@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66" + integrity sha512-tMsdNBgOsrUophCAFQl0XPe6Zqk/uy9gnue+jIIKhykO51hxyu6uNx7zBPy0+y/WKYVZZMspV9YeXLNdKk+iYw== -math-expression-evaluator@^1.2.14: - version "1.2.17" - resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" - -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" +matcher@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/matcher/-/matcher-1.1.1.tgz#51d8301e138f840982b338b116bb0c09af62c1c2" + integrity sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg== + dependencies: + escape-string-regexp "^1.0.4" md5.js@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== dependencies: hash-base "^3.0.0" inherits "^2.0.1" + safe-buffer "^5.1.2" -mdn-data@^1.0.0, mdn-data@~1.1.0: +mdn-data@~1.1.0: version "1.1.4" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01" + integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA== media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== dependencies: - mimic-fn "^1.0.0" + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= dependencies: errno "^0.1.3" readable-stream "^2.0.1" @@ -6643,6 +7835,7 @@ memory-fs@^0.4.0, memory-fs@~0.4.1: meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= dependencies: camelcase-keys "^2.0.0" decamelize "^1.1.2" @@ -6658,6 +7851,7 @@ meow@^3.3.0: meow@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975" + integrity sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A== dependencies: camelcase-keys "^4.0.0" decamelize-keys "^1.0.0" @@ -6669,55 +7863,32 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" -meow@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" - dependencies: - camelcase-keys "^4.0.0" - decamelize-keys "^1.0.0" - loud-rejection "^1.0.0" - minimist-options "^3.0.1" - normalize-package-data "^2.3.4" - read-pkg-up "^3.0.0" - redent "^2.0.0" - trim-newlines "^2.0.0" - yargs-parser "^10.0.0" - merge-stream@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= dependencies: readable-stream "^2.0.1" -merge2@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.2.tgz#03212e3da8d86c4d8523cebd6318193414f94e34" +merge2@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" + integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== merge@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - -micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== + +microevent.ts@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" + integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== -micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -6733,111 +7904,123 @@ micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: snapdragon "^0.8.1" to-regex "^3.0.2" +micromatch@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== dependencies: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@~1.36.0: - version "1.36.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397" +mime-db@1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" + integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== -mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.18, mime-types@~2.1.19, mime-types@~2.1.7: - version "2.1.20" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19" +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.24" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" + integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== dependencies: - mime-db "~1.36.0" - -mime@^1.3.4, mime@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + mime-db "1.40.0" -mime@^2.0.3: - version "2.3.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" +mime@^2.0.3, mime@^2.1.0, mime@^2.3.1: + version "2.4.3" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.3.tgz#229687331e86f68924e6cb59e1cdd937f18275fe" + integrity sha512-QgrPRJfE+riq5TPZMcHZOtm8c6K/yYrMbKIoRfapfiGLxS8OTeIfRhUGW5LU7MlRa52KOAGCfUNruqLrIBvWZw== mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-response@^1.0.0: +mimic-response@^1.0.0, mimic-response@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -mini-css-extract-plugin@~0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.4.tgz#c10410a004951bd3cedac1da69053940fccb625d" +mini-css-extract-plugin@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.6.0.tgz#a3f13372d6fcde912f3ee4cd039665704801e3b9" + integrity sha512-79q5P7YGI6rdnVyIAV4NXpBQJFWdkzJxCim3Kog4078fM0piAaFlwocqbejdWtLW1cEzCexPrh6EdyFsPgVdAw== dependencies: loader-utils "^1.1.0" + normalize-url "^2.0.1" schema-utils "^1.0.0" webpack-sources "^1.1.0" minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" minimist-options@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== dependencies: arrify "^1.0.1" is-plain-obj "^1.1.0" minimist@0.0.8: version "0.0.8" - resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0: +minimist@1.2.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0: version "1.2.0" - resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= minimist@~0.0.1: version "0.0.10" - resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.2.1, minipass@^2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957" +minipass@^2.2.1, minipass@^2.3.4, minipass@^2.3.5: + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" +minizlib@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" + integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== dependencies: minipass "^2.2.1" -mississippi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^2.0.1" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== dependencies: concat-stream "^1.5.0" duplexify "^3.4.2" @@ -6853,44 +8036,61 @@ mississippi@^3.0.0: mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" - resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" -mocha@~3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d" +mocha@^6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.1.4.tgz#e35fada242d5434a7e163d555c705f6875951640" + integrity sha512-PN8CIy4RXsIoxoFJzS4QNnCH4psUCPWc4/rPrst/ecSJJbLBkubMiyGCP2Kj/9YnWbotFqAoeXyXMucj7gwCFg== dependencies: - browser-stdout "1.3.0" - commander "2.9.0" - debug "2.6.8" - diff "3.2.0" + ansi-colors "3.2.3" + browser-stdout "1.3.1" + debug "3.2.6" + diff "3.5.0" escape-string-regexp "1.0.5" - glob "7.1.1" - growl "1.9.2" - he "1.1.1" - json3 "3.3.2" - lodash.create "3.1.1" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "2.2.0" + minimatch "3.0.4" mkdirp "0.5.1" - supports-color "3.1.2" + ms "2.1.1" + node-environment-flags "1.0.5" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.2.2" + yargs-parser "13.0.0" + yargs-unparser "1.5.0" modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" + integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== -moment@~2.21.0: - version "2.21.0" - resolved "http://registry.npmjs.org/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a" +moment@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= dependencies: aproba "^1.1.1" copy-concurrently "^1.0.0" @@ -6899,30 +8099,45 @@ move-concurrently@^1.0.1: rimraf "^2.5.4" run-queue "^1.0.3" -ms@2.0.0, ms@^2.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.1, ms@^2.0.0, ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== multimatch@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" + integrity sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis= dependencies: array-differ "^1.0.0" array-union "^1.0.1" arrify "^1.0.0" minimatch "^3.0.0" -mute-stream@0.0.7, mute-stream@~0.0.4: +mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +mute-stream@~0.0.4: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.9.2: - version "2.11.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099" +nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -6939,40 +8154,56 @@ nanomatch@^1.2.9: natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= needle@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.2.tgz#1120ca4c41f2fcc6976fd28a8968afe239929418" + version "2.4.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" + integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== dependencies: - debug "^2.1.2" + debug "^3.2.6" iconv-lite "^0.4.4" sax "^1.2.4" -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -neo-async@^2.5.0: - version "2.5.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.2.tgz#489105ce7bc54e709d736b195f82135048c50fcc" +neo-async@^2.5.0, neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -netmask@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/netmask/-/netmask-1.0.6.tgz#20297e89d86f6f6400f250d9f4f6b4c1945fcd35" +next-tick@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== no-case@^2.2.0: version "2.3.2" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== dependencies: lower-case "^1.1.1" +node-environment-flags@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" + integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + node-fetch-npm@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" + integrity sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw== dependencies: encoding "^0.1.11" json-parse-better-errors "^1.0.0" @@ -6981,19 +8212,21 @@ node-fetch-npm@^2.0.2: node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== dependencies: encoding "^0.1.11" is-stream "^1.0.1" -node-fetch@^2.1.2, node-fetch@~2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.2.0.tgz#4ee79bde909262f9775f731e3656d0db55ced5b5" +node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== -node-gyp@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" +node-gyp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-4.0.0.tgz#972654af4e5dd0cd2a19081b4b46fe0442ba6f45" + integrity sha512-2XiryJ8sICNo6ej8d0idXDEMKfVfFK7kekGCtJAuelGsYHQxhj13KTf95swTCN2dZ/4lTfZ84Fu31jqJEEgjWA== dependencies: - fstream "^1.0.0" glob "^7.0.3" graceful-fs "^4.1.2" mkdirp "^0.5.0" @@ -7003,16 +8236,18 @@ node-gyp@^3.8.0: request "^2.87.0" rimraf "2" semver "~5.3.0" - tar "^2.0.0" + tar "^4.4.8" which "1" node-int64@^0.4.0: version "0.4.0" - resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= node-libs-browser@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" + version "2.2.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.0.tgz#c72f60d9d46de08a940dedbb25f3ffa2f9bbaa77" + integrity sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA== dependencies: assert "^1.1.1" browserify-zlib "^0.2.0" @@ -7021,7 +8256,7 @@ node-libs-browser@^2.0.0: constants-browserify "^1.0.0" crypto-browserify "^3.11.0" domain-browser "^1.1.1" - events "^1.0.0" + events "^3.0.0" https-browserify "^1.0.0" os-browserify "^0.3.0" path-browserify "0.0.0" @@ -7035,21 +8270,29 @@ node-libs-browser@^2.0.0: timers-browserify "^2.0.4" tty-browserify "0.0.0" url "^0.11.0" - util "^0.10.3" + util "^0.11.0" vm-browserify "0.0.4" +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + node-notifier@^5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" + version "5.4.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.0.tgz#7b455fdce9f7de0c63538297354f3db468426e6a" + integrity sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ== dependencies: growly "^1.3.0" - semver "^5.4.1" + is-wsl "^1.1.0" + semver "^5.5.0" shellwords "^0.1.1" which "^1.3.0" -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -7062,123 +8305,82 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-uuid@~1.4.7: - version "1.4.8" - resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" - -nodemailer-direct-transport@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz#e96fafb90358560947e569017d97e60738a50a86" - dependencies: - nodemailer-shared "1.1.0" - smtp-connection "2.12.0" - -nodemailer-fetch@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz#79c4908a1c0f5f375b73fe888da9828f6dc963a4" - -nodemailer-shared@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz#cf5994e2fd268d00f5cf0fa767a08169edb07ec0" - dependencies: - nodemailer-fetch "1.6.0" - -nodemailer-smtp-pool@2.8.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz#2eb94d6cf85780b1b4725ce853b9cbd5e8da8c72" - dependencies: - nodemailer-shared "1.1.0" - nodemailer-wellknown "0.1.10" - smtp-connection "2.12.0" - -nodemailer-smtp-transport@2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz#03d71c76314f14ac7dbc7bf033a6a6d16d67fb77" - dependencies: - nodemailer-shared "1.1.0" - nodemailer-wellknown "0.1.10" - smtp-connection "2.12.0" - -nodemailer-wellknown@0.1.10: - version "0.1.10" - resolved "https://registry.yarnpkg.com/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz#586db8101db30cb4438eb546737a41aad0cf13d5" - -nodemailer@^2.5.0: - version "2.7.2" - resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-2.7.2.tgz#f242e649aeeae39b6c7ed740ef7b061c404d30f9" +node-releases@^1.1.19: + version "1.1.21" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.21.tgz#46c86f9adaceae4d63c75d3c2f2e6eee618e55f3" + integrity sha512-TwnURTCjc8a+ElJUjmDqU6+12jhli1Q61xOQmdZ7ECZVBZuQpN/1UnembiIHDM1wCcfLvh5wrWXUF5H6ufX64Q== dependencies: - libmime "3.0.0" - mailcomposer "4.0.1" - nodemailer-direct-transport "3.3.2" - nodemailer-shared "1.1.0" - nodemailer-smtp-pool "2.8.2" - nodemailer-smtp-transport "2.7.2" - socks "1.1.9" + semver "^5.3.0" "nopt@2 || 3", nopt@3.x: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= dependencies: abbrev "1" nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= dependencies: abbrev "1" osenv "^0.1.4" -normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" +normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== dependencies: hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" + resolve "^1.10.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.0.1, normalize-path@^2.1.1: +normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= dependencies: remove-trailing-separator "^1.0.1" -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@2.0.1: +normalize-url@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" + integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== dependencies: prepend-http "^2.0.0" query-string "^5.0.1" sort-keys "^2.0.0" -normalize-url@^1.4.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" - dependencies: - object-assign "^4.0.1" - prepend-http "^1.0.0" - query-string "^4.1.0" - sort-keys "^1.0.0" +normalize-url@^3.1.0, normalize-url@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== normalize.css@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-8.0.0.tgz#14ac5e461612538a4ce9be90a7da23f86e718493" + version "8.0.1" + resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-8.0.1.tgz#9b98a208738b9cc2634caacbc42d131c97487bf3" + integrity sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg== npm-bundled@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" + version "1.0.6" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" + integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== -npm-lifecycle@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-2.1.0.tgz#1eda2eedb82db929e3a0c50341ab0aad140ed569" +npm-lifecycle@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-2.1.1.tgz#0027c09646f0fd346c5c93377bdaba59c6748fdf" + integrity sha512-+Vg6I60Z75V/09pdcH5iUo/99Q/vop35PaI99elvxk56azSVVsdsSsS/sXqKDNwbRRNN1qSxkcO45ZOu0yOWew== dependencies: byline "^5.0.0" - graceful-fs "^4.1.11" - node-gyp "^3.8.0" + graceful-fs "^4.1.15" + node-gyp "^4.0.0" resolve-from "^4.0.0" slide "^1.1.6" uid-number "0.0.6" @@ -7188,15 +8390,17 @@ npm-lifecycle@^2.0.0: "npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" + integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== dependencies: hosted-git-info "^2.6.0" osenv "^0.1.5" semver "^5.5.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.10, npm-packlist@^1.1.6: - version "1.1.11" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.11.tgz#84e8c683cbe7867d34b1d357d893ce29e28a02de" +npm-packlist@^1.1.12, npm-packlist@^1.1.6, npm-packlist@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc" + integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -7204,19 +8408,23 @@ npm-packlist@^1.1.10, npm-packlist@^1.1.6: npm-path@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" + integrity sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw== dependencies: which "^1.2.10" -npm-pick-manifest@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.1.0.tgz#dc381bdd670c35d81655e1d5a94aa3dd4d87fce5" +npm-pick-manifest@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40" + integrity sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA== dependencies: + figgy-pudding "^3.5.1" npm-package-arg "^6.0.0" semver "^5.4.1" -npm-registry-fetch@^3.0.0, npm-registry-fetch@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz#aa7d9a7c92aff94f48dba0984bdef4bd131c88cc" +npm-registry-fetch@^3.8.0, npm-registry-fetch@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.9.0.tgz#44d841780e2833f06accb34488f8c7450d1a6856" + integrity sha512-srwmt8YhNajAoSAaDWndmZgx89lJwIZ1GWxOuckH4Coek4uHv5S+o/l9FLQe/awA+JwTnj4FJHldxhlXdZEBmw== dependencies: JSONStream "^1.3.4" bluebird "^3.5.1" @@ -7228,12 +8436,14 @@ npm-registry-fetch@^3.0.0, npm-registry-fetch@^3.8.0: npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= dependencies: path-key "^2.0.0" npm-which@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + integrity sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo= dependencies: commander "^2.9.0" npm-path "^2.0.2" @@ -7242,142 +8452,149 @@ npm-which@^3.0.1: "npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.2, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" gauge "~2.7.3" set-blocking "~2.0.0" -nth-check@^1.0.1, nth-check@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" +nth-check@^1.0.2, nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== dependencies: boolbase "~1.0.0" null-check@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" + integrity sha1-l33/1xdgErnsMNKjnbXPcqBDnt0= -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" +null-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/null-loader/-/null-loader-2.0.0.tgz#1c99da3f0d2c0996b51e9eada3a898a5d57472aa" + integrity sha512-PhEeA3v/tAacxC5dNO1i2yXzGVWWrZ9jTx+TMEJ716amvnBXzvrxIwy9HW7MyJsHe8ACQzpiQgbrAjDRMA7gcg== + dependencies: + loader-utils "^1.2.3" + schema-utils "^1.0.0" number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= nwsapi@^2.0.7: - version "2.0.9" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016" - -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + version "2.1.4" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.1.4.tgz#e006a878db23636f8e8a67d33ca0e4edf61a842f" + integrity sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw== oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== object-assign@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" + integrity sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo= object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-component@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + integrity sha1-8MaapQ78lbhmwYb0AKM3acsvEpE= object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= dependencies: copy-descriptor "^0.1.0" define-property "^0.2.5" kind-of "^3.0.3" -object-keys@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" +object-keys@^1.0.11, object-keys@^1.0.12: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= dependencies: isobject "^3.0.0" +object.assign@4.1.0, object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= dependencies: define-properties "^1.1.2" es-abstract "^1.5.1" -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" -object.values@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" +object.values@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.0.tgz#bf6810ef5da3e5325790eaaa2be213ea84624da9" + integrity sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg== dependencies: - define-properties "^1.1.2" - es-abstract "^1.6.1" - function-bind "^1.1.0" - has "^1.0.1" + define-properties "^1.1.3" + es-abstract "^1.12.0" + function-bind "^1.1.1" + has "^1.0.3" + +octokit-pagination-methods@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" + integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= dependencies: ee-first "1.1.1" once@1.x, 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" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= dependencies: mimic-fn "^1.0.0" -opn-cli@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/opn-cli/-/opn-cli-4.0.0.tgz#dcc00052db3f296384f76e56ca1c59ffd7deb4d0" - dependencies: - file-type "^10.4.0" - get-stdin "^6.0.0" - meow "^5.0.0" - opn "^5.4.0" - temp-write "^3.4.0" - -opn@^5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035" - dependencies: - is-wsl "^1.1.0" - optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= dependencies: minimist "~0.0.1" wordwrap "~0.0.2" @@ -7385,6 +8602,7 @@ optimist@^0.6.1: optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" @@ -7396,175 +8614,208 @@ optionator@^0.8.1, optionator@^0.8.2: os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" +os-locale@^3.0.0, os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-name@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" + integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" + macos-release "^2.2.0" + windows-release "^3.1.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= osenv@0, osenv@^0.1.4, osenv@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -p-cancelable@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-each-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" + integrity sha1-kw89Et0fUOdDRFeiLNbwSsatf3E= + dependencies: + p-reduce "^1.0.0" p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== 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.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec" +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" + integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ== 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@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== dependencies: p-limit "^2.0.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + p-map-series@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" + integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= dependencies: p-reduce "^1.0.0" p-map@^1.1.1, p-map@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== + +p-map@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== p-pipe@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" + integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= + +p-queue@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-4.0.0.tgz#ed0eee8798927ed6f2c2f5f5b77fdb2061a5d346" + integrity sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg== + dependencies: + eventemitter3 "^3.1.0" p-reduce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - dependencies: - p-finally "^1.0.0" + integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= 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.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== p-waterfall@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-1.0.0.tgz#7ed94b3ceb3332782353af6aae11aa9fc235bb00" + integrity sha1-ftlLPOszMngjU69qrhGqn8I1uwA= dependencies: p-reduce "^1.0.0" -pac-proxy-agent@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-2.0.2.tgz#90d9f6730ab0f4d2607dcdcd4d3d641aa26c3896" - dependencies: - agent-base "^4.2.0" - debug "^3.1.0" - get-uri "^2.0.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.1" - pac-resolver "^3.0.0" - raw-body "^2.2.0" - socks-proxy-agent "^3.0.0" - -pac-resolver@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-3.0.0.tgz#6aea30787db0a891704deb7800a722a7615a6f26" - dependencies: - co "^4.6.0" - degenerator "^1.0.4" - ip "^1.1.5" - netmask "^1.0.6" - thunkify "^2.1.2" - -package-json@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-5.0.0.tgz#a7dbe2725edcc7dc9bcee627672275e323882433" +package-json@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.3.0.tgz#5ed793418b8322af7abfb985a19a20c2f40c2fb0" + integrity sha512-XO7WS3EEXd48vmW633Y97Mh9xuENFiOevI9G+ExfTG/k6xuY9cBd3fxkAoDMSEsNZXasaVJIJ1rD/n7GMf18bA== dependencies: - got "^8.3.1" - registry-auth-token "^3.3.2" - registry-url "^3.1.0" - semver "^5.5.0" + got "^9.6.0" + registry-auth-token "^3.4.0" + registry-url "^5.0.0" + semver "^5.6.0" -pacote@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.1.0.tgz#59810859bbd72984dcb267269259375d32f391e5" +pacote@^9.5.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.0.tgz#85f3013a3f6dd51c108b0ccabd3de8102ddfaeda" + integrity sha512-aUplXozRbzhaJO48FaaeClmN+2Mwt741MC6M3bevIGZwdCaP7frXzbUOfOWa91FPHoLITzG0hYaKY363lxO3bg== dependencies: - bluebird "^3.5.1" - cacache "^11.0.2" - figgy-pudding "^3.2.1" - get-stream "^3.0.0" - glob "^7.1.2" - lru-cache "^4.1.3" + bluebird "^3.5.3" + cacache "^11.3.2" + figgy-pudding "^3.5.1" + get-stream "^4.1.0" + glob "^7.1.3" + lru-cache "^5.1.1" make-fetch-happen "^4.0.1" minimatch "^3.0.4" - minipass "^2.3.3" + minipass "^2.3.5" mississippi "^3.0.0" mkdirp "^0.5.1" normalize-package-data "^2.4.0" npm-package-arg "^6.1.0" - npm-packlist "^1.1.10" - npm-pick-manifest "^2.1.0" - npm-registry-fetch "^3.0.0" + npm-packlist "^1.1.12" + npm-pick-manifest "^2.2.3" + npm-registry-fetch "^3.8.0" osenv "^0.1.5" promise-inflight "^1.0.1" promise-retry "^1.1.1" - protoduck "^5.0.0" + protoduck "^5.0.1" rimraf "^2.6.2" safe-buffer "^5.1.2" - semver "^5.5.0" - ssri "^6.0.0" - tar "^4.4.3" - unique-filename "^1.1.0" - which "^1.3.0" + semver "^5.6.0" + ssri "^6.0.1" + tar "^4.4.8" + unique-filename "^1.1.1" + which "^1.3.1" pako@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" + version "1.0.10" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" + integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== parallel-transform@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + integrity sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY= dependencies: cyclist "~0.2.2" inherits "^2.0.3" @@ -7573,116 +8824,152 @@ parallel-transform@^1.1.0: param-case@2.1.x: version "2.1.1" resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= + dependencies: + no-case "^2.2.0" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: - no-case "^2.2.0" + callsites "^3.0.0" parse-asn1@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" + version "5.1.4" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" + integrity sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw== dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" create-hash "^1.1.0" evp_bytestokey "^1.0.0" pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" parse-github-repo-url@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" + integrity sha1-nn2LslKmy2ukJZUGC3v23z28H1A= parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= dependencies: error-ex "^1.2.0" parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= dependencies: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + +parse-path@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.1.tgz#0ec769704949778cb3b8eda5e994c32073a1adff" + integrity sha512-d7yhga0Oc+PwNXDvQ0Jv1BuWkLVPXcAoQ/WREgd6vNNoKYaW52KI+RdOFjI63wjkmps9yUE8VS4veP+AgpQ/hA== + dependencies: + is-ssh "^1.3.0" + protocols "^1.4.0" + +parse-url@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.1.tgz#99c4084fc11be14141efa41b3d117a96fcb9527f" + integrity sha512-flNUPP27r3vJpROi0/R3/2efgKkyXqnXwyP1KQ2U0SfFRgdizOdWfvrrvJg1LuOoxs7GQhmxJlq23IpQ/BkByg== + dependencies: + is-ssh "^1.3.0" + normalize-url "^3.3.0" + parse-path "^4.0.0" + protocols "^1.4.0" + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== parseqs@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + integrity sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0= dependencies: better-assert "~1.0.0" parseuri@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + integrity sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo= dependencies: better-assert "~1.0.0" -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= path-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + integrity sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo= path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= dependencies: pinkie-promise "^2.0.0" 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-is-absolute@^1.0.0, path-is-absolute@^1.0.1: +path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-parse@^1.0.5: +path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== path-posix@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/path-posix/-/path-posix-1.0.0.tgz#06b26113f56beab042545a23bfa88003ccac260f" - -path-proxy@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/path-proxy/-/path-proxy-1.0.0.tgz#18e8a36859fc9d2f1a53b48dee138543c020de5e" - dependencies: - inflection "~1.3.0" + integrity sha1-BrJhE/Vr6rBCVFojv6iAA8ysJg8= path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= dependencies: graceful-fs "^4.1.2" pify "^2.0.0" @@ -7691,23 +8978,27 @@ path-type@^1.0.0: path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== dependencies: pify "^3.0.0" path@~0.12.7: version "0.12.7" resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" + integrity sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8= dependencies: process "^0.11.1" util "^0.10.3" -pathval@^1.0.0: +pathval@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" + integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= pbkdf2@^3.0.3: - version "3.0.16" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.16.tgz#7404208ec6b01b62d85bf83853a8064f8d9c2a5c" + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== dependencies: create-hash "^1.1.2" create-hmac "^1.1.4" @@ -7718,376 +9009,219 @@ pbkdf2@^3.0.3: pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.5: + version "2.0.7" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6" + integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA== pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pirates@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + dependencies: + node-modules-regexp "^1.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" pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== dependencies: find-up "^3.0.0" +pkg-dir@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + please-upgrade-node@^3.0.2, please-upgrade-node@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz#ed320051dfcc5024fae696712c8288993595e8ac" + integrity sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ== dependencies: semver-compare "^1.0.0" -pluralize@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" - pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== -popper.js@^1.14.1: - version "1.14.4" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.4.tgz#8eec1d8ff02a5a3a152dd43414a15c7b79fd69b6" +popper.js@^1.14.1, popper.js@^1.14.4: + version "1.15.0" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2" + integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA== posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postcss-calc@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" - dependencies: - postcss "^5.0.2" - postcss-message-helpers "^2.0.0" - reduce-css-calc "^1.2.6" - -postcss-colormin@^2.1.8: - version "2.2.2" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" - dependencies: - colormin "^1.0.5" - postcss "^5.0.13" - postcss-value-parser "^3.2.3" - -postcss-convert-values@^2.3.4: - version "2.6.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" - dependencies: - postcss "^5.0.11" - postcss-value-parser "^3.1.2" - -postcss-discard-comments@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" +postcss-modules-extract-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" + integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ== dependencies: - postcss "^5.0.14" + postcss "^7.0.5" -postcss-discard-duplicates@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" +postcss-modules-local-by-default@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz#dd9953f6dd476b5fd1ef2d8830c8929760b56e63" + integrity sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA== dependencies: - postcss "^5.0.4" + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + postcss-value-parser "^3.3.1" -postcss-discard-empty@^2.0.1: +postcss-modules-scope@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" - dependencies: - postcss "^5.0.14" - -postcss-discard-overridden@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" - dependencies: - postcss "^5.0.16" - -postcss-discard-unused@^2.2.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" - dependencies: - postcss "^5.0.14" - uniqs "^2.0.0" - -postcss-filter-plugins@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz#82245fdf82337041645e477114d8e593aa18b8ec" - dependencies: - postcss "^5.0.4" - -postcss-merge-idents@^2.1.5: - version "2.1.7" - resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" - dependencies: - has "^1.0.1" - postcss "^5.0.10" - postcss-value-parser "^3.1.1" - -postcss-merge-longhand@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" - dependencies: - postcss "^5.0.4" - -postcss-merge-rules@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.1.0.tgz#ad3f5bf7856114f6fcab901b0502e2a2bc39d4eb" + integrity sha512-91Rjps0JnmtUB0cujlc8KIKCsJXWjzuxGeT/+Q2i2HXKZ7nBUeF9YQTZZTNvHVoNYj1AthsjnGLtqDUE0Op79A== dependencies: - browserslist "^1.5.2" - caniuse-api "^1.5.2" - postcss "^5.0.4" - postcss-selector-parser "^2.2.2" - vendors "^1.0.0" + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" -postcss-message-helpers@^2.0.0: +postcss-modules-values@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" - -postcss-minify-font-values@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" - dependencies: - object-assign "^4.0.1" - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-minify-gradients@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" - dependencies: - postcss "^5.0.12" - postcss-value-parser "^3.3.0" - -postcss-minify-params@^1.0.4: - version "1.2.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.2" - postcss-value-parser "^3.0.2" - uniqs "^2.0.0" - -postcss-minify-selectors@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" - dependencies: - alphanum-sort "^1.0.2" - has "^1.0.1" - postcss "^5.0.14" - postcss-selector-parser "^2.0.0" - -postcss-modules-extract-imports@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" - dependencies: - postcss "^6.0.1" - -postcss-modules-local-by-default@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-scope@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-values@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz#479b46dc0c5ca3dc7fa5270851836b9ec7152f64" + integrity sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w== dependencies: icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - -postcss-normalize-charset@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" - dependencies: - postcss "^5.0.5" - -postcss-normalize-url@^3.0.7: - version "3.0.8" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^1.4.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - -postcss-ordered-values@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.1" + postcss "^7.0.6" -postcss-reduce-idents@^2.2.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-reduce-initial@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" - dependencies: - postcss "^5.0.4" - -postcss-reduce-transforms@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" - dependencies: - has "^1.0.1" - postcss "^5.0.8" - postcss-value-parser "^3.0.1" - -postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" +postcss-selector-parser@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" + integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== dependencies: - flatten "^1.0.2" + cssesc "^3.0.0" indexes-of "^1.0.1" uniq "^1.0.1" -postcss-svgo@^2.1.1: - version "2.1.6" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" - dependencies: - is-svg "^2.0.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - svgo "^0.7.0" - -postcss-unique-selectors@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" - -postcss-zindex@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" - dependencies: - has "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: - version "5.2.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" +postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss@^6.0.1, postcss@^6.0.14: - version "6.0.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" +postcss@^7.0.14, postcss@^7.0.5, postcss@^7.0.6: + version "7.0.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.16.tgz#48f64f1b4b558cb8b52c88987724359acb010da2" + integrity sha512-MOo8zNSlIqh22Uaa3drkdIAgUGEL+AD1ESiSdmElLUmE2uVDo1QloiT/IfW9qRw8Gw+Y/w69UVMGwbufMSftxA== dependencies: - chalk "^2.4.1" + chalk "^2.4.2" source-map "^0.6.1" - supports-color "^5.4.0" + supports-color "^6.1.0" prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - -prepend-http@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" -prettier@^1.11.1: - version "1.14.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.2.tgz#0ac1c6e1a90baa22a62925f41963c841983282f9" +prettier@^1.17.0: + version "1.17.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db" + integrity sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg== pretty-error@^2.0.2: version "2.1.1" resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + integrity sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM= dependencies: renderkid "^2.0.1" utila "~0.4" -pretty-format@^23.5.0: - version "23.5.0" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-23.5.0.tgz#0f9601ad9da70fe690a269cd3efca732c210687c" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - -pretty-format@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" +pretty-format@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.8.0.tgz#8dae7044f58db7cb8be245383b565a963e3c27f2" + integrity sha512-P952T7dkrDEplsR+TuY7q3VXDae5Sr7zmQb12JU/NDQa/3CH7/QW0yvqLcGN6jL+zQFKaoJcPc+yJxMTGmosqw== dependencies: - ansi-regex "^3.0.0" + "@jest/types" "^24.8.0" + ansi-regex "^4.0.0" ansi-styles "^3.2.0" + react-is "^16.8.4" -private@^0.1.6, private@^0.1.8, private@~0.1.5: +private@^0.1.6, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== process@^0.11.1, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" +progress@^2.0.0, progress@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= promise-retry@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" + integrity sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0= dependencies: err-code "^1.0.0" retry "^0.10.0" @@ -8095,87 +9229,92 @@ promise-retry@^1.1.1: promise@^7.0.3, promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== dependencies: asap "~2.0.3" -promisify-call@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/promisify-call/-/promisify-call-2.0.4.tgz#d48c2d45652ccccd52801ddecbd533a6d4bd5fba" - dependencies: - with-callback "^1.0.2" - -prompts@^0.1.9: - version "0.1.14" - resolved "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2" +prompts@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.1.0.tgz#bf90bc71f6065d255ea2bdc0fe6520485c1b45db" + integrity sha512-+x5TozgqYdOwWsQFZizE/Tra3fKvAoy037kOyU6cgz84n8f6zxngLOV4O32kTwt9FcLCxAqw0P/c8rOr9y+Gfg== dependencies: - kleur "^2.0.1" - sisteransi "^0.1.1" + kleur "^3.0.2" + sisteransi "^1.0.0" promzard@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" + integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= dependencies: read "1" prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2: - version "15.6.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== dependencies: - loose-envify "^1.3.1" + loose-envify "^1.4.0" object-assign "^4.1.1" + react-is "^16.8.1" + +property-expr@^1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-1.5.1.tgz#22e8706894a0c8e28d58735804f6ba3a3673314f" + integrity sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g== proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= -protoduck@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.0.tgz#752145e6be0ad834cb25716f670a713c860dce70" - dependencies: - genfun "^4.0.1" +protocols@^1.1.0, protocols@^1.4.0: + version "1.4.7" + resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" + integrity sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg== -proxy-agent@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-3.0.1.tgz#4fb7b61b1476d0fe8e3a3384d90e2460bbded3f9" +protoduck@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" + integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg== dependencies: - agent-base "^4.2.0" - debug "^3.1.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.1" - lru-cache "^4.1.2" - pac-proxy-agent "^2.0.1" - proxy-from-env "^1.0.0" - socks-proxy-agent "^4.0.1" + genfun "^5.0.0" proxy-from-env@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4= prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= -psl@^1.1.24: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" +psl@^1.1.24, psl@^1.1.28: + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" + integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== public-encrypt@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994" + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== dependencies: bn.js "^4.1.0" browserify-rsa "^4.0.0" create-hash "^1.1.0" parse-asn1 "^5.0.0" randombytes "^2.0.1" + safe-buffer "^5.1.2" -pump@^2.0.0, pump@^2.0.1: +pump@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -8183,6 +9322,7 @@ pump@^2.0.0, pump@^2.0.1: pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -8190,6 +9330,7 @@ pump@^3.0.0: pumpify@^1.3.3: version "1.5.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== dependencies: duplexify "^3.6.0" inherits "^2.0.3" @@ -8198,58 +9339,61 @@ pumpify@^1.3.3: punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@1.4.1, punycode@^1.2.4, punycode@^1.4.1: +punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= -punycode@^2.1.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer@^1.5.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.7.0.tgz#edcba2300a50847202c0f19fd15e7a96171ff3bd" +puppeteer@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.17.0.tgz#371957d227a2f450fa74b78e78a2dadb2be7f14f" + integrity sha512-3EXZSximCzxuVKpIHtyec8Wm2dWZn1fc5tQi34qWfiUgubEVYHjUvr0GOJojqf3mifI6oyKnCdrGxaOI+lWReA== dependencies: - debug "^3.1.0" + debug "^4.1.0" extract-zip "^1.6.6" https-proxy-agent "^2.2.1" mime "^2.0.3" - progress "^2.0.0" + progress "^2.0.1" proxy-from-env "^1.0.0" rimraf "^2.6.1" - ws "^5.1.1" + ws "^6.1.0" pure-color@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" + integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= q@^1.1.2, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= qjobs@^1.1.4: version "1.2.0" resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" + integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== -qs@6.5.2, qs@~6.5.2: +qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - -qs@~6.2.0: - version "6.2.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.3.tgz#1cfcb25c10a9b2b483053ff39f5dfc9233908cfe" - -query-string@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - dependencies: - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== query-string@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== dependencies: decode-uri-component "^0.2.0" object-assign "^4.1.0" @@ -8258,60 +9402,65 @@ query-string@^5.0.1: querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= -querystringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.0.0.tgz#fa3ed6e68eb15159457c89b37bc6472833195755" +querystringify@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" + integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" - -randomatic@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116" - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" + integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" randomfill@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== dependencies: randombytes "^2.0.5" safe-buffer "^5.1.0" range-parser@^1.0.3, range-parser@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.3.3, raw-body@^2.2.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== dependencies: - bytes "3.0.0" - http-errors "1.6.3" - iconv-lite "0.4.23" + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" unpipe "1.0.0" -raw-loader@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" +raw-loader@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-2.0.0.tgz#e2813d9e1e3f80d1bbade5ad082e809679e20c26" + integrity sha512-kZnO5MoIyrojfrPWqrhFNLZemIAX8edMOCp++yC5RKxzFB3m92DqKNhKlU6+FvpOhWtvyh3jOaD7J6/9tpdIKg== + dependencies: + loader-utils "^1.1.0" + schema-utils "^1.0.0" -rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: +rc@^1.1.6, rc@^1.2.7, rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" ini "~1.3.0" @@ -8321,6 +9470,7 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: react-base16-styling@^0.5.1: version "0.5.3" resolved "https://registry.yarnpkg.com/react-base16-styling/-/react-base16-styling-0.5.3.tgz#3858f24e9c4dd8cbd3f702f3f74d581ca2917269" + integrity sha1-OFjyTpxN2MvT9wLz901YHKKRcmk= dependencies: base16 "^1.0.0" lodash.curry "^4.0.1" @@ -8330,28 +9480,37 @@ react-base16-styling@^0.5.1: react-dom@^0.14.0: version "0.14.9" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-0.14.9.tgz#05064a3dcf0fb1880a3b2bfc9d58c55d8d9f6293" + integrity sha1-BQZKPc8PsYgKOyv8nVjFXY2fYpM= -react-dom@~16.4.2: - version "16.4.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.2.tgz#4afed569689f2c561d2b8da0b819669c38a0bda4" +react-dom@~16.8.4: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f" + integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA== dependencies: - fbjs "^0.8.16" loose-envify "^1.1.0" object-assign "^4.1.1" - prop-types "^15.6.0" + prop-types "^15.6.2" + scheduler "^0.13.6" react-highlighter@^0.4.0: version "0.4.3" resolved "https://registry.yarnpkg.com/react-highlighter/-/react-highlighter-0.4.3.tgz#e32c84d053259c30ca72c615aa759036d0d23048" + integrity sha512-dwItRaGRHBceuzZd5NXeroapdmZ2JCAWZ3AdwdthRlSkdtPCY18DWrd6mPmiMCfSB6lgVwwCPQl4unZzG5sXXw== dependencies: blacklist "^1.1.4" create-react-class "^15.6.2" escape-string-regexp "^1.0.5" prop-types "^15.6.0" +react-is@^16.8.1, react-is@^16.8.4: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" + integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== + react-json-tree@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/react-json-tree/-/react-json-tree-0.11.0.tgz#f5b17e83329a9c76ae38be5c04fda3a7fd684a35" + version "0.11.2" + resolved "https://registry.yarnpkg.com/react-json-tree/-/react-json-tree-0.11.2.tgz#af70199fcbc265699ade2aec492465c51608f95e" + integrity sha512-aYhUPj1y5jR3ZQ+G3N7aL8FbTyO03iLwnVvvEikLcNFqNTyabdljo9xDftZndUBFyyyL0aK3qGO9+8EilILHUw== dependencies: babel-runtime "^6.6.1" prop-types "^15.5.8" @@ -8360,29 +9519,33 @@ react-json-tree@^0.11.0: react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-paginate@^5.2.3: - version "5.2.4" - resolved "https://registry.yarnpkg.com/react-paginate/-/react-paginate-5.2.4.tgz#0a4d6d468ebb1795d0581bd4fc930ad57a86ae14" +react-paginate@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/react-paginate/-/react-paginate-6.3.0.tgz#29cbb5d1645227f4e4f959b9d7f43cfae603f801" + integrity sha512-lT/ne7hZzctGDli4QzUAou0JjfZgxKmtl9/r30B5UVonICZIy1u0SrAkdlEZ5ubgzrOykBeCmxkTWi5IyPg4AQ== dependencies: prop-types "^15.6.1" react-popper@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-1.0.2.tgz#0e72f338b7f15ab9f9ec884e36ae0dad78a3e301" + version "1.3.3" + resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-1.3.3.tgz#2c6cef7515a991256b4f0536cd4bdcb58a7b6af6" + integrity sha512-ynMZBPkXONPc5K4P5yFWgZx5JGAUIP3pGGLNs58cfAPgK67olx7fmLp+AdpZ0+GoQ+ieFDa/z4cdV6u7sioH6w== dependencies: - babel-runtime "6.x.x" - create-react-context "^0.2.1" - popper.js "^1.14.1" + "@babel/runtime" "^7.1.2" + create-react-context "<=0.2.2" + popper.js "^1.14.4" prop-types "^15.6.1" - typed-styles "^0.0.5" - warning "^3.0.0" + typed-styles "^0.0.7" + warning "^4.0.2" react-transition-group@^2.2.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.5.0.tgz#70bca0e3546102c4dc5cf3f5f57f73447cce6874" + version "2.9.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d" + integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg== dependencies: - dom-helpers "^3.3.1" + dom-helpers "^3.4.0" loose-envify "^1.4.0" prop-types "^15.6.2" react-lifecycles-compat "^3.0.4" @@ -8390,28 +9553,32 @@ react-transition-group@^2.2.1: react@^0.14.0: version "0.14.9" resolved "https://registry.yarnpkg.com/react/-/react-0.14.9.tgz#9110a6497c49d44ba1c0edd317aec29c2e0d91d1" + integrity sha1-kRCmSXxJ1EuhwO3TF67CnC4NkdE= dependencies: envify "^3.0.0" fbjs "^0.6.1" -react@~16.4.2: - version "16.4.2" - resolved "https://registry.yarnpkg.com/react/-/react-16.4.2.tgz#2cd90154e3a9d9dd8da2991149fdca3c260e129f" +react@~16.8.4: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" + integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== dependencies: - fbjs "^0.8.16" loose-envify "^1.1.0" object-assign "^4.1.1" - prop-types "^15.6.0" + prop-types "^15.6.2" + scheduler "^0.13.6" read-cmd-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" + integrity sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs= dependencies: graceful-fs "^4.1.2" -"read-package-json@1 || 2", read-package-json@^2.0.0: +"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: version "2.0.13" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" + integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg== dependencies: glob "^7.1.1" json-parse-better-errors "^1.0.1" @@ -8420,9 +9587,10 @@ read-cmd-shim@^1.0.1: optionalDependencies: graceful-fs "^4.1.2" -read-package-tree@^5.1.6, read-package-tree@~5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.1.6.tgz#4f03e83d0486856fb60d97c94882841c2a7b1b7a" +read-package-tree@^5.1.6, read-package-tree@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.2.tgz#4b6a0ef2d943c1ea36a578214c9a7f6b7424f7a8" + integrity sha512-rW3XWUUkhdKmN2JKB4FL563YAgtINifso5KShykufR03nJ5loGFlkUMe1g/yxmqX073SoYYTsgXu7XdDinKZuA== dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" @@ -8433,6 +9601,7 @@ read-package-tree@^5.1.6, read-package-tree@~5.1.6: read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= dependencies: find-up "^1.0.0" read-pkg "^1.0.0" @@ -8440,13 +9609,23 @@ read-pkg-up@^1.0.1: read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= dependencies: find-up "^2.0.0" read-pkg "^3.0.0" -read-pkg@^1.0.0, read-pkg@^1.1.0: +read-pkg-up@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" + integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== + dependencies: + find-up "^3.0.0" + read-pkg "^3.0.0" + +read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" @@ -8455,28 +9634,33 @@ read-pkg@^1.0.0, read-pkg@^1.1.0: read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= dependencies: load-json-file "^4.0.0" normalize-package-data "^2.3.2" path-type "^3.0.0" -read-pkg@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" +read-pkg@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.1.1.tgz#5cf234dde7a405c90c88a519ab73c467e9cb83f5" + integrity sha512-dFcTLQi6BZ+aFUaICg7er+/usEoqFdQxiEBsEMNGoipenihtxxtdrQuBXvyANCEI8VuUIVYFgeHGx9sLLvim4w== dependencies: - normalize-package-data "^2.3.2" + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" parse-json "^4.0.0" - pify "^3.0.0" + type-fest "^0.4.1" read@1, read@~1.0.1: version "1.0.7" resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -8486,62 +9670,45 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@1.0: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@1.1.x, "readable-stream@1.x >=1.1.9": - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" +"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.1.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.3.0.tgz#cb8011aad002eb717bf040291feba8569c986fb9" + integrity sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw== dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" + integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c= dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" graceful-fs "^4.1.2" once "^1.3.0" -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" + graceful-fs "^4.1.11" + micromatch "^3.1.10" readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" -realpath-native@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.1.tgz#07f40a0cce8f8261e2e8b7ebebf5c95965d7b633" +realpath-native@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" + integrity sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA== dependencies: util.promisify "^1.0.0" recast@^0.11.17, recast@~0.11.12: version "0.11.23" resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.23.tgz#451fd3004ab1e4df9b4e4b66376b2a21912462d3" + integrity sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM= dependencies: ast-types "0.9.6" esprima "~3.1.0" @@ -8551,12 +9718,14 @@ recast@^0.11.17, recast@~0.11.12: rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= dependencies: resolve "^1.1.6" redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= dependencies: indent-string "^2.1.0" strip-indent "^1.0.1" @@ -8564,175 +9733,155 @@ redent@^1.0.0: redent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" + integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= dependencies: indent-string "^3.0.0" strip-indent "^2.0.0" -redis-commands@^1.2.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.3.5.tgz#4495889414f1e886261180b1442e7295602d83a2" - -redis-parser@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-2.6.0.tgz#52ed09dacac108f1a631c07e9b69941e7a19504b" - -redis@^2.7.1: - version "2.8.0" - resolved "https://registry.yarnpkg.com/redis/-/redis-2.8.0.tgz#202288e3f58c49f6079d97af7a10e1303ae14b02" - dependencies: - double-ended-queue "^2.1.0-0" - redis-commands "^1.2.0" - redis-parser "^2.6.0" - -reduce-css-calc@^1.2.6: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" - dependencies: - balanced-match "^0.4.2" - math-expression-evaluator "^1.2.14" - reduce-function-call "^1.0.1" - -reduce-function-call@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" +regenerate-unicode-properties@^8.0.2: + version "8.1.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" + integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA== dependencies: - balanced-match "^0.4.2" + regenerate "^1.4.0" -regenerate@^1.2.1: +regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" +regenerator-runtime@^0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" + integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA== + +regenerator-transform@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.0.tgz#2ca9aaf7a2c239dd32e4761218425b8c7a86ecaf" + integrity sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w== dependencies: - is-equal-shallow "^0.1.3" + private "^0.1.6" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== dependencies: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" - -regexpu-core@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" +regexp-tree@^0.1.6: + version "0.1.10" + resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.10.tgz#d837816a039c7af8a8d64d7a7c3cf6a1d93450bc" + integrity sha512-K1qVSbcedffwuIslMwpe6vGlj+ZXRnGkvjAtFHfDZZZuEdA/h0dxljAPu9vhUo6Rrx2U2AwJ+nSQ6hK+lrP5MQ== -registry-auth-token@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +regexpu-core@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae" + integrity sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.0.2" + regjsgen "^0.5.0" + regjsparser "^0.6.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.1.0" + +registry-auth-token@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e" + integrity sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A== dependencies: rc "^1.1.6" safe-buffer "^5.0.1" -registry-url@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" +registry-url@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009" + integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== dependencies: - rc "^1.0.1" + rc "^1.2.8" -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" +regjsgen@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" + integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" +regjsparser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" + integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== dependencies: jsesc "~0.5.0" relateurl@0.2.x: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= renderkid@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" + version "2.0.3" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.3.tgz#380179c2ff5ae1365c522bf2fcfcff01c5b74149" + integrity sha512-z8CLQp7EZBPCwCnncgf9C4XAi3WR0dv+uWu/PjIyhhAb5d6IJ/QZqlHFprHeKT+59//V6BNUsLbvN8+2LarxGA== dependencies: css-select "^1.1.0" - dom-converter "~0.1" - htmlparser2 "~3.3.0" + dom-converter "^0.2" + htmlparser2 "^3.3.0" strip-ansi "^3.0.0" - utila "~0.3" + utila "^0.4.0" repeat-element@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== -repeat-string@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" - -repeat-string@^1.5.2, repeat-string@^1.6.1: +repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= dependencies: is-finite "^1.0.0" -request-promise-core@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" +request-promise-core@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.2.tgz#339f6aababcafdb31c799ff158700336301d3346" + integrity sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag== dependencies: - lodash "^4.13.1" + lodash "^4.17.11" request-promise-native@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" - dependencies: - request-promise-core "1.1.1" - stealthy-require "^1.1.0" - tough-cookie ">=2.3.3" - -request@2.75.x: - version "2.75.0" - resolved "http://registry.npmjs.org/request/-/request-2.75.0.tgz#d2b8268a286da13eaa5d01adf5d18cc90f657d93" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - bl "~1.1.2" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.0.0" - har-validator "~2.0.6" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - node-uuid "~1.4.7" - oauth-sign "~0.8.1" - qs "~6.2.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - -request@^2.0.0, request@^2.74.0, request@^2.87.0: + version "1.0.7" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.7.tgz#a49868a624bdea5069f1251d0a836e0d89aa2c59" + integrity sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w== + dependencies: + request-promise-core "1.1.2" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.87.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -8755,86 +9904,84 @@ request@^2.0.0, request@^2.74.0, request@^2.87.0: tunnel-agent "^0.6.0" uuid "^3.3.2" -requestretry@^1.2.2: - version "1.13.0" - resolved "https://registry.yarnpkg.com/requestretry/-/requestretry-1.13.0.tgz#213ec1006eeb750e8b8ce54176283d15a8d55d94" - dependencies: - extend "^3.0.0" - lodash "^4.15.0" - request "^2.74.0" - when "^3.7.7" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= -require-uncached@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= resize-observer-polyfill@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.0.tgz#660ff1d9712a2382baa2cad450a4716209f9ca69" + version "1.5.1" + resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" + integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= dependencies: resolve-from "^3.0.0" -resolve-from@^1.0.0: +resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@1.1.7, resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.3.2, resolve@^1.5.0: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" +resolve@1.x, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2: + version "1.11.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.0.tgz#4014870ba296176b86343d50b60f3b50609ce232" + integrity sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw== dependencies: - path-parse "^1.0.5" + path-parse "^1.0.6" -responselike@1.0.2: +responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= dependencies: lowercase-keys "^1.0.0" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= dependencies: onetime "^2.0.0" signal-exit "^3.0.2" @@ -8842,127 +9989,141 @@ restore-cursor@^2.0.0: ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== retry@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" + integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" +rfdc@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" + integrity sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug== -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" +rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@~2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: - glob "^7.0.5" + glob "^7.1.3" ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== dependencies: hash-base "^3.0.0" inherits "^2.0.1" -rsvp@^3.3.3: - version "3.6.2" - resolved "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" +rsvp@^4.8.4: + version "4.8.4" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.4.tgz#b50e6b34583f3dd89329a2f23a8a2be072845911" + integrity sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA== run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= dependencies: is-promise "^2.1.0" run-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" + integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A== run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= dependencies: aproba "^1.1.1" rw@1: version "1.3.3" resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" + integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q= -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - -rxjs@^6.1.0: - version "6.3.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.2.tgz#6a688b16c4e6e980e62ea805ec30648e1c60907f" +rxjs@^6.3.3, rxjs@^6.4.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" + integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== dependencies: tslib "^1.9.0" safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= dependencies: ret "~0.1.10" "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sane@^2.0.0: - version "2.5.2" - resolved "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" + integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== dependencies: + "@cnakazawa/watch" "^1.0.3" anymatch "^2.0.0" - capture-exit "^1.2.0" - exec-sh "^0.2.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" fb-watchman "^2.0.0" micromatch "^3.1.4" minimist "^1.1.1" walker "~1.0.5" - watch "~0.18.0" - optionalDependencies: - fsevents "^1.2.3" -sanitize-html@~1.18.2: - version "1.18.4" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-1.18.4.tgz#ffdeea13b555dd5e872e9a68b79e5e716cd8c543" +sanitize-html@~1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-1.20.1.tgz#f6effdf55dd398807171215a62bfc21811bacf85" + integrity sha512-txnH8TQjaQvg2Q0HY06G6CDJLVYCpbnxrdO0WN8gjCKaU5J0KbyGYhZxx5QJg3WLZ1lB7XU9kDkfrCXUozqptA== dependencies: - chalk "^2.3.0" - htmlparser2 "^3.9.0" + chalk "^2.4.1" + htmlparser2 "^3.10.0" lodash.clonedeep "^4.5.0" lodash.escaperegexp "^4.1.2" lodash.isplainobject "^4.0.6" lodash.isstring "^4.0.1" - lodash.mergewith "^4.6.0" - postcss "^6.0.14" + lodash.mergewith "^4.6.1" + postcss "^7.0.5" srcset "^1.0.0" - xtend "^4.0.0" + xtend "^4.0.1" -sax@^1.2.4, sax@~1.2.1, sax@~1.2.4: +sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +scheduler@^0.13.6: + version "0.13.6" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" + integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" schema-utils@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" + integrity sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8= dependencies: ajv "^5.0.0" -schema-utils@^0.4.3, schema-utils@^0.4.4, schema-utils@^0.4.5: +schema-utils@^0.4.5: version "0.4.7" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" + integrity sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ== dependencies: ajv "^6.1.0" ajv-keywords "^3.1.0" @@ -8970,6 +10131,7 @@ schema-utils@^0.4.3, schema-utils@^0.4.4, schema-utils@^0.4.5: schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== dependencies: ajv "^6.1.0" ajv-errors "^1.0.0" @@ -8978,30 +10140,37 @@ schema-utils@^1.0.0: semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.0.1, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" +"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" + integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== + +semver@^6.0.0, semver@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.0.tgz#e95dc415d45ecf03f2f9f83b264a6b11f49c0cca" + integrity sha512-kCqEOOHoBcFs/2Ccuk4Xarm/KiWRSLEX9CAZF8xkJ6ZPlIoTZ8V5f7J16vYLJqDbR7KrxTJpR2lqjIEm2Qx9cQ== semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= -serialize-javascript@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" +serialize-javascript@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" + integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA== set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -9011,6 +10180,7 @@ set-value@^0.4.3: set-value@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -9020,14 +10190,17 @@ set-value@^2.0.0: setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" @@ -9035,16 +10208,19 @@ sha.js@^2.4.0, sha.js@^2.4.8: shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= shelljs@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35" + version "0.8.3" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" + integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -9052,68 +10228,76 @@ shelljs@^0.8.2: shellwords@^0.1.1: version "0.1.1" - resolved "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +simple-git@^1.85.0: + version "1.113.0" + resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.113.0.tgz#668989728a1e9cf4ec6c72b69ea2eecc93489bea" + integrity sha512-i9WVsrK2u0G/cASI9nh7voxOk9mhanWY9eGtWBDSYql6m49Yk5/Fan6uZsDr/xmzv8n+eQ8ahKCoEr8cvU3h+g== + dependencies: + debug "^4.0.1" simulate-event@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/simulate-event/-/simulate-event-1.4.0.tgz#7f8a404116280bcbfe26347ddbcbffe5bd2be00e" + integrity sha1-f4pAQRYoC8v+JjR928v/5b0r4A4= dependencies: xtend "^4.0.1" -sisteransi@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" - -slack-node@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/slack-node/-/slack-node-0.2.0.tgz#de4b8dddaa8b793f61dbd2938104fdabf37dfa30" - dependencies: - requestretry "^1.2.2" +sisteransi@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.0.tgz#77d9622ff909080f1c19e5f4a1df0c1b0a27b88c" + integrity sha512-N+z4pHB4AmUv0SjveWRd6q1Nj5w62m5jodv+GD8lvmbY/83T/rpbJGZOnK5T149OldDj4Db07BSv9xY4K6NTPQ== slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= -slice-ansi@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" slide@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= -smart-buffer@^1.0.13, smart-buffer@^1.0.4: - version "1.1.15" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16" - -smart-buffer@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" - -smtp-connection@2.12.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/smtp-connection/-/smtp-connection-2.12.0.tgz#d76ef9127cb23c2259edb1e8349c2e8d5e2d74c1" - dependencies: - httpntlm "1.6.1" - nodemailer-shared "1.1.0" +smart-buffer@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" + integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== dependencies: define-property "^1.0.0" isobject "^3.0.0" @@ -9122,12 +10306,14 @@ snapdragon-node@^2.0.1: snapdragon-util@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== dependencies: kind-of "^3.2.0" snapdragon@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== dependencies: base "^0.11.1" debug "^2.2.0" @@ -9138,117 +10324,97 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - socket.io-adapter@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b" + integrity sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs= -socket.io-client@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.0.4.tgz#0918a552406dc5e540b380dcd97afc4a64332f8e" +socket.io-client@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.1.1.tgz#dcb38103436ab4578ddb026638ae2f21b623671f" + integrity sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ== dependencies: backo2 "1.0.2" base64-arraybuffer "0.1.5" component-bind "1.0.0" component-emitter "1.2.1" - debug "~2.6.4" - engine.io-client "~3.1.0" + debug "~3.1.0" + engine.io-client "~3.2.0" + has-binary2 "~1.0.2" has-cors "1.1.0" indexof "0.0.1" object-component "0.0.3" parseqs "0.0.5" parseuri "0.0.5" - socket.io-parser "~3.1.1" + socket.io-parser "~3.2.0" to-array "0.1.4" -socket.io-parser@~3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.1.3.tgz#ed2da5ee79f10955036e3da413bfd7f1e4d86c8e" +socket.io-parser@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.2.0.tgz#e7c6228b6aa1f814e6148aea325b51aa9499e077" + integrity sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA== dependencies: component-emitter "1.2.1" debug "~3.1.0" - has-binary2 "~1.0.2" isarray "2.0.1" -socket.io@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.0.4.tgz#c1a4590ceff87ecf13c72652f046f716b29e6014" +socket.io@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.1.1.tgz#a069c5feabee3e6b214a75b40ce0652e1cfb9980" + integrity sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA== dependencies: - debug "~2.6.6" - engine.io "~3.1.0" + debug "~3.1.0" + engine.io "~3.2.0" + has-binary2 "~1.0.2" socket.io-adapter "~1.1.0" - socket.io-client "2.0.4" - socket.io-parser "~3.1.1" - -socks-proxy-agent@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz#2eae7cf8e2a82d34565761539a7f9718c5617659" - dependencies: - agent-base "^4.1.0" - socks "^1.1.10" - -socks-proxy-agent@^4.0.0, socks-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473" - dependencies: - agent-base "~4.2.0" - socks "~2.2.0" - -socks@1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.9.tgz#628d7e4d04912435445ac0b6e459376cb3e6d691" - dependencies: - ip "^1.1.2" - smart-buffer "^1.0.4" + socket.io-client "2.1.1" + socket.io-parser "~3.2.0" -socks@^1.1.10: - version "1.1.10" - resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.10.tgz#5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a" +socks-proxy-agent@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" + integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== dependencies: - ip "^1.1.4" - smart-buffer "^1.0.13" + agent-base "~4.2.1" + socks "~2.3.2" -socks@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.1.tgz#68ad678b3642fbc5d99c64c165bc561eab0215f9" +socks@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.2.tgz#ade388e9e6d87fdb11649c15746c578922a5883e" + integrity sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ== dependencies: ip "^1.1.5" - smart-buffer "^4.0.1" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - dependencies: - is-plain-obj "^1.0.0" + smart-buffer "4.0.2" sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= dependencies: is-plain-obj "^1.0.0" -sort-object-keys@^1.1.1: +sort-object-keys@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.2.tgz#d3a6c48dc2ac97e6bc94367696e03f6d09d37952" + integrity sha1-06bEjcKsl+a8lDZ2luA/bQnTeVI= -sort-package-json@~1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.7.1.tgz#f2e5fbffe8420cc1bb04485f4509f05e73b4c0f2" +sort-package-json@~1.22.1: + version "1.22.1" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.22.1.tgz#384ce7a098cd13be4109800d5ce2f0cf7826052e" + integrity sha512-uVINQraFQvnlzNHFnQOT4MYy0qonIEzKwhrI2yrTiQjNo5QF4h3ffrnCk7a95QAwoK/RdkO/w8W9tJIcaOWC7g== dependencies: - sort-object-keys "^1.1.1" + detect-indent "^5.0.0" + sort-object-keys "^1.1.2" source-list-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== source-map-loader@~0.2.1: version "0.2.4" resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.4.tgz#c18b0dc6e23bf66f6792437557c569a11e072271" + integrity sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ== dependencies: async "^2.5.0" loader-utils "^1.1.0" @@ -9256,6 +10422,7 @@ source-map-loader@~0.2.1: source-map-resolve@^0.5.0: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== dependencies: atob "^2.1.1" decode-uri-component "^0.2.0" @@ -9263,15 +10430,10 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.6: - version "0.5.9" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" +source-map-support@^0.5.6, source-map-support@~0.5.10: + version "0.5.12" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -9279,139 +10441,151 @@ source-map-support@^0.5.6: source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@^0.4.2, source-map@^0.4.4: +source-map@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + integrity sha1-66T12pwNyZneaAMti092FzZSA2s= dependencies: amdefine ">=0.0.4" -source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1: +source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= dependencies: amdefine ">=0.0.4" spdx-correct@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== spdx-expression-parse@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + version "3.0.4" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1" + integrity sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== dependencies: extend-shallow "^3.0.0" split2@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" + integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== dependencies: through2 "^2.0.2" split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== dependencies: through "2" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= srcset@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/srcset/-/srcset-1.0.0.tgz#a5669de12b42f3b1d5e83ed03c71046fc48f41ef" + integrity sha1-pWad4StC87HV6D7QPHEEb8SPQe8= dependencies: array-uniq "^1.0.2" number-is-nan "^1.0.0" sshpk@^1.7.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - safer-buffer "^2.0.2" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^5.2.4: - version "5.3.0" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" - dependencies: - safe-buffer "^5.1.1" - -ssri@^6.0.0: +ssri@^6.0.0, ssri@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" + integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== dependencies: figgy-pudding "^3.5.1" -stable@~0.1.6: +stable@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" + integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== stack-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" + version "1.0.2" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" + integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== -staged-git-files@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.1.tgz#37c2218ef0d6d26178b1310719309a16a59f8f7b" +staged-git-files@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.2.tgz#4326d33886dc9ecfa29a6193bf511ba90a46454b" + integrity sha512-0Eyrk6uXW6tg9PYkhi/V/J4zHp33aNyi2hOCmhFLqLTIhbgqWn5jlSzI+IU0VqrZq6+DbHcabQl/WP6P3BG0QA== static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= dependencies: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.4.0 < 2": +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - -stealthy-require@^1.1.0: +stealthy-require@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== dependencies: inherits "~2.0.1" readable-stream "^2.0.2" @@ -9419,6 +10593,7 @@ stream-browserify@^2.0.1: stream-each@^1.1.0: version "1.2.3" resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== dependencies: end-of-stream "^1.1.0" stream-shift "^1.0.0" @@ -9426,6 +10601,7 @@ stream-each@^1.1.0: stream-http@^2.7.2: version "2.8.3" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== dependencies: builtin-status-codes "^3.0.0" inherits "^2.0.1" @@ -9436,27 +10612,33 @@ stream-http@^2.7.2: stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= -streamroller@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-0.7.0.tgz#a1d1b7cf83d39afb0d63049a5acbf93493bdf64b" +streamroller@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-1.0.5.tgz#71660c20b06b1a7b204d46085731ad13c10a562d" + integrity sha512-iGVaMcyF5PcUY0cPbW3xFQUXnr9O4RZXNBBjhuLZgrjLO4XCLLGfx4T2sGqygSeylUjwgWRsnNbT9aV0Zb8AYw== dependencies: - date-format "^1.2.0" - debug "^3.1.0" - mkdirp "^0.5.1" - readable-stream "^2.3.0" + async "^2.6.2" + date-format "^2.0.0" + debug "^3.2.6" + fs-extra "^7.0.1" + lodash "^4.17.11" strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= string-argv@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" + integrity sha1-2sMECGkMIfPDYwo/86BYd73L1zY= string-length@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= dependencies: astral-regex "^1.0.0" strip-ansi "^4.0.0" @@ -9464,6 +10646,7 @@ string-length@^2.0.0: string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" @@ -9472,193 +10655,223 @@ string-width@^1.0.1: "string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string_decoder@^1.0.0, string_decoder@~1.1.1: +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string_decoder@^1.0.0, string_decoder@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" + integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - stringify-object@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.2.tgz#9853052e5a88fb605a44cd27445aa257ad7ffbcd" + version "3.3.0" + resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== dependencies: - get-own-enumerable-property-symbols "^2.0.1" + get-own-enumerable-property-symbols "^3.0.0" is-obj "^1.0.1" is-regexp "^1.0.0" -stringstream@~0.0.4: - version "0.0.6" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= dependencies: ansi-regex "^3.0.0" -strip-bom@3.0.0, strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= dependencies: is-utf8 "^0.2.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= strip-indent@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= dependencies: get-stdin "^4.0.1" strip-indent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= -strip-json-comments@~2.0.1: +strip-json-comments@2.0.1, strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= strong-log-transformer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.0.0.tgz#fa6d8e0a9e62b3c168c3cad5ae5d00dc97ba26cc" + version "2.1.0" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" + integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== dependencies: - byline "^5.0.0" duplexer "^0.1.1" minimist "^1.2.0" through "^2.3.4" -style-loader@~0.21.0: - version "0.21.0" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.21.0.tgz#68c52e5eb2afc9ca92b6274be277ee59aea3a852" +style-loader@~0.23.1: + version "0.23.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" + integrity sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg== dependencies: loader-utils "^1.1.0" - schema-utils "^0.4.5" + schema-utils "^1.0.0" -supports-color@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== dependencies: - has-flag "^1.0.0" + has-flag "^3.0.0" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: +supports-color@^3.1.0: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= dependencies: has-flag "^1.0.0" -supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== dependencies: has-flag "^3.0.0" -svg-url-loader@~2.3.1: +svg-url-loader@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/svg-url-loader/-/svg-url-loader-2.3.2.tgz#dd86b26c19fe3b914f04ea10ef39594eade04464" + integrity sha1-3YaybBn+O5FPBOoQ7zlZTq3gRGQ= dependencies: file-loader "1.1.11" loader-utils "1.1.0" -svgo-loader@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/svgo-loader/-/svgo-loader-2.1.0.tgz#e86c0ca08c1149bb1fb4b3a469dabac847f5e24a" +svgo-loader@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/svgo-loader/-/svgo-loader-2.2.0.tgz#f29eb43efc14c34a15c4023f56ba12775ccdbe5f" + integrity sha512-AtIy4kmUQc1zo+QK3ZFvRrULRZAhUC63cLJxdVo1cONZ9WeYAkySUlaB05uZKKcYpsTb/9tDsBSXMab3/0QWtw== dependencies: + js-yaml "^3.12.0" loader-utils "^1.0.3" -svgo@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" - dependencies: - coa "~1.0.1" - colors "~1.1.2" - csso "~2.3.1" - js-yaml "~3.7.0" - mkdirp "~0.5.1" - sax "~1.2.1" - whet.extend "~0.9.9" - -svgo@~1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.0.5.tgz#7040364c062a0538abacff4401cea6a26a7a389a" +svgo@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.2.2.tgz#0253d34eccf2aed4ad4f283e11ee75198f9d7316" + integrity sha512-rAfulcwp2D9jjdGu+0CuqlrAUin6bBWrpoqXWwKDZZZJfXcUXQSxLJOFJCQCSA0x0pP2U0TxSlJu2ROq5Bq6qA== dependencies: - coa "~2.0.1" - colors "~1.1.2" - css-select "~1.3.0-rc0" - css-select-base-adapter "~0.1.0" - css-tree "1.0.0-alpha25" + chalk "^2.4.1" + coa "^2.0.2" + css-select "^2.0.0" + css-select-base-adapter "^0.1.1" + css-tree "1.0.0-alpha.28" css-url-regex "^1.1.0" - csso "^3.5.0" - js-yaml "~3.10.0" + csso "^3.5.1" + js-yaml "^3.13.1" mkdirp "~0.5.1" - object.values "^1.0.4" + object.values "^1.1.0" sax "~1.2.4" - stable "~0.1.6" + stable "^0.1.8" unquote "~1.1.1" util.promisify "~1.0.0" symbol-observable@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= -table@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" - dependencies: - ajv "^5.2.3" - ajv-keywords "^2.1.0" - chalk "^2.1.0" - lodash "^4.17.4" - slice-ansi "1.0.0" - string-width "^2.1.1" - -tapable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" +synchronous-promise@^2.0.6: + version "2.0.8" + resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.8.tgz#01fd026fffdbf2d3d39ec06ee1a7c971578136f7" + integrity sha512-xYavZtFC1vKgJu0AOSYdrLeikNCsNwmUeZaV1XF9cMqEhBVVxLq6rEbYzOGrF1MV2MNPkhsJqqiXuQ4a76CEUg== -tar@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" +table@^5.2.3: + version "5.4.0" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.0.tgz#d772a3216e68829920a41a32c18eda286c95d780" + integrity sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw== dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" + ajv "^6.9.1" + lodash "^4.17.11" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +tapable@^1.0.0, tapable@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar@^4, tar@^4.4.3: - version "4.4.6" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" +tar@^4, tar@^4.4.8: + version "4.4.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" + integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== dependencies: - chownr "^1.0.1" + chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.3" - minizlib "^1.1.0" + minipass "^2.3.4" + minizlib "^1.1.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" yallist "^3.0.2" @@ -9666,10 +10879,12 @@ tar@^4, tar@^4.4.3: temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= temp-write@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" + integrity sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= dependencies: graceful-fs "^4.1.2" is-stream "^1.1.0" @@ -9678,295 +10893,377 @@ temp-write@^3.4.0: temp-dir "^1.0.0" uuid "^3.0.1" -test-exclude@^4.2.1: - version "4.2.2" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.2.tgz#8b67aa8408f84afc225b06669e25c510f8582820" +terser-webpack-plugin@^1.1.0, terser-webpack-plugin@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz#69aa22426299f4b5b3775cbed8cb2c5d419aa1d4" + integrity sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg== dependencies: - arrify "^1.0.1" + cacache "^11.3.2" + find-cache-dir "^2.0.0" + is-wsl "^1.1.0" + loader-utils "^1.2.3" + schema-utils "^1.0.0" + serialize-javascript "^1.7.0" + source-map "^0.6.1" + terser "^4.0.0" + webpack-sources "^1.3.0" + worker-farm "^1.7.0" + +terser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.0.0.tgz#ef356f6f359a963e2cc675517f21c1c382877374" + integrity sha512-dOapGTU0hETFl1tCo4t56FN+2jffoKyER9qBGoUFyZ6y7WLoKT0bF+lAYi6B6YsILcGF3q1C2FBh8QcKSCgkgA== + dependencies: + commander "^2.19.0" + source-map "~0.6.1" + source-map-support "~0.5.10" + +test-exclude@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" + integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g== + dependencies: + glob "^7.1.3" minimatch "^3.0.4" - read-pkg-up "^3.0.0" - require-main-filename "^1.0.1" + read-pkg-up "^4.0.0" + require-main-filename "^2.0.0" -text-encoding@~0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.5.5.tgz#d29845d9c1f2ac5ceba4bf861c561856c523ac53" +text-encoding@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.7.0.tgz#f895e836e45990624086601798ea98e8f36ee643" + integrity sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA== -text-extensions@^1.0.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39" +text-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-2.0.0.tgz#43eabd1b495482fae4a2bf65e5f56c29f69220f6" + integrity sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ== -text-table@~0.2.0: +text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -thread-loader@^1.1.5: - version "1.2.0" - resolved "https://registry.yarnpkg.com/thread-loader/-/thread-loader-1.2.0.tgz#35dedb23cf294afbbce6c45c1339b950ed17e7a4" +thread-loader@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/thread-loader/-/thread-loader-2.1.2.tgz#f585dd38e852c7f9cded5d092992108148f5eb30" + integrity sha512-7xpuc9Ifg6WU+QYw/8uUqNdRwMD+N5gjwHKMqETrs96Qn+7BHwECpt2Brzr4HFlf4IAkZsayNhmGdbkBsTJ//w== dependencies: - async "^2.3.0" - loader-runner "^2.3.0" + loader-runner "^2.3.1" loader-utils "^1.1.0" + neo-async "^2.6.0" throat@^4.0.0: version "4.1.0" - resolved "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= through2@^2.0.0, through2@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== dependencies: - readable-stream "^2.1.5" + readable-stream "~2.3.6" xtend "~4.0.1" +through2@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + dependencies: + readable-stream "2 || 3" + through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3.4, through@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -thunkify@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/thunkify/-/thunkify-2.1.2.tgz#faa0e9d230c51acc95ca13a361ac05ca7e04553d" - -time-stamp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.1.0.tgz#6c5c0b2bc835a244616abcfddf81ce13a1975c9f" - -timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= timers-browserify@^2.0.4: version "2.0.10" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" + integrity sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg== dependencies: setimmediate "^1.0.4" -timespan@2.3.x: - version "2.3.0" - resolved "https://registry.yarnpkg.com/timespan/-/timespan-2.3.0.tgz#4902ce040bd13d845c8f59b27e9d59bad6f39929" - tmp@0.0.33, tmp@0.0.x, tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== dependencies: os-tmpdir "~1.0.2" tmpl@1.0.x: version "1.0.4" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= to-array@0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + integrity sha1-F+bBH3PdTz10zaek/zI46a2b+JA= to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= dependencies: kind-of "^3.0.2" +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= dependencies: is-number "^3.0.0" repeat-string "^1.6.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== dependencies: define-property "^2.0.2" extend-shallow "^3.0.2" regex-not "^1.0.2" safe-regex "^1.1.0" +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + topojson-client@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/topojson-client/-/topojson-client-3.0.0.tgz#1f99293a77ef42a448d032a81aa982b73f360d2f" + integrity sha1-H5kpOnfvQqRI0DKoGqmCtz82DS8= dependencies: commander "2" toposort@^1.0.0: version "1.0.7" resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" + integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= + +toposort@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" + integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= + +tough-cookie@^2.3.3, tough-cookie@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" -tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.4.3: +tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== dependencies: psl "^1.1.24" punycode "^1.4.1" -tough-cookie@~2.3.0: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - dependencies: - punycode "^1.4.1" - tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= dependencies: punycode "^2.1.0" trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= trim-newlines@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" + integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= trim-off-newlines@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - -ts-jest@^23.1.4: - version "23.1.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-23.1.4.tgz#66ac1d8d3fbf8f9a98432b11aa377aa850664b2b" - dependencies: - closest-file-data "^0.1.4" - fs-extra "6.0.1" - json5 "^0.5.0" - lodash "^4.17.10" - -ts-loader@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-5.0.0.tgz#0715ee31ed229fcdc8df73e87ccd80e6a46cae04" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +ts-jest@^24.0.2: + version "24.0.2" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.0.2.tgz#8dde6cece97c31c03e80e474c749753ffd27194d" + integrity sha512-h6ZCZiA1EQgjczxq+uGLXQlNgeg02WWJBbeT8j6nyIBRQdglqbvzDoHahTEIiS6Eor6x8mK6PfZ7brQ9Q6tzHw== + dependencies: + bs-logger "0.x" + buffer-from "1.x" + fast-json-stable-stringify "2.x" + json5 "2.x" + make-error "1.x" + mkdirp "0.x" + resolve "1.x" + semver "^5.5" + yargs-parser "10.x" + +ts-loader@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-6.0.2.tgz#cbd46a1495668ed9d59813f5c66f4bb49ff0c14c" + integrity sha512-kkF3sGf3oBUehlvXI9fkbItbFTnNgGkYAz91vtWnsKAU4m+LAmQjuby7uTZNo3As+/zHLuyB052SkQDY6vLXtg== dependencies: chalk "^2.3.0" enhanced-resolve "^4.0.0" loader-utils "^1.0.2" - micromatch "^3.1.4" - semver "^5.0.1" + micromatch "^4.0.0" + semver "^6.0.0" -tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.2: +tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@~1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== -tslint-config-prettier@^1.9.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.15.0.tgz#76b9714399004ab6831fdcf76d89b73691c812cf" +tslint-config-prettier@^1.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" + integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== -tslint-plugin-prettier@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-1.3.0.tgz#7eb65d19ea786a859501a42491b78c5de2031a3f" +tslint-plugin-prettier@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-2.0.1.tgz#95b6a3b766622ffc44375825d7760225c50c3680" + integrity sha512-4FX9JIx/1rKHIPJNfMb+ooX1gPk5Vg3vNi7+dyFYpLO+O57F4g+b/fo1+W/G0SUOkBLHB/YKScxjX/P+7ZT/Tw== dependencies: eslint-plugin-prettier "^2.2.0" + lines-and-columns "^1.1.6" tslib "^1.7.1" -tslint-react@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.6.0.tgz#7f462c95c4a0afaae82507f06517ff02942196a1" - dependencies: - tsutils "^2.13.1" - -tslint@^5.11.0: - version "5.11.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed" +tslint-react@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-4.0.0.tgz#b4bb4c01c32448cb14d23f143a2f5e4989bb961e" + integrity sha512-9fNE0fm9zNDx1+b6hgy8rgDN2WsQLRiIrn3+fbqm0tazBVF6jiaCFAITxmU+WSFWYE03Xhp1joCircXOe1WVAQ== dependencies: - babel-code-frame "^6.22.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^3.2.0" - glob "^7.1.1" - js-yaml "^3.7.0" - minimatch "^3.0.4" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.8.0" - tsutils "^2.27.2" + tsutils "^3.9.1" -tslint@~5.10.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.10.0.tgz#11e26bccb88afa02dd0d9956cae3d4540b5f54c3" +tslint@^5.15.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.16.0.tgz#ae61f9c5a98d295b9a4f4553b1b1e831c1984d67" + integrity sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA== dependencies: - babel-code-frame "^6.22.0" + "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" chalk "^2.3.0" commander "^2.12.1" diff "^3.2.0" glob "^7.1.1" - js-yaml "^3.7.0" + js-yaml "^3.13.0" minimatch "^3.0.4" + mkdirp "^0.5.1" resolve "^1.3.2" semver "^5.3.0" tslib "^1.8.0" - tsutils "^2.12.1" - -tsscmp@~1.0.0: - version "1.0.6" - resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" + tsutils "^2.29.0" -tsutils@^2.12.1, tsutils@^2.13.1, tsutils@^2.27.2: +tsutils@^2.29.0: version "2.29.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== + dependencies: + tslib "^1.8.1" + +tsutils@^3.9.1: + version "3.10.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.10.0.tgz#6f1c95c94606e098592b0dff06590cf9659227d6" + integrity sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q== dependencies: tslib "^1.8.1" tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= dependencies: safe-buffer "^5.0.1" -tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" - tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" -type-detect@^4.0.0: +type-detect@^4.0.0, type-detect@^4.0.5: version "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.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" + integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== -type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" +type-is@~1.6.17: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== dependencies: media-typer "0.3.0" - mime-types "~2.1.18" + mime-types "~2.1.24" -typed-styles@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/typed-styles/-/typed-styles-0.0.5.tgz#a60df245d482a9b1adf9c06c078d0f06085ed1cf" +typed-styles@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/typed-styles/-/typed-styles-0.0.7.tgz#93392a008794c4595119ff62dde6809dbc40a3d9" + integrity sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q== typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typedoc-default-themes@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz#6dc2433e78ed8bea8e887a3acde2f31785bd6227" + integrity sha1-bcJDPnjti+qOiHo6zeLzF4W9Yic= typedoc@^0.14.2: version "0.14.2" resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.14.2.tgz#769f457f4f9e4bdb8b5f3b177c86b6a31d8c3dc3" + integrity sha512-aEbgJXV8/KqaVhcedT7xG6d2r+mOvB5ep3eIz1KuB5sc4fDYXcepEEMdU7XSqLFO5hVPu0nllHi1QxX2h/QlpQ== dependencies: "@types/fs-extra" "^5.0.3" "@types/handlebars" "^4.0.38" @@ -9989,85 +11286,84 @@ typedoc@^0.14.2: typescript@3.2.x: version "3.2.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.4.tgz#c585cb952912263d915b462726ce244ba510ef3d" + integrity sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg== -typescript@~3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.1.tgz#6de14e1db4b8a006ac535e482c8ba018c55f750b" +typescript@~3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202" + integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw== typestyle@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/typestyle/-/typestyle-2.0.1.tgz#9593e6029ce5f23f1a5728ddd3ed6bf1ffa781f8" + version "2.0.2" + resolved "https://registry.yarnpkg.com/typestyle/-/typestyle-2.0.2.tgz#e22f24f5d7e8506aa36b1fd3606824ac16291104" + integrity sha512-2nKRvMFE12MYudRu0UxYryZw3vbSOnZyuZiGTblYKIEi/U+VaH/hThv69AWCu89V7qc9uqrcQme1GCXmObomuQ== dependencies: csstype "^2.4.0" free-style "2.5.1" -ua-parser-js@^0.7.18: - version "0.7.18" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" - -ua-parser-js@^0.7.9: +ua-parser-js@^0.7.18, ua-parser-js@^0.7.9: version "0.7.19" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b" + integrity sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ== -uglify-es@^3.3.4: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" +uglify-js@3.4.x: + version "3.4.10" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f" + integrity sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw== dependencies: - commander "~2.13.0" + commander "~2.19.0" source-map "~0.6.1" -uglify-js@3.4.x, uglify-js@^3.1.4: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" +uglify-js@^3.1.4: + version "3.5.15" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.5.15.tgz#fe2b5378fd0b09e116864041437bff889105ce24" + integrity sha512-fe7aYFotptIddkwcm6YuA0HmknBZ52ZzOsUxZEdhhkSsz7RfjHDX2QDxwKTiv4JQ5t5NhfmpgAK+J7LiDhKSqg== dependencies: - commander "~2.17.1" + commander "~2.20.0" source-map "~0.6.1" -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uglifyjs-webpack-plugin@^1.2.4, uglifyjs-webpack-plugin@~1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz#57638dd99c853a1ebfe9d97b42160a8a507f9d00" - dependencies: - cacache "^10.0.4" - find-cache-dir "^1.0.0" - schema-utils "^0.4.5" - serialize-javascript "^1.4.0" - source-map "^0.6.1" - uglify-es "^3.3.4" - webpack-sources "^1.1.0" - worker-farm "^1.5.2" - uid-number@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== umask@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" + integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= -underscore@~1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" + integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw== union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= dependencies: arr-union "^3.1.0" get-value "^2.0.6" @@ -10077,88 +11373,112 @@ union-value@^1.0.0: uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - -unique-filename@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== dependencies: unique-slug "^2.0.0" unique-slug@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" + version "2.0.1" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.1.tgz#5e9edc6d1ce8fb264db18a507ef9bd8544451ca6" + integrity sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg== dependencies: imurmurhash "^0.1.4" +universal-user-agent@^2.0.0, universal-user-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.1.0.tgz#5abfbcc036a1ba490cb941f8fd68c46d3669e8e4" + integrity sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q== + dependencies: + os-name "^3.0.0" + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= unquote@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" + integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= dependencies: has-value "^0.3.1" isobject "^3.0.0" -upath@^1.0.5: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" +upath@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" + integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== dependencies: punycode "^2.1.0" urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-loader@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.0.1.tgz#61bc53f1f184d7343da2728a1289ef8722ea45ee" +url-join@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-2.0.5.tgz#5af22f18c052a000a48d7b82c5e9c2e2feeda728" + integrity sha1-WvIvGMBSoACkjXuCxenC4v7tpyg= + +url-loader@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.2.tgz#b971d191b83af693c5e3fea4064be9e1f2d7f8d8" + integrity sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg== dependencies: loader-utils "^1.1.0" mime "^2.0.3" - schema-utils "^0.4.3" + schema-utils "^1.0.0" url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= dependencies: prepend-http "^2.0.0" url-parse@~1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.3.tgz#bfaee455c889023219d757e045fa6a684ec36c15" + version "1.4.7" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" + integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== dependencies: - querystringify "^2.0.0" + querystringify "^2.1.1" requires-port "^1.0.0" -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" +url-template@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" + integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= dependencies: punycode "1.3.2" querystring "0.2.0" @@ -10166,58 +11486,74 @@ url@^0.11.0: use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== -useragent@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.2.1.tgz#cf593ef4f2d175875e8bb658ea92e18a4fd06d8e" +useragent@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" + integrity sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw== dependencies: - lru-cache "2.2.x" + lru-cache "4.1.x" tmp "0.0.x" -util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= util.promisify@1.0.0, util.promisify@^1.0.0, util.promisify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== dependencies: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" -util@0.10.3, util@^0.10.3: +util@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= dependencies: inherits "2.0.1" -utila@~0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" +util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== + dependencies: + inherits "2.0.3" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + dependencies: + inherits "2.0.3" -utila@~0.4: +utila@^0.4.0, utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.0.1, uuid@^3.3.2: +uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== -uws@~9.14.0: - version "9.14.0" - resolved "https://registry.yarnpkg.com/uws/-/uws-9.14.0.tgz#fac8386befc33a7a3705cbd58dc47b430ca4dd95" - -v8-compile-cache@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c" +v8-compile-cache@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" + integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" @@ -10225,276 +11561,342 @@ validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: validate-npm-package-name@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" + integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= dependencies: builtins "^1.0.3" -vega-canvas@^1.0.1, vega-canvas@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vega-canvas/-/vega-canvas-1.1.0.tgz#99ce74d4510a46fc9ed1a8721014da725898ec9f" +vega-canvas@^1.2.0, vega-canvas@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/vega-canvas/-/vega-canvas-1.2.1.tgz#ee0586e2a1f096f6a5d1710df61ef501562c2bd4" + integrity sha512-k/S3EPeJ37D7fYDhv4sEg7fNWVpLheQY7flfLyAmJU7aSwCMgw8cZJi0CKHchJeculssfH+41NCqvRB1QtaJnw== -vega-crossfilter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/vega-crossfilter/-/vega-crossfilter-3.0.0.tgz#390f4c380a9c6018bf89700c38c08d16cd95607a" +vega-crossfilter@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/vega-crossfilter/-/vega-crossfilter-4.0.1.tgz#9fab0dc5445e846d732c83ac2b5a72225bc6fdf1" + integrity sha512-wLNS4JzKaOLj8EAzI/v8XBJjUWMRWYSu6EeQF4o9Opq/78u87Ol9Lc5I27UHsww5dNNH/tHubAV4QPIXnGOp5Q== dependencies: - d3-array "^1.2.1" - vega-dataflow "^4.0.0" - vega-util "^1.7.0" + d3-array "^2.0.3" + vega-dataflow "^5.1.0" + vega-util "^1.8.0" -vega-dataflow@^4.0.0, vega-dataflow@^4.0.3, vega-dataflow@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/vega-dataflow/-/vega-dataflow-4.0.4.tgz#e2f4b4805618d01c0b833a93484d3c244675fba3" +vega-dataflow@^5.1.0, vega-dataflow@^5.1.1, vega-dataflow@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/vega-dataflow/-/vega-dataflow-5.2.1.tgz#82aa6a2aca5c61a6924b4561b6e3ab51bd473f8f" + integrity sha512-Yer0BlKVemxrlPwDF1p1z/dcMQZdzJNPAoVmp58GQsp4EyS4zW6yFOnMrLAxvU2SU6hywNbtL+7PBDVzzffgNw== dependencies: - vega-loader "^3.0.1" - vega-util "^1.7.0" + vega-loader "^4.0.0" + vega-util "^1.10.0" -vega-embed@3.18.2: - version "3.18.2" - resolved "https://registry.yarnpkg.com/vega-embed/-/vega-embed-3.18.2.tgz#296fec71455bfcaff19a2adb56bf1155851a50ae" +vega-embed@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/vega-embed/-/vega-embed-4.2.0.tgz#59e8478faa6e1e33d0eb601a5b98be9b79d4c4ad" + integrity sha512-+WaCaoESZBnF80OiA3UUTO/2qlruj5iTyK1mXYIqdfygEldFLQSZS1DSbLwy0m6BlTZz7mkEWMIe6cX4/P3ufw== dependencies: - d3-selection "^1.3.0" - json-stringify-pretty-compact "^1.2.0" - semver "^5.5.0" - vega-lib "^4.0.0 || ^3.3.0" - vega-lite "^2.6.0" + d3-selection "^1.4.0" + json-stringify-pretty-compact "^2.0.0" + semver "^6.0.0" vega-schema-url-parser "^1.1.0" - vega-themes "^2.1.1" - vega-tooltip "^0.12.0" - -vega-encode@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/vega-encode/-/vega-encode-3.1.4.tgz#ecf1bdeb7a01bc07ed86fb0bfb6ae32d34f6279b" - dependencies: - d3-array "^1.2.1" - d3-format "^1.3.0" - d3-interpolate "^1.2.0" - vega-dataflow "^4.0.3" - vega-scale "^2.4.0" - vega-util "^1.7.0" + vega-themes "^2.3.0" + vega-tooltip "^0.17.0" -vega-event-selector@^2.0.0: +vega-encode@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/vega-encode/-/vega-encode-4.3.0.tgz#cf719c052e6dc63ee260941bdb7c4c1ee71cd0fb" + integrity sha512-Ha8NsjAL6ZOhYTxGLXtwGQE+SdtImMXU+IX/zJswTGOJspXgeLw/HTRFKlsIxuI+jRv+paDEIvhGTedROnLQ+Q== + dependencies: + d3-array "^2.0.3" + d3-format "^1.3.2" + d3-interpolate "^1.3.2" + d3-time-format "^2.1.3" + vega-dataflow "^5.1.1" + vega-scale "^4.1.1" + vega-util "^1.8.0" + +vega-event-selector@^2.0.0, vega-event-selector@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/vega-event-selector/-/vega-event-selector-2.0.0.tgz#6af8dc7345217017ceed74e9155b8d33bad05d42" + integrity sha512-EZeStM/7LNfJiRuop0lvhOR52Q1l9i/EIYUnm/XddhjR+UqhPkeCmZcffMTr41z3aGm/zciVLlKanUWNT+jQ1A== -vega-expression@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/vega-expression/-/vega-expression-2.3.1.tgz#d802a329190bdeb999ce6d8083af56b51f686e83" +vega-expression@^2.5.0, vega-expression@^2.6.0, vega-expression@~2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/vega-expression/-/vega-expression-2.6.0.tgz#9955887b53b05da8e1d101c41a7ddce414edfb6d" + integrity sha512-c2FFrIfKtlTtLCR3BnZDm6O2ey7u+5YRukLnNobRe+hoiqeH86C2+FkjXotE63cYGj39R5OS+SK+VBSDz3bmVw== dependencies: - vega-util "1" + vega-util "^1.8.0" -vega-force@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/vega-force/-/vega-force-3.0.0.tgz#f5d10bb0a49e41c47f2d83441e407510948eb89a" +vega-force@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/vega-force/-/vega-force-4.0.1.tgz#8b4f25701db132b75c2388a62665b1dc761181c9" + integrity sha512-b+gOZCon0Odg7RQg5q9NHFHPrB9/pLiZrNqlEaFHXXXmqlMBCz0BjrFxaP7FkXwIxG2Z4bef70Ly6aLyzm/m3A== dependencies: - d3-force "^1.1.0" - vega-dataflow "^4.0.0" - vega-util "^1.7.0" + d3-force "^2.0.0" + vega-dataflow "^5.1.0" + vega-util "^1.8.0" -vega-geo@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/vega-geo/-/vega-geo-3.1.0.tgz#2022f0dc612199585b10d2274967fee94d7505b4" +vega-functions@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/vega-functions/-/vega-functions-5.3.0.tgz#b80b61e6fe6e6a5d07be42dd0dc966cc14039420" + integrity sha512-zutwlCVU9+HZgUnUfwzOuWksdZFpSM4gPijeSrNDM51KnE7LZivcRCgOjQA9vN0lV0GPhoF/7mcBPIrS2YqENw== + dependencies: + d3-array "^2.0.3" + d3-color "^1.2.3" + d3-format "^1.3.2" + d3-geo "^1.11.3" + d3-time-format "^2.1.3" + vega-dataflow "^5.2.1" + vega-expression "^2.6.0" + vega-scale "^4.0.0" + vega-scenegraph "^4.0.0" + vega-selections "^5.0.0" + vega-statistics "^1.3.0" + vega-util "^1.9.0" + +vega-geo@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/vega-geo/-/vega-geo-4.0.3.tgz#5fe940a70c8e64e456ef453acd27ea368900aa63" + integrity sha512-ZlOJ607JF/qp/Zx2nSCvJXpfbmOsf+BN1+JzQneUan1yhdAQvbtcJ8mInTQo8QRElRHVw8kBot15SUYf8gQHAA== dependencies: - d3-array "^1.2.1" - d3-contour "^1.3.0" - d3-geo "^1.10.0" - vega-dataflow "^4.0.3" - vega-projection "^1.2.0" - vega-util "^1.7.0" + d3-array "^2.0.3" + d3-contour "^1.3.2" + d3-geo "^1.11.3" + vega-dataflow "^5.1.1" + vega-projection "^1.2.1" + vega-util "^1.8.0" -vega-hierarchy@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/vega-hierarchy/-/vega-hierarchy-3.0.3.tgz#0003ed59eacdba70256a00c9c39e1643424662ec" +vega-hierarchy@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/vega-hierarchy/-/vega-hierarchy-4.0.1.tgz#7abcd4725a77b573bc0f2e3700ce1f55f3e0fb99" + integrity sha512-LBkgnltUIkQJZ4s9P6geQe+zVRtdDTZ6dDr0RoR+NVMPIxuyCrGgWiuGLEPq0HDMdR8Oc+UAfl3x1nsHe8Zdkw== dependencies: - d3-collection "^1.0.4" - d3-hierarchy "^1.1.6" - vega-dataflow "^4.0.4" - vega-util "^1.7.0" + d3-hierarchy "^1.1.8" + vega-dataflow "^5.1.0" + vega-util "^1.8.0" -"vega-lib@^4.0.0 || ^3.3.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/vega-lib/-/vega-lib-4.2.0.tgz#78adc086c7b0230da5b41c3fdfc0202b48e228fa" +vega-lite@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-3.2.1.tgz#d9aa3edbfd0886cedebe606f070bbf5c33998ba7" + integrity sha512-Q8ZWodSo5Q3ovLrtqHt9nR7ooRnN9rJzT74JKDPcyGTwqV6kpqFApQxyHYfIj4s4CAZs4pGdpBQaa2M4pKVeyw== + dependencies: + "@types/clone" "~0.1.30" + "@types/fast-json-stable-stringify" "^2.0.0" + clone "~2.1.2" + fast-deep-equal "~2.0.1" + fast-json-stable-stringify "~2.0.0" + json-stringify-pretty-compact "~2.0.0" + tslib "~1.9.3" + vega-event-selector "~2.0.0" + vega-expression "~2.6.0" + vega-typings "0.6.2" + vega-util "~1.10.0" + yargs "~13.2.2" + +vega-loader@^4.0.0, vega-loader@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/vega-loader/-/vega-loader-4.1.0.tgz#27d6f8256aa0dfc991721083e0cc60d7fe866eef" + integrity sha512-YpscMiGGvhnEp811zM8y4TH39VAhWVU1gOUCeovheMLDHzMK31uydYqfyGHPVjWTbfFDmLzcMceJ6hsUMiZmNA== dependencies: - vega-crossfilter "^3.0.0" - vega-dataflow "^4.0.4" - vega-encode "^3.1.4" - vega-event-selector "^2.0.0" - vega-expression "^2.3.1" - vega-force "^3.0.0" - vega-geo "^3.1.0" - vega-hierarchy "^3.0.3" - vega-loader "^3.0.1" - vega-parser "^3.7.2" - vega-projection "^1.2.0" - vega-runtime "^3.1.0" - vega-scale "^2.4.0" - vega-scenegraph "^3.2.2" - vega-statistics "^1.2.1" - vega-transforms "^2.2.0" - vega-typings "*" - vega-util "^1.7.0" - vega-view "^3.3.3" - vega-view-transforms "^2.0.2" - vega-voronoi "^3.0.0" - vega-wordcloud "^3.0.0" - -vega-lite@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-2.6.0.tgz#ce79c2db0311b0b920afdf2cd7384556a334e2f0" + d3-dsv "^1.1.1" + d3-time-format "^2.1.3" + node-fetch "^2.5.0" + topojson-client "^3.0.0" + vega-util "^1.8.0" + +vega-parser@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/vega-parser/-/vega-parser-5.7.0.tgz#905389ce2f9a1400860f4f948b0a1bff66a501b9" + integrity sha512-CIfyLkTEnWm5J3MZMovKhyMlX6LWkXF3kJQ7ENkGWtdaZ/c+2OBjtMFhwPsRW28Cci9VO5g+yboRfmxLV2rd6A== dependencies: - "@types/json-stable-stringify" "^1.0.32" - json-stable-stringify "^1.0.1" - tslib "^1.9.2" + vega-dataflow "^5.2.1" vega-event-selector "^2.0.0" - vega-typings "^0.3.17" - vega-util "^1.7.0" - yargs "^11.0.0" + vega-expression "^2.6.0" + vega-functions "^5.3.0" + vega-scale "^4.1.1" + vega-util "^1.10.0" -vega-loader@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/vega-loader/-/vega-loader-3.0.1.tgz#728426b54e74de7dbc91d418e05230bc7ee23a88" +vega-projection@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/vega-projection/-/vega-projection-1.2.1.tgz#f3425238fadab0b875f2ce92e5bba9dfc983f367" + integrity sha512-7ouWSDdBV8kBQFA26RHUtp39DDO7g3NcEJlhhBywvCQ0nEtqZinERW3bIOxVxZ5H1OKkmhBrxQUPHok2AC06aA== dependencies: - d3-dsv "^1.0.8" - d3-time-format "^2.1.1" - node-fetch "^2.1.2" - topojson-client "^3.0.0" - vega-util "^1.7.0" - -vega-parser@^3.7.0, vega-parser@^3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/vega-parser/-/vega-parser-3.7.2.tgz#03b7ce1bcf4cb3edd2f81576937023a2ffac167d" - dependencies: - d3-array "^1.2.1" - d3-color "^1.2.0" - d3-format "^1.3.0" - d3-geo "^1.10.0" - d3-time-format "^2.1.1" - vega-dataflow "^4.0.4" - vega-event-selector "^2.0.0" - vega-expression "^2.3.1" - vega-scale "^2.4.0" - vega-scenegraph "^3.2.2" - vega-statistics "^1.2.1" - vega-util "^1.7.0" + d3-geo "^1.11.3" -vega-projection@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vega-projection/-/vega-projection-1.2.0.tgz#812c955251dab495fda83d9406ba72d9833a2014" +vega-regression@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vega-regression/-/vega-regression-1.0.0.tgz#4c029862edb192be8c0bbd5d19267271877524aa" + integrity sha512-jNK3aDfM4cHImNvcR5jZHkIpWNr0/HUpxq71xhtjQ98qgmGBoSeUptuRXC4emJd9pRGuyj3vwrkUP4NcbIIIQw== dependencies: - d3-geo "^1.10.0" + d3-array "^2.0.3" + vega-dataflow "^5.2.1" + vega-statistics "^1.4.0" + vega-util "^1.10.0" -vega-runtime@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/vega-runtime/-/vega-runtime-3.1.0.tgz#c8bd3d65bef28cae0b1bbc8ddfbcd6b76e5e6013" +vega-runtime@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/vega-runtime/-/vega-runtime-5.0.1.tgz#27660ab48fc94e41790a9545b869adae197ffe5c" + integrity sha512-Aopn4CSMMKOO0pGrvtFShSiW5OJ6I7caumx3wWARAn8E6WISZTp4ORorTMwGOav4GQcg+aG/FREORHjkKCpyFA== dependencies: - vega-dataflow "^4.0.4" - vega-util "^1.7.0" + vega-dataflow "^5.1.0" + vega-util "^1.8.0" -vega-scale@^2.1.1, vega-scale@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/vega-scale/-/vega-scale-2.4.0.tgz#184b11979e643463ed45dfae9142e42b5a35eecc" +vega-scale@^4.0.0, vega-scale@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/vega-scale/-/vega-scale-4.1.1.tgz#32c93a1d4ec430c415d70ef6ce2af01c7de85384" + integrity sha512-mFGsSUuDrGT9MYRyWinwqla9u06w3/DAEJQrBqFFaL6g7BSggW/y2SiA+RyDdGQf2gU7VfunkaCK9Jt7I768rw== dependencies: - d3-array "^1.2.1" - d3-interpolate "^1.2.0" - d3-scale "^2.1.0" - d3-scale-chromatic "^1.3.0" - d3-time "^1.0.8" - vega-util "^1.7.0" + d3-array "^2.0.3" + d3-interpolate "^1.3.2" + d3-scale "^3.0.0" + d3-time "^1.0.11" + vega-util "^1.10.0" -vega-scenegraph@^3.2.1, vega-scenegraph@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/vega-scenegraph/-/vega-scenegraph-3.2.2.tgz#6ed5f37f637c7e5eed702621eacc68b1c6ed4cdb" +vega-scenegraph@^4.0.0, vega-scenegraph@^4.1.0, vega-scenegraph@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/vega-scenegraph/-/vega-scenegraph-4.2.0.tgz#b143fcce8a2acc40adcba953c2cf0706c701f75d" + integrity sha512-q1T6PWM9gKjP3/kWy3VSuXiHV0tUz1oMKSwIWl2u36ZscEpL6EzLTHSOWbKx3gyqJNoYr1dAKNdj2nxj10uWWQ== dependencies: - d3-path "^1.0.5" - d3-shape "^1.2.0" - vega-canvas "^1.1.0" - vega-loader "^3.0.1" - vega-util "^1.7.0" + d3-path "^1.0.7" + d3-shape "^1.3.5" + vega-canvas "^1.2.1" + vega-loader "^4.0.0" + vega-util "^1.8.0" vega-schema-url-parser@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/vega-schema-url-parser/-/vega-schema-url-parser-1.1.0.tgz#39168ec04e5468ce278a06c16ec0d126035a85b5" + integrity sha512-Tc85J2ofMZZOsxiqDM9sbvfsa+Vdo3GwNLjEEsPOsCDeYqsUHKAlc1IpbbhPLZ6jusyM9Lk0e1izF64GGklFDg== -vega-statistics@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/vega-statistics/-/vega-statistics-1.2.1.tgz#a35b3fc3d0039f8bb0a8ba1381d42a1df79ecb34" +vega-selections@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vega-selections/-/vega-selections-5.0.0.tgz#26c915103c1359b61dfcff6743e16087d6985c99" + integrity sha512-x5QVF6sBLmvpEWUUIzUqxvvQZTdaj/SzIUtO4SGhvKylBpAWpb0Qyt/GKZ6FZc8FVcH55CQj5uvpre828tjO2Q== dependencies: - d3-array "1" + vega-expression "^2.5.0" + vega-util "^1.8.0" -vega-themes@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/vega-themes/-/vega-themes-2.1.1.tgz#27878fe2cec0dc5340ab42c0cadb4f7dec9549fc" +vega-statistics@^1.2.5, vega-statistics@^1.3.0, vega-statistics@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/vega-statistics/-/vega-statistics-1.4.0.tgz#e96b4d3c87f0b72ad88ef62ed4c6f4a610c62f92" + integrity sha512-FdkM8fGJf1zFgpmAD3wE4eWrGgDphE0uZze20Lv5x3s2pAamtYhQV3m36Hd7R+5UFFljiAkspNrGjG9HlFPNVQ== dependencies: - vega-typings "^0.3.4" + d3-array "^2.0.3" -vega-tooltip@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/vega-tooltip/-/vega-tooltip-0.12.0.tgz#014b21b08ea5fe14eb59c9b6643614c77a3b3e47" - dependencies: - vega-util "^1.7.0" +vega-themes@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/vega-themes/-/vega-themes-2.3.0.tgz#d0a5a3f16af4baeae3e4f43a0b65d7c5479805b1" + integrity sha512-C33RC/oB7NAMgAMdfiKy3Akwbn2uaTJSpmS3sRdiThbQxdhyh+iwc+horG4DWK7zYwJa8tITGbXknYoJXPkdIA== -vega-transforms@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/vega-transforms/-/vega-transforms-2.2.0.tgz#5f427632abf6d4226249435fadf0b8d7d74e79bc" +vega-tooltip@^0.17.0: + version "0.17.0" + resolved "https://registry.yarnpkg.com/vega-tooltip/-/vega-tooltip-0.17.0.tgz#16bb5b57fb727823bb15f4ca4e350622471db2b9" + integrity sha512-/Ha3ho2xZ8N22dCfGg76gpaqyXqwrJBO3X+3H7so73xjIFW0iwHrZeMN0O6zxt5wefdp2+0I+91V4mWjWcP4ng== dependencies: - d3-array "^1.2.1" - vega-dataflow "^4.0.4" - vega-statistics "^1.2.1" - vega-util "^1.7.0" + vega-util "^1.10.0" -vega-typings@*, vega-typings@^0.3.17, vega-typings@^0.3.4: - version "0.3.46" - resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.3.46.tgz#85a402d546d3060070fc0bfc627d2e61f1b14ee1" +vega-transforms@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/vega-transforms/-/vega-transforms-4.1.0.tgz#6d06fd51441ac0985ac893edc5a74f48ab969f7c" + integrity sha512-U9rWIZifFbn0AwENyYh/A2JVv9a7KUdovvatu/AfEAe5rEos2UKSVx0n2KRf+N1dmNgyN0Hc/SNfF8/RijmbLQ== dependencies: - vega-util "^1.7.0" + d3-array "^2.0.3" + vega-dataflow "^5.2.1" + vega-statistics "^1.4.0" + vega-util "^1.10.0" -vega-util@1, vega-util@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.7.0.tgz#0ca0512bb8dcc6541165c34663d115d0712e0cf1" +vega-typings@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.6.2.tgz#2951bf7a4208a5aca3aa8e1316c4df81e759b02b" + integrity sha512-k1VBtlj+Ls8cgl1zvdUD6iX7YGsxkHSWmeG0C8DGOxKU7Q3imOCb7uUytexVjVKuWqwCrMnmNTYspelgLBMO+Q== + dependencies: + vega-util "^1.10.0" -vega-view-transforms@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/vega-view-transforms/-/vega-view-transforms-2.0.2.tgz#5c2877bb9e7ebef296f740b60c5e1612d2666dcd" +vega-typings@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.7.1.tgz#c4e5f65eeee4fb64b1a2b14dee426d1b26a02a40" + integrity sha512-YRjmcszidnncThmv3UnectLTw6oN/Wg9crx62JC0bA/NhLl4aWuaWTQvikr87l7cGWfKR3Qh9fQgRRhgJ22CPw== dependencies: - vega-dataflow "^4.0.3" - vega-scenegraph "^3.2.1" - vega-util "^1.7.0" + vega-util "^1.10.0" -vega-view@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/vega-view/-/vega-view-3.3.3.tgz#aa811775fe5f171620bc2f5357d3de1585e4ce12" +vega-util@^1.10.0, vega-util@^1.8.0, vega-util@^1.9.0, vega-util@~1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.10.0.tgz#edfd8c04f1d269f903976c228820153902c270d4" + integrity sha512-fTGnTG7FhtTG9tiYDL3k5s8YHqB71Ml5+aC9B7eaBygeB8GKXBrcbTXLOzoCRxT3Jr5cRhr99PMBu0AkqmhBog== + +vega-view-transforms@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/vega-view-transforms/-/vega-view-transforms-4.3.1.tgz#2c9529b9c5efc15221fea43d6440e28031149353" + integrity sha512-myhG7Y3oCvAKpu9hjdlFoiJmAZAQ0SChDZ0fmR01eBjP9XMw2D9E3+VJKpdWzfJfyfKW0c+505FZBQ9QW4YQgg== dependencies: - d3-array "^1.2.1" - d3-timer "^1.0.7" - vega-dataflow "^4.0.4" - vega-parser "^3.7.0" - vega-runtime "^3.1.0" - vega-scenegraph "^3.2.1" - vega-util "^1.7.0" + vega-dataflow "^5.1.1" + vega-scenegraph "^4.1.0" + vega-util "^1.8.0" -vega-voronoi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/vega-voronoi/-/vega-voronoi-3.0.0.tgz#e83d014c0d8d083592d5246122e3a9d4af0ce434" +vega-view@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/vega-view/-/vega-view-5.2.2.tgz#8a29f53382b55ea2ff02fb58ea02f919aedba046" + integrity sha512-9YWepeLgr+15MQPCV3B5JsRWiOTieUL8/p227cmHpBlm7Lt8HEnqihsIhskAEPGDx6/zENSn01arv+54k3qIiQ== + dependencies: + d3-array "^2.0.3" + d3-timer "^1.0.9" + vega-dataflow "^5.2.1" + vega-functions "^5.3.0" + vega-runtime "^5.0.1" + vega-scenegraph "^4.2.0" + vega-util "^1.10.0" + +vega-voronoi@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/vega-voronoi/-/vega-voronoi-4.0.1.tgz#876e24c869d2f4902bc634b445efbb8a41850495" + integrity sha512-z1iALPb4w5ftM0TaCuRJL1ihkjxWE3RNo/KgkZel/KLrOUn+M8Gt6YghkLrtbNwA/2/khy2rqkarf0KGCZpl/Q== dependencies: - d3-voronoi "^1.1.2" - vega-dataflow "^4.0.0" - vega-util "^1.7.0" + d3-voronoi "^1.1.4" + vega-dataflow "^5.1.0" + vega-util "^1.8.0" -vega-wordcloud@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/vega-wordcloud/-/vega-wordcloud-3.0.0.tgz#3843d5233673a36a93f78c849d3c7568c1cdc2ce" +vega-wordcloud@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/vega-wordcloud/-/vega-wordcloud-4.0.2.tgz#6e6f711e83195f764e1b0ace80f98091af94a3a6" + integrity sha512-nV9bRKjRGcmcQV5wXvOvWes4T5937t3RF+Rm1d03YVAzZpOcVKk9uBuVSeFYBLX2XcDBVe4HK54qDoOTFftHMw== dependencies: - vega-canvas "^1.0.1" - vega-dataflow "^4.0.0" - vega-scale "^2.1.1" - vega-statistics "^1.2.1" - vega-util "^1.7.0" + vega-canvas "^1.2.0" + vega-dataflow "^5.1.1" + vega-scale "^4.0.0" + vega-statistics "^1.2.5" + vega-util "^1.8.0" -vendors@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.2.tgz#7fcb5eef9f5623b156bcea89ec37d63676f21801" +vega@^5.3.5: + version "5.4.0" + resolved "https://registry.yarnpkg.com/vega/-/vega-5.4.0.tgz#62fb18de7cb3477a3914aa2f7b98197958c0fd2e" + integrity sha512-1c77yse5ZOYXgVig5RjJCWwM8yHvY1Ds7ncusiT1Hu3wXVhOw8TKe2CLCbcOpWSmPRJ48BRw/6qF70iS4zWYAQ== + dependencies: + vega-crossfilter "^4.0.1" + vega-dataflow "^5.2.1" + vega-encode "^4.3.0" + vega-event-selector "^2.0.0" + vega-expression "^2.6.0" + vega-force "^4.0.1" + vega-functions "^5.3.0" + vega-geo "^4.0.3" + vega-hierarchy "^4.0.1" + vega-loader "^4.1.0" + vega-parser "^5.7.0" + vega-projection "^1.2.1" + vega-regression "^1.0.0" + vega-runtime "^5.0.1" + vega-scale "^4.1.1" + vega-scenegraph "^4.2.0" + vega-statistics "^1.4.0" + vega-transforms "^4.1.0" + vega-typings "^0.7.0" + vega-util "^1.10.0" + vega-view "^5.2.2" + vega-view-transforms "^4.3.1" + vega-voronoi "^4.0.1" + vega-wordcloud "^4.0.2" verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" @@ -10503,41 +11905,40 @@ verror@1.10.0: vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM= dependencies: indexof "0.0.1" void-elements@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= w3c-hr-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" + integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= dependencies: browser-process-hrtime "^0.1.2" -walker@~1.0.5: +walker@^1.0.7, walker@~1.0.5: version "1.0.7" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= dependencies: makeerror "1.0.x" -warning@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" +warning@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== dependencies: loose-envify "^1.0.0" -watch@~0.18.0: - version "0.18.0" - resolved "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" - dependencies: - exec-sh "^0.2.0" - minimist "^1.2.0" - watch@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/watch/-/watch-1.0.2.tgz#340a717bde765726fa0aa07d721e0147a551df0c" + integrity sha1-NApxe952Vyb6CqB9ch4BR6VR3ww= dependencies: exec-sh "^0.2.0" minimist "^1.2.0" @@ -10545,6 +11946,7 @@ watch@~1.0.2: watchpack@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" + integrity sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== dependencies: chokidar "^2.0.2" graceful-fs "^4.1.2" @@ -10553,48 +11955,66 @@ watchpack@^1.5.0: wcwidth@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= dependencies: defaults "^1.0.3" webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-cli@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.1.0.tgz#d71a83687dcfeb758fdceeb0fe042f96bcf62994" +webpack-cli@^3.3.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.2.tgz#aed2437b0db0a7faa2ad28484e166a5360014a91" + integrity sha512-FLkobnaJJ+03j5eplxlI0TUxhGCOdfewspIGuvDVtpOlrAuKMFC57K42Ukxqs1tn8947/PM6tP95gQc0DCzRYA== dependencies: chalk "^2.4.1" cross-spawn "^6.0.5" - enhanced-resolve "^4.0.0" - global-modules-path "^2.1.0" - import-local "^1.0.0" - inquirer "^6.0.0" + enhanced-resolve "^4.1.0" + findup-sync "^2.0.0" + global-modules "^1.0.0" + import-local "^2.0.0" interpret "^1.1.0" loader-utils "^1.1.0" - supports-color "^5.4.0" - v8-compile-cache "^2.0.0" - yargs "^12.0.1" + supports-color "^5.5.0" + v8-compile-cache "^2.0.2" + yargs "^12.0.5" -webpack-dev-middleware@^1.12.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" +webpack-dev-middleware@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz#a51692801e8310844ef3e3790e1eacfe52326fd4" + integrity sha512-tj5LLD9r4tDuRIDa5Mu9lnY2qBBehAITv6A9irqXhw/HQquZgTx3BCd57zYbU2gMDnncA49ufK2qVQSbaKJwOw== dependencies: + loud-rejection "^1.6.0" memory-fs "~0.4.1" - mime "^1.5.0" + mime "^2.1.0" path-is-absolute "^1.0.0" range-parser "^1.0.3" - time-stamp "^2.0.0" + url-join "^2.0.2" + webpack-log "^1.0.1" + +webpack-log@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-1.2.0.tgz#a4b34cda6b22b518dbb0ab32e567962d5c72a43d" + integrity sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA== + dependencies: + chalk "^2.1.0" + log-symbols "^2.1.0" + loglevelnext "^1.0.1" + uuid "^3.1.0" -webpack-merge@^4.1.1: - version "4.1.4" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.4.tgz#0fde38eabf2d5fd85251c24a5a8c48f8a3f4eb7b" +webpack-merge@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.1.tgz#5e923cf802ea2ace4fd5af1d3247368a633489b4" + integrity sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw== dependencies: lodash "^4.17.5" -webpack-sources@^1.0.1, webpack-sources@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.2.0.tgz#18181e0d013fce096faf6f8e6d41eeffffdceac2" +webpack-sources@^1.1.0, webpack-sources@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" + integrity sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== dependencies: source-list-map "^2.0.0" source-map "~0.6.1" @@ -10602,28 +12022,29 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0: webpack-visualizer-plugin@^0.1.11: version "0.1.11" resolved "https://registry.yarnpkg.com/webpack-visualizer-plugin/-/webpack-visualizer-plugin-0.1.11.tgz#b8770ad86b4f652612c68b1b782253faf9f8a34e" + integrity sha1-uHcK2GtPZSYSxosbeCJT+vn4o04= dependencies: d3 "^3.5.6" mkdirp "^0.5.1" react "^0.14.0" react-dom "^0.14.0" -webpack@~4.12.0: - version "4.12.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.12.2.tgz#d2b8418eb40cedcbf2c1f5905d23a99546011ce9" - dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-module-context" "1.5.12" - "@webassemblyjs/wasm-edit" "1.5.12" - "@webassemblyjs/wasm-opt" "1.5.12" - "@webassemblyjs/wasm-parser" "1.5.12" - acorn "^5.6.2" - acorn-dynamic-import "^3.0.0" +webpack@^4.32.2: + version "4.32.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.32.2.tgz#3639375364a617e84b914ddb2c770aed511e5bc8" + integrity sha512-F+H2Aa1TprTQrpodRAWUMJn7A8MgDx82yQiNvYMaj3d1nv3HetKU0oqEulL9huj8enirKi8KvEXQ3QtuHF89Zg== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-module-context" "1.8.5" + "@webassemblyjs/wasm-edit" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + acorn "^6.0.5" + acorn-dynamic-import "^4.0.0" ajv "^6.1.0" ajv-keywords "^3.1.0" chrome-trace-event "^1.0.0" - enhanced-resolve "^4.0.0" - eslint-scope "^3.7.1" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.0" json-parse-better-errors "^1.0.2" loader-runner "^2.3.0" loader-utils "^1.1.0" @@ -10632,33 +12053,38 @@ webpack@~4.12.0: mkdirp "~0.5.0" neo-async "^2.5.0" node-libs-browser "^2.0.0" - schema-utils "^0.4.4" - tapable "^1.0.0" - uglifyjs-webpack-plugin "^1.2.4" + schema-utils "^1.0.0" + tapable "^1.1.0" + terser-webpack-plugin "^1.1.0" watchpack "^1.5.0" - webpack-sources "^1.0.1" + webpack-sources "^1.3.0" whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.4.tgz#63fb016b7435b795d9025632c086a5209dbd2621" + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== dependencies: - iconv-lite "0.4.23" + iconv-lite "0.4.24" -whatwg-fetch@>=0.10.0, whatwg-fetch@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" +whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" + integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== whatwg-fetch@^0.9.0: version "0.9.0" - resolved "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz#0e3684c6cb9995b43efc9df03e4c365d95fd9cc0" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz#0e3684c6cb9995b43efc9df03e4c365d95fd9cc0" + integrity sha1-DjaExsuZlbQ+/J3wPkw2XZX9nMA= -whatwg-mimetype@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4" +whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== whatwg-url@^6.4.1: version "6.5.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.1" @@ -10667,75 +12093,105 @@ whatwg-url@^6.4.1: whatwg-url@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.1" webidl-conversions "^4.0.2" -when@^3.7.7: - version "3.7.8" - resolved "https://registry.yarnpkg.com/when/-/when-3.7.8.tgz#c7130b6a7ea04693e842cdc9e7a1f2aa39a39f82" - -whet.extend@~0.9.9: - version "0.9.9" - resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1, which@^1.1.1, which@^1.2.1, which@^1.2.10, which@^1.2.12, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@1, which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.10, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -wide-align@^1.1.0: +wide-align@1.1.3, wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== dependencies: string-width "^1.0.2 || 2" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -with-callback@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/with-callback/-/with-callback-1.0.2.tgz#a09629b9a920028d721404fb435bdcff5c91bc21" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +windows-release@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.2.0.tgz#8122dad5afc303d833422380680a79cdfa91785f" + integrity sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA== + dependencies: + execa "^1.0.0" wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -worker-farm@^1.5.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" +worker-farm@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" + integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== dependencies: errno "~0.1.7" +worker-rpc@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.1.tgz#cb565bd6d7071a8f16660686051e969ad32f54d5" + integrity sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg== + dependencies: + microevent.ts "~0.1.1" + wrap-ansi@^2.0.0: version "2.1.0" - resolved "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" + integrity sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo= + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" +write-file-atomic@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" + integrity sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-file-atomic@^2.0.0, write-file-atomic@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.2.tgz#a7181706dfba17855d221140a9c06e15fcdd87b9" + integrity sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" @@ -10744,6 +12200,7 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: write-json-file@^2.2.0, write-json-file@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" + integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= dependencies: detect-indent "^5.0.0" graceful-fs "^4.1.2" @@ -10755,145 +12212,214 @@ write-json-file@^2.2.0, write-json-file@^2.3.0: write-pkg@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.2.0.tgz#0e178fe97820d389a8928bc79535dbe68c2cff21" + integrity sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw== dependencies: sort-keys "^2.0.0" write-json-file "^2.2.0" -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== dependencies: mkdirp "^0.5.1" -ws@^5.1.1, ws@^5.2.0: +ws@^5.2.0: version "5.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== dependencies: async-limiter "~1.0.0" +ws@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + +ws@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.0.0.tgz#79351cbc3f784b3c20d0821baf4b4ff809ffbf51" + integrity sha512-cknCal4k0EAOrh1SHHPPWWh4qm93g1IuGGGwBjWkXmCG7LsDtL8w9w+YVfaF+KSVwiHQKDIMsSLBVftKf9d1pg== + dependencies: + async-limiter "^1.0.0" + ws@~3.3.1: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== dependencies: async-limiter "~1.0.0" safe-buffer "~5.1.0" ultron "~1.1.0" -ws@~6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/ws/-/ws-6.0.0.tgz#eaa494aded00ac4289d455bac8d84c7c651cef35" - dependencies: - async-limiter "~1.0.0" - xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== xml@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= xmlhttprequest-ssl@~1.5.4: version "1.5.5" resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" - -xregexp@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943" - -xregexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" + integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= -xterm@~3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.10.1.tgz#14accf92772e5a6728f317a3c209ba714b73c8b5" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" +xterm@~3.13.2: + version "3.13.2" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.13.2.tgz#987c3a7fe3d23d6c03ce0eaf06c0554c38935570" + integrity sha512-4utKoF16/pzH6+EkFaaay+qPCozf5RP2P0JuH6rvIGHY0CRwgU2LwbQ/24DY+TvaZ5m+kwvIUvPqIBoMZYfgOg== "y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= yallist@^3.0.0, yallist@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== -yargs-parser@^10.0.0, yargs-parser@^10.1.0: +yargs-parser@10.x: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== dependencies: camelcase "^4.1.0" -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" +yargs-parser@13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.0.0.tgz#3fc44f3e76a8bdb1cc3602e860108602e5ccde8b" + integrity sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw== dependencies: - camelcase "^4.1.0" + camelcase "^5.0.0" + decamelize "^1.2.0" -yargs@^11.0.0: - version "11.1.0" - resolved "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" +yargs-parser@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" + integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^13.0.0, yargs-parser@^13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.0.tgz#7016b6dd03e28e1418a510e258be4bff5a31138f" + integrity sha512-Yq+32PrijHRri0vVKQEm+ys8mbqWjLiwQkMFNXEENutzLPP0bE4Lcd4iA3OQY5HF+GD3xXxf0MEHb8E4/SA3AA== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-unparser@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.5.0.tgz#f2bb2a7e83cbc87bb95c8e572828a06c9add6e0d" + integrity sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw== + dependencies: + flat "^4.1.0" + lodash "^4.17.11" + yargs "^12.0.5" + +yargs@13.2.2: + version "13.2.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.2.tgz#0c101f580ae95cea7f39d927e7770e3fdc97f993" + integrity sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA== dependencies: cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" require-directory "^2.1.1" - require-main-filename "^1.0.1" + require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^2.0.0" + string-width "^3.0.0" which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" + y18n "^4.0.0" + yargs-parser "^13.0.0" -yargs@^12.0.1: - version "12.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.1.tgz#6432e56123bb4e7c3562115401e98374060261c2" +yargs@^12.0.1, yargs@^12.0.2, yargs@^12.0.5: + version "12.0.5" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" + integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== dependencies: cliui "^4.0.0" - decamelize "^2.0.0" + decamelize "^1.2.0" find-up "^3.0.0" get-caller-file "^1.0.1" - os-locale "^2.0.0" + os-locale "^3.0.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" string-width "^2.0.0" which-module "^2.0.0" y18n "^3.2.1 || ^4.0.0" - yargs-parser "^10.1.0" + yargs-parser "^11.1.1" -yargs@~3.10.0: - version "3.10.0" - resolved "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" +yargs@~13.2.2: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yarn-deduplicate@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/yarn-deduplicate/-/yarn-deduplicate-1.1.1.tgz#19b4a87654b66f55bf3a4bd6b153b4e4ab1b6e6d" + integrity sha512-2FDJ1dFmtvqhRmfja89ohYzpaheCYg7BFBSyaUq+kxK0y61C9oHv1XaQovCWGJtP2WU8PksQOgzMVV7oQOobzw== dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" + "@yarnpkg/lockfile" "^1.1.0" + commander "^2.10.0" + semver "^5.3.0" -yarn@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.6.0.tgz#9cec6f7986dc237d39ec705ce74d95155fe55d4b" +yarn@1.15.2: + version "1.15.2" + resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.15.2.tgz#7a064ca81ca34235f16376ad2f796ed432f9e285" + integrity sha512-DhqaGe2FcYKduO42d2hByXk7y8k2k42H3uzYdWBMTvcNcgWKx7xCkJWsVAQikXvaEQN2GyJNrz8CboqUmaBRrw== yauzl@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + integrity sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU= dependencies: fd-slicer "~1.0.1" yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" + integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk= + +yup@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/yup/-/yup-0.27.0.tgz#f8cb198c8e7dd2124beddc2457571329096b06e7" + integrity sha512-v1yFnE4+u9za42gG/b/081E7uNW9mUj3qtkmelLbW5YPROZzSH/KUUyJu9Wt8vxFJcT9otL/eZopS0YK1L5yPQ== + dependencies: + "@babel/runtime" "^7.0.0" + fn-name "~2.0.1" + lodash "^4.17.11" + property-expr "^1.5.0" + synchronous-promise "^2.0.6" + toposort "^2.0.2"